diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-04-11 13:44:48 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-04-11 13:44:48 +0200 |
commit | c1d404b9e400d15b1b29fb05303278be0859eb7a (patch) | |
tree | c496e0dcc7ed8c8109a3903921b694c19ea190f9 /libswresample/dither.c | |
parent | a2c92e60639b132e291c97aff9a7e18d1a0ae049 (diff) | |
download | ffmpeg-c1d404b9e400d15b1b29fb05303278be0859eb7a.tar.gz |
swr: add a dither_scale parameter to tune the amplitude of the dither.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswresample/dither.c')
-rw-r--r-- | libswresample/dither.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libswresample/dither.c b/libswresample/dither.c index 8d5d0bcca9..a340733610 100644 --- a/libswresample/dither.c +++ b/libswresample/dither.c @@ -36,6 +36,8 @@ void swri_get_dither(SwrContext *s, void *dst, int len, unsigned seed, enum AVSa if(in_fmt == AV_SAMPLE_FMT_S32 && out_fmt == AV_SAMPLE_FMT_U8 ) scale = 1L<<24; if(in_fmt == AV_SAMPLE_FMT_S16 && out_fmt == AV_SAMPLE_FMT_U8 ) scale = 1L<<8; + scale *= s->dither_scale; + for(i=0; i<len + TMP_EXTRA; i++){ double v; seed = seed* 1664525 + 1013904223; |