# HG changeset patch # User jbr # Date 1243267971 0 # Node ID d23332ab364f422f29c56e9554b98c0fdf7da62d # Parent b69723e55653fe1a8d2232ed9d1d72c7419eeed2 eac3dec: get rid of unnecessary left shifts in 16-bit * 24-bit multiplication in GAQ mantissa ramapping. diff -r b69723e55653 -r d23332ab364f eac3dec.c --- a/eac3dec.c Mon May 25 12:17:02 2009 +0000 +++ b/eac3dec.c Mon May 25 16:12:51 2009 +0000 @@ -186,13 +186,13 @@ 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;