[FFmpeg-cvslog] x86/dct32: don't build ff_dct32_float_sse on x86_64

James Almer git at videolan.org
Mon Jun 9 01:10:28 CEST 2014


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Sun Jun  8 19:39:21 2014 -0300| [6d408495b59547c6c07830d2095144586dc13a5b] | committer: Michael Niedermayer

x86/dct32: don't build ff_dct32_float_sse on x86_64

There's an SSE2 version already, and technically the SSE version
on x86_64 was wrong (using pshufd and pshuflw, SSE2 instructions).

Signed-off-by: James Almer <jamrial at gmail.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/x86/dct32.asm  |    2 ++
 libavcodec/x86/dct_init.c |    2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavcodec/x86/dct32.asm b/libavcodec/x86/dct32.asm
index 6fd5ba3..c70f6c9 100644
--- a/libavcodec/x86/dct32.asm
+++ b/libavcodec/x86/dct32.asm
@@ -484,7 +484,9 @@ cglobal dct32_float, 2, 3, 16, out, in, tmp
 %endif
 %endmacro
 
+%if ARCH_X86_32
 INIT_XMM sse
 DCT32_FUNC
+%endif
 INIT_XMM sse2
 DCT32_FUNC
diff --git a/libavcodec/x86/dct_init.c b/libavcodec/x86/dct_init.c
index 85e2d0c..fd6ef45 100644
--- a/libavcodec/x86/dct_init.c
+++ b/libavcodec/x86/dct_init.c
@@ -30,7 +30,7 @@ av_cold void ff_dct_init_x86(DCTContext *s)
 {
     int cpu_flags = av_get_cpu_flags();
 
-    if (EXTERNAL_SSE(cpu_flags))
+    if (EXTERNAL_SSE(cpu_flags) && ARCH_X86_32)
         s->dct32 = ff_dct32_float_sse;
     if (EXTERNAL_SSE2(cpu_flags))
         s->dct32 = ff_dct32_float_sse2;



More information about the ffmpeg-cvslog mailing list