[FFmpeg-cvslog] vp56: only compile MMX SIMD on x86-32.

Ronald S. Bultje git at videolan.org
Sun Jul 29 02:26:19 CEST 2012


ffmpeg | branch: master | Ronald S. Bultje <rsbultje at gmail.com> | Thu Jul 26 22:09:46 2012 -0700| [158744a4cd63a8dce2060b366ae7b6509351d6c8] | committer: Ronald S. Bultje

vp56: only compile MMX SIMD on x86-32.

All x86-64 CPUs have SSE2, so the MMX version will never be used. This
leads to smaller binaries.

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

 libavcodec/x86/vp56dsp.asm    |    2 ++
 libavcodec/x86/vp56dsp_init.c |    2 ++
 2 files changed, 4 insertions(+)

diff --git a/libavcodec/x86/vp56dsp.asm b/libavcodec/x86/vp56dsp.asm
index 27a82bc..ca4d97e 100644
--- a/libavcodec/x86/vp56dsp.asm
+++ b/libavcodec/x86/vp56dsp.asm
@@ -162,8 +162,10 @@ cglobal vp6_filter_diag4, 5, 7, 8
     RET
 %endmacro
 
+%if ARCH_X86_32
 INIT_MMX mmx
 vp6_filter_diag4
+%endif
 
 INIT_XMM sse2
 vp6_filter_diag4
diff --git a/libavcodec/x86/vp56dsp_init.c b/libavcodec/x86/vp56dsp_init.c
index 2989281..ae04440 100644
--- a/libavcodec/x86/vp56dsp_init.c
+++ b/libavcodec/x86/vp56dsp_init.c
@@ -36,9 +36,11 @@ av_cold void ff_vp56dsp_init_x86(VP56DSPContext* c, enum CodecID codec)
     int mm_flags = av_get_cpu_flags();
 
     if (CONFIG_VP6_DECODER && codec == CODEC_ID_VP6) {
+#if ARCH_X86_32
         if (mm_flags & AV_CPU_FLAG_MMX) {
             c->vp6_filter_diag4 = ff_vp6_filter_diag4_mmx;
         }
+#endif
 
         if (mm_flags & AV_CPU_FLAG_SSE2) {
             c->vp6_filter_diag4 = ff_vp6_filter_diag4_sse2;



More information about the ffmpeg-cvslog mailing list