[x265] [PATCH] asm: chroma_hps[48x64] for i444 - improved 16378c->11853c

aasaipriya at multicorewareinc.com aasaipriya at multicorewareinc.com
Mon May 4 06:47:49 CEST 2015


# HG changeset patch
# User Aasaipriya Chandran <aasaipriya at multicorewareinc.com>
# Date 1430713686 -19800
#      Mon May 04 09:58:06 2015 +0530
# Node ID e9bf197661f2fdc9f94a220b6dfcc0c754d55245
# Parent  4cf55e54fe3ec33f540b7678b02de34074c0527b
asm: chroma_hps[48x64] for i444 - improved 16378c->11853c

diff -r 4cf55e54fe3e -r e9bf197661f2 source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp	Sat May 02 10:58:05 2015 -0500
+++ b/source/common/x86/asm-primitives.cpp	Mon May 04 09:58:06 2015 +0530
@@ -2468,6 +2468,7 @@
         p.chroma[X265_CSP_I444].pu[LUMA_16x64].filter_hps = x265_interp_4tap_horiz_ps_16x64_avx2;
 
         p.chroma[X265_CSP_I444].pu[LUMA_24x32].filter_hps = x265_interp_4tap_horiz_ps_24x32_avx2;
+        p.chroma[X265_CSP_I444].pu[LUMA_48x64].filter_hps = x265_interp_4tap_horiz_ps_48x64_avx2;
 
         p.chroma[X265_CSP_I444].pu[LUMA_32x16].filter_hps = x265_interp_4tap_horiz_ps_32x16_avx2;
         p.chroma[X265_CSP_I444].pu[LUMA_32x64].filter_hps = x265_interp_4tap_horiz_ps_32x64_avx2;
diff -r 4cf55e54fe3e -r e9bf197661f2 source/common/x86/ipfilter8.asm
--- a/source/common/x86/ipfilter8.asm	Sat May 02 10:58:05 2015 -0500
+++ b/source/common/x86/ipfilter8.asm	Mon May 04 09:58:06 2015 +0530
@@ -24076,3 +24076,85 @@
     dec               r4d
     jnz               .loop
     RET
+
+;-----------------------------------------------------------------------------------------------------------------------------
+; void interp_4tap_horiz_ps_48x64(pixel *src, intptr_t srcStride, int16_t *dst, intptr_t dstStride, int coeffIdx, int isRowExt)
+;-----------------------------------------------------------------------------------------------------------------------------;
+
+INIT_YMM avx2
+cglobal interp_4tap_horiz_ps_48x64, 4,7,6
+    mov             r4d, r4m
+    mov             r5d, r5m
+    add             r3d, r3d
+
+%ifdef PIC
+    lea               r6,           [tab_ChromaCoeff]
+    vpbroadcastd      m0,           [r6 + r4 * 4]
+%else
+    vpbroadcastd      m0,           [tab_ChromaCoeff + r4 * 4]
+%endif
+
+    vbroadcasti128     m2,          [pw_1]
+    vbroadcasti128     m5,          [pw_2000]
+    mova               m1,          [tab_Tm]
+
+    ; register map
+    ; m0 - interpolate coeff
+    ; m1 - shuffle order table
+    ; m2 - constant word 1
+    mov               r6d,          64
+    dec               r0
+    test              r5d,          r5d
+    je                .loop
+    sub               r0 ,          r1
+    add               r6d ,         3
+
+.loop
+    ; Row 0
+    vbroadcasti128    m3,           [r0]                           ; [x x x x x A 9 8 7 6 5 4 3 2 1 0]
+    pshufb            m3,           m1
+    pmaddubsw         m3,           m0
+    pmaddwd           m3,           m2
+    vbroadcasti128    m4,           [r0 + 8]                       ; [x x x x x A 9 8 7 6 5 4 3 2 1 0]
+    pshufb            m4,           m1
+    pmaddubsw         m4,           m0
+    pmaddwd           m4,           m2
+
+    packssdw          m3,           m4
+    psubw             m3,           m5
+    vpermq            m3,           m3,          q3120
+    movu              [r2],         m3
+
+    vbroadcasti128    m3,           [r0 + 16]                      ; [x x x x x A 9 8 7 6 5 4 3 2 1 0]
+    pshufb            m3,           m1
+    pmaddubsw         m3,           m0
+    pmaddwd           m3,           m2
+    vbroadcasti128    m4,           [r0 + 24]                      ; [x x x x x A 9 8 7 6 5 4 3 2 1 0]
+    pshufb            m4,           m1
+    pmaddubsw         m4,           m0
+    pmaddwd           m4,           m2
+
+    packssdw          m3,           m4
+    psubw             m3,           m5
+    vpermq            m3,           m3,          q3120
+    movu              [r2 + 32],    m3
+
+    vbroadcasti128    m3,           [r0 + 32]                      ; [x x x x x A 9 8 7 6 5 4 3 2 1 0]
+    pshufb            m3,           m1
+    pmaddubsw         m3,           m0
+    pmaddwd           m3,           m2
+    vbroadcasti128    m4,           [r0 + 40]                      ; [x x x x x A 9 8 7 6 5 4 3 2 1 0]
+    pshufb            m4,           m1
+    pmaddubsw         m4,           m0
+    pmaddwd           m4,           m2
+
+    packssdw          m3,           m4
+    psubw             m3,           m5
+    vpermq            m3,           m3,          q3120
+    movu              [r2 + 64],    m3
+
+    add               r2,          r3
+    add               r0,          r1
+    dec               r6d
+    jnz               .loop
+    RET


More information about the x265-devel mailing list