Commit 724b8f6a authored by Justin Ruggles's avatar Justin Ruggles

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
parent 4cab1e49
...@@ -186,13 +186,13 @@ void ff_eac3_decode_transform_coeffs_aht_ch(AC3DecodeContext *s, int ch) ...@@ -186,13 +186,13 @@ void ff_eac3_decode_transform_coeffs_aht_ch(AC3DecodeContext *s, int ch)
b = 1 << (23 - log_gain); b = 1 << (23 - log_gain);
else else
b = ff_eac3_gaq_remap_2_4_b[hebap-8][log_gain-1] << 8; 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 { } else {
/* small mantissa, no GAQ, or Gk=1 */ /* small mantissa, no GAQ, or Gk=1 */
mant <<= 24 - bits; mant <<= 24 - bits;
if (!log_gain) { if (!log_gain) {
/* remap mantissa value for no GAQ or Gk=1 */ /* 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; s->pre_mantissa[ch][bin][blk] = mant;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment