[x265] [PATCH Review Only] interp_4tap_vert_pp_6x8

praveen at multicorewareinc.com praveen at multicorewareinc.com
Tue Oct 29 10:22:32 CET 2013


# HG changeset patch
# User Praveen Tiwari
# Date 1383038526 -19800
# Node ID 3306252fb160dcabe2015a502572e9ad635e48a8
# Parent  4c618e33c25f98597d529d4e6ec9fb899bdc1d41
interp_4tap_vert_pp_6x8

diff -r 4c618e33c25f -r 3306252fb160 source/common/x86/ipfilter8.asm
--- a/source/common/x86/ipfilter8.asm	Tue Oct 29 11:16:32 2013 +0530
+++ b/source/common/x86/ipfilter8.asm	Tue Oct 29 14:52:06 2013 +0530
@@ -35,6 +35,9 @@
            db 4, 5, 6, 7, 8,  9,  10, 11, 5, 6, 7, 8,  9,  10, 11, 12
            db 6, 7, 8, 9, 10, 11, 12, 13, 7, 8, 9, 10, 11, 12, 13, 14
 
+tab_Vm:    db 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1
+           db 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3
+
 tab_c_512:      times 8 dw 512
 tab_c_8192:     times 8 dw 8192
 tab_c_526336:   times 4 dd 8192*64+2048
@@ -898,3 +901,105 @@
     jnz         .loopH
 
     RET
+
+;-----------------------------------------------------------------------------
+;void interp_4tap_vert_pp_6x8(pixel *src, intptr_t srcStride, pixel *dst, intptr_t dstStride, int coeffIdx)
+;-----------------------------------------------------------------------------
+%macro FILTER_V4_W6_H4 2
+INIT_XMM sse4
+cglobal interp_4tap_vert_pp_%1x%2, 4, 7, 8
+
+mov         r4d,       r4m
+sub         r0,        r1
+
+%ifdef PIC
+lea         r6,        [tab_ChromaCoeff]
+movd        m5,        [r6 + r4 * 4]
+%else
+movd        m5,        [tab_ChromaCoeff + r4 * 4]
+%endif
+
+pshufb      m6,        m5,       [tab_Vm]
+pshufb      m5,        [tab_Vm + 16]
+
+mova        m4,        [tab_c_512]
+
+mov         r4d,       %2
+
+.loop
+movq        m0,        [r0]
+movq        m1,        [r0 + r1]
+movq        m2,        [r0 + 2 * r1]
+lea         r5,        [r0 + 2 * r1]
+movq        m3,        [r5 + r1]
+
+punpcklbw   m0,        m1
+punpcklbw   m7,        m2,        m3
+
+pmaddubsw   m0,        m6
+pmaddubsw   m7,        m5
+
+paddw       m0,        m7
+
+pmulhrsw    m0,        m4
+packuswb    m0,        m0
+movd        [r2],      m0
+pextrw      [r2 + 4],  m0,    2
+
+movq        m0,        [r0 + 4 * r1]
+
+punpcklbw   m1,        m2
+punpcklbw   m7,        m3,        m0
+
+pmaddubsw   m1,        m6
+pmaddubsw   m7,        m5
+
+paddw       m1,        m7
+
+pmulhrsw    m1,        m4
+packuswb    m1,        m1
+movd        [r2 + r3],      m1
+pextrw      [r2 + r3 + 4],  m1,    2
+
+lea         r6,        [r0 + 4 * r1]
+movq        m1,        [r6 + r1]
+
+punpcklbw   m2,        m3
+punpcklbw   m7,        m0,        m1
+
+pmaddubsw   m2,        m6
+pmaddubsw   m7,        m5
+
+paddw       m2,        m7
+
+pmulhrsw    m2,        m4
+packuswb    m2,        m2
+movd        [r2 + 2 * r3],     m2
+pextrw      [r2 + 2 * r3 + 4], m2,    2
+
+movq        m2,        [r6 + 2 * r1]
+
+punpcklbw   m3,        m0
+punpcklbw   m1,        m2
+
+pmaddubsw   m3,        m6
+pmaddubsw   m1,        m5
+
+paddw       m3,        m1
+
+pmulhrsw    m3,        m4
+packuswb    m3,        m3
+
+lea         r5,               [r2 + 2 * r3]
+movd        [r5 + r3],        m3
+pextrw      [r5 + r3 + 4],    m3,    2
+
+lea         r0,        [r0 + 4 * r1]
+lea         r2,        [r2 + 4 * r3]
+
+sub         r4,         4
+jnz        .loop
+RET
+%endmacro
+
+FILTER_V4_W6_H4 6, 8


More information about the x265-devel mailing list