diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2011-01-27 15:20:43 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-01-28 03:15:35 +0100 |
commit | 733dbe7d18c267728ef03762d83e9e1b086668cd (patch) | |
tree | 41345c1989e46631e4209c3b09206b0fd45bc54a /libavcodec/nellymoserdec.c | |
parent | 2f7d8977bcdeb2c39fd9acbd753d605298824db8 (diff) | |
download | ffmpeg-733dbe7d18c267728ef03762d83e9e1b086668cd.tar.gz |
Remove the add bias hack for the C version of DSPContext.float_to_int16_*().
(cherry picked from commit 9d06d7bce3babb82ed650c13ed13a57f6f626a71)
Diffstat (limited to 'libavcodec/nellymoserdec.c')
-rw-r--r-- | libavcodec/nellymoserdec.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/libavcodec/nellymoserdec.c b/libavcodec/nellymoserdec.c index 89dde91248..e70d0622da 100644 --- a/libavcodec/nellymoserdec.c +++ b/libavcodec/nellymoserdec.c @@ -49,7 +49,6 @@ typedef struct NellyMoserDecodeContext { float state[128]; AVLFG random_state; GetBitContext gb; - int add_bias; float scale_bias; DSPContext dsp; FFTContext imdct_ctx; @@ -65,7 +64,7 @@ static void overlap_and_window(NellyMoserDecodeContext *s, float *state, float * while (bot < NELLY_BUF_LEN) { audio[bot] = a_in [bot]*ff_sine_128[bot] - +state[bot]*ff_sine_128[top] + s->add_bias; + +state[bot]*ff_sine_128[top]; bot++; top--; @@ -136,13 +135,7 @@ static av_cold int decode_init(AVCodecContext * avctx) { dsputil_init(&s->dsp, avctx); - if(s->dsp.float_to_int16 == ff_float_to_int16_c) { - s->add_bias = 385; - s->scale_bias = 1.0/(8*32768); - } else { - s->add_bias = 0; s->scale_bias = 1.0/(1*8); - } /* Generate overlap window */ if (!ff_sine_128[127]) |