summaryrefslogtreecommitdiffstats
path: root/libswresample/dither.c
Commit message (Collapse)AuthorAgeFilesLines
* swresample: Skip over dither steps if dithering scale is 0Michael Niedermayer2016-08-181-0/+5
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swresample: move dither init upMichael Niedermayer2016-08-181-9/+0
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swresample/dither: use integer arithmeticGanesh Ajjanagadde2015-08-231-1/+1
| | | | | | | | 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>
* swresample/dither: check memory allocationGanesh Ajjanagadde2015-06-031-1/+5
| | | | | | check memory allocation in swri_get_dither() Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample: add av_cold to init functionsMichael Niedermayer2015-02-211-1/+1
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample/dither: Cleanup number suffixesMichael Niedermayer2015-02-011-6/+6
| | | | | | The <<31 case needs LL Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample/dither: use av_malloc_array()Michael Niedermayer2014-04-081-1/+1
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: set scale for 32->32/24 ditherMichael Niedermayer2013-06-051-0/+1
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: support a seperate output sample bits.Michael Niedermayer2013-02-241-0/+3
| | | | | | This avoids user apps having to mangle dither scale. for pcm24 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr/dither: fix division by 0Michael Niedermayer2013-01-141-1/+1
| | | | | Found-by: Daemon404 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: Use a temporary buffer for dither/Noise shaping when the input is read onlyMichael Niedermayer2013-01-101-0/+2
| | | | | | This avoids copying the input Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: scale data down in noise shaping to avoid clipingMichael Niedermayer2013-01-101-0/+1
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: reorder the operations in the noise shaping codeMichael Niedermayer2013-01-101-0/+1
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: add noise_scale field to seperate it from the noise shaping scalesMichael Niedermayer2013-01-101-1/+2
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: fix the noise sample type for noise shapingMichael Niedermayer2013-01-091-9/+10
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: split swri_dither_init() outMichael Niedermayer2013-01-091-31/+47
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: move dither related fields to their own contextMichael Niedermayer2013-01-091-14/+14
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: update copyright years of a few files iam working onMichael Niedermayer2013-01-091-1/+1
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: Implement Noise shaping ditherMichael Niedermayer2013-01-091-6/+41
| | | | | | | | | | | | | | | 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>
* swr: change sample format representation so as to maintain the planer/packed ↵Michael Niedermayer2012-04-281-0/+3
| | | | | | distinction. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: add a dither_scale parameter to tune the amplitude of the dither.Michael Niedermayer2012-04-111-0/+2
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: pass context to swri_get_dither()Michael Niedermayer2012-04-111-3/+3
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: add triangular highpass ditherMichael Niedermayer2012-04-111-1/+22
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: add triangular dither supportMichael Niedermayer2012-04-101-0/+5
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: add dither support.Michael Niedermayer2012-04-101-0/+56
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
OpenPOWER on IntegriCloud