Commit 3913d6f7 authored by James Almer's avatar James Almer

x86/scene_sad: fix link errors when HAVE_X86ASM is not defined

Reviewed-by: 's avatarHaihao Xiang <haihao.xiang@intel.com>
Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent d290bb0c
......@@ -36,17 +36,25 @@ static void FUNC_NAME(SCENE_SAD_PARAMS) { \
*sum += sad[0]; \
}
#if HAVE_X86ASM
SCENE_SAD_FUNC(scene_sad_sse2, ff_scene_sad_sse2, 16);
#if HAVE_AVX2_EXTERNAL
SCENE_SAD_FUNC(scene_sad_avx2, ff_scene_sad_avx2, 32);
#endif
#endif
ff_scene_sad_fn ff_scene_sad_get_fn_x86(int depth)
{
#if HAVE_X86ASM
int cpu_flags = av_get_cpu_flags();
if (depth == 8) {
#if HAVE_AVX2_EXTERNAL
if (EXTERNAL_AVX2_FAST(cpu_flags))
return scene_sad_avx2;
else if (EXTERNAL_SSE2(cpu_flags))
#endif
if (EXTERNAL_SSE2(cpu_flags))
return scene_sad_sse2;
}
#endif
return NULL;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment