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

dnyaneshwar at multicorewareinc.com dnyaneshwar at multicorewareinc.com
Wed Oct 30 06:37:12 CET 2013


# HG changeset patch
# User Dnyaneshwar Gorade <dnyaneshwar at multicorewareinc.com>
# Date 1383111373 -19800
#      Wed Oct 30 11:06:13 2013 +0530
# Node ID e245358c122335558cd510aae413eb1f71e98e47
# Parent  c946d617fd9fbd2ae237d5ba7d8338a1a3f5ea7d
asm: assembly code for pixel_sad_16x12

diff -r c946d617fd9f -r e245358c1223 source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp	Tue Oct 29 15:16:28 2013 +0530
+++ b/source/common/x86/asm-primitives.cpp	Wed Oct 30 11:06:13 2013 +0530
@@ -236,6 +236,7 @@
         //PIXEL_AVE(sse2);
 
         p.sad[LUMA_16x4 ]  = x265_pixel_sad_16x4_sse2;
+        p.sad[LUMA_16x12]  = x265_pixel_sad_16x12_sse2;
         p.sad[LUMA_16x32]  = x265_pixel_sad_16x32_sse2;
         p.sad[LUMA_16x64]  = x265_pixel_sad_16x64_sse2;
 
diff -r c946d617fd9f -r e245358c1223 source/common/x86/sad-a.asm
--- a/source/common/x86/sad-a.asm	Tue Oct 29 15:16:28 2013 +0530
+++ b/source/common/x86/sad-a.asm	Wed Oct 30 11:06:13 2013 +0530
@@ -244,6 +244,35 @@
     SAD_END_SSE2
 
 ;-----------------------------------------------------------------------------
+; int pixel_sad_16x12( uint8_t *, intptr_t, uint8_t *, intptr_t )
+;-----------------------------------------------------------------------------
+cglobal pixel_sad_16x12, 4,4,3
+    pxor m0, m0
+
+    PROCESS_SAD_16x4
+    PROCESS_SAD_16x4
+
+    movu    m1,  [r2]
+    movu    m2,  [r2 + r3]
+    psadbw  m1,  [r0]
+    psadbw  m2,  [r0 + r1]
+    paddd   m1,  m2
+    paddd   m0,  m1
+    lea     r2,  [r2 + 2 * r3]
+    lea     r0,  [r0 + 2 * r1]
+    movu    m1,  [r2]
+    movu    m2,  [r2 + r3]
+    psadbw  m1,  [r0]
+    psadbw  m2,  [r0 + r1]
+    paddd   m1,  m2
+    paddd   m0,  m1
+
+    movhlps m1, m0
+    paddd   m0, m1
+    movd    eax, m0
+    RET
+
+;-----------------------------------------------------------------------------
 ; int pixel_sad_16x32( uint8_t *, intptr_t, uint8_t *, intptr_t )
 ;-----------------------------------------------------------------------------
 cglobal pixel_sad_16x32, 4,4,3


More information about the x265-devel mailing list