[FFmpeg-devel] [PATCH 05/12] WMA: use vector_fmul_step_scalar

Michael Niedermayer michaelni
Mon Sep 28 00:12:40 CEST 2009


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 ...

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090928/f484feb9/attachment.pgp>



More information about the ffmpeg-devel mailing list