aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2012-07-27 14:25:46 +0200
committerDiego Biurrun <diego@biurrun.de>2012-11-25 17:25:10 +0100
commit28c8e288fa0342fdef532a7522a4707bebf831cc (patch)
tree1c430a76fb7e5db8802d11789d6b7a0206ff02d9
parentb491da18d1df50428411b40d76db496068861496 (diff)
downloadffmpeg-28c8e288fa0342fdef532a7522a4707bebf831cc.tar.gz
x86: h264_chromamc: port to cpuflags
-rw-r--r--libavcodec/x86/h264_chromamc.asm85
1 files changed, 44 insertions, 41 deletions
diff --git a/libavcodec/x86/h264_chromamc.asm b/libavcodec/x86/h264_chromamc.asm
index 2dd4603917..1be37dec78 100644
--- a/libavcodec/x86/h264_chromamc.asm
+++ b/libavcodec/x86/h264_chromamc.asm
@@ -89,7 +89,7 @@ SECTION .text
jne .next4rows
%endmacro
-%macro chroma_mc8_mmx_func 3
+%macro chroma_mc8_mmx_func 2-3
%ifidn %2, rv40
%ifdef PIC
%define rnd_1d_rv40 r8
@@ -103,9 +103,9 @@ SECTION .text
%else
%define extra_regs 0
%endif ; rv40
-; put/avg_h264_chroma_mc8_mmx_*(uint8_t *dst /*align 8*/, uint8_t *src /*align 1*/,
-; int stride, int h, int mx, int my)
-cglobal %1_%2_chroma_mc8_%3, 6, 7 + extra_regs, 0
+; put/avg_h264_chroma_mc8_*(uint8_t *dst /*align 8*/, uint8_t *src /*align 1*/,
+; int stride, int h, int mx, int my)
+cglobal %1_%2_chroma_mc8%3, 6, 7 + extra_regs, 0
%if ARCH_X86_64
movsxd r2, r2d
%endif
@@ -282,14 +282,14 @@ cglobal %1_%2_chroma_mc8_%3, 6, 7 + extra_regs, 0
RET
%endmacro
-%macro chroma_mc4_mmx_func 3
+%macro chroma_mc4_mmx_func 2
%define extra_regs 0
%ifidn %2, rv40
%ifdef PIC
%define extra_regs 1
%endif ; PIC
%endif ; rv40
-cglobal %1_%2_chroma_mc4_%3, 6, 6 + extra_regs, 0
+cglobal %1_%2_chroma_mc4, 6, 6 + extra_regs, 0
%if ARCH_X86_64
movsxd r2, r2d
%endif
@@ -373,8 +373,8 @@ cglobal %1_%2_chroma_mc4_%3, 6, 6 + extra_regs, 0
REP_RET
%endmacro
-%macro chroma_mc2_mmx_func 3
-cglobal %1_%2_chroma_mc2_%3, 6, 7, 0
+%macro chroma_mc2_mmx_func 2
+cglobal %1_%2_chroma_mc2, 6, 7, 0
%if ARCH_X86_64
movsxd r2, r2d
%endif
@@ -434,35 +434,38 @@ cglobal %1_%2_chroma_mc2_%3, 6, 7, 0
PAVG %1, %2
%endmacro
-INIT_MMX
+INIT_MMX mmx
%define CHROMAMC_AVG NOTHING
%define CHROMAMC_AVG4 NOTHING
-chroma_mc8_mmx_func put, h264, rnd_mmx
-chroma_mc8_mmx_func put, vc1, nornd_mmx
-chroma_mc8_mmx_func put, rv40, mmx
-chroma_mc4_mmx_func put, h264, mmx
-chroma_mc4_mmx_func put, rv40, mmx
-chroma_mc2_mmx_func put, h264, mmxext
+chroma_mc8_mmx_func put, h264, _rnd
+chroma_mc8_mmx_func put, vc1, _nornd
+chroma_mc8_mmx_func put, rv40
+chroma_mc4_mmx_func put, h264
+chroma_mc4_mmx_func put, rv40
+
+INIT_MMX mmxext
+chroma_mc2_mmx_func put, h264
%define CHROMAMC_AVG DIRECT_AVG
%define CHROMAMC_AVG4 COPY_AVG
%define PAVG pavgb
-chroma_mc8_mmx_func avg, h264, rnd_mmxext
-chroma_mc8_mmx_func avg, vc1, nornd_mmxext
-chroma_mc8_mmx_func avg, rv40, mmxext
-chroma_mc4_mmx_func avg, h264, mmxext
-chroma_mc4_mmx_func avg, rv40, mmxext
-chroma_mc2_mmx_func avg, h264, mmxext
+chroma_mc8_mmx_func avg, h264, _rnd
+chroma_mc8_mmx_func avg, vc1, _nornd
+chroma_mc8_mmx_func avg, rv40
+chroma_mc4_mmx_func avg, h264
+chroma_mc4_mmx_func avg, rv40
+chroma_mc2_mmx_func avg, h264
%define PAVG pavgusb
-chroma_mc8_mmx_func avg, h264, rnd_3dnow
-chroma_mc8_mmx_func avg, vc1, nornd_3dnow
-chroma_mc8_mmx_func avg, rv40, 3dnow
-chroma_mc4_mmx_func avg, h264, 3dnow
-chroma_mc4_mmx_func avg, rv40, 3dnow
-
-%macro chroma_mc8_ssse3_func 3
-cglobal %1_%2_chroma_mc8_%3, 6, 7, 8
+INIT_MMX 3dnow
+chroma_mc8_mmx_func avg, h264, _rnd
+chroma_mc8_mmx_func avg, vc1, _nornd
+chroma_mc8_mmx_func avg, rv40
+chroma_mc4_mmx_func avg, h264
+chroma_mc4_mmx_func avg, rv40
+
+%macro chroma_mc8_ssse3_func 2-3
+cglobal %1_%2_chroma_mc8%3, 6, 7, 8
%if ARCH_X86_64
movsxd r2, r2d
%endif
@@ -609,8 +612,8 @@ cglobal %1_%2_chroma_mc8_%3, 6, 7, 8
REP_RET
%endmacro
-%macro chroma_mc4_ssse3_func 3
-cglobal %1_%2_chroma_mc4_%3, 6, 7, 0
+%macro chroma_mc4_ssse3_func 2
+cglobal %1_%2_chroma_mc4, 6, 7, 0
%if ARCH_X86_64
movsxd r2, r2d
%endif
@@ -663,16 +666,16 @@ cglobal %1_%2_chroma_mc4_%3, 6, 7, 0
%endmacro
%define CHROMAMC_AVG NOTHING
-INIT_XMM
-chroma_mc8_ssse3_func put, h264, rnd_ssse3
-chroma_mc8_ssse3_func put, vc1, nornd_ssse3
-INIT_MMX
-chroma_mc4_ssse3_func put, h264, ssse3
+INIT_XMM ssse3
+chroma_mc8_ssse3_func put, h264, _rnd
+chroma_mc8_ssse3_func put, vc1, _nornd
+INIT_MMX ssse3
+chroma_mc4_ssse3_func put, h264
%define CHROMAMC_AVG DIRECT_AVG
%define PAVG pavgb
-INIT_XMM
-chroma_mc8_ssse3_func avg, h264, rnd_ssse3
-chroma_mc8_ssse3_func avg, vc1, nornd_ssse3
-INIT_MMX
-chroma_mc4_ssse3_func avg, h264, ssse3
+INIT_XMM ssse3
+chroma_mc8_ssse3_func avg, h264, _rnd
+chroma_mc8_ssse3_func avg, vc1, _nornd
+INIT_MMX ssse3
+chroma_mc4_ssse3_func avg, h264