summaryrefslogtreecommitdiff
path: root/libswresample/dither.c
Commit message (Collapse)AuthorAge
* avutil/common: Don't auto-include mem.hAndreas Rheinhardt2024-03-31
| | | | | | | | | | | There are lots of files that don't need it: The number of object files that actually need it went down from 2011 to 884 here. Keep it for external users in order to not cause breakages. Also improve the other headers a bit while just at it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* swresample: Skip over dither steps if dithering scale is 0Michael Niedermayer2016-08-18
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swresample: move dither init upMichael Niedermayer2016-08-18
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swresample/dither: use integer arithmeticGanesh Ajjanagadde2015-08-23
| | | | | | | | 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-03
| | | | | | check memory allocation in swri_get_dither() Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample: add av_cold to init functionsMichael Niedermayer2015-02-21
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample/dither: Cleanup number suffixesMichael Niedermayer2015-02-01
| | | | | | The <<31 case needs LL Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample/dither: use av_malloc_array()Michael Niedermayer2014-04-08
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: set scale for 32->32/24 ditherMichael Niedermayer2013-06-05
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: support a seperate output sample bits.Michael Niedermayer2013-02-24
| | | | | | 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-14
| | | | | 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-10
| | | | | | 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-10
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: reorder the operations in the noise shaping codeMichael Niedermayer2013-01-10
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: add noise_scale field to seperate it from the noise shaping scalesMichael Niedermayer2013-01-10
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: fix the noise sample type for noise shapingMichael Niedermayer2013-01-09
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: split swri_dither_init() outMichael Niedermayer2013-01-09
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: move dither related fields to their own contextMichael Niedermayer2013-01-09
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: update copyright years of a few files iam working onMichael Niedermayer2013-01-09
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: Implement Noise shaping ditherMichael Niedermayer2013-01-09
| | | | | | | | | | | | | | | 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-28
| | | | | | 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-11
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: pass context to swri_get_dither()Michael Niedermayer2012-04-11
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: add triangular highpass ditherMichael Niedermayer2012-04-11
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: add triangular dither supportMichael Niedermayer2012-04-10
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: add dither support.Michael Niedermayer2012-04-10
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>