[x265] [PATCH] asm: assembly code for pixel_sad_64x32

dnyaneshwar at multicorewareinc.com dnyaneshwar at multicorewareinc.com
Wed Oct 30 09:16:42 CET 2013


# HG changeset patch
# User Dnyaneshwar Gorade <dnyaneshwar at multicorewareinc.com>
# Date 1383120938 -19800
#      Wed Oct 30 13:45:38 2013 +0530
# Node ID c08f78ad73bf677164f3ffec707a1fb22de21d59
# Parent  147651ebea036e9378966a8e1e187dbab72d3896
asm: assembly code for pixel_sad_64x32

diff -r 147651ebea03 -r c08f78ad73bf source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp	Wed Oct 30 13:25:12 2013 +0530
+++ b/source/common/x86/asm-primitives.cpp	Wed Oct 30 13:45:38 2013 +0530
@@ -247,6 +247,7 @@
         p.sad[LUMA_32x64]  = x265_pixel_sad_32x64_sse2;
 
         p.sad[LUMA_64x16]  = x265_pixel_sad_64x16_sse2;
+        p.sad[LUMA_64x32]  = x265_pixel_sad_64x32_sse2;
 
         ASSGN_SSE(sse2);
         INIT2(sad, _sse2);
diff -r 147651ebea03 -r c08f78ad73bf source/common/x86/sad-a.asm
--- a/source/common/x86/sad-a.asm	Wed Oct 30 13:25:12 2013 +0530
+++ b/source/common/x86/sad-a.asm	Wed Oct 30 13:45:38 2013 +0530
@@ -774,6 +774,36 @@
     movd    eax, m0
     RET
 
+;-----------------------------------------------------------------------------
+; int pixel_sad_64x32( uint8_t *, intptr_t, uint8_t *, intptr_t )
+;-----------------------------------------------------------------------------
+cglobal pixel_sad_64x32, 4,4,5
+    pxor  m0,  m0
+    mov   r4,  32
+
+.loop
+    PROCESS_SAD_64x4
+    lea     r2,  [r2 + r3]
+    lea     r0,  [r0 + r1]
+
+    PROCESS_SAD_64x4
+    lea     r2,  [r2 + r3]
+    lea     r0,  [r0 + r1]
+
+    sub   r4,  8
+    cmp   r4,  8
+
+jnz .loop
+    PROCESS_SAD_64x4
+    lea   r2,  [r2 + r3]
+    lea   r0,  [r0 + r1]
+    PROCESS_SAD_64x4
+
+    movhlps m1,  m0
+    paddd   m0,  m1
+    movd    eax, m0
+    RET
+
 %endmacro
 
 INIT_XMM sse2


More information about the x265-devel mailing list