[x265] [PATCH 3 of 6] asm: filter_vsp[16x4], filter_vss[16x4] in avx2: 987c->575c, 862c->600c
Divya Manivannan
divya at multicorewareinc.com
Wed Mar 18 06:43:15 CET 2015
# HG changeset patch
# User Divya Manivannan <divya at multicorewareinc.com>
# Date 1426656013 -19800
# Wed Mar 18 10:50:13 2015 +0530
# Node ID ddfb88a81ab340be6e6bd41e1ccba6bdac7fa6fd
# Parent 33b44627f2b763b3a57c20d5cc55c66034a97467
asm: filter_vsp[16x4], filter_vss[16x4] in avx2: 987c->575c, 862c->600c
diff -r 33b44627f2b7 -r ddfb88a81ab3 source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp Wed Mar 18 10:47:04 2015 +0530
+++ b/source/common/x86/asm-primitives.cpp Wed Mar 18 10:50:13 2015 +0530
@@ -1693,6 +1693,7 @@
p.chroma[X265_CSP_I420].pu[CHROMA_420_4x16].filter_vsp = x265_interp_4tap_vert_sp_4x16_avx2;
p.chroma[X265_CSP_I420].pu[CHROMA_420_8x4].filter_vsp = x265_interp_4tap_vert_sp_8x4_avx2;
p.chroma[X265_CSP_I420].pu[CHROMA_420_12x16].filter_vsp = x265_interp_4tap_vert_sp_12x16_avx2;
+ p.chroma[X265_CSP_I420].pu[CHROMA_420_16x4].filter_vsp = x265_interp_4tap_vert_sp_16x4_avx2;
p.chroma[X265_CSP_I420].pu[CHROMA_420_16x12].filter_vsp = x265_interp_4tap_vert_sp_16x12_avx2;
p.chroma[X265_CSP_I420].pu[CHROMA_420_16x32].filter_vsp = x265_interp_4tap_vert_sp_16x32_avx2;
p.chroma[X265_CSP_I420].pu[CHROMA_420_24x32].filter_vsp = x265_interp_4tap_vert_sp_24x32_avx2;
@@ -1708,6 +1709,7 @@
p.chroma[X265_CSP_I420].pu[CHROMA_420_4x16].filter_vss = x265_interp_4tap_vert_ss_4x16_avx2;
p.chroma[X265_CSP_I420].pu[CHROMA_420_8x4].filter_vss = x265_interp_4tap_vert_ss_8x4_avx2;
p.chroma[X265_CSP_I420].pu[CHROMA_420_12x16].filter_vss = x265_interp_4tap_vert_ss_12x16_avx2;
+ p.chroma[X265_CSP_I420].pu[CHROMA_420_16x4].filter_vss = x265_interp_4tap_vert_ss_16x4_avx2;
p.chroma[X265_CSP_I420].pu[CHROMA_420_16x12].filter_vss = x265_interp_4tap_vert_ss_16x12_avx2;
p.chroma[X265_CSP_I420].pu[CHROMA_420_16x32].filter_vss = x265_interp_4tap_vert_ss_16x32_avx2;
p.chroma[X265_CSP_I420].pu[CHROMA_420_24x32].filter_vss = x265_interp_4tap_vert_ss_24x32_avx2;
diff -r 33b44627f2b7 -r ddfb88a81ab3 source/common/x86/ipfilter8.asm
--- a/source/common/x86/ipfilter8.asm Wed Mar 18 10:47:04 2015 +0530
+++ b/source/common/x86/ipfilter8.asm Wed Mar 18 10:50:13 2015 +0530
@@ -14490,6 +14490,52 @@
FILTER_VER_CHROMA_S_AVX2_16x12 sp
FILTER_VER_CHROMA_S_AVX2_16x12 ss
+%macro FILTER_VER_CHROMA_S_AVX2_16x4 1
+INIT_YMM avx2
+cglobal interp_4tap_vert_%1_16x4, 4, 7, 8
+ mov r4d, r4m
+ shl r4d, 6
+ add r1d, r1d
+
+%ifdef PIC
+ lea r5, [pw_ChromaCoeffV]
+ add r5, r4
+%else
+ lea r5, [pw_ChromaCoeffV + r4]
+%endif
+
+ lea r4, [r1 * 3]
+ sub r0, r1
+%ifidn %1,sp
+ mova m7, [pd_526336]
+%else
+ add r3d, r3d
+%endif
+%rep 2
+ PROCESS_CHROMA_S_AVX2_W8_4R %1
+ lea r6, [r3 * 3]
+%ifidn %1,sp
+ movq [r2], xm0
+ movhps [r2 + r3], xm0
+ movq [r2 + r3 * 2], xm2
+ movhps [r2 + r6], xm2
+ add r2, 8
+%else
+ movu [r2], xm0
+ movu [r2 + r3], xm1
+ movu [r2 + r3 * 2], xm2
+ movu [r2 + r6], xm3
+ add r2, 16
+%endif
+ lea r6, [4 * r1 - 16]
+ sub r0, r6
+%endrep
+ RET
+%endmacro
+
+FILTER_VER_CHROMA_S_AVX2_16x4 sp
+FILTER_VER_CHROMA_S_AVX2_16x4 ss
+
;---------------------------------------------------------------------------------------------------------------------
; void interp_4tap_vertical_ss_%1x%2(int16_t *src, intptr_t srcStride, int16_t *dst, intptr_t dstStride, int coeffIdx)
;---------------------------------------------------------------------------------------------------------------------
More information about the x265-devel
mailing list