Fix compilation with yasm-0.6.2.
authorCarl Eugen Hoyos <cehoyos@ag.or.at>
Sat, 1 Sep 2012 08:59:16 +0000 (10:59 +0200)
committerCarl Eugen Hoyos <cehoyos@ag.or.at>
Sat, 1 Sep 2012 08:59:16 +0000 (10:59 +0200)
libavcodec/x86/fft_init.c
libavcodec/x86/h264_intrapred_init.c
libavcodec/x86/h264dsp_init.c
libavcodec/x86/mpegaudiodec.c
libavcodec/x86/proresdsp_init.c
libavcodec/x86/v210-init.c
libavutil/x86/float_dsp_init.c
libswresample/x86/swresample_x86.c
libswscale/x86/swscale.c

index 852c6b8..f14c588 100644 (file)
@@ -47,7 +47,7 @@ av_cold void ff_fft_init_mmx(FFTContext *s)
         s->fft_calc    = ff_fft_calc_sse;
         s->fft_permutation = FF_FFT_PERM_SWAP_LSBS;
     }
-    if (has_vectors & AV_CPU_FLAG_AVX && HAVE_AVX && s->nbits >= 5) {
+    if (has_vectors & AV_CPU_FLAG_AVX && HAVE_AVX_EXTERNAL && s->nbits >= 5) {
         /* AVX for SB */
         s->imdct_half      = ff_imdct_half_avx;
         s->fft_calc        = ff_fft_calc_avx;
@@ -65,7 +65,7 @@ av_cold void ff_dct_init_mmx(DCTContext *s)
         s->dct32 = ff_dct32_float_sse;
     if (has_vectors & AV_CPU_FLAG_SSE2 && HAVE_SSE)
         s->dct32 = ff_dct32_float_sse2;
-    if (has_vectors & AV_CPU_FLAG_AVX && HAVE_AVX)
+    if (has_vectors & AV_CPU_FLAG_AVX && HAVE_AVX_EXTERNAL)
         s->dct32 = ff_dct32_float_avx;
 #endif
 }
index 3d4701d..d40a08a 100644 (file)
@@ -367,8 +367,7 @@ void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, const int bit_depth
             h->pred8x8l[VERT_RIGHT_PRED     ] = ff_pred8x8l_vertical_right_10_ssse3;
             h->pred8x8l[HOR_UP_PRED         ] = ff_pred8x8l_horizontal_up_10_ssse3;
         }
-#if HAVE_AVX
-        if (mm_flags & AV_CPU_FLAG_AVX) {
+        if (HAVE_AVX_EXTERNAL && mm_flags & AV_CPU_FLAG_AVX) {
             h->pred4x4[DIAG_DOWN_LEFT_PRED ] = ff_pred4x4_down_left_10_avx;
             h->pred4x4[DIAG_DOWN_RIGHT_PRED] = ff_pred4x4_down_right_10_avx;
             h->pred4x4[VERT_LEFT_PRED      ] = ff_pred4x4_vertical_left_10_avx;
@@ -384,7 +383,6 @@ void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, const int bit_depth
             h->pred8x8l[VERT_RIGHT_PRED     ] = ff_pred8x8l_vertical_right_10_avx;
             h->pred8x8l[HOR_UP_PRED         ] = ff_pred8x8l_horizontal_up_10_avx;
         }
-#endif /* HAVE_AVX */
     }
 #endif /* HAVE_YASM */
 }
index 6fd77be..472f252 100644 (file)
@@ -292,7 +292,7 @@ void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth,
                     c->biweight_h264_pixels_tab[0] = ff_h264_biweight_16_ssse3;
                     c->biweight_h264_pixels_tab[1] = ff_h264_biweight_8_ssse3;
                 }
