x86: h264dsp: Fix linking with yasm and optimizations disabled
authorDiego Biurrun <diego@biurrun.de>
Tue, 27 Nov 2012 19:35:27 +0000 (20:35 +0100)
committerDiego Biurrun <diego@biurrun.de>
Wed, 28 Nov 2012 13:45:28 +0000 (14:45 +0100)
Some optimized functions reference optimized symbols, so the functions
must be explicitly disabled when those symbols are unavailable.

libavcodec/x86/h264dsp_init.c

index d7257e6..ac231cb 100644 (file)
@@ -129,7 +129,7 @@ LF_IFUNC(v, chroma_intra, depth, avx)
 LF_FUNCS(uint8_t,   8)
 LF_FUNCS(uint16_t, 10)
 
-#if ARCH_X86_32
+#if ARCH_X86_32 && HAVE_MMXEXT_EXTERNAL
 LF_FUNC(v8, luma, 8, mmxext)
 static void ff_deblock_v_luma_8_mmxext(uint8_t *pix, int stride, int alpha,
                                        int beta, int8_t *tc0)
@@ -146,7 +146,7 @@ static void ff_deblock_v_luma_intra_8_mmxext(uint8_t *pix, int stride,
     ff_deblock_v8_luma_intra_8_mmxext(pix + 0, stride, alpha, beta);
     ff_deblock_v8_luma_intra_8_mmxext(pix + 8, stride, alpha, beta);
 }
-#endif /* ARCH_X86_32 */
+#endif /* ARCH_X86_32 && HAVE_MMXEXT_EXTERNAL */
 
 LF_FUNC(v,  luma,       10, mmxext)
 LF_IFUNC(v, luma_intra, 10, mmxext)
@@ -245,12 +245,12 @@ void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth,
                     c->h264_h_loop_filter_chroma       = ff_deblock_h_chroma_8_mmxext;
                     c->h264_h_loop_filter_chroma_intra = ff_deblock_h_chroma_intra_8_mmxext;
                 }
-#if ARCH_X86_32
+#if ARCH_X86_32 && HAVE_MMXEXT_EXTERNAL
                 c->h264_v_loop_filter_luma       = ff_deblock_v_luma_8_mmxext;
                 c->h264_h_loop_filter_luma       = ff_deblock_h_luma_8_mmxext;
                 c->h264_v_loop_filter_luma_intra = ff_deblock_v_luma_intra_8_mmxext;
                 c->h264_h_loop_filter_luma_intra = ff_deblock_h_luma_intra_8_mmxext;
-#endif /* ARCH_X86_32 */
+#endif /* ARCH_X86_32 && HAVE_MMXEXT_EXTERNAL */
                 c->weight_h264_pixels_tab[0] = ff_h264_weight_16_mmxext;
                 c->weight_h264_pixels_tab[1] = ff_h264_weight_8_mmxext;
                 c->weight_h264_pixels_tab[2] = ff_h264_weight_4_mmxext;