diff --git a/libavcodec/x86/vp8dsp.asm b/libavcodec/x86/vp8dsp.asm
index 82f21fefae4c10f163494a92996ae57ee071683e..531b205b7bda38fcbd9885d12304d14ebac6918a 100644
--- a/libavcodec/x86/vp8dsp.asm
+++ b/libavcodec/x86/vp8dsp.asm
@@ -1465,27 +1465,6 @@ VP8_DC_WHT
 %endif
 %endmacro
 
-%macro SPLATB_REG 2-3
-%if cpuflag(ssse3)
-    movd           %1, %2d
-    pshufb         %1, %3
-%elif cpuflag(sse2)
-    movd           %1, %2d
-    punpcklbw      %1, %1
-    pshuflw        %1, %1, 0x0
-    punpcklqdq     %1, %1
-%elif cpuflag(mmx2)
-    movd           %1, %2d
-    punpcklbw      %1, %1
-    pshufw         %1, %1, 0x0
-%else
-    movd           %1, %2d
-    punpcklbw      %1, %1
-    punpcklwd      %1, %1
-    punpckldq      %1, %1
-%endif
-%endmacro
-
 %macro SIMPLE_LOOPFILTER 2
 cglobal vp8_%1_loop_filter_simple, 3, %2, 8, dst, stride, flim, cntr
 %if mmsize == 8 ; mmx/mmxext
diff --git a/libavutil/x86/x86util.asm b/libavutil/x86/x86util.asm
index 066384b4c7aae760a819d84fc1ff80dcc1f6da99..941ec760846f2afbf240ed09be646f81a43f2b20 100644
--- a/libavutil/x86/x86util.asm
+++ b/libavutil/x86/x86util.asm
@@ -256,15 +256,26 @@
 %define ABSB ABSB_MMX
 %define ABSB2 ABSB2_MMX
 
-%macro SPLATB_MMX 3
+%macro SPLATB_LOAD 3
+%if cpuflag(ssse3)
+    movd      %1, [%2-3]
+    pshufb    %1, %3
+%else
     movd      %1, [%2-3] ;to avoid crossing a cacheline
     punpcklbw %1, %1
     SPLATW    %1, %1, 3
+%endif
 %endmacro
 
-%macro SPLATB_SSSE3 3
-    movd      %1, [%2-3]
+%macro SPLATB_REG 3
+%if cpuflag(ssse3)
+    movd      %1, %2d
     pshufb    %1, %3
+%else
+    movd      %1, %2d
+    punpcklbw %1, %1
+    SPLATW    %1, %1, 0
+%endif
 %endmacro
 
 %macro PALIGNR_MMX 4-5 ; [dst,] src1, src2, imm, tmp
@@ -296,6 +307,14 @@
 %endif
 %endmacro
 
+%macro PSHUFLW 1+
+    %if mmsize == 8
+        pshufw %1
+    %else
+        pshuflw %1
+    %endif
+%endmacro
+
 %macro DEINTB 5 ; mask, reg1, mask, reg2, optional src to fill masks from
 %ifnum %5
     pand   m%3, m%5, m%4 ; src .. y6 .. y4
@@ -521,8 +540,22 @@
 %if mmsize == 16
     pshuflw    %1, %2, (%3)*0x55
     punpcklqdq %1, %1
-%else
+%elif cpuflag(mmx2)
     pshufw     %1, %2, (%3)*0x55
+%else
+    %ifnidn %1, %2
+        mova       %1, %2
+    %endif
+    %if %3 & 2
+        punpckhwd  %1, %1
+    %else
+        punpcklwd  %1, %1
+    %endif
+    %if %3 & 1
+        punpckhwd  %1, %1
+    %else
+        punpcklwd  %1, %1
+    %endif
 %endif
 %endmacro