Commit Graph

283 Commits

Author SHA1 Message Date
diego 5910188a5e Fix illegal identifier: Rename _ftype_t macro to FLOAT_TYPE.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26382 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-04-10 10:01:54 +00:00
diego 1e18468ce0 Remove useless #include.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26377 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-04-09 18:20:22 +00:00
diego dc8d47d1eb Merge libaf/Makefile into Makefile, one less instance of recursive make.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26376 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-04-09 18:15:21 +00:00
diego f8b6baa57e Remove some useless quotes from #error preprocessor directives.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26375 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-04-09 18:05:57 +00:00
diego 6ae33bc013 Use quotes instead of angular brackets for local includes.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26374 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-04-09 18:02:05 +00:00
diego 0ce6d08a83 Handle af_ladspa conditional compilation in the usual way.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26373 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-04-09 17:23:59 +00:00
diego 37ea342f85 #include config.h before all other headers.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26235 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-03-14 16:46:13 +00:00
diego 62ac9600ba Add missing header #include to fix 'make checkheaders'.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26214 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-03-10 19:19:03 +00:00
diego d4ac911f0f af_export.c is only compiled if HAVE_SYS_MMAN_H is set, so using that
#ifdef within the file is pointless


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26213 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-03-10 19:12:29 +00:00
ulion 6b8b2a51e5 Fix ffvorbis decoder's output channel order with channel reordering function.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26164 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-03-05 02:46:50 +00:00
diego b355c3aa67 Add directory names to libavcodec #includes.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26152 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-03-03 19:32:15 +00:00
diego c03c4b5431 Wrap '#include <sys/mman.h>' in HAVE_SYS_MMAN_H.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26137 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-03-01 10:31:51 +00:00
diego 21c200e767 FFmpeg now uses different (unified) #include paths.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26101 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-02-25 15:46:36 +00:00
diego ae66c7536e Replace silly check for config.h inclusion, just include it.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26096 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-02-24 23:44:35 +00:00
diego 8efb2fa21c Add MPLAYER_ prefix to multiple inclusion guards.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26061 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-02-22 09:09:46 +00:00
diego c7577cd703 This header should not have multiple inclusion guards, it is meant
to be included multiple times.
patch by Alexander Stege  mplayer a legale-software d com


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26026 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-02-18 21:07:33 +00:00
diego 835c654bb0 typo fix: inited --> initialized
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25994 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-02-14 14:23:55 +00:00
ulion 85941859b2 Fix buffer overflow bug by calculate the buffer size accurately.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25670 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-11 10:15:46 +00:00
diego 2b6af2000b Add multiple inclusion guards to all header files that lack them.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25581 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-01 21:35:58 +00:00
diego baee7815d5 Replace multiple inclusion guards with leading underscores by default names.
Leading underscores are reserved for system identifiers.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25579 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-01 20:21:20 +00:00
diego fba0b66ff9 Add explanatory comments to the #endif part of multiple inclusion guards.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25563 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-31 16:15:50 +00:00
diego 496f7332a7 Relicense GPL v2 files as GPL v2+ and add proper license headers.
Done with permission from Michael Niedermayer, the author.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25557 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-31 10:41:20 +00:00
ulion 66abcc42af Add new audio filter for encoding multi-channel audio into ac3 at runtime.
And if set first parameter of this filter to 1, it will do ac3 passthrough
like hwac3 did.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25385 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-13 12:38:17 +00:00
ulion 1ed6e96cfb Fix all current known multi-channel wrong order problems by adding
common functions for channel reordering.
This fixes these modules by adding channel reordering code for 5.0/5.1 audio:
ao: pcm
ad: dmo, faad, ffmpeg(ac3, dca, libfaad, liba52), pcm
ae: faac, lavc(ac3, libfaac), pcm


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25343 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-10 16:53:30 +00:00
ulion 0fe9266445 Fix my wrong code in r25530.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25334 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-10 11:08:27 +00:00
ulion 920a892892 Fix missing command line bug by making the input parameter constant.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25330 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-10 01:43:33 +00:00
reimar def649b0e4 100l, bzero is deprecated, use memset instead
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25216 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-11-30 21:29:45 +00:00
ivo 89308b1105 Remove redundant changelog from comments. There's always svn log.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25199 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-11-29 14:30:03 +00:00
diego df58d5f00d Fix multiple inclusion guards, identifiers starting with __ are reserved
for the system.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25198 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-11-29 14:23:24 +00:00
ulion 70e7acda26 Prevent from using data->len when data is NULL (when play() return NULL).
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25143 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-11-23 05:50:34 +00:00
reimar ce11ba5de5 Add padding and unroll loop 4x for at least another 10% speedup
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25104 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-11-18 22:13:49 +00:00
reimar 0f0e2f5f5b Change to a 64 bit accumulation variable instead of shifting.
Changing the way the loop is done is necessary to reduce register pressure.
About 20% speedup even on 32 bit x86.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25103 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-11-18 18:52:51 +00:00
reimar 13a205e075 100l, *ppc++ was supposed to be replaced by ppc[i] in r25100, but that is not any faster.
Just removing the += s->samples_overlap - s->num_channels; still provides a
ca. 20% speedup on x86 (AThlon X2 64) with gcc 3.4 (compiler stupidity?)


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25102 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-11-18 18:33:45 +00:00
reimar 66c4759992 Use "long" instead of "int" for innermost loop variable.
About 12% faster on x86_64


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25101 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-11-18 17:44:11 +00:00
reimar 0bc7ce3b04 Rearrange scaletempo inner loop.
Speedup on x86 with gcc 3.4 36%, on x86_64 with gcc 4.1 5%


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25100 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-11-18 17:28:27 +00:00
reimar 1c05db4406 100l, someone mixed up && and ||, so if allocation of only one buffers failed
that would not be detected.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25098 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-11-18 15:48:20 +00:00
reimar 4112aa7bcd Avoid some casts by changing int8_t* to void* in af_scaletempo
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25097 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-11-18 14:57:59 +00:00
uau d7f6cb23de A/V sync: take audio filter buffers into account
Substract the delay caused by filter buffering when calculating
currently playing audio position. This matters for af_scaletempo which
buffers significant and varying amounts of data. For other current
filters the effect is normally insignificant.

