summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2012-07-15 18:33:59 +0200
committerDiego Biurrun <diego@biurrun.de>2012-11-18 18:34:05 +0100
commit87af05c575791406090272b6a37b50d51e85490c (patch)
treed654993de187ea4a7c04156775d8f9097b3100b6
parent1c5805521c3e406886341d752ebf38f8d41e1d13 (diff)
x86: SPLATD: port to cpuflags
-rw-r--r--libavcodec/x86/dsputil.asm2
-rw-r--r--libavcodec/x86/fmtconvert.asm3
-rw-r--r--libavutil/x86/x86util.asm22
-rw-r--r--libswscale/x86/output.asm2
4 files changed, 7 insertions, 22 deletions
diff --git a/libavcodec/x86/dsputil.asm b/libavcodec/x86/dsputil.asm
index de54540818..726d4c6362 100644
--- a/libavcodec/x86/dsputil.asm
+++ b/libavcodec/x86/dsputil.asm
@@ -1124,11 +1124,9 @@ cglobal vector_clip_int32%5, 5,5,%1, dst, src, min, max, len
%endmacro
INIT_MMX mmx
-%define SPLATD SPLATD_MMX
%define CLIPD CLIPD_MMX
VECTOR_CLIP_INT32 0, 1, 0, 0
INIT_XMM sse2
-%define SPLATD SPLATD_SSE2
VECTOR_CLIP_INT32 6, 1, 0, 0, _int
%define CLIPD CLIPD_SSE2
VECTOR_CLIP_INT32 6, 2, 0, 1
diff --git a/libavcodec/x86/fmtconvert.asm b/libavcodec/x86/fmtconvert.asm
index 77b8bd7069..8267bd47dc 100644
--- a/libavcodec/x86/fmtconvert.asm
+++ b/libavcodec/x86/fmtconvert.asm
@@ -72,12 +72,9 @@ cglobal int32_to_float_fmul_scalar, 4, 4, %1, dst, src, mul, len
%endmacro
INIT_XMM sse
-%define SPLATD SPLATD_SSE
INT32_TO_FLOAT_FMUL_SCALAR 5
INIT_XMM sse2
-%define SPLATD SPLATD_SSE2
INT32_TO_FLOAT_FMUL_SCALAR 3
-%undef SPLATD
;------------------------------------------------------------------------------
diff --git a/libavutil/x86/x86util.asm b/libavutil/x86/x86util.asm
index 40d87639fe..d3c0d86056 100644
--- a/libavutil/x86/x86util.asm
+++ b/libavutil/x86/x86util.asm
@@ -574,24 +574,14 @@
%endif
%endmacro
-%macro SPLATD 2-3 0
-%if mmsize == 16
- pshufd %1, %2, (%3)*0x55
-%else
- pshufw %1, %2, (%3)*0x11 + ((%3)+1)*0x44
-%endif
-%endmacro
-
-%macro SPLATD_MMX 1
+%macro SPLATD 1
+%if mmsize == 8
punpckldq %1, %1
-%endmacro
-
-%macro SPLATD_SSE 1
- shufps %1, %1, 0
-%endmacro
-
-%macro SPLATD_SSE2 1
+%elif cpuflag(sse2)
pshufd %1, %1, 0
+%elif cpuflag(sse)
+ shufps %1, %1, 0
+%endif
%endmacro
%macro CLIPW 3 ;(dst, min, max)
diff --git a/libswscale/x86/output.asm b/libswscale/x86/output.asm
index d137e6ece2..e1ceded756 100644
--- a/libswscale/x86/output.asm
+++ b/libswscale/x86/output.asm
@@ -187,7 +187,7 @@ cglobal yuv2planeX_%1, %3, 8, %2, filter, fltsize, src, dst, w, dither, offset
%else ; %1 == 10/9/8
punpcklwd m5, m3, m4
punpckhwd m3, m4
- SPLATD m0, m0
+ SPLATD m0
pmaddwd m5, m0
pmaddwd m3, m0