[FFmpeg-devel] [PATCH] 3dnow optimized mp3 windowing

Michael Niedermayer michaelni
Fri Jul 16 23:25:23 CEST 2010


On Sat, Jul 03, 2010 at 06:50:11PM +0200, Vitor Sessak wrote:
> $subj.
>
> -Vitor

>  mpegaudiodec_mmx.c |   94 +++++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 94 insertions(+)
> 1ab25d8b8b98fcfd4b604873bd4cd370ee76677f  mp3win_3dnow.diff
> Index: libavcodec/x86/mpegaudiodec_mmx.c
> ===================================================================
> --- libavcodec/x86/mpegaudiodec_mmx.c	(revision 24021)
> +++ libavcodec/x86/mpegaudiodec_mmx.c	(working copy)
> @@ -147,10 +147,104 @@
>      *out = sum;
>  }
>  
> +static void apply_window_3dnow(const float *buf, const float *win1,
> +                               const float *win2, float *sum1, float *sum2,
> +                               int len)
> +{
> +    x86_reg count = - 4*len;
> +    const float *win1a = win1;
> +    const float *win2a = win2;
> +    const float *bufa  = buf;
> +    float *sum1a = sum1;
> +    float *sum2a = sum2;

this looks a bit redundant


[...]
> +
> +static void apply_window_mp3_3dnow(float *in, float *win, int *unused,
> +                                   float *out, int incr)
> +{
> +    LOCAL_ALIGNED_16(float, suma, [17]);
> +    LOCAL_ALIGNED_16(float, sumb, [17]);
> +    LOCAL_ALIGNED_16(float, sumc, [17]);
> +    LOCAL_ALIGNED_16(float, sumd, [17]);
> +
> +    float sum;
> +    int j;
> +    float *out2 = out + 32 * incr;
> +

> +    /* copy to avoid wrap */
> +    memcpy(in + 512, in, 32 * sizeof(*in));

calling memcpy in asm optimized functions?



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

The greatest way to live with honor in this world is to be what we pretend
to be. -- Socrates
-------------- 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/20100716/77dfd7ba/attachment.pgp>



More information about the ffmpeg-devel mailing list