Instead of the old time-based filter delay field (which was ignored)
this version stores the per-filter delay in units of bytes input read
without corresponding output. This allows the current scaletempo
behavior where other filters before and after it can see the same
nominal samplerate even though the real duration of the data varies;
in this case the other filters can not know the delay they're causing
in terms of real time.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24928 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-11-01 06:52:50 +00:00
uau de034ce87f af_scaletempo: code cleanup
Make internal functions static and remove leading '_' from some
function names. Cast pointers to compatible 8-bit pointer types
instead of ints when calculating their difference.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24927 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-11-01 06:52:47 +00:00
uau e803711bbd af_scaletempo: Fix crash in option parsing
The value of the "speed" suboption was not initialized before calling
subopt_parse(). If the command line had suboptions but "speed" was not
one of them then the code accessed an uninitialized pointer and
possibly crashed. Fixed by initializing the option value.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24926 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-11-01 06:52:44 +00:00
uau ff1568af58 af_scaletempo: Fix audio copy position
Because of a missing *num_channels factor the filter copied audio from
an incorrect position. This mixed up the channel order and hurt audio
quality even if the channels had identical content.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24925 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-11-01 06:52:41 +00:00
uau d33703496c Add audio filter scaletempo
Patch by Robert Juliano, juliano.1 osu edu


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24924 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-11-01 06:52:38 +00:00
uau 1844e1dd0c Change decode_audio() interface
Rewrite decode_audio to better deal with filters that handle input in
large blocks. It now always places output in sh_audio->a_out_buffer
(which was always given as a parameter before) and reallocates the
buffer if needed. After the changes filters can return arbitrarily
large blocks of data without some of it being lost. The new version
also allows simplifying some code.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24920 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-11-01 06:52:19 +00:00
uau 5bfedc0a2d Remove some pointless 'inline' qualifiers
Most of these functions aren't even used in the same translation unit.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24918 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-11-01 06:52:10 +00:00
uau ab2237c15a libaf: Remove rational number implementation
Remove the mul/cancel/gcd functions and some related code. Use ff_gcd
instead of the removed af_gcd in af_resample.c.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24917 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-11-01 06:52:06 +00:00
uau 7deec05ea0 libaf: change filter input/output ratio calculations
Change the audio filters to use a double instead of rationals for the
ratio of output to input size. The rationals could overflow when
calculating the overall ratio of a filter chain and gave no real
advantage compared to doubles.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24916 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-11-01 06:52:01 +00:00
uau c6824f577e Remove unused functions in af.c
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24915 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-11-01 06:51:57 +00:00
diego c8ae1836e6 cosmetics: misc typo fixes
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24615 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-09-25 16:34:23 +00:00
reimar 15649d0f00 Fix loads of typos
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24581 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-09-19 15:44:09 +00:00
reimar e9ea243fbd Fix typo in comment
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24541 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-09-16 09:00:45 +00:00