Commit Graph

349 Commits

Author SHA1 Message Date
diego 8ba6b4eaf9 cosmetics: Remove pointless empty lines at EOF.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30675 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-20 21:02:49 +00:00
reimar dd79cbf17b Move code that makes the filter chain match the desired output format into
a separate function.
Call this function also from af_add, fixes audio corruption with e.g.
-softvol -af format=s16be (bug #1561).


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30659 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-19 21:52:29 +00:00
reimar 3bbbb21ada Make the code match the documentation by making higher-quality but slower
audio filtering the default.
This mostly means lavcresample being the default instead of plain "resample".


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30455 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-30 10:09:14 +00:00
reimar 1a5841fbbb Add a proper header for our strsep implementation so strsep will
not be used without a declaration, causing issues on 64 bit systems.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30355 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-17 15:08:31 +00:00
reimar b27ec53011 Let the format filter do the AC3 endianness conversion instead of duplicating
the conversion code over and over.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30285 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-11 20:40:51 +00:00
reimar 33bc71f10d Add support for distinguishing between little- and big-endian SPDIF AC3
and converting between both.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30283 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-11 20:27:52 +00:00
reimar 76feee19c4 Add a hack to af_fmt2bits to recognize AC3 as a 16-bit format, since this
is more correct than 8 bit for alignment purposes.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30278 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-11 19:37:50 +00:00
reimar 6910cdaae1 Add and use AF_FORMAT_IS_AC3 macro.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30276 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-11 19:23:18 +00:00
reimar a8a53e872e Revert r30170, AF_FORMAT_AC3 is supposed to be the special mask,
and should not include other parts.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30275 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-11 19:08:15 +00:00
reimar 13fe3d4986 Mark AC3 as 16-bit format, this simplifies alignment calculation and fixes
hwac3 with ALSA reportedly broken by r29750.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30170 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-02 20:45:27 +00:00
tack b2adf9d98d Fix mangling of 24-bit audio during channel reorder.
Only 1/3 of the samples in the buffer passed to reorder_channel_nch()
were being reordered.  For 8-, 16-, and 32-bit audio, the buffers could
be treated as int8_t, int16_t, and int32_t respectively.  24-bit audio
was being processed as int8_t, requiring iteration over n_samples*3, not
n_samples.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29971 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-11-28 18:23:26 +00:00
tack 3c2afd6786 Add support for 8 channel audio.
Where 8 channel support is non-trivial (e.g. ao_dsound), at least ensure we
fail gracefully.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29868 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-11-10 00:45:19 +00:00
tack 1d30062395 Cosmetics: remove trailing whitespace from file.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29867 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-11-10 00:43:14 +00:00
tack b6712cc6c2 reorder_ch: Remove unneeded AF_CHANNEL_LAYOUT_LAVC_AAC_DEC_*
All references to these values were removed r29821.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29822 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-11-04 00:58:11 +00:00
reimar 09e4467756 Change libaf control ordering to make the controls unique again, (AF_CONTROL_PAN_BALANCE vs.
AF_CONTROL_PLAYBACK_SPEED), put them in-order again and add a bit of padding in-between.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29718 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-09-26 06:41:09 +00:00
tack 0d0c303ebe Fix channel reordering when using 24-bit samples by adding breaks to cases
missed by r29427.

Patch submitted by Shane W, shane-mplayer csy ca


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29541 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-08-19 13:29:07 +00:00
tack bc4cc45029 Cosmetics: adjust alignment.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29534 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-08-18 22:25:58 +00:00
tack f89696a8e2 Fix incorrect channel ordering for lavc audio codecs (specifically ffac3,
ffdca, ffflac, ffaac, fftruehd).  In the process, adds support for 32-bit
samples.



git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29533 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-08-18 22:24:36 +00:00
diego e5751ced4f Replace WORDS_BIGENDIAN by HAVE_BIGENDIAN in all internal code.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29443 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-07-26 19:53:00 +00:00
iive f6c25fd5c5 Fix 24bit audio playback.
The reordering channels code had reoccurring bug
where in switch(samplesize) block the
case 3 (3 bytes) doesn't end with break;
leading to execution of the next case 4 too.
This mangles the already processed data and
causes massive memory corruption.



git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29427 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-07-19 09:55:29 +00:00
diego 6e9cbdc104 whitespace cosmetics: Remove all trailing whitespace.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-05-13 02:58:57 +00:00
bircoph fbf9a582f4 Cosmetics for r29244 to follow K&R style closely.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29245 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-05-03 21:52:41 +00:00
bircoph e8abba5f43 Support for libbs2b ver. 3.0.0 API.
Now filter parameters are highly controllable, virtually all audio
formats are supported, and new profiles are available.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29244 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-05-03 21:51:37 +00:00
bircoph 83c2df3565 Use native endian float filter provided by libbs2b instead of
selection based on WORDS_ENDIAN.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29134 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-04-02 20:49:47 +00:00
bircoph e3b6f71b2d Add libbs2b audio filter itself.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29132 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-04-02 19:01:57 +00:00
diego 2e903f7c75 Remove unnecessary malloc.h #includes and related #ifdeffery.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29126 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-04-02 09:20:48 +00:00
bircoph fa804e5d97 Move config.h include directive up as a precaution measure.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29091 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-28 20:21:20 +00:00
bircoph 29fc3d6601 Reorder includes alphabetically.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29090 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-28 20:03:08 +00:00
bircoph e3455c5b20 Remove af_mp.h and add its content to af.h
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29089 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-28 20:01:43 +00:00
bircoph 42a792bbc7 Remove af_msg special-casing API in libaf.
Replace it by standard mp_msg message system.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29088 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-28 19:57:56 +00:00
diego a21feef029 cosmetics: Remove file names from file header, it only causes trouble.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28959 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-15 12:45:16 +00:00
reimar b6d7a2552c Remove several useless casts from af_resample
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28848 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-06 11:47:51 +00:00
reimar c2574a6b0a Free af->setup and contents in af_resample uninit function.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28847 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-06 11:46:06 +00:00
reimar 37a09a25ff Use calloc to allocate the af_resample ring buffers, reportedly using
non-zeroed buffers can cause initial noise, see -dev-eng:
[PATCH]: Add missing memset after malloc in libaf/af_resample.c
Wed, 4 Mar 2009 15:29:30 +0800


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28846 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-06 11:42:45 +00:00
reimar 33ca05bce9 Use a single malloc to allocate space for the circular buffers.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28845 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-06 11:39:13 +00:00
reimar 1dd64224c4 Comment typo fixes for af_resample
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28844 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-06 11:31:18 +00:00
uau 45626ad18c af_stats: Some fixes to the new filter
The just committed af_stats was an older version of the patch with
broken max volume calculation. Fix that and do some cleanup.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28698 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-02-21 22:07:39 +00:00
diego db757ae96b Add missing #include "config.h", fixes the warning:
libaf/af.c:23:5: warning: "HAVE_MALLOC_H" is not defined


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28697 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-02-21 21:29:38 +00:00
diego 0cddea3754 Add statistics audio filter that prints information about the audio stream.
patch by Nicolas George, nicolas.george normalesup org


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28696 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-02-21 21:27:27 +00:00
diego be8c67909b Convert HAVE_MALLOC_H into a 0/1 definition, fixes the warning:
mem.c:32:5: warning: "HAVE_MALLOC_H" is not defined


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28629 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-02-17 11:16:19 +00:00
diego 0c3d542dc7 WORDS_BIGENDIAN is defined/undefined, not 0/1.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28374 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-01-26 09:56:27 +00:00
diego 65ea2d93f8 Drop HAVE_LRINTF check, lrintf is used without checking in other places.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28372 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-01-26 09:54:14 +00:00
diego eb4a4604c0 HAVE_3DNOW --> HAVE_AMD3DNOW
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28370 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-01-26 09:29:53 +00:00
diego 7034529d9a Fix build: Add required header and adjust preprocessor check.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28368 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-01-25 23:55:21 +00:00
diego f66f0ca777 Add missing header for av_gcd, fixes the warning:
libaf/af_resample.c:204: warning: implicit declaration of function 'av_gcd'


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28357 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-01-25 19:20:30 +00:00
cehoyos 83c523f9ea Fix compilation: s/ff_gcd/av_gcd.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28338 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-01-17 11:29:36 +00:00
reimar 97df2f9162 More #ifdef HAVE_MMX etc. missed by earlier search.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28327 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-01-16 09:32:54 +00:00
reimar 4abf191c5d More #ifdef -> #if fixes
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28326 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-01-16 09:29:20 +00:00
diego 5043110082 Rename libaf/af_format_alaw.c --> libaf/af_format_alaw.h and
libaf/af_format_ulaw.c --> libaf/af_format_ulaw.h.
Both files are not compiled but used as standard headers, so there
is no reason for them not be named like any other header file.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28273 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-01-05 22:05:19 +00:00
diego 92805de182 Use standard multiple inclusion guards.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28272 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-01-05 21:55:47 +00:00