[FFmpeg-devel] [PATCH V3 1/2] avfilter/vf_gblur: add x86 SIMD optimizations

Adam Sampson ats at offog.org
Wed Jun 12 15:21:15 EEST 2019


Hi Ruiling,

Ruiling Song <ruiling.song at intel.com> writes:

> The horizontal pass get ~2x performance with the patch
> under single thread.
[...]
> +++ b/libavfilter/x86/vf_gblur.asm
[...]
> +%if ARCH_X86_64
> +INIT_XMM sse4
> +HORIZ_SLICE
> +
> +INIT_XMM avx2
> +HORIZ_SLICE
> +%endif
[...]
> +++ b/libavfilter/x86/vf_gblur_init.c
[...]
> +void ff_horiz_slice_sse4(float *ptr, int width, int height, int steps, float nu, float bscale);
> +void ff_horiz_slice_avx2(float *ptr, int width, int height, int
> steps, float nu, float bscale);

This breaks the build for me on x86-32 -- the asm helpers in
vf_gblur.asm are only defined on x86-64, but vf_gblur_init.c expects
them to exist on both architectures.

ld: libavfilter/libavfilter.so: undefined reference to `ff_horiz_slice_avx2'
ld: libavfilter/libavfilter.so: undefined reference to `ff_horiz_slice_sse4'
collect2: error: ld returned 1 exit status

Adding "#if ARCH_X86_64" conditionals to vf_gblur_init.c fixes it.

Thanks,

-- 
Adam Sampson <ats at offog.org>                         <http://offog.org/>


More information about the ffmpeg-devel mailing list