On 02/21/2012 05:02 PM, Christophe Gisquet wrote:

> Hi,
> 
> this is very minor, and I'm not even sure it can be said to be a win,
> but still...
> 
> Christophe
> 
> 
> 0003-x86-dsputil-simplify-scalarproduct_float_sse.patch
> 
> 
> From 4338b6b7a41c5beeb368410edb31b6439725a65e Mon Sep 17 00:00:00 2001
> From: Christophe GISQUET <[email protected]>
> Date: Tue, 21 Feb 2012 22:43:27 +0100
> Subject: [PATCH 3/3] x86 dsputil: simplify scalarproduct_float_sse
> 
> The mov and the shuffle can be performed in one instruction by using a
> different shuffle operation. Timing difference is not measurable.
> ---
>  libavcodec/x86/dsputil_yasm.asm |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/libavcodec/x86/dsputil_yasm.asm b/libavcodec/x86/dsputil_yasm.asm
> index 09940d1..ca3ec18 100644
> --- a/libavcodec/x86/dsputil_yasm.asm
> +++ b/libavcodec/x86/dsputil_yasm.asm
> @@ -472,8 +472,7 @@ cglobal scalarproduct_float_sse, 3,3,2, v1, v2, offset
>          js       .loop
>      movhlps xmm1, xmm0
>      addps   xmm0, xmm1
> -    movss   xmm1, xmm0
> -    shufps  xmm0, xmm0, 1
> +    pshufd  xmm1, xmm0, 1
>      addss   xmm0, xmm1
>  %if ARCH_X86_64 == 0
>      movd    r0m,  xmm0


pshufd is sse2 not sse

-Justin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to