Michael Niedermayer
c1d404b9e4
swr: add a dither_scale parameter to tune the amplitude of the dither.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-11 13:44:48 +02:00
Michael Niedermayer
a2c92e6063
swr: pass context to swri_get_dither()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-11 13:44:15 +02:00
Michael Niedermayer
f8a237a307
swr: add triangular highpass dither
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-11 13:27:22 +02:00
Michael Niedermayer
1fc4ff2205
swr: generate more dither noise to improve quality.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-11 13:26:32 +02:00
Michael Niedermayer
22057e8ecb
swr: add swr_get_class()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-11 13:25:56 +02:00
Michael Niedermayer
f9a2c5bc07
swr: simplify code by using av_get_bytes_per_sample()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-11 10:02:00 +02:00
Michael Niedermayer
6e9c634c36
swr: fix copy & pasted comment to match the code.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-10 23:54:04 +02:00
Michael Niedermayer
b1ef4dc406
swr: add triangular dither support
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-10 21:18:33 +02:00
Michael Niedermayer
0cff3e130b
swr: remove unused variable
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-10 21:18:32 +02:00
Michael Niedermayer
0170889372
swr: add SWR_DITHER_RECTANGULAR to AVOptions array
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-10 21:18:32 +02:00
Michael Niedermayer
5b2be9bcc0
swr-test: include opt.h, this is needed for changing options for testing.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-10 19:54:42 +02:00
Michael Niedermayer
7c673d73ec
swr: use assert in swri_sum2 to check that only supported formats are used.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-10 19:54:42 +02:00
Michael Niedermayer
db2eadb2f5
swr: add dither support.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-10 19:54:41 +02:00
Michael Niedermayer
5c1f312888
swr: update copyright year for rematrix
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-10 19:54:41 +02:00
Michael Niedermayer
24ab1abfb6
resample: support double precission resampling
...
This commit is dedicated to the audiophiles who can hear it when a
needle is dropped on the moon.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-10 13:48:55 +02:00
Michael Niedermayer
3d9338b1c2
swr: support int32 and float as internal sample formats
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-10 13:19:29 +02:00
Michael Niedermayer
7f1ae79d38
swr: support float & int32 in the resampler
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-10 13:18:49 +02:00
Michael Niedermayer
605bcf6101
swr-test: Add newline to test output
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-10 13:06:00 +02:00
Michael Niedermayer
2f0801527d
resample: update copyright years, they where incorrect.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-10 12:35:37 +02:00
Michael Niedermayer
5ef5c02354
swr-test: remove unused variable
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-01 22:24:06 +02:00
Michael Niedermayer
87688727e4
swr: remove unused variable
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-01 22:11:34 +02:00
Michael Niedermayer
dc984da961
swr: fix pointer type warnings
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-01 22:10:40 +02:00
Michael Niedermayer
8d7f2db60a
swr-test: test the new flexible buffering
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-25 21:50:49 +02:00
Michael Niedermayer
59b038b4a4
swr: realloc_audio: support packed audio buffers
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-25 21:50:00 +02:00
Michael Niedermayer
1b0fcf33b8
swr: More flexible and convenient buffering
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-25 21:49:42 +02:00
Michael Niedermayer
e0c7128302
swr: fix segfault when 0 out size is used.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-25 12:22:06 +02:00
Michael Niedermayer
691b92474a
swr: revert stray hunk
...
Found-by:ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-25 12:22:06 +02:00
Michael Niedermayer
7e592379d9
resample: Fix boundary handling with fragments.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-25 10:34:06 +02:00
Michael Niedermayer
8b11ae8a9a
swr: Fix partial flushing.
...
Found-by: durandal_1707
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-25 06:37:01 +02:00
Michael Niedermayer
19342bc725
swr: test partial flushing
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-25 05:58:21 +02:00
Michael Niedermayer
4f16153d35
swr: allow flushing in multiple steps if the output is too small.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-25 03:33:06 +02:00
Michael Niedermayer
ac6798dbc1
swr: fix compilation failure with old versions of gcc.
...
gcc 4.4 did not like the way i used typedefs
Idea-by: beastd
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-25 00:35:10 +01:00
Michael Niedermayer
15890d67c1
swr: drop SWR_CH_MAX with the next major ABI bump
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-24 23:20:46 +01:00
Michael Niedermayer
947215a261
swr: dont use SWR_CH_MAX in the public function declaration.
...
This change should make no binary difference to the generated code.
the API version is just bumped for correctness sake, this is not
really a API or ABI change.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-24 23:03:17 +01:00
Michael Niedermayer
1937c4e0b9
swr: make SwrContext a typedef.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-24 22:56:24 +01:00
Michael Niedermayer
74656bdd4c
swresample: support up to 32 channels
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-24 22:38:14 +01:00
Michael Niedermayer
ae03b2141e
swr: check that there is enough information to do rematrixing when needed.
...
Fixes assertion failure.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-23 12:10:08 +01:00
Lou Logan
2d38081b4f
cosmetics: fix some typos
...
Patch attached.
From 2d4094fc0dcb4ccd0735eb7e1719e228ebb56bb9 Mon Sep 17 00:00:00 2001
From: Lou Logan <lou@lrcd.com>
Date: Mon, 12 Mar 2012 14:13:44 -0800
Subject: [PATCH] cosmetics: fix some typos
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-13 01:14:04 +01:00
Nicolas George
a8cdb7b95a
swr: special case for empty channels in rematrix.
...
Speed += 10% overall for pan=stereo:FL=FL+FR from wav to null.
2012-03-07 23:56:00 +01:00
Carl Eugen Hoyos
7b4e1466d4
Exit ffmpeg if swr_convert() fails.
2012-02-27 19:02:28 +01:00
Nicolas George
560b224f53
libswr: allow to set custom matrices.
2012-02-20 20:46:35 +01:00
Marton Balint
741aca7936
libswresample: introduce int swr_set_compensation() instead of void swr_compensate()
...
The new version returns AVERROR(EINVAL) is the specified paramters are invalid,
and also creates the resampler if none was used so far.
Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-09 04:16:06 +01:00
Reimar Döffinger
aeeb0e6deb
indeo4, swresample: add some missing static/const to tables.
...
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-01-08 19:11:58 +01:00
Michael Niedermayer
320b8d6335
swr: fix swresample_version()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-23 23:26:02 +01:00
Michael Niedermayer
ab6603b1d8
libswresample.v: add swresample* for cmdutils.c
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-22 04:47:52 +01:00
Michael Niedermayer
3339f87dbd
swr: increase LIBSWRESAMPLE_VERSION_MICRO to 100
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-22 03:09:41 +01:00
Michael Niedermayer
4468ad827a
swr: add swresample_version swresample_configuration and swresample_license
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-22 03:08:47 +01:00
Michael Niedermayer
aa1c590b29
swr: fix assert failure
...
Bug found by: Oana Stratulat
GCI-id: 7211207
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-20 11:28:34 +01:00
Michael Niedermayer
3ba0bfe71f
Merge remote-tracking branch 'qatar/master'
...
* qatar/master:
ulti: Fix invalid reads
lavf: dealloc private options in av_write_trailer
yadif: support 10bit YUV
vc1: mark with ER_MB_ERROR bits overconsumption
lavc: introduce ER_MB_END and ER_MB_ERROR
error_resilience: use the ER_ namespace
build: move inclusion of subdir.mak to main subdir loop
rv34: NEON optimised 4x4 dequant
rv34: move 4x4 dequant to RV34DSPContext
aacdec: Use intfloat.h rather than local punning union.
Conflicts:
libavcodec/h264.c
libavcodec/vc1dec.c
libavfilter/vf_yadif.c
libavformat/Makefile
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-13 23:21:37 +01:00
Michael Niedermayer
12804348f5
swr-test: drop one const, silence most const qualifer warnings.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-03 00:46:46 +01:00
Michael Niedermayer
ebe4d5adc5
swr-test_: Fix mixed declaration and statements:
...
swresample_test.c:123:21: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
swresample_test.c:127:25: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-03 00:40:15 +01:00
Clément Bœsch
81a65b82fb
swr: handle correctly muted channel with u8 sample fmt.
2011-11-29 17:14:25 +01:00
Clément Bœsch
0232f788b6
swr: fix invalid sample format message.
...
If the sample format is invalid, av_get_sample_fmt_name() will always
return NULL.
2011-11-24 16:55:45 +01:00
Clément Bœsch
58205edcc6
swr: use native planar sample formats.
2011-11-24 16:55:45 +01:00
Clément Bœsch
afb0470a25
swr: fix test program.
...
The number of used channels need to be reset to zero when
swr_alloc_set_opts() is called successive times.
This is a regression introduced in c8136ebd
.
2011-11-24 16:55:44 +01:00
Clément Bœsch
bdd22e3523
swr: change minimum I/O channel count to zero.
...
This will silence the warning of av_set_opt_int() in swr for
input/output channels when the layout is not yet defined (or supported).
2011-11-20 16:06:16 +01:00
Michael Niedermayer
4fef94c6d2
swr: doxument matrix fields.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-17 20:29:55 +01:00
Clément Bœsch
0bfc03df3a
swr: move code to avoid resample forward declaration.
2011-11-17 18:30:03 +01:00
Clément Bœsch
eafa2b6005
swr: introduce a public function to customize the channel mapping.
2011-11-17 18:30:03 +01:00
Clément Bœsch
1dbd433f0d
swr: use av_opt_set_int() instead of manual assignments in swr_alloc_set_opts().
2011-11-17 17:57:20 +01:00
Clément Bœsch
f03afd5d54
swr: surround mixing is obviously used, fix comment.
2011-11-17 17:57:07 +01:00
Clément Bœsch
68d3144e89
swr: doxycomment public API.
2011-11-17 17:56:55 +01:00
Clément Bœsch
acd56efbeb
swr: correctly raise rematrix AVERROR.
2011-11-17 17:56:52 +01:00
Clément Bœsch
7cdfce4f63
swr: fix "control reaches end of non-void function" compiler warning.
2011-11-17 10:16:08 +01:00
Clément Bœsch
809631af1a
swr: bump minor version.
2011-11-17 10:16:07 +01:00
Clément Bœsch
af1eb298c1
swr: use int16_t instead of short for resampling.
2011-11-17 10:16:07 +01:00
Clément Bœsch
4c0bad513a
swr: start doxycommenting the API.
2011-11-17 10:16:07 +01:00
Clément Bœsch
a768b9d825
swr: make swr_* functions match the prototypes.
2011-11-17 10:16:07 +01:00
Clément Bœsch
645c61fb2b
swr: rename swr_alloc2() to swr_alloc_set_opts().
2011-11-17 10:16:07 +01:00
Clément Bœsch
c4deb90cfa
swr: use "swri_" prefix instead of "swr_" for the private API.
2011-11-17 10:16:07 +01:00
Clément Bœsch
64db5a1a57
swr: drop 'AV' prefix from ResampleContext.
...
This type/struct is not part of the public API.
2011-11-17 10:16:07 +01:00
Clément Bœsch
fc6351d019
swr: make audio convert code explicitely private.
...
Only what's declared in libswresample/swresample.h is public.
2011-11-17 10:16:07 +01:00
Clément Bœsch
3a5fc38574
swr: fix #endif comment ref.
2011-11-17 10:16:07 +01:00
Clément Bœsch
df72ae673f
swr: replace deprecated av_set_int() with av_opt_set_int().
2011-11-16 07:27:20 +01:00
Clément Bœsch
ad561b5707
swr: replace deprecated av_opt_set_defaults2() with av_opt_set_defaults().
2011-11-16 07:27:20 +01:00
Clément Bœsch
180aa82c1d
swr: replace deprecated av_get_bits_per_sample_fmt() with av_get_bytes_per_sample().
2011-11-16 07:27:20 +01:00
Clément Bœsch
f9368466c4
swr: use designated initializers for the class.
2011-11-16 07:27:20 +01:00
Clément Bœsch
7e516a11ca
swr: rename resample2 to resample.
2011-11-16 07:27:20 +01:00
Clément Bœsch
fc42550097
swr: move format convert code to dedicated functions.
...
This should easier common case optimizations.
2011-11-16 07:27:20 +01:00
Clément Bœsch
c8136ebd6a
swr: set the default used_ch_count value to zero.
...
This allows an appropriate behaviour when it is not specified (fallback
to the number of input channels).
Fixes Ticket523
2011-11-14 22:11:28 +01:00
Clément Bœsch
f5cd136f2b
ffmpeg: add -map_channel option.
...
Based on an initial work by Baptiste Coudurier.
2011-11-04 19:40:32 +01:00
Michael Niedermayer
5cd1580ff8
swr: document how flushing works and bump minor version.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-04 16:34:39 +01:00
Michael Niedermayer
813b20a39f
swr-test: test flushing
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-04 16:32:31 +01:00
Michael Niedermayer
71f5712cb5
swr: Support flushing last samples out.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-04 16:31:51 +01:00
Michael Niedermayer
1b9ca38d9d
resample2: fix potential overflow
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-27 14:34:45 +02:00
Michael Niedermayer
a67cb012e6
resample: Fix overflow
...
Found-by: Jim Radford
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-27 14:31:53 +02:00
Michael Niedermayer
2f86566a31
rematrix: add parameter to tune volume
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-26 00:46:46 +02:00
Michael Niedermayer
b1470d7a60
rematrix: change type of integers from 16 to 32bit to allow increasing volume with it.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-26 00:46:46 +02:00
Michael Niedermayer
1e40b2c22b
rematrix: add type for coefficients
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-26 00:46:46 +02:00
Michael Niedermayer
44a2bb75a7
swr: Fix swresample.c:293:5: warning: passing argument 2 of ‘fill_audiodata’ from incompatible pointer type
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-21 00:36:00 +02:00
Michael Niedermayer
36e5e51ae3
swr: remove unused variable.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-21 00:34:37 +02:00
Michael Niedermayer
a911177276
swr: Fix assignment discards qualifiers from pointer target type warning.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-21 00:33:04 +02:00
Michael Niedermayer
03e56a2ad9
resample2: Fix passing argument from incompatible pointer type warnings.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-21 00:31:20 +02:00
Michael Niedermayer
e6459720b5
swr: Mark src as const in swr_resample()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-21 00:30:41 +02:00
Michael Niedermayer
76dbb0905a
rematrix: Fix several passing argument from incompatible pointer type warnings.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-21 00:28:03 +02:00
Clément Bœsch
539399d4d1
AVOptions: rename remaining FF_OPT_TYPE_* to AV_OPT_TYPE_*.
2011-10-17 07:33:10 +02:00
Carl Eugen Hoyos
7f16ec61e1
Do not warn about wrong channel layout if no channel layout is defined.
2011-10-16 17:12:53 +02:00
Clément Bœsch
ade3ec8457
swresample: fix another broken indent chunk.
...
Also use a consistent style inside that block.
2011-10-10 15:55:28 +02:00
Clément Bœsch
9719f25e7b
swresample: fix broken indent.
2011-10-10 09:57:41 +02:00
Michael Niedermayer
355cc1a052
swresample/rematrix: show matrix with debug log level
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-07 13:51:40 +02:00
Marton Balint
177ed7e818
swresample: use av_get_default_channel_layout instead of guess_layout
...
Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-07 02:53:18 +02:00
Michael Niedermayer
67b2df792f
swresample: Try to handle cases with input channel count and layout mismatching.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-06 20:21:40 +02:00
Michael Niedermayer
503e5e9db5
libswresample: support directly converting sampleformats and packed/planar in a single pass.
...
Previously a intermediate planar format was used when both input and output where packed.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-06 00:07:03 +02:00
Michael Niedermayer
834b3760a7
swresample: check for invalid sample formats.
...
Bug-Found-by: Justin Ruggles
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-01 01:39:17 +02:00
Michael Niedermayer
17d51938d2
swr_test: test planar audio
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-01 01:17:39 +02:00
Michael Niedermayer
a75b254c74
swr: minor fixes to get planar audio working
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-01 01:17:39 +02:00
Michael Niedermayer
da343ff432
swr_test: dont test samples that have not been written
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-29 04:52:22 +02:00
Nicolas George
b592f9bb65
swresample: remove unused variable.
...
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-28 16:11:01 +02:00
Nicolas George
a34869ed7d
libswr/rematrix: remove unused variable.
...
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-28 16:11:01 +02:00
Nicolas George
80287854c2
libswr/rematrix: add braces to silence a warning.
...
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-28 16:11:01 +02:00
Michael Niedermayer
8593b743a8
rematrix: dont use floats for int16 code.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-19 09:25:50 +02:00
Michael Niedermayer
c3c1af6dc6
rematrix: use double during init.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-19 08:44:49 +02:00
Michael Niedermayer
1133676f4a
swr: replace sqrt(0.5) by M_SQRT1_2
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-19 08:44:24 +02:00
Michael Niedermayer
9dd3da1061
swr: fix shared lib build
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-19 07:26:42 +02:00
Michael Niedermayer
b5875b9111
Add libswresample.
...
Similar to libswscale this does resampling and format convertion, just for audio
instead of video.
changing sampling rate, sample formats, channel layouts and sample packing all
in one with a very simple public interface.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-19 07:04:17 +02:00