[FFmpeg-devel] [PATCH] [WIP] swr: rewrite resample_common_float_sse in yasm.

James Almer jamrial at gmail.com
Thu Jun 19 22:45:15 CEST 2014


On 19/06/14 9:08 AM, Ronald S. Bultje wrote:
> DO NOT MERGE. Speed not tested. avx and linear functions not yet ported,
> inline assembly for this function not yet removed.
> ---
>  libswresample/x86/Makefile           |   1 +
>  libswresample/x86/resample.asm       | 164 +++++++++++++++++++++++++++++++++++
>  libswresample/x86/resample_x86_dsp.c |   5 +-
>  3 files changed, 169 insertions(+), 1 deletion(-)
>  create mode 100644 libswresample/x86/resample.asm

[...]

> +.loop:
> +    mov          filterd, dword [ctxq+ResampleContext.filter_alloc]
> +    imul         filterd, indexd
> +    shl          filterq, 2
> +    add          filterq, [ctxq+ResampleContext.filter_bank]
> +
> +    mov      filter_lend, dword [ctxq+ResampleContext.filter_length]
> +    lea          srcptrq, [srcq   +filter_lenq*4]
> +    lea          filterq, [filterq+filter_lenq*4]
> +    neg      filter_lenq
> +
> +    pxor              m0, m0

xorps.

If this code is going to be shared in some way with the int16 functions then 
you could add a ZERO macro of sorts that chooses between xorps and pxor.
Or it could be added to x86util instead. There are at least two other asm 
files with a macro like that after all.


More information about the ffmpeg-devel mailing list