[FFmpeg-devel] [PATCH] avcodec/x86/audiodsp: add scalarproduct avx2

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Tue Sep 13 12:28:16 EEST 2022


Paul B Mahol:
>  
> +INIT_YMM avx2
> +cglobal scalarproduct_int16, 3,3,2, v1, v2, order
> +    add orderd, orderd
> +    add v1q, orderq
> +    add v2q, orderq
> +    neg orderq
> +    pxor    m1, m1
> +.loop:
> +    movu    m0, [v1q + orderq]
> +    pmaddwd m0, [v2q + orderq]
> +    paddd   m1, m0
> +    add     orderq, mmsize
> +    jl .loop
> +    HADDD   m1, m0
> +    movd   eax, xm1
> +    RET
>  

avx2 asm functions are guarded by %if HAVE_AVX2_EXTERNAL (presumably not
all assemblers can handle them?).

- Andreas


More information about the ffmpeg-devel mailing list