[x265] [PATCH] asm: filter_vpp, filter_vps for 12x32 in avx2

Divya Manivannan divya at multicorewareinc.com
Thu Apr 30 12:09:55 CEST 2015


# HG changeset patch
# User Divya Manivannan <divya at multicorewareinc.com>
# Date 1430387179 -19800
#      Thu Apr 30 15:16:19 2015 +0530
# Node ID f000408d0243a286ed0a56b65779fdc0c040db5c
# Parent  5c9b9856de29c079c268dfe070dd9ece8fd96f56
asm: filter_vpp, filter_vps for 12x32 in avx2

filter_vpp[12x32]: 2307c->1885c
filter_vps[12x32]: 1884c->1612c

diff -r 5c9b9856de29 -r f000408d0243 source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp	Wed Apr 29 17:11:03 2015 +0530
+++ b/source/common/x86/asm-primitives.cpp	Thu Apr 30 15:16:19 2015 +0530
@@ -2537,6 +2537,7 @@
         p.chroma[X265_CSP_I422].pu[CHROMA_422_8x64].filter_vps = x265_interp_4tap_vert_ps_8x64_avx2;
         p.chroma[X265_CSP_I422].pu[CHROMA_422_32x64].filter_vps = x265_interp_4tap_vert_ps_32x64_avx2;
         p.chroma[X265_CSP_I422].pu[CHROMA_422_32x48].filter_vps = x265_interp_4tap_vert_ps_32x48_avx2;
+        p.chroma[X265_CSP_I422].pu[CHROMA_422_12x32].filter_vps = x265_interp_4tap_vert_ps_12x32_avx2;
 
         //i444 for chroma_vps
         p.chroma[X265_CSP_I444].pu[LUMA_4x4].filter_vps = x265_interp_4tap_vert_ps_4x4_avx2;
@@ -2578,6 +2579,7 @@
         p.chroma[X265_CSP_I422].pu[CHROMA_422_8x64].filter_vpp = x265_interp_4tap_vert_pp_8x64_avx2;
         p.chroma[X265_CSP_I422].pu[CHROMA_422_32x64].filter_vpp = x265_interp_4tap_vert_pp_32x64_avx2;
         p.chroma[X265_CSP_I422].pu[CHROMA_422_32x48].filter_vpp = x265_interp_4tap_vert_pp_32x48_avx2;
+        p.chroma[X265_CSP_I422].pu[CHROMA_422_12x32].filter_vpp = x265_interp_4tap_vert_pp_12x32_avx2;
 
         //i444 for chroma_vpp
         p.chroma[X265_CSP_I444].pu[LUMA_4x4].filter_vpp = x265_interp_4tap_vert_pp_4x4_avx2;
diff -r 5c9b9856de29 -r f000408d0243 source/common/x86/ipfilter8.asm
--- a/source/common/x86/ipfilter8.asm	Wed Apr 29 17:11:03 2015 +0530
+++ b/source/common/x86/ipfilter8.asm	Thu Apr 30 15:16:19 2015 +0530
@@ -7560,9 +7560,9 @@
     FILTER_VER_CHROMA_AVX2_16x4 pp
     FILTER_VER_CHROMA_AVX2_16x4 ps
 
-%macro FILTER_VER_CHROMA_AVX2_12x16 1
-INIT_YMM avx2
-cglobal interp_4tap_vert_%1_12x16, 4, 7, 8
+%macro FILTER_VER_CHROMA_AVX2_12xN 2
+INIT_YMM avx2
+cglobal interp_4tap_vert_%1_12x%2, 4, 7, 8
     mov             r4d, r4m
     shl             r4d, 6
 
@@ -7582,7 +7582,7 @@
     vbroadcasti128  m7, [pw_2000]
 %endif
     lea             r6, [r3 * 3]
-
+%rep %2 / 16
     movu            xm0, [r0]                       ; m0 = row 0
     movu            xm1, [r0 + r1]                  ; m1 = row 1
     punpckhbw       xm2, xm0, xm1
@@ -7868,11 +7868,15 @@
     vextracti128    xm5, m5, 1
     movq            [r2 + r6 + 16], xm5
 %endif
-    RET
-%endmacro
-
-    FILTER_VER_CHROMA_AVX2_12x16 pp
-    FILTER_VER_CHROMA_AVX2_12x16 ps
+    lea             r2, [r2 + r3 * 4]
+%endrep
+    RET
+%endmacro
+
+    FILTER_VER_CHROMA_AVX2_12xN pp, 16
+    FILTER_VER_CHROMA_AVX2_12xN ps, 16
+    FILTER_VER_CHROMA_AVX2_12xN pp, 32
+    FILTER_VER_CHROMA_AVX2_12xN ps, 32
 
 ;-----------------------------------------------------------------------------
 ;void interp_4tap_vert_pp_24x32(pixel *src, intptr_t srcStride, pixel *dst, intptr_t dstStride, int coeffIdx)


More information about the x265-devel mailing list