Michael Niedermayer
30b2611ed3
swresample: Skip over dither steps if dithering scale is 0
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-18 11:52:11 +02:00
Michael Niedermayer
946acacdcd
swresample: move dither init up
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-18 11:50:14 +02:00
Ganesh Ajjanagadde
24e6729a04
swresample/dither: use integer arithmetic
...
This fixes a -Wabsolute-value reported by clang 3.5+ complaining about misuse of fabs() for integer absolute value.
An additional benefit is the removal of floating point calculations.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-23 23:19:31 +02:00
Ganesh Ajjanagadde
196b885a5f
swresample/dither: check memory allocation
...
check memory allocation in swri_get_dither()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-03 11:46:37 +02:00
Michael Niedermayer
c0e3b46118
swresample: add av_cold to init functions
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-21 00:33:09 +01:00
Michael Niedermayer
c77cc2c176
swresample/dither: Cleanup number suffixes
...
The <<31 case needs LL
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-01 20:00:10 +01:00
Michael Niedermayer
a5290cb1ac
swresample/dither: use av_malloc_array()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-08 00:29:20 +02:00
Michael Niedermayer
6bc4e36ba7
swr: set scale for 32->32/24 dither
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-05 03:06:34 +02:00
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>
2013-02-24 20:31:56 +01:00
Michael Niedermayer
55d0528669
swr/dither: fix division by 0
...
Found-by: Daemon404
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-14 02:57:00 +01:00
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>
2013-01-10 18:51:30 +01:00
Michael Niedermayer
2672b2c1d2
swr: scale data down in noise shaping to avoid cliping
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-10 01:44:15 +01:00
Michael Niedermayer
0b60fc94aa
swr: reorder the operations in the noise shaping code
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-10 00:27:04 +01:00
Michael Niedermayer
ead3a2a37e
swr: add noise_scale field to seperate it from the noise shaping scales
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-10 00:25:09 +01:00
Michael Niedermayer
6908ded20e
swr: fix the noise sample type for noise shaping
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-09 23:28:09 +01:00
Michael Niedermayer
3ef06f3415
swr: split swri_dither_init() out
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-09 23:28:08 +01:00
Michael Niedermayer
3ab1970612
swr: move dither related fields to their own context
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-09 18:41:12 +01:00
Michael Niedermayer
ba1314c2ef
swr: update copyright years of a few files iam working on
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-09 18:30:01 +01:00
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>
2013-01-09 18:25:06 +01:00
Michael Niedermayer
edbde52226
swr: change sample format representation so as to maintain the planer/packed distinction.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-28 13:02:58 +02:00
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
b1ef4dc406
swr: add triangular dither support
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-10 21:18:33 +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