aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2012-07-26 20:43:50 -0700
committerRonald S. Bultje <rsbultje@gmail.com>2012-07-27 17:35:49 -0700
commitd07ff3cd5a31fad25e2fc89ce8ef98da144c0ee6 (patch)
tree7958a72a19b5bd9ef7e357115932e68c0bc84970
parent4a26fdd8520d5ad7ea6458854610521bbda880d5 (diff)
downloadffmpeg-d07ff3cd5a31fad25e2fc89ce8ef98da144c0ee6.tar.gz
h264_chromamc_10bit: port x86 simd to cpuflags.
-rw-r--r--libavcodec/x86/dsputil_mmx.c16
-rw-r--r--libavcodec/x86/h264_chromamc_10bit.asm40
2 files changed, 28 insertions, 28 deletions
diff --git a/libavcodec/x86/dsputil_mmx.c b/libavcodec/x86/dsputil_mmx.c
index e91ede531e..afbb5312b8 100644
--- a/libavcodec/x86/dsputil_mmx.c
+++ b/libavcodec/x86/dsputil_mmx.c
@@ -2117,10 +2117,10 @@ void ff_ ## OP ## _h264_chroma_mc ## NUM ## _ ## DEPTH ## _ ## OPT \
(uint8_t *dst, uint8_t *src, \
int stride, int h, int x, int y);
-CHROMA_MC(put, 2, 10, mmxext)
-CHROMA_MC(avg, 2, 10, mmxext)
-CHROMA_MC(put, 4, 10, mmxext)
-CHROMA_MC(avg, 4, 10, mmxext)
+CHROMA_MC(put, 2, 10, mmx2)
+CHROMA_MC(avg, 2, 10, mmx2)
+CHROMA_MC(put, 4, 10, mmx2)
+CHROMA_MC(avg, 4, 10, mmx2)
CHROMA_MC(put, 8, 10, sse2)
CHROMA_MC(avg, 8, 10, sse2)
CHROMA_MC(put, 8, 10, avx)
@@ -2740,10 +2740,10 @@ static void dsputil_init_mmx2(DSPContext *c, AVCodecContext *avctx,
c->put_h264_chroma_pixels_tab[2] = ff_put_h264_chroma_mc2_mmx2;
}
if (bit_depth == 10 && CONFIG_H264CHROMA) {
- c->put_h264_chroma_pixels_tab[2] = ff_put_h264_chroma_mc2_10_mmxext;
- c->avg_h264_chroma_pixels_tab[2] = ff_avg_h264_chroma_mc2_10_mmxext;
- c->put_h264_chroma_pixels_tab[1] = ff_put_h264_chroma_mc4_10_mmxext;
- c->avg_h264_chroma_pixels_tab[1] = ff_avg_h264_chroma_mc4_10_mmxext;
+ c->put_h264_chroma_pixels_tab[2] = ff_put_h264_chroma_mc2_10_mmx2;
+ c->avg_h264_chroma_pixels_tab[2] = ff_avg_h264_chroma_mc2_10_mmx2;
+ c->put_h264_chroma_pixels_tab[1] = ff_put_h264_chroma_mc4_10_mmx2;
+ c->avg_h264_chroma_pixels_tab[1] = ff_avg_h264_chroma_mc4_10_mmx2;
}
c->add_hfyu_median_prediction = ff_add_hfyu_median_prediction_mmx2;
diff --git a/libavcodec/x86/h264_chromamc_10bit.asm b/libavcodec/x86/h264_chromamc_10bit.asm
index 3f7c513069..370c7b5a46 100644
--- a/libavcodec/x86/h264_chromamc_10bit.asm
+++ b/libavcodec/x86/h264_chromamc_10bit.asm
@@ -60,10 +60,10 @@ SECTION .text
;-----------------------------------------------------------------------------
; void put/avg_h264_chroma_mc8(pixel *dst, pixel *src, int stride, int h, int mx, int my)
;-----------------------------------------------------------------------------
-%macro CHROMA_MC8 2
+%macro CHROMA_MC8 1
; 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_h264_chroma_mc8_10_%2, 6,7,8
+cglobal %1_h264_chroma_mc8_10, 6,7,8
movsxdifnidn r2, r2d
mov r6d, r5d
or r6d, r4d
@@ -173,8 +173,8 @@ cglobal %1_h264_chroma_mc8_10_%2, 6,7,8
add r0, r2
%endmacro
-%macro CHROMA_MC4 2
-cglobal %1_h264_chroma_mc4_10_%2, 6,6,7
+%macro CHROMA_MC4 1
+cglobal %1_h264_chroma_mc4_10, 6,6,7
movsxdifnidn r2, r2d
movd m2, r4m ; x
movd m3, r5m ; y
@@ -203,8 +203,8 @@ cglobal %1_h264_chroma_mc4_10_%2, 6,6,7
;-----------------------------------------------------------------------------
; void put/avg_h264_chroma_mc2(pixel *dst, pixel *src, int stride, int h, int mx, int my)
;-----------------------------------------------------------------------------
-%macro CHROMA_MC2 2
-cglobal %1_h264_chroma_mc2_10_%2, 6,7
+%macro CHROMA_MC2 1
+cglobal %1_h264_chroma_mc2_10, 6,7
movsxdifnidn r2, r2d
mov r6d, r4d
shl r4d, 16
@@ -250,24 +250,24 @@ cglobal %1_h264_chroma_mc2_10_%2, 6,7
%endmacro
%define CHROMAMC_AVG NOTHING
-INIT_XMM
-CHROMA_MC8 put, sse2
+INIT_XMM sse2
+CHROMA_MC8 put
%if HAVE_AVX
-INIT_AVX
-CHROMA_MC8 put, avx
+INIT_XMM avx
+CHROMA_MC8 put
%endif
-INIT_MMX
-CHROMA_MC4 put, mmxext
-CHROMA_MC2 put, mmxext
+INIT_MMX mmx2
+CHROMA_MC4 put
+CHROMA_MC2 put
%define CHROMAMC_AVG AVG
%define PAVG pavgw
-INIT_XMM
-CHROMA_MC8 avg, sse2
+INIT_XMM sse2
+CHROMA_MC8 avg
%if HAVE_AVX
-INIT_AVX
-CHROMA_MC8 avg, avx
+INIT_XMM avx
+CHROMA_MC8 avg
%endif
-INIT_MMX
-CHROMA_MC4 avg, mmxext
-CHROMA_MC2 avg, mmxext
+INIT_MMX mmx2
+CHROMA_MC4 avg
+CHROMA_MC2 avg