[FFmpeg-cvslog] Fix compilation with old yasm.

Carl Eugen Hoyos git at videolan.org
Thu Jun 16 23:32:00 CEST 2011


ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Thu Jun 16 23:14:17 2011 +0200| [5fb67d8039e15a34c5aef8a1c87c8e252296938b] | committer: Carl Eugen Hoyos

Fix compilation with old yasm.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5fb67d8039e15a34c5aef8a1c87c8e252296938b
---

 libavcodec/x86/h264_deblock.asm       |    6 ++++++
 libavcodec/x86/h264_deblock_10bit.asm |    8 ++++++++
 libavcodec/x86/h264dsp_mmx.c          |    2 +-
 3 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/libavcodec/x86/h264_deblock.asm b/libavcodec/x86/h264_deblock.asm
index 2a6da0f..6c2ef18 100644
--- a/libavcodec/x86/h264_deblock.asm
+++ b/libavcodec/x86/h264_deblock.asm
@@ -386,8 +386,10 @@ cglobal deblock_h_luma_8_%1, 5,7
 
 INIT_XMM
 DEBLOCK_LUMA sse2
+%ifdef HAVE_AVX
 INIT_AVX
 DEBLOCK_LUMA avx
+%endif
 
 %else
 
@@ -506,8 +508,10 @@ INIT_MMX
 DEBLOCK_LUMA mmxext, v8, 8
 INIT_XMM
 DEBLOCK_LUMA sse2, v, 16
+%ifdef HAVE_AVX
 INIT_AVX
 DEBLOCK_LUMA avx, v, 16
+%endif
 
 %endif ; ARCH
 
@@ -778,8 +782,10 @@ cglobal deblock_h_luma_intra_8_%1, 2,4
 
 INIT_XMM
 DEBLOCK_LUMA_INTRA sse2, v
+%ifdef HAVE_AVX
 INIT_AVX
 DEBLOCK_LUMA_INTRA avx , v
+%endif
 %ifndef ARCH_X86_64
 INIT_MMX
 DEBLOCK_LUMA_INTRA mmxext, v8
diff --git a/libavcodec/x86/h264_deblock_10bit.asm b/libavcodec/x86/h264_deblock_10bit.asm
index 699fc4a..ee31625 100644
--- a/libavcodec/x86/h264_deblock_10bit.asm
+++ b/libavcodec/x86/h264_deblock_10bit.asm
@@ -419,9 +419,11 @@ cglobal deblock_h_luma_10_%1, 5,7,15
 
 INIT_XMM
 DEBLOCK_LUMA_64 sse2
+%ifdef HAVE_AVX
 INIT_AVX
 DEBLOCK_LUMA_64 avx
 %endif
+%endif
 
 %macro SWAPMOVA 2
 %ifid %1
@@ -714,8 +716,10 @@ cglobal deblock_h_luma_intra_10_%1, 4,7,16
 
 INIT_XMM
 DEBLOCK_LUMA_INTRA_64 sse2
+%ifdef HAVE_AVX
 INIT_AVX
 DEBLOCK_LUMA_INTRA_64 avx
+%endif
 
 %endif
 
@@ -799,10 +803,12 @@ DEBLOCK_LUMA_INTRA mmxext
 INIT_XMM
 DEBLOCK_LUMA sse2
 DEBLOCK_LUMA_INTRA sse2
+%ifdef HAVE_AVX
 INIT_AVX
 DEBLOCK_LUMA avx
 DEBLOCK_LUMA_INTRA avx
 %endif
+%endif
 
 ; in: %1=p0, %2=q0, %3=p1, %4=q1, %5=mask, %6=tmp, %7=tmp
 ; out: %1=p0', %2=q0'
@@ -913,5 +919,7 @@ DEBLOCK_CHROMA mmxext
 %endif
 INIT_XMM
 DEBLOCK_CHROMA sse2
+%ifdef HAVE_AVX
 INIT_AVX
 DEBLOCK_CHROMA avx
+%endif
diff --git a/libavcodec/x86/h264dsp_mmx.c b/libavcodec/x86/h264dsp_mmx.c
index 3bb4384..6c1b0a5 100644
--- a/libavcodec/x86/h264dsp_mmx.c
+++ b/libavcodec/x86/h264dsp_mmx.c
@@ -418,7 +418,7 @@ void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth)
                 c->biweight_h264_pixels_tab[3]= ff_h264_biweight_8x8_ssse3;
                 c->biweight_h264_pixels_tab[4]= ff_h264_biweight_8x4_ssse3;
             }
-            if (mm_flags&AV_CPU_FLAG_AVX) {
+            if (HAVE_AVX && 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;



More information about the ffmpeg-cvslog mailing list