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
c8737d348b
swr: work with 4 noise shaping coeffs at a time
...
63->38 kcycles
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
93bc0f0180
swr/noise_shaping_data: pad coeffs to multiple of 4 when they are 1 below
...
This allows using code working with 4 at a time
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
ef7fdc8cff
swr: use a local variable for ns_coeffs
...
maybe a very tiny bit faster
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
68ff7d265f
swr: use local variable for ns_errors
...
71 -> 63 kcycles
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
b5d9e5d06c
swr: minor simplification for the noise shaping pos update
...
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
2eec98125e
swr: mark noise data for noise shaping as const
...
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
2672b2c1d2
swr: scale data down in noise shaping to avoid cliping
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
0b60fc94aa
swr: reorder the operations in the noise shaping code
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
ead3a2a37e
swr: add noise_scale field to seperate it from the noise shaping scales
...
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
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