Commit d07ff3cd authored by Ronald S. Bultje's avatar Ronald S. Bultje

h264_chromamc_10bit: port x86 simd to cpuflags.

parent 4a26fdd8
...@@ -2117,10 +2117,10 @@ void ff_ ## OP ## _h264_chroma_mc ## NUM ## _ ## DEPTH ## _ ## OPT \ ...@@ -2117,10 +2117,10 @@ void ff_ ## OP ## _h264_chroma_mc ## NUM ## _ ## DEPTH ## _ ## OPT \
(uint8_t *dst, uint8_t *src, \ (uint8_t *dst, uint8_t *src, \
int stride, int h, int x, int y); int stride, int h, int x, int y);
CHROMA_MC(put, 2, 10, mmxext) CHROMA_MC(put, 2, 10, mmx2)
CHROMA_MC(avg, 2, 10, mmxext) CHROMA_MC(avg, 2, 10, mmx2)
CHROMA_MC(put, 4, 10, mmxext) CHROMA_MC(put, 4, 10, mmx2)
CHROMA_MC(avg, 4, 10, mmxext) CHROMA_MC(avg, 4, 10, mmx2)
CHROMA_MC(put, 8, 10, sse2) CHROMA_MC(put, 8, 10, sse2)
CHROMA_MC(avg, 8, 10, sse2) CHROMA_MC(avg, 8, 10, sse2)
CHROMA_MC(put, 8, 10, avx) CHROMA_MC(put, 8, 10, avx)
...@@ -2740,10 +2740,10 @@ static void dsputil_init_mmx2(DSPContext *c, AVCodecContext *avctx, ...@@ -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; c->put_h264_chroma_pixels_tab[2] = ff_put_h264_chroma_mc2_mmx2;
} }
if (bit_depth == 10 && CONFIG_H264CHROMA) { if (bit_depth == 10 && CONFIG_H264CHROMA) {
c->put_h264_chroma_pixels_tab[2] = ff_put_h264_chroma_mc2_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_mmxext; 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_mmxext; 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_mmxext; 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; c->add_hfyu_median_prediction = ff_add_hfyu_median_prediction_mmx2;
......
...@@ -60,10 +60,10 @@ SECTION .text ...@@ -60,10 +60,10 @@ SECTION .text
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
; void put/avg_h264_chroma_mc8(pixel *dst, pixel *src, int stride, int h, int mx, int my) ; 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*/, ; put/avg_h264_chroma_mc8_*(uint8_t *dst /*align 8*/, uint8_t *src /*align 1*/,
; int stride, int h, int mx, int my) ; 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 movsxdifnidn r2, r2d
mov r6d, r5d mov r6d, r5d
or r6d, r4d or r6d, r4d
...@@ -173,8 +173,8 @@ cglobal %1_h264_chroma_mc8_10_%2, 6,7,8 ...@@ -173,8 +173,8 @@ cglobal %1_h264_chroma_mc8_10_%2, 6,7,8
add r0, r2 add r0, r2
%endmacro %endmacro
%macro CHROMA_MC4 2 %macro CHROMA_MC4 1
cglobal %1_h264_chroma_mc4_10_%2, 6,6,7 cglobal %1_h264_chroma_mc4_10, 6,6,7
movsxdifnidn r2, r2d movsxdifnidn r2, r2d
movd m2, r4m ; x movd m2, r4m ; x
movd m3, r5m ; y movd m3, r5m ; y
...@@ -203,8 +203,8 @@ cglobal %1_h264_chroma_mc4_10_%2, 6,6,7 ...@@ -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) ; void put/avg_h264_chroma_mc2(pixel *dst, pixel *src, int stride, int h, int mx, int my)
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
%macro CHROMA_MC2 2 %macro CHROMA_MC2 1
cglobal %1_h264_chroma_mc2_10_%2, 6,7 cglobal %1_h264_chroma_mc2_10, 6,7
movsxdifnidn r2, r2d movsxdifnidn r2, r2d
mov r6d, r4d mov r6d, r4d
shl r4d, 16 shl r4d, 16
...@@ -250,24 +250,24 @@ cglobal %1_h264_chroma_mc2_10_%2, 6,7 ...@@ -250,24 +250,24 @@ cglobal %1_h264_chroma_mc2_10_%2, 6,7
%endmacro %endmacro
%define CHROMAMC_AVG NOTHING %define CHROMAMC_AVG NOTHING
INIT_XMM INIT_XMM sse2
CHROMA_MC8 put, sse2 CHROMA_MC8 put
%if HAVE_AVX %if HAVE_AVX
INIT_AVX INIT_XMM avx
CHROMA_MC8 put, avx CHROMA_MC8 put
%endif %endif
INIT_MMX INIT_MMX mmx2
CHROMA_MC4 put, mmxext CHROMA_MC4 put
CHROMA_MC2 put, mmxext CHROMA_MC2 put
%define CHROMAMC_AVG AVG %define CHROMAMC_AVG AVG
%define PAVG pavgw %define PAVG pavgw
INIT_XMM INIT_XMM sse2
CHROMA_MC8 avg, sse2 CHROMA_MC8 avg
%if HAVE_AVX %if HAVE_AVX
INIT_AVX INIT_XMM avx
CHROMA_MC8 avg, avx CHROMA_MC8 avg
%endif %endif
INIT_MMX INIT_MMX mmx2
CHROMA_MC4 avg, mmxext CHROMA_MC4 avg
CHROMA_MC2 avg, mmxext CHROMA_MC2 avg
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment