On Mon, Sep 5, 2016 at 1:02 PM, Anton Khirnov <an...@khirnov.net> wrote:
> CC: libav-sta...@libav.org
> ---
>  libavcodec/x86/audiodsp.asm | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/libavcodec/x86/audiodsp.asm b/libavcodec/x86/audiodsp.asm
> index dc38ada..0e3019c 100644
> --- a/libavcodec/x86/audiodsp.asm
> +++ b/libavcodec/x86/audiodsp.asm
> @@ -26,6 +26,7 @@ SECTION .text
>  %macro SCALARPRODUCT 0
>  ; int ff_scalarproduct_int16(int16_t *v1, int16_t *v2, int order)
>  cglobal scalarproduct_int16, 3,3,3, v1, v2, order
> +    movsxdifnidn orderq, orderd
>      shl orderq, 1
>      add v1q, orderq
>      add v2q, orderq

Alternatively replace "shl orderq, 1" with "add orderd, orderd"
instead, one instruction less since instructions operating on 32-bit
registers will implicitly zero the upper 32 bits (using "shl orderd,
1" works equally well but add can be faster than shl on some CPUs so
might as well use that instead).
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to