Commit Graph

246 Commits

Author SHA1 Message Date
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
diego 84157efa5a Clean up the way get_path is handled: Compile get_path.c to an object to link
against instead of directly #including the C file and replace the many extern
declarations by a proper header file.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24262 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-08-28 11:20:24 +00:00
diego 505a5f013b Fix warning:
af_sinesuppress.c:34: warning: 'play_float' declared 'static' but never defined


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24191 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-08-25 16:51:02 +00:00
diego 3e9e4acd8d Do not use leading underscores in multiple inclusion guards, they are reserved.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23709 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-07-02 22:34:45 +00:00
reimar 736affc4b2 ff_gcd is already in libavutil/common.h, no need for an extra prototype here
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23643 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-06-24 12:40:51 +00:00
zuxy 6e6d3acfa9 Add AF_CONTROL_PAN_BALANCE control
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23571 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-06-17 12:18:13 +00:00
zuxy 173c051b76 Remove incorrect comment: pan defaults to block all, instead of pass-thru.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23553 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-06-13 09:29:51 +00:00
zuxy c91cce5812 Avoid zero output for pan filter; zero output now means same # of channels
as input. Make pan work for af_add().


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23552 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-06-13 09:28:49 +00:00
zuxy fd6d47944e Make pan reentrant. Multiple pans in chain work fine.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23551 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-06-13 09:20:36 +00:00
reimar 6a09e8e2ed Replace implicit use of fast_memcpy via macro by explicit use to allow
for future optimization.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23475 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-06-05 14:27:54 +00:00
diego 49b64742ed Add general variables for either static or shared FFmpeg libraries.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23119 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-04-26 11:22:22 +00:00
diego 5a8c8aadef cosmetics: Remove CONFIG_ prefix from FFmpeg library Makefile variables.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23110 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-04-25 08:35:35 +00:00
michael 3b3181fefd reasonable cutoff frequency default
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22773 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-03-22 01:50:04 +00:00
diego 42314cb0ba Remove unnecessary unistd.h include.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22766 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-03-20 09:53:31 +00:00
diego 997d7e7b1d Remove MinGW hack, it's no longer needed.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22765 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-03-20 09:46:26 +00:00
diego 7ee0eb4e19 Rename open to af_open so as not to conflict with a previous header definition.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22764 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-03-20 09:46:00 +00:00
diego 4fb6bd2843 Conditionally compile af_export instead of having #ifdef around the file.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22743 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-03-19 10:13:33 +00:00
diego 5f6965df5d Move libav* include CFLAGS to mpcommon.mak instead of duplicating them.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22735 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-03-18 22:49:37 +00:00
diego 5519d98983 cosmetics: Fix indentation, reorder some lines for consistency.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22549 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-03-13 21:55:23 +00:00
diego 60b39e2786 Give more descriptive names to the source and library variables and split
between common, MPlayer-specific and MEncoder-specific parts.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22546 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-03-13 12:10:57 +00:00
reimar 6ca4e1b4e8 Move variable declaration to appropriate place
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22200 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-02-10 20:33:27 +00:00
reimar 7111287409 Cosmetics: remove tabs added in last commit from otherwise tab-free file.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22199 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-02-10 20:32:56 +00:00
uau e876e45030 Fix memory leaks.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22197 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-02-10 18:12:03 +00:00
uau 945cb3447e Use AF_NCH for max number of channels instead of private CHANS define.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22196 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-02-10 18:05:18 +00:00
uau 6ffcc5caa5 Fix nonsense tests like previously in af_pan.
Probably no practical effect.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22194 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-02-10 17:31:18 +00:00
uau b89e99cadc Fix nonsense tests ("if (af->data->audio)" before "if (af->data)").
Probably doesn't matter in practice.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22193 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-02-10 17:27:11 +00:00
reimar 0d48d2f02c Cosmetics: add space after comma in output
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22174 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-02-08 11:27:18 +00:00
reimar 5df7bb377f Experimental support for multichannel ladspa effects
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22145 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-02-05 17:09:25 +00:00
diego 4f9a4a72c9 Fix FSF address and otherwise broken license headers.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21995 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-01-22 08:02:06 +00:00
reimar f4b7a0e4d1 Get rid on -DGNU_SOURCE for internal code, imported libs should be fixed
ASAP, too, though


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21604 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-12-12 20:29:30 +00:00
reimar 18004d2d98 Hack around libavutil/bswap.h compilation problems due to always_inline undefined.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21523 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-12-07 11:58:07 +00:00
diego b125a9e129 Add libav include paths to CFLAGS without indirection.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21406 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-12-01 01:11:42 +00:00
diego b7b22bd874 Remove some superfluous include CFLAGS.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21390 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-11-29 15:14:03 +00:00
diego cac6c0eea2 Remove bswap.h, use libavutil/bswap.h instead.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21388 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-11-29 15:02:45 +00:00
nplourde cf332d16c2 reordering of #include to avoid clash with math.h and quicktime/*.h, patch by Crhis Roccati<roccati@pobox.com>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21369 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-11-28 23:13:08 +00:00
diego 2a86b5b99e FFmpeg-style dependency declaration
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21325 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-11-27 13:42:36 +00:00
diego 969612fd49 Remove superfluous dependency declaration on real header files.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21315 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-11-27 11:31:25 +00:00
diego dc2be42703 Merge common parts of all Makefiles into one file included by all.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21275 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-11-26 18:12:36 +00:00