diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-01-10 00:25:09 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-01-10 00:25:09 +0100 |
commit | ead3a2a37e67de617cad33b7e9bdb8ade6ed220f (patch) | |
tree | 2dd95712df07b85c581461eb5d6ac4fef2f269a5 /libswresample/dither.c | |
parent | 6908ded20e8040a48f6e281e665aabd6b1066a9e (diff) | |
download | ffmpeg-ead3a2a37e67de617cad33b7e9bdb8ade6ed220f.tar.gz |
swr: add noise_scale field to seperate it from the noise shaping scales
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswresample/dither.c')
-rw-r--r-- | libswresample/dither.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libswresample/dither.c b/libswresample/dither.c index d7cb8a134a..c3bb5609ed 100644 --- a/libswresample/dither.c +++ b/libswresample/dither.c @@ -24,7 +24,7 @@ #include "noise_shaping_data.c" void swri_get_dither(SwrContext *s, void *dst, int len, unsigned seed, enum AVSampleFormat noise_fmt) { - double scale = s->dither.ns_scale; + double scale = s->dither.noise_scale; #define TMP_EXTRA 2 double *tmp = av_malloc((len + TMP_EXTRA) * sizeof(double)); int i; @@ -95,6 +95,7 @@ int swri_dither_init(SwrContext *s, enum AVSampleFormat out_fmt, enum AVSampleFo scale *= s->dither.scale; s->dither.ns_pos = 0; + s->dither.noise_scale= scale; s->dither.ns_scale = scale; s->dither.ns_scale_1 = 1/scale; memset(s->dither.ns_errors, 0, sizeof(s->dither.ns_errors)); |