summaryrefslogtreecommitdiff
path: root/libavcodec/wmaprodec.c
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2009-09-27 08:16:50 +0000
committerMåns Rullgård <mans@mansr.com>2009-09-27 08:16:50 +0000
commitd975e5e9b765855a085010341d9da87e62f73684 (patch)
tree228279625b2ffa590859cc717931e7546b1266f4 /libavcodec/wmaprodec.c
parent8b11b44ea73f8052c8c2b606532037df848b1d76 (diff)
WMAPRO: use vector_fmul_scalar from dsputil where possible
Originally committed as revision 20056 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/wmaprodec.c')
-rw-r--r--libavcodec/wmaprodec.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c
index 7f35edc699..a4fcab7d27 100644
--- a/libavcodec/wmaprodec.c
+++ b/libavcodec/wmaprodec.c
@@ -981,10 +981,13 @@ static void inverse_channel_transform(WMAProDecodeCtx *s)
}
}
} else if (s->num_channels == 2) {
- for (y = sfb[0]; y < FFMIN(sfb[1], s->subframe_len); y++) {
- ch_data[0][y] *= 181.0 / 128;
- ch_data[1][y] *= 181.0 / 128;
- }
+ int len = FFMIN(sfb[1], s->subframe_len) - sfb[0];
+ s->dsp.vector_fmul_scalar(ch_data[0] + sfb[0],
+ ch_data[0] + sfb[0],
+ 181.0 / 128, len);
+ s->dsp.vector_fmul_scalar(ch_data[1] + sfb[0],
+ ch_data[1] + sfb[0],
+ 181.0 / 128, len);
}
}
}
@@ -1214,10 +1217,10 @@ static int decode_subframe(WMAProDecodeCtx *s)
(s->channel[c].max_scale_factor - *sf++) *
s->channel[c].scale_factor_step;
const float quant = pow(10.0, exp / 20.0);
- int start;
-
- for (start = s->cur_sfb_offsets[b]; start < end; start++)
- s->tmp[start] = s->channel[c].coeffs[start] * quant;
+ int start = s->cur_sfb_offsets[b];
+ s->dsp.vector_fmul_scalar(s->tmp + start,
+ s->channel[c].coeffs + start,
+ quant, end - start);
}
/** apply imdct (ff_imdct_half == DCTIV with reverse) */