[x265] [PATCH] assembly code for intra_pred_ang8_5

yuvaraj at multicorewareinc.com yuvaraj at multicorewareinc.com
Tue Jan 21 14:21:33 CET 2014


# HG changeset patch
# User Yuvaraj Venkatesh <yuvaraj at multicorewareinc.com>
# Date 1390300367 -19800
#      Tue Jan 21 16:02:47 2014 +0530
# Node ID 7990c9ba0510515117c720fd0674c50c9e6f85c0
# Parent  051c3938d6e797d75c06792ccbf8fb2326576b92
assembly code for intra_pred_ang8_5

diff -r 051c3938d6e7 -r 7990c9ba0510 source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp	Tue Jan 21 12:05:04 2014 +0530
+++ b/source/common/x86/asm-primitives.cpp	Tue Jan 21 16:02:47 2014 +0530
@@ -1015,6 +1015,8 @@
 
         SETUP_INTRA_ANG8(3, 3, sse4);
         SETUP_INTRA_ANG8(4, 4, sse4);
+        SETUP_INTRA_ANG8(5, 5, sse4);
+        SETUP_INTRA_ANG8(31, 5, sse4);
         SETUP_INTRA_ANG8(32, 4, sse4);
         SETUP_INTRA_ANG8(33, 3, sse4);
 
diff -r 051c3938d6e7 -r 7990c9ba0510 source/common/x86/intrapred8.asm
--- a/source/common/x86/intrapred8.asm	Tue Jan 21 12:05:04 2014 +0530
+++ b/source/common/x86/intrapred8.asm	Tue Jan 21 16:02:47 2014 +0530
@@ -1289,6 +1289,64 @@
     packuswb    m1,        m2
     jmp         mangle(private_prefix %+ _ %+ intra_pred_ang8_3 %+ SUFFIX %+ .transpose8x8)
 
+cglobal intra_pred_ang8_5, 3,5,8
+    cmp         r4m,       byte 31
+    cmove       r2,        r3mp
+    lea         r3,        [ang_table + 13 * 16]
+    mova        m7,        [pw_1024]
+
+    movu        m0,        [r2 + 1]                   ; [16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1]
+    palignr     m1,        m0, 1                      ; [x 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2]
+
+    punpckhbw   m2,        m0, m1                     ; [x 16 16 15 15 14 14 13 13 12 12 11 11 10 10 9]
+    punpcklbw   m0,        m1                         ; [9 8 8 7 7 6 6 5 5 4 4 3 3 2 2 1]
+    palignr     m1,        m2, m0, 2                  ; [10 9 9 8 8 7 7 6 6 5 5 4 4 3 3 2]
+    mova        m5,        m1
+
+    movu        m3,        [r3 + 4 * 16]              ; [17]
+    movu        m6,        [r3 - 11 * 16]             ; [2]
+
+    pmaddubsw   m4,        m0, m3
+    pmulhrsw    m4,        m7
+    pmaddubsw   m1,        m6
+    pmulhrsw    m1,        m7
+    packuswb    m4,        m1
+
+    movu        m3,        [r3 + 6 * 16]              ; [19]
+    pmaddubsw   m5,        m3
+    pmulhrsw    m5,        m7
+
+    palignr     m6,        m2, m0, 4                  ; [11 10 10 9 9 8 8 7 7 6 6 5 5 4 4 3]
+    mova        m1,        m6
+
+    movu        m3,        [r3 - 9 * 16]              ; [4]
+    pmaddubsw   m1,        m3
+    pmulhrsw    m1,        m7
+    packuswb    m5,        m1
+
+    movu        m3,        [r3 + 8 * 16]              ; [21]
+    pmaddubsw   m6,        m3
+    pmulhrsw    m6,        m7
+
+    palignr     m1,        m2, m0, 6                  ; [12 11 11 10 10 9 9 8 8 7 7 6 6 5 5 4]
+
+    mova        m3,        m1
+    pmaddubsw   m3,        [r3 - 7 * 16]              ; [6]
+    pmulhrsw    m3,        m7
+    packuswb    m6,        m3
+
+    movu        m3,        [r3 + 10 * 16]             ; [23]
+    pmaddubsw   m1,        m3
+    pmulhrsw    m1,        m7
+
+    palignr     m2,        m0, 8                      ; [13 12 12 11 11 10 10 9 9 8 8 7 7 8 8 9]
+
+    movu        m3,        [r3 - 5 * 16]              ; [8]
+    pmaddubsw   m2,        m3
+    pmulhrsw    m2,        m7
+    packuswb    m1,        m2
+    jmp         mangle(private_prefix %+ _ %+ intra_pred_ang8_3 %+ SUFFIX %+ .transpose8x8)
+
 ;-----------------------------------------------------------------------------
 ; void intraPredAng16(pixel* dst, intptr_t dstStride, pixel *refLeft, pixel *refAbove, int dirMode, int bFilter)
 ;-----------------------------------------------------------------------------


More information about the x265-devel mailing list