Commit fb93e61e authored by Mans Rullgard's avatar Mans Rullgard

x86: lavfi: fix gradfun/yadif build with mmx/sse disabled

These functions are defined conditionally so any uses need to have
preprocessor guards.
Signed-off-by: 's avatarMans Rullgard <mans@mansr.com>
parent cbd9b2f9
......@@ -168,10 +168,16 @@ av_cold void ff_gradfun_init_x86(GradFunContext *gf)
{
int cpu_flags = av_get_cpu_flags();
if (HAVE_MMX2 && cpu_flags & AV_CPU_FLAG_MMX2)
#if HAVE_MMX2
if (cpu_flags & AV_CPU_FLAG_MMX2)
gf->filter_line = gradfun_filter_line_mmx2;
if (HAVE_SSSE3 && cpu_flags & AV_CPU_FLAG_SSSE3)
#endif
#if HAVE_SSSE3
if (cpu_flags & AV_CPU_FLAG_SSSE3)
gf->filter_line = gradfun_filter_line_ssse3;
if (HAVE_SSE && cpu_flags & AV_CPU_FLAG_SSE2)
#endif
#if HAVE_SSE
if (cpu_flags & AV_CPU_FLAG_SSE2)
gf->blur_line = gradfun_blur_line_sse2;
#endif
}
......@@ -53,10 +53,16 @@ av_cold void ff_yadif_init_x86(YADIFContext *yadif)
{
int cpu_flags = av_get_cpu_flags();
if (HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX)
#if HAVE_MMX
if (cpu_flags & AV_CPU_FLAG_MMX)
yadif->filter_line = yadif_filter_line_mmx;
if (HAVE_SSE && cpu_flags & AV_CPU_FLAG_SSE2)
#endif
#if HAVE_SSE
if (cpu_flags & AV_CPU_FLAG_SSE2)
yadif->filter_line = yadif_filter_line_sse2;
if (HAVE_SSSE3 && cpu_flags & AV_CPU_FLAG_SSSE3)
#endif
#if HAVE_SSSE3
if (cpu_flags & AV_CPU_FLAG_SSSE3)
yadif->filter_line = yadif_filter_line_ssse3;
#endif
}
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