aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/x86
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2012-08-02 00:55:34 +0200
committerDiego Biurrun <diego@biurrun.de>2012-11-02 17:05:29 +0100
commit0a7a94f2e53bcdb8ac5857eb8c67c16f6f1d0f2f (patch)
treeb736ff407825a764a4e1d017ed6afefa802fb0f3 /libavutil/x86
parent9a07c1332cfe092b57b5758f22b686ca58806c60 (diff)
downloadffmpeg-0a7a94f2e53bcdb8ac5857eb8c67c16f6f1d0f2f.tar.gz
x86: Refactor PSWAPD fallback implementations and port to cpuflags
Diffstat (limited to 'libavutil/x86')
-rw-r--r--libavutil/x86/x86util.asm12
1 files changed, 12 insertions, 0 deletions
diff --git a/libavutil/x86/x86util.asm b/libavutil/x86/x86util.asm
index ca0041acf7..9183d38595 100644
--- a/libavutil/x86/x86util.asm
+++ b/libavutil/x86/x86util.asm
@@ -319,6 +319,18 @@
%endif
%endmacro
+%macro PSWAPD 2
+%if cpuflag(mmxext)
+ pshufw %1, %2, q1032
+%elif cpuflag(3dnowext)
+ pswapd %1, %2
+%elif cpuflag(3dnow)
+ movq %1, %2
+ psrlq %1, 32
+ punpckldq %1, %2
+%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