-                if (HAVE_AVX && mm_flags & AV_CPU_FLAG_AVX) {
+                if (HAVE_AVX_EXTERNAL && mm_flags & AV_CPU_FLAG_AVX) {
 #if HAVE_ALIGNED_STACK
                     c->h264_v_loop_filter_luma       = ff_deblock_v_luma_8_avx;
                     c->h264_h_loop_filter_luma       = ff_deblock_h_luma_8_avx;
index 8da3e02..c716af2 100644 (file)
@@ -221,7 +221,7 @@ DECL_IMDCT_BLOCKS(sse2,sse)
 DECL_IMDCT_BLOCKS(sse3,sse)
 DECL_IMDCT_BLOCKS(ssse3,sse)
 #endif
-#if HAVE_AVX
+#if HAVE_AVX_EXTERNAL
 DECL_IMDCT_BLOCKS(avx,avx)
 #endif
 #endif /* HAVE_YASM */
@@ -251,7 +251,7 @@ void ff_mpadsp_init_mmx(MPADSPContext *s)
 #endif /* HAVE_INLINE_ASM */
 #if HAVE_YASM
     if (0) {
-#if HAVE_AVX
+#if HAVE_AVX_EXTERNAL
     } else if (mm_flags & AV_CPU_FLAG_AVX && HAVE_AVX) {
         s->imdct36_blocks_float = imdct36_blocks_avx;
 #endif
index a99a938..5892af2 100644 (file)
@@ -47,11 +47,9 @@ void ff_proresdsp_x86_init(ProresDSPContext *dsp, AVCodecContext *avctx)
         dsp->idct_put = ff_prores_idct_put_10_sse4;
     }
 
-#if HAVE_AVX
-    if (flags & AV_CPU_FLAG_AVX) {
+    if (HAVE_AVX_EXTERNAL && flags & AV_CPU_FLAG_AVX) {
         dsp->idct_permutation_type = FF_TRANSPOSE_IDCT_PERM;
         dsp->idct_put = ff_prores_idct_put_10_avx;
     }
-#endif /* HAVE_AVX */
 #endif /* ARCH_X86_64 && HAVE_YASM */
 }
index c961178..02c5eaa 100644 (file)
@@ -34,14 +34,14 @@ av_cold void v210_x86_init(V210DecContext *s)
         if (cpu_flags & AV_CPU_FLAG_SSSE3)
             s->unpack_frame = ff_v210_planar_unpack_aligned_ssse3;
 
-        if (HAVE_AVX && cpu_flags & AV_CPU_FLAG_AVX)
+        if (HAVE_AVX_EXTERNAL && cpu_flags & AV_CPU_FLAG_AVX)
             s->unpack_frame = ff_v210_planar_unpack_aligned_avx;
     }
     else {
         if (cpu_flags & AV_CPU_FLAG_SSSE3)
             s->unpack_frame = ff_v210_planar_unpack_unaligned_ssse3;
 
-        if (HAVE_AVX && cpu_flags & AV_CPU_FLAG_AVX)
+        if (HAVE_AVX_EXTERNAL && cpu_flags & AV_CPU_FLAG_AVX)
             s->unpack_frame = ff_v210_planar_unpack_unaligned_avx;
     }
 #endif
index 3e05b9d..7c73f5f 100644 (file)
@@ -40,7 +40,7 @@ void ff_float_dsp_init_x86(AVFloatDSPContext *fdsp)
         fdsp->vector_fmul = ff_vector_fmul_sse;
         fdsp->vector_fmac_scalar = ff_vector_fmac_scalar_sse;
     }
-    if (mm_flags & AV_CPU_FLAG_AVX && HAVE_AVX) {
+    if (mm_flags & AV_CPU_FLAG_AVX && HAVE_AVX_EXTERNAL) {
         fdsp->vector_fmul = ff_vector_fmul_avx;
         fdsp->vector_fmac_scalar = ff_vector_fmac_scalar_avx;
     }
index 74e05e6..93db7e3 100644 (file)
@@ -125,7 +125,7 @@ MULTI_CAPS_FUNC(AV_CPU_FLAG_SSE2, sse2)
                 ac->simd_f =  ff_pack_6ch_float_to_int32_a_sse4;
         }
     }
-    if(HAVE_AVX && mm_flags & AV_CPU_FLAG_AVX) {
+    if(HAVE_AVX_EXTERNAL && mm_flags & AV_CPU_FLAG_AVX) {
         if(   out_fmt == AV_SAMPLE_FMT_FLT  && in_fmt == AV_SAMPLE_FMT_S32 || out_fmt == AV_SAMPLE_FMT_FLTP && in_fmt == AV_SAMPLE_FMT_S32P)
             ac->simd_f =  ff_int32_to_float_a_avx;
         if(channels == 6) {
@@ -185,7 +185,7 @@ void swri_rematrix_init_x86(struct SwrContext *s){
             s->mix_1_1_simd = ff_mix_1_1_a_float_sse;
             s->mix_2_1_simd = ff_mix_2_1_a_float_sse;
         }
-        if(HAVE_AVX && mm_flags & AV_CPU_FLAG_AVX) {
+        if(HAVE_AVX_EXTERNAL && mm_flags & AV_CPU_FLAG_AVX) {
             s->mix_1_1_simd = ff_mix_1_1_a_float_avx;
             s->mix_2_1_simd = ff_mix_2_1_a_float_avx;
         }
index 3217adf..e633e92 100644 (file)
@@ -541,7 +541,7 @@ switch(c->dstBpc){ \
             c->yuv2plane1 = ff_yuv2plane1_16_sse4;
     }
 
-    if (HAVE_AVX && cpu_flags & AV_CPU_FLAG_AVX) {
+    if (HAVE_AVX_EXTERNAL && cpu_flags & AV_CPU_FLAG_AVX) {
         ASSIGN_VSCALEX_FUNC(c->yuv2planeX, avx, ,
                             HAVE_ALIGNED_STACK || ARCH_X86_64);
         ASSIGN_VSCALE_FUNC(c->yuv2plane1, avx, avx, 1);