[FFmpeg-devel] [PATCH v7] libavfilter/x86/vf_convolution: add sobel filter optimization and unit test with intel AVX512 VNNI

James Almer jamrial at gmail.com
Mon Nov 14 04:42:53 EET 2022


On 11/4/2022 5:29 AM, bin.wang-at-intel.com at ffmpeg.org wrote:
> +%macro FILTER_SOBEL 0
> +%if UNIX64
> +cglobal filter_sobel, 4, 15, 7, dst, width, matrix, ptr, c0, c1, c2, c3, c4, c5, c6, c7, c8, r, x
> +%else
> +cglobal filter_sobel, 4, 15, 7, dst, width, rdiv, bias, matrix, ptr, c0, c1, c2, c3, c4, c5, c6, c7, c8, r, x
> +%endif
> +%if WIN64
> +    SWAP xmm0, xmm2
> +    SWAP xmm1, xmm3
> +    mov  r2q, matrixmp
> +    mov  r3q, ptrmp
> +    DEFINE_ARGS dst, width, matrix, ptr, c0, c1, c2, c3, c4, c5, c6, c7, c8, r, x
> +%endif
> +    movsxdifnidn widthq, widthd
> +    VBROADCASTSS m0, xmm0
> +    VBROADCASTSS m1, xmm1

This and every other xmm# case should instead be xm#, to ensure the 
swapping is taken into account.


More information about the ffmpeg-devel mailing list