[x265] [PATCH] asm: luma_hps[24x32] for high bit depth - improved 31170c->14518c

aasaipriya at multicorewareinc.com aasaipriya at multicorewareinc.com
Fri May 22 07:33:20 CEST 2015


# HG changeset patch
# User Aasaipriya Chandran <aasaipriya at multicorewareinc.com>
# Date 1432272787 -19800
#      Fri May 22 11:03:07 2015 +0530
# Node ID 9597f2084a42381d1c028356f1a5482e23bfb560
# Parent  db28c55ee39348644bdb357d9df6eb74da5c9ccb
asm: luma_hps[24x32] for high bit depth - improved 31170c->14518c

diff -r db28c55ee393 -r 9597f2084a42 source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp	Fri May 22 10:54:52 2015 +0530
+++ b/source/common/x86/asm-primitives.cpp	Fri May 22 11:03:07 2015 +0530
@@ -1413,6 +1413,7 @@
         p.pu[LUMA_8x4].luma_hps = x265_interp_8tap_horiz_ps_8x4_avx2;
         p.pu[LUMA_8x16].luma_hps = x265_interp_8tap_horiz_ps_8x16_avx2;
         p.pu[LUMA_8x32].luma_hps = x265_interp_8tap_horiz_ps_8x32_avx2;
+        p.pu[LUMA_24x32].luma_hps = x265_interp_8tap_horiz_ps_24x32_avx2;
 
         p.pu[LUMA_4x4].luma_hpp = x265_interp_8tap_horiz_pp_4x4_avx2;
         p.pu[LUMA_4x8].luma_hpp = x265_interp_8tap_horiz_pp_4x8_avx2;
diff -r db28c55ee393 -r 9597f2084a42 source/common/x86/ipfilter16.asm
--- a/source/common/x86/ipfilter16.asm	Fri May 22 10:54:52 2015 +0530
+++ b/source/common/x86/ipfilter16.asm	Fri May 22 11:03:07 2015 +0530
@@ -7718,3 +7718,70 @@
     IPFILTER_LUMA_PS_8xN_AVX2 8
     IPFILTER_LUMA_PS_8xN_AVX2 16
     IPFILTER_LUMA_PS_8xN_AVX2 32
+
+INIT_YMM avx2
+%if ARCH_X86_64 == 1
+cglobal interp_8tap_horiz_ps_24x32, 4, 6, 8
+    add                 r1d, r1d
+    add                 r3d, r3d
+    mov                 r4d, r4m
+    mov                 r5d, r5m
+    shl                 r4d, 4
+%ifdef PIC
+    lea                 r6, [tab_LumaCoeff]
+    vpbroadcastq        m0, [r6 + r4]
+    vpbroadcastq        m1, [r6 + r4 + 8]
+%else
+    vpbroadcastq        m0, [tab_LumaCoeff + r4]
+    vpbroadcastq        m1, [tab_LumaCoeff + r4 + 8]
+%endif
+    mova                m3, [pb_shuf]
+    vbroadcasti128      m2, [pd_n32768]
+
+    ; register map
+    ; m0 , m1 interpolate coeff
+
+    sub                 r0, 6
+    test                r5d, r5d
+    mov                 r4d, 32
+    jz                  .loop0
+    lea                 r6, [r1*3]
+    sub                 r0, r6
+    add                 r4d, 7
+
+.loop0:
+%assign x 0
+%rep 24/8
+    vbroadcasti128      m4, [r0 + x]
+    vbroadcasti128      m5, [r0 + 8 + x]
+    pshufb              m4, m3
+    pshufb              m7, m5, m3
+    pmaddwd             m4, m0
+    pmaddwd             m7, m1
+    paddd               m4, m7
+
+    vbroadcasti128      m6, [r0 + 16 + x]
+    pshufb              m5, m3
+    pshufb              m6, m3
+    pmaddwd             m5, m0
+    pmaddwd             m6, m1
+    paddd               m5, m6
+
+    phaddd              m4, m5
+    vpermq              m4, m4, q3120
+    paddd               m4, m2
+    vextracti128        xm5,m4, 1
+    psrad               xm4, 2
+    psrad               xm5, 2
+    packssdw            xm4, xm5
+
+    movu                [r2 + x], xm4
+    %assign x x+16
+    %endrep
+
+    add                 r2, r3
+    add                 r0, r1
+    dec                 r4d
+    jnz                 .loop0
+    RET
+%endif


More information about the x265-devel mailing list