diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2008-04-16 15:30:04 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2008-04-16 15:30:04 +0000 |
commit | a1b914b20dfbf3f8b2854afe78d22d32b1111640 (patch) | |
tree | 0995be63d4e1ae7759d99cb432474abfa4ecd87c | |
parent | 5d32325a7b39ac3afcfe9fd08ab4ad94b3b4c54d (diff) | |
download | ffmpeg-a1b914b20dfbf3f8b2854afe78d22d32b1111640.tar.gz |
Move the *-1 to a more sane place as well.
Originally committed as revision 12857 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/nellymoserdec.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/nellymoserdec.c b/libavcodec/nellymoserdec.c index 4aa7966af2..d20db9f40a 100644 --- a/libavcodec/nellymoserdec.c +++ b/libavcodec/nellymoserdec.c @@ -279,7 +279,7 @@ void nelly_decode_block(NellyMoserDecodeContext *s, const unsigned char block[NE for (i=0 ; i<NELLY_BANDS ; i++) { if (i > 0) val += nelly_delta_table[get_bits(&s->gb, 5)]; - pval = pow(2, val/2048) * s->scale_bias; + pval = -pow(2, val/2048) * s->scale_bias; for (j = 0; j < nelly_band_sizes_table[i]; j++) { *bptr++ = val; *pptr++ = pval; @@ -298,11 +298,11 @@ void nelly_decode_block(NellyMoserDecodeContext *s, const unsigned char block[NE for (j = 0; j < NELLY_FILL_LEN; j++) { if (bits[j] <= 0) { aptr[j] = M_SQRT1_2*pows[j]; - if (!(av_random(&s->random_state) & 1)) + if (av_random(&s->random_state) & 1) aptr[j] *= -1.0; } else { v = get_bits(&s->gb, bits[j]); - aptr[j] = -dequantization_table[(1<<bits[j])-1+v]*pows[j]; + aptr[j] = dequantization_table[(1<<bits[j])-1+v]*pows[j]; } } memset(&aptr[NELLY_FILL_LEN], 0, |