Browse Source

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

Reviewed-by: Haihao Xiang <haihao.xiang@intel.com>
Signed-off-by: James Almer <jamrial@gmail.com>
tags/n4.2
James Almer 6 years ago
parent
commit
3913d6f734
1 changed files with 9 additions and 1 deletions
  1. +9
    -1
      libavfilter/x86/scene_sad_init.c

+ 9
- 1
libavfilter/x86/scene_sad_init.c View File

@@ -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;
}

Loading…
Cancel
Save