]> git.sesse.net Git - ffmpeg/blobdiff - libavutil/x86/x86util.asm
Merge commit '8c02adc62d71dfbb079a04753d8c16152c49de88'
[ffmpeg] / libavutil / x86 / x86util.asm
index 67d7905132837d97e9f99b639c44d709d43c3337..1064e9a25cac9f1fce11b5175b4f4804de8ccb75 100644 (file)
     paddd   %1, %2
 %endif
 %if notcpuflag(xop) || sizeof%1 != 16
+%if cpuflag(mmxext)
     PSHUFLW %2, %1, q0032
+%else ; mmx
+    mova    %2, %1
+    psrlq   %2, 32
+%endif
     paddd   %1, %2
 %endif
 %undef %1
 %endif
 %endmacro
 
-%macro PAVGB 2
+%macro PAVGB 2-4
 %if cpuflag(mmxext)
     pavgb   %1, %2
 %elif cpuflag(3dnow)
     pavgusb %1, %2
+%elif cpuflag(mmx)
+    movu   %3, %2
+    por    %3, %1
+    pxor   %1, %2
+    pand   %1, %4
+    psrlq  %1, 1
+    psubb  %3, %1
+    SWAP   %1, %3
 %endif
 %endmacro