[x265] [PATCH] asm: intra_pred_ang8_2 asm code

yuvaraj at multicorewareinc.com yuvaraj at multicorewareinc.com
Thu Jan 9 05:13:41 CET 2014


# HG changeset patch
# User Yuvaraj Venkatesh <yuvaraj at multicorewareinc.com>
# Date 1389240803 -19800
#      Thu Jan 09 09:43:23 2014 +0530
# Node ID f693ad253fef7b200d205e1d76ec4a8c2637da14
# Parent  c4edab8dab65b393ab9d48f7533df554f41ca4fe
asm: intra_pred_ang8_2 asm code

diff -r c4edab8dab65 -r f693ad253fef source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp	Tue Jan 07 18:36:17 2014 +0530
+++ b/source/common/x86/asm-primitives.cpp	Thu Jan 09 09:43:23 2014 +0530
@@ -549,10 +549,11 @@
 
 #define SETUP_INTRA_ANG4(mode, fno, cpu) \
     p.intra_pred[BLOCK_4x4][mode] = x265_intra_pred_ang4_ ## fno ## _ ## cpu;
+#define SETUP_INTRA_ANG8(mode, fno, cpu) \
+    p.intra_pred[BLOCK_8x8][mode] = x265_intra_pred_ang8_ ## fno ## _ ## cpu;
 
 namespace x265 {
 // private x265 namespace
-
 void Setup_Assembly_Primitives(EncoderPrimitives &p, int cpuMask)
 {
 #if HIGH_BIT_DEPTH
@@ -889,10 +890,11 @@
 
         SETUP_INTRA_ANG4(2, 2, ssse3);
         SETUP_INTRA_ANG4(34, 2, ssse3);
+        SETUP_INTRA_ANG8(2, 2, ssse3);
+        SETUP_INTRA_ANG8(34, 2, ssse3);
 
         p.scale1D_128to64 = x265_scale1D_128to64_ssse3;
         p.scale2D_64to32 = x265_scale2D_64to32_ssse3;
-
         SAD_X3(ssse3);
         SAD_X4(ssse3);
         p.sad_x4[LUMA_8x4] = x265_pixel_sad_x4_8x4_ssse3;
diff -r c4edab8dab65 -r f693ad253fef source/common/x86/intrapred.h
--- a/source/common/x86/intrapred.h	Tue Jan 07 18:36:17 2014 +0530
+++ b/source/common/x86/intrapred.h	Thu Jan 09 09:43:23 2014 +0530
@@ -57,9 +57,25 @@
 DECL_ANG(4, 17, sse4);
 DECL_ANG(4, 18, sse4);
 DECL_ANG(4, 26, sse4);
-
+DECL_ANG(8, 2, ssse3);
+DECL_ANG(8, 3, sse4);
+DECL_ANG(8, 4, sse4);
+DECL_ANG(8, 5, sse4);
+DECL_ANG(8, 6, sse4);
+DECL_ANG(8, 7, sse4);
+DECL_ANG(8, 8, sse4);
+DECL_ANG(8, 9, sse4);
+DECL_ANG(8, 10, sse4);
+DECL_ANG(8, 11, sse4);
+DECL_ANG(8, 12, sse4);
+DECL_ANG(8, 13, sse4);
+DECL_ANG(8, 14, sse4);
+DECL_ANG(8, 15, sse4);
+DECL_ANG(8, 16, sse4);
+DECL_ANG(8, 17, sse4);
+DECL_ANG(8, 18, sse4);
+DECL_ANG(8, 26, sse4);
 #undef DECL_ANG
-
 void x265_all_angs_pred_4x4_sse4(pixel *dest, pixel *above0, pixel *left0, pixel *above1, pixel *left1, bool bLuma);
 void x265_all_angs_pred_8x8_sse4(pixel *dest, pixel *above0, pixel *left0, pixel *above1, pixel *left1, bool bLuma);
 
diff -r c4edab8dab65 -r f693ad253fef source/common/x86/intrapred8.asm
--- a/source/common/x86/intrapred8.asm	Tue Jan 07 18:36:17 2014 +0530
+++ b/source/common/x86/intrapred8.asm	Thu Jan 09 09:43:23 2014 +0530
@@ -1105,6 +1105,33 @@
     psrldq      m0, 1
     movd        [r0], m0
     RET
+;-----------------------------------------------------------------------------
+; void intraPredAng(pixel* dst, intptr_t dstStride, pixel *refLeft, pixel *refAbove, int dirMode, int bFilter)
+;-----------------------------------------------------------------------------
+INIT_XMM ssse3
+cglobal intra_pred_ang8_2, 3,5,2
+    cmp         r4m,            byte 34
+    cmove       r2,             r3mp
+    movu        m0,             [r2 + 2]
+    lea         r4,             [r1 * 3]
+
+    movh        [r0],           m0
+    palignr     m1,             m0, 1
+    movh        [r0 + r1],      m1
+    palignr     m1,             m0, 2
+    movh        [r0 + r1 * 2],  m1
+    palignr     m1,             m0, 3
+    movh        [r0 + r4],      m1
+    palignr     m1,             m0, 4
+    lea         r0,             [r0 + r1 * 4]
+    movh        [r0],           m1
+    palignr     m1,             m0, 5
+    movh        [r0 + r1],      m1
+    palignr     m1,             m0, 6
+    movh        [r0 + r1 * 2],  m1
+    palignr     m1,             m0, 7
+    movh        [r0 + r4],      m1
+    RET
 
 ;-----------------------------------------------------------------------------
 ; void all_angs_pred_4x4(pixel *dest, pixel *above0, pixel *left0, pixel *above1, pixel *left1, bool bLuma)


More information about the x265-devel mailing list