[x265] [PATCH] asm: psyCost_ss_32x32 in sse4: improve 136848c->39754c

Divya Manivannan divya at multicorewareinc.com
Mon Jan 19 06:36:05 CET 2015


# HG changeset patch
# User Divya Manivannan <divya at multicorewareinc.com>
# Date 1421645733 -19800
#      Mon Jan 19 11:05:33 2015 +0530
# Node ID 96b98b02b9ffc44d7da263a5c9d49e110c22d2da
# Parent  298735b1907d5f4044724f6028ba361d1a1baf50
asm: psyCost_ss_32x32 in sse4: improve 136848c->39754c

diff -r 298735b1907d -r 96b98b02b9ff source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp	Mon Jan 19 10:56:24 2015 +0530
+++ b/source/common/x86/asm-primitives.cpp	Mon Jan 19 11:05:33 2015 +0530
@@ -933,6 +933,7 @@
 
         p.cu[BLOCK_8x8].psy_cost_ss = x265_psyCost_ss_8x8_sse4;
         p.cu[BLOCK_16x16].psy_cost_ss = x265_psyCost_ss_16x16_sse4;
+        p.cu[BLOCK_32x32].psy_cost_ss = x265_psyCost_ss_32x32_sse4;
 #endif
         p.cu[BLOCK_4x4].psy_cost_ss = x265_psyCost_ss_4x4_sse4;
     }
@@ -1186,6 +1187,7 @@
         ALL_LUMA_CU(psy_cost_pp, psyCost_pp, sse4);
         p.cu[BLOCK_8x8].psy_cost_ss = x265_psyCost_ss_8x8_sse4;
         p.cu[BLOCK_16x16].psy_cost_ss = x265_psyCost_ss_16x16_sse4;
+        p.cu[BLOCK_32x32].psy_cost_ss = x265_psyCost_ss_32x32_sse4;
 #endif
         p.cu[BLOCK_4x4].psy_cost_ss = x265_psyCost_ss_4x4_sse4;
     }
diff -r 298735b1907d -r 96b98b02b9ff source/common/x86/pixel-a.asm
--- a/source/common/x86/pixel-a.asm	Mon Jan 19 10:56:24 2015 +0530
+++ b/source/common/x86/pixel-a.asm	Mon Jan 19 11:05:33 2015 +0530
@@ -8903,3 +8903,31 @@
     movd            eax, m15
     RET
 %endif
+
+%if ARCH_X86_64
+INIT_XMM sse4
+cglobal psyCost_ss_32x32, 4, 9, 16
+
+    mova            m13, [hmul_w]
+    mova            m14, [pw_1]
+    add             r1, r1
+    add             r3, r3
+    lea             r4, [3 * r1]
+    lea             r6, [3 * r3]
+    pxor            m15, m15
+    mov             r7d, 4
+.loopH:
+    mov             r8d, 4
+.loopW:
+    psy_cost_ss
+    add             r0, 16
+    add             r2, 16
+    dec             r8d
+    jnz             .loopW
+    lea             r0, [r0 + r1 * 8 - 64]
+    lea             r2, [r2 + r3 * 8 - 64]
+    dec             r7d
+    jnz             .loopH
+    movd            eax, m15
+    RET
+%endif
diff -r 298735b1907d -r 96b98b02b9ff source/common/x86/pixel.h
--- a/source/common/x86/pixel.h	Mon Jan 19 10:56:24 2015 +0530
+++ b/source/common/x86/pixel.h	Mon Jan 19 11:05:33 2015 +0530
@@ -226,6 +226,7 @@
 int x265_psyCost_ss_4x4_sse4(const int16_t* source, intptr_t sstride, const int16_t* recon, intptr_t rstride);
 int x265_psyCost_ss_8x8_sse4(const int16_t* source, intptr_t sstride, const int16_t* recon, intptr_t rstride);
 int x265_psyCost_ss_16x16_sse4(const int16_t* source, intptr_t sstride, const int16_t* recon, intptr_t rstride);
+int x265_psyCost_ss_32x32_sse4(const int16_t* source, intptr_t sstride, const int16_t* recon, intptr_t rstride);
 
 #undef DECL_PIXELS
 #undef DECL_HEVC_SSD


More information about the x265-devel mailing list