[FFmpeg-devel] [PATCH 05/12] WMA: use vector_fmul_step_scalar
Måns Rullgård
mans
Tue Sep 29 13:04:06 CEST 2009
Michael Niedermayer <michaelni at gmx.at> writes:
> On Sun, Sep 27, 2009 at 11:49:21AM +0100, Mans Rullgard wrote:
>> ---
>> libavcodec/wmadec.c | 6 +++---
>> 1 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/libavcodec/wmadec.c b/libavcodec/wmadec.c
>> index a4d5ad6..9367e97 100644
>> --- a/libavcodec/wmadec.c
>> +++ b/libavcodec/wmadec.c
>> @@ -601,9 +601,9 @@ static int wma_decode_block(WMACodecContext *s)
>> for(i = 0;i < s->coefs_start; i++)
>> *coefs++ = 0.0;
>> n = nb_coefs[ch];
>> - for(i = 0;i < n; i++) {
>> - *coefs++ = coefs1[i] * exponents[i<<bsize>>esize] * mult;
>> - }
>> + s->dsp.vector_fmul_step_scalar(coefs, coefs1, exponents,
>> + mult, 1<<bsize>>esize, n);
>> + coefs += n;
>> n = s->block_len - s->coefs_end[bsize];
>> for(i = 0;i < n; i++)
>> *coefs++ = 0.0;
>
> i suspect that highlevel optimizations are possible and should be done first
> as they likely would render this optimized code obsolete
>
> for example: what value does 1<<bsize>>esize generally have?
> if its commonly 1 the others could be convertet ...
On a randomly chosen test file, 1 is the most common value, roughly
50%, with 2, 3, and 4 also occurring frequently.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list