1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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: Mans Rullgard <mans@mansr.com>
This commit is contained in:
Mans Rullgard 2012-07-02 23:04:04 +01:00
parent cbd9b2f918
commit fb93e61e2b
2 changed files with 18 additions and 6 deletions

View File

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

View File

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