Michael Niedermayer
e2b718464e
swresample: Make rematrix maxvalue user settable
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Timothy Gu
a9bbf59be7
cosmetics: Fix "dont" "wont" "doesnt" typos
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
ca2818b881
swresample/x86/audio_convert: add emms to CONV
...
Might fix Ticket1874
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
d62030ffca
swresample/rematrix_template: Fix integer overflow in mix8to2
...
Fixes: CID1030352
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
b04bbe6b86
swresample/rematrix_template: Fix integer overflow in mix6to2
...
Fixes: CID1030351
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
Michael Niedermayer
6bc4e36ba7
swr: set scale for 32->32/24 dither
...
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
4cfc92081d
swr: add native_simd_one
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
b84de51f54
swresample/rematrix: add S32 mixing code
...
Needed for dithering S32
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
f3c638eac1
wresample/rematrix_template: fix internal types
...
Should make no difference, but future commits will need it
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
6e29f39252
swr/rematrix: use av_calloc()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
03148fd174
buildsys: only include log2_tab per library for shared builds
...
Fix linking failures with -all_load due to multiple log2_tabs
Signed-off-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
12 years ago
Rob Sykes
dc666d360b
soxr: libsoxr 0.1.1 support
...
Libsoxr 0.1.1 will be out very soon; no changes planned beyond what's currently in git.
It includes a couple of fixes (not affecting FFmpeg's current usage) and a minor API change (but remains ABI compatible).
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
24244cec2f
swr-test: Fix clip to 32bit
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
b8c55590d5
swr/resample: fix integer overflow, add missing cast
...
The effects of this are limited to numeric errors in the output
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
91debec976
swr/resample: fix filter rounding and cliping for s32
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
f9abeecd94
swr/ build_filter: use av_calloc() fix buffer overflow
...
Fixes integer & buffer overflow
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
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
cc4a41727e
swr: fix "may be used uninitialized in this function" warnings
...
The uninitialized use implicates 0 channels, which is unlikely
to reach this function but fixed anyway in this commit.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
55d0528669
swr/dither: fix division by 0
...
Found-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
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