diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2010-01-12 23:02:07 +0000 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2010-01-12 23:02:07 +0000 |
commit | 1460c79097b19c9ff0413df4d8d651dd5c1a9983 (patch) | |
tree | a4b220a0da0dc543a0449804b869208d97d9ef23 /libavcodec/ac3dec.c | |
parent | 188d3c510dd166656223afc5fbcf6c424a41e0ca (diff) | |
download | ffmpeg-1460c79097b19c9ff0413df4d8d651dd5c1a9983.tar.gz |
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
Diffstat (limited to 'libavcodec/ac3dec.c')
-rw-r--r-- | libavcodec/ac3dec.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c index 82091bc6e3..ba7ae16711 100644 --- a/libavcodec/ac3dec.c +++ b/libavcodec/ac3dec.c @@ -420,10 +420,9 @@ static void calc_transform_coeffs_cpl(AC3DecodeContext *s) int band_end = bin + s->cpl_band_sizes[band]; for (ch = 1; ch <= s->fbw_channels; 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++) { - s->fixed_coeffs[ch][bin] = ((int64_t)s->fixed_coeffs[CPL_CH][bin] * - cpl_coord) >> 23; + s->fixed_coeffs[ch][bin] = MULH(s->fixed_coeffs[CPL_CH][bin] << 4, cpl_coord); } if (ch == 2 && s->phase_flags[band]) { for (bin = band_start; bin < band_end; bin++) |