Stefano Sabatini
904c89ac1b
lswr/swresample: convert ocl and icl options to AV_OPT_TYPE_CHANNEL_LAYOUT
...
Improve interface flexibility. In particular makes it possible to set
channel layout through symbolic names using the av_opt_set() interface.
11 years ago
Michael Niedermayer
9078b40d35
swresample: replace 2 av_free() by av_freep()
...
avoids leaving stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
e2b718464e
swresample: Make rematrix maxvalue user settable
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Timothy Gu
a9bbf59be7
cosmetics: Fix "dont" "wont" "doesnt" typos
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
3289670142
swr: dont treat 32 and 24 as equal in simple copy check
...
Fixes dithering from 32 to 24 bit
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Paul B Mahol
0804171104
swresample: set flags & description and add documentation for output_sample_bits
...
Allows users to actually use such option.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Michael Niedermayer
495bf1b685
swr: Fix dithering of s16 with SIMD
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
35aaa306ac
swr: make the default of nopts for first_pts actually work
...
Fixes Ticket2210
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
8b3affda87
swr: support a seperate output sample bits.
...
This avoids user apps having to mangle dither scale. for pcm24
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
2abbe6d07a
swr: add duplicate cutoff for compatibility
...
Based on
commit 50f4337a2f
Author: Justin Ruggles <justin.ruggles@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
21cd905cd4
swr: check channel layouts before using them.
...
Fixes out of array accesses
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
b5f544a0f9
swr: Dont use floats for S32->S32 when possible
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
be989f9236
swr: reorder init code to make rematrix status available earlier
...
This also makes some other fields available earlier which may
be usefull one day
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
167af704ea
swr: limit phase_shift to a less insane value.
...
This prevents potential crashes and out of memory issues if
the user manually sets such insane values.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
00cae86754
swr: support first_pts
...
Trolled-by: Daemon404
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
d676598f87
swr: fix handling of timestamps that cause multiple drops or silence injections
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
a34aee4646
swr: limit buffer size for silence injection
...
This reduces memory usage for unreasonable large silence injections
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
b481d09bd9
swr: limit buffer size for discarding.
...
This prevents insane memory usage in case of insane input values.
Untested due to lack of a testcase that causes such insane allocation
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
db4e0ecaf0
swr: move silence buffer to context to avoid per use malloc/free
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
dc6588421e
swr: move buffer used to discard sample to context
...
This avoids the need to allocate & free to repeatly
Fixes Ticket2122
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
a74548521b
swr: check that allocation of in/out_convert succeeded
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
e5a736261b
swr: Use a temporary buffer for dither/Noise shaping when the input is read only
...
This avoids copying the input
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
558aa6cab7
swr: add seperate in/out pointers to the noise shaping code
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
fca51256d4
swr: rename dither_pos to noise_pos
...
THis more closely matches what the field represents
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
6908ded20e
swr: fix the noise sample type for noise shaping
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
3ef06f3415
swr: split swri_dither_init() out
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
8514d5bcf7
swr: remove unused variable
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
3ab1970612
swr: move dither related fields to their own context
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
ba1314c2ef
swr: update copyright years of a few files iam working on
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
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
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
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
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
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
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
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
Michael Niedermayer
31a797eb28
swr: add av_cold to init/free functions
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
c5278cb84f
Add Dolby/DPLII downmix support to libswresample
...
Based on code by John Stebbins <jstebbins.hb@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
b9df3f4f6c
swr: fix 10l typo mixing in and out config.
...
Fixes ticket1458
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Justin Ruggles
7e15df7551
swr: resampling: add filter type and Kaiser window beta to AVOptions
12 years ago