Michael Niedermayer
82742294b7
swr: Implement Noise shaping dither
...
The following variants are implemented:
lipshitz noise shaping dither
shibata noise shaping dither
low shibata noise shaping dither
high shibata noise shaping dither
f-weighted noise shaping dither
modified-e-weighted noise shaping dither
improved-e-weighted noise shaping dither
Data tables taken from SOX
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
f3c9d8d41b
swr: use SIMD for dithering
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
9aec63af9b
swr: fix assertion failure if dither is used without the preout buffer differing from in
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Alexander Strasser
ac25b31ede
lswr: Improve default resampler's default parameters
...
After making some blind tests on a small collection of music
samples for home usage. It turned out that the default cutoff
was too low.
The impact of filter_size was not clearly distinguishable (the
results were on the edge) with the music samples but turned out
to be clearly audible in some synthetic samples.
Thanks to Daniel for helping out with the listening tests.
Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
12 years ago
Nicolas George
5f12d5ad78
lswr: improve rematrixing error message.
...
Report channel layout/count for insufficiently determined
rematrixing.
12 years ago
Rob Sykes
8d9a503313
docs: add soxr documentation
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Rob Sykes
03d38ee207
soxr_resample: soxr API parameter rename
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Rob Sykes
f2957adb23
soxr_resample: Correct email address
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
f9e55c0fed
swr: support -async X as a simple way to do what ffmpeg -async X did
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Clément Bœsch
0212c1c43d
swr/doxy: fix missing quote in code example.
12 years ago
Michael Niedermayer
d18706244f
audioconvert/arm: require alignment of 16
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
ceb9f8d927
audioconvert: support simd code with specific alignment requirements.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Rob Sykes
801b315729
swr: Add SOX resampler support
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Rob Sykes
41049d07f2
swr: add a lowpass default so that each Resampler can have its own default.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
ae5a55e77a
swr: move flush into Resampler
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
431dcc49d2
swr: make realloc_audio() available outside swresample.c
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Rob Sykes
5a5d70748c
swr: Add API to make resample engine selectable.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
5595e7a102
doxy: fix swr group name
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
b6a7f66f93
resample: remove disabled debug code
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Clément Bœsch
2273b3aaf9
swr: remove unused ONE define.
12 years ago
Stefano Sabatini
8bee8f778a
lswr/swresample: use AV_OPT_TYPE_SAMPLE_FMT for sample format options
...
Improve usability and robustness.
12 years ago
Clément Bœsch
52b7823b73
swr: include stdint.h instead of inttypes.h.
...
stdint.h is for the [u]int*_t types, which is the only thing we need for
the prototypes. inttypes.h includes stdint.h and defines more thing we
don't need here.
Bump micro in case a user app was relying on this include for its own
code.
12 years ago
Clément Bœsch
186942a5e3
swr: fix a few typo in the public header.
12 years ago
Michael Niedermayer
156a75a459
swr-doxy: elaborate on swr_get_delay() and the timebase
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
7cca237ddd
swr: general doxy text about swr and example code.
...
Based on doxy from avr
Reviewed-by: Clément Bœsch
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Clément Bœsch
c02ae48271
swr: set default channel count options to 0.
...
If not set, they will be defined using the channel layout setting, which
is much more convenient when using swr_alloc() instead of
swr_alloc_set_opts().
12 years ago
Clément Bœsch
8f42b09604
swr/resample: fix SSSE3 included unconditionally.
...
10l Regression since 8ea88339
.
12 years ago
Clément Bœsch
5e68bf9b92
swr/rematrix: move templating parameters to template itself.
12 years ago
Clément Bœsch
8ea8833979
swr/resample: move templating parameters to template itself.
...
It has various benefits such as allowing some refactoring, clarifying
the code in the inclusion part, and making the template understandable
in standalone.
This commit is based on the templating method used by Justin Ruggles for
libavresample.
12 years ago
Michael Niedermayer
d53f447130
swr: move if() block into the only branch where it can be true.
...
This should make the code a tiny tiny bit faster.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
17da2d9eee
swr: reorder/redesign operations to avoid integer overflow.
...
This fixes a out of array read.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Paul B Mahol
1acd2f6ba7
Replace rest of libavutil/audioconvert.h with libavutil/channel_layout.h
...
Also remove it in once case when it is not needed.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Stefano Sabatini
6450c05ba5
lswr/swresample: adopt globally consistent rules for options help message
...
The help text tells what the option does, not what the accepted parameter
is. Thus convert strings of the kind:
Bikeshed Color
to
set bikeshed color
12 years ago
Stefano Sabatini
7be09a91c2
lswr/swresample.h: use consistent inclusion guard header name
12 years ago
Michael Niedermayer
d23e8f53ad
swr: use 64bit index/len for x86_64 mix
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Hendrik Leppkes
04bf2e7f0e
swresample: include ff_log2_tab for shared builds
...
This is done in accordance with all other libraries, which no longer access ff_log2_tab from avutil directly for shared builds, and instead obtain their own copy.
This change is required for MSVC DLL builds, as well as avoids accessing a private symbol from another library.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
9de5b11d58
swr-test: fix division by 0
...
Fixes CID733739
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
dd3e5baa59
swr-test: check pointers before use
...
Fixes: CID733807, CID733806
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
555f352f99
swr/rematrix: fix C99 left shift overflow
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
7df9f595c9
swri_resample_init: unsupported sample formats are an internal error.
...
This condition cannot happen.
Fixes CID733802
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
13a215236b
swr-test: avoid VLA
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
jamal
a70b4935f1
Add missing version macros to libraries
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
jamal
b75c3d2b8b
swresample: Create version.h header
...
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Mans Rullgard
7e3208a087
ARM: libswresample: NEON optimised generic fltp to s16 conversion
...
Adapted to swr by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
97599f8c6d
swr: make sure the last data element is NULL so we can use it to detect the number of channels
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Mans Rullgard
5dc7363446
ARM: libswresample: NEON optimised stereo fltp to s16 conversion
...
Adaption to swr by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Mans Rullgard
0eebde07a9
ARM: libswresample: NEON optimised flat float to s16 conversion
...
Adapted to swr by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
9d89d1d484
swr/resample: mark mm_flags as potentially unused
...
They are unused when asm is disabled
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
31a797eb28
swr: add av_cold to init/free functions
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
0e78e575ed
swr/auto_matrix: treat a single channel as mono instead of failing
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago