On Mon, Jun 25, 2012 at 1:39 PM, Justin Ruggles
<[email protected]> wrote:
> ---
>  libavresample/x86/audio_convert.asm    |   34 
> ++++++++++++++++++++++++++++++++
>  libavresample/x86/audio_convert_init.c |    9 ++++++++
>  2 files changed, 43 insertions(+), 0 deletions(-)
>
> diff --git a/libavresample/x86/audio_convert.asm 
> b/libavresample/x86/audio_convert.asm
> index d8bcbdc..53091ef 100644
> --- a/libavresample/x86/audio_convert.asm
> +++ b/libavresample/x86/audio_convert.asm
> @@ -1094,3 +1094,37 @@ CONV_FLT_TO_S16P_6CH
>  INIT_XMM avx
>  CONV_FLT_TO_S16P_6CH
>  %endif
> +
> +;------------------------------------------------------------------------------
> +; void ff_conv_flt_to_fltp_2ch(float *const *dst, float *src, int len,
> +;                              int channels);
> +;------------------------------------------------------------------------------
> +
> +%macro CONV_FLT_TO_FLTP_2CH 0
> +cglobal conv_flt_to_fltp_2ch, 3,4,4, dst0, src, len, dst1
> +    lea   lenq, [4*lend]
> +    mov  dst1q, [dst0q+gprsize]
> +    mov  dst0q, [dst0q        ]
> +    lea   srcq, [srcq+2*lenq]
> +    add  dst0q, lenq
> +    add  dst1q, lenq
> +    neg   lenq
> +    ALIGN 16
> +.loop:
> +    mova    m0, [srcq+2*lenq       ]
> +    mova    m1, [srcq+2*lenq+mmsize]
> +    shufps  m2, m0, m1, q2020
> +    shufps  m3, m0, m1, q3131
> +    mova  [dst0q+lenq], m2
> +    mova  [dst1q+lenq], m3
> +    add   lenq, mmsize
> +    jl .loop
> +    REP_RET

Can we not use 3-operand in the second shufps?  On non-AVX targets,
this will generate an extra (unnecessary) mova.

Other than that, looks okay.

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

Reply via email to