Commit 1460c790 authored by Reimar Döffinger's avatar Reimar Döffinger

Use MULH instead of 64x64 multiplication, around 5% overall speedup on Intel Atom.

Patch by myself and Yuriy Kaminskiy [yumkam mail ru]

Originally committed as revision 21175 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 188d3c51
...@@ -420,10 +420,9 @@ static void calc_transform_coeffs_cpl(AC3DecodeContext *s) ...@@ -420,10 +420,9 @@ static void calc_transform_coeffs_cpl(AC3DecodeContext *s)
int band_end = bin + s->cpl_band_sizes[band]; int band_end = bin + s->cpl_band_sizes[band];
for (ch = 1; ch <= s->fbw_channels; ch++) { for (ch = 1; ch <= s->fbw_channels; ch++) {
if (s->channel_in_cpl[ch]) { if (s->channel_in_cpl[ch]) {
int64_t cpl_coord = s->cpl_coords[ch][band]; int cpl_coord = s->cpl_coords[ch][band] << 5;
for (bin = band_start; bin < band_end; bin++) { for (bin = band_start; bin < band_end; bin++) {
s->fixed_coeffs[ch][bin] = ((int64_t)s->fixed_coeffs[CPL_CH][bin] * s->fixed_coeffs[ch][bin] = MULH(s->fixed_coeffs[CPL_CH][bin] << 4, cpl_coord);
cpl_coord) >> 23;
} }
if (ch == 2 && s->phase_flags[band]) { if (ch == 2 && s->phase_flags[band]) {
for (bin = band_start; bin < band_end; bin++) for (bin = band_start; bin < band_end; bin++)
......
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