aboutsummaryrefslogtreecommitdiff
path: root/libavcodec/eac3dec.c
diff options
context:
space:
mode:
authorJustin Ruggles2009-05-25 16:12:51 +0000
committerJustin Ruggles2009-05-25 16:12:51 +0000
commit724b8f6ac790550caddbf6a7644fba6beb0acf47 (patch)
treecee58b711900f8d75ca7dbb9312e226bc21ada8f /libavcodec/eac3dec.c
parent4cab1e491b69fa45f4b60f6259cc3340f51cdbd1 (diff)
eac3dec: get rid of unnecessary left shifts in 16-bit * 24-bit
multiplication in GAQ mantissa ramapping. Originally committed as revision 18941 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/eac3dec.c')
-rw-r--r--libavcodec/eac3dec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/eac3dec.c b/libavcodec/eac3dec.c
index 92d6bdcfd0..d92d54e3e4 100644
--- a/libavcodec/eac3dec.c
+++ b/libavcodec/eac3dec.c
@@ -186,13 +186,13 @@ void ff_eac3_decode_transform_coeffs_aht_ch(AC3DecodeContext *s, int ch)
b = 1 << (23 - log_gain);
else
b = ff_eac3_gaq_remap_2_4_b[hebap-8][log_gain-1] << 8;
- mant += (((ff_eac3_gaq_remap_2_4_a[hebap-8][log_gain-1] << 8) * (int64_t)mant) >> 23) + b;
+ mant += ((ff_eac3_gaq_remap_2_4_a[hebap-8][log_gain-1] * (int64_t)mant) >> 15) + b;
} else {
/* small mantissa, no GAQ, or Gk=1 */
mant <<= 24 - bits;
if (!log_gain) {
/* remap mantissa value for no GAQ or Gk=1 */
- mant += ((ff_eac3_gaq_remap_1[hebap-8] << 8) * (int64_t)mant) >> 23;
+ mant += (ff_eac3_gaq_remap_1[hebap-8] * (int64_t)mant) >> 15;
}
}
s->pre_mantissa[ch][bin][blk] = mant;