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

yuvaraj at multicorewareinc.com yuvaraj at multicorewareinc.com
Thu Nov 21 14:04:28 CET 2013


# HG changeset patch
# User Yuvaraj Venkatesh <yuvaraj at multicorewareinc.com>
# Date 1385039050 -19800
#      Thu Nov 21 18:34:10 2013 +0530
# Node ID 772f8e5219e1cebdac98c6645c5ccdfcc123641b
# Parent  07e7c6fa290a99856b96a3ec0d2c8eafdbdb921f
asm: assembly code for pixel_sa8d_32x8

diff -r 07e7c6fa290a -r 772f8e5219e1 source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp	Thu Nov 21 18:11:56 2013 +0530
+++ b/source/common/x86/asm-primitives.cpp	Thu Nov 21 18:34:10 2013 +0530
@@ -94,7 +94,7 @@
     p.sa8d_inter[LUMA_8x16]  = x265_pixel_sa8d_8x16_ ## cpu; \
     p.sa8d_inter[LUMA_32x24] = x265_pixel_sa8d_32x24_ ## cpu; \
     p.sa8d_inter[LUMA_24x32] = x265_pixel_sa8d_24x32_ ## cpu; \
-    p.sa8d_inter[LUMA_32x8]  = cmp<32, 8, 8, 8, x265_pixel_sa8d_8x8_ ## cpu>; \
+    p.sa8d_inter[LUMA_32x8]  = x265_pixel_sa8d_32x8_ ## cpu; \
     p.sa8d_inter[LUMA_8x32]  = cmp<8, 32, 8, 8, x265_pixel_sa8d_8x8_ ## cpu>; \
     p.sa8d_inter[LUMA_32x32] = x265_pixel_sa8d_32x32_ ## cpu; \
     p.sa8d_inter[LUMA_32x16] = x265_pixel_sa8d_32x16_ ## cpu; \
diff -r 07e7c6fa290a -r 772f8e5219e1 source/common/x86/pixel-a.asm
--- a/source/common/x86/pixel-a.asm	Thu Nov 21 18:11:56 2013 +0530
+++ b/source/common/x86/pixel-a.asm	Thu Nov 21 18:34:10 2013 +0530
@@ -3706,6 +3706,27 @@
     movd eax, m12
     RET
 
+cglobal pixel_sa8d_32x8, 4,8,12
+    FIX_STRIDES r1, r3
+    lea  r4, [3*r1]
+    lea  r5, [3*r3]
+    pxor m12, m12
+%if vertical == 0
+    mova m7, [hmul_8p]
+%endif
+    SA8D_8x8
+    add r0, 8
+    add r2, 8
+    SA8D_8x8
+    add r0, 8
+    add r2, 8
+    SA8D_8x8
+    add r0, 8
+    add r2, 8
+    SA8D_8x8
+    movd eax, m12
+    RET
+
 cglobal pixel_sa8d_32x16, 4,8,12
     FIX_STRIDES r1, r3
     lea  r4, [3*r1]
@@ -4843,6 +4864,62 @@
     mov esp, r6
     RET
 
+cglobal pixel_sa8d_32x8, 4,7,8
+    FIX_STRIDES r1, r3
+    mov  r6, esp
+    and  esp, ~15
+    sub  esp, 64
+
+    lea  r4, [r1 + 2*r1]
+    lea  r5, [r3 + 2*r3]
+    call pixel_sa8d_8x8_internal2
+    HADDUW m0, m1
+    movd r4d, m0
+    add  r4d, 1
+    shr  r4d, 1
+    mov dword [esp+36], r4d
+
+    mov  r0, [r6+20]
+    mov  r2, [r6+28]
+    add  r0, 8*SIZEOF_PIXEL
+    add  r2, 8*SIZEOF_PIXEL
+    lea  r4, [r1 + 2*r1]
+    call pixel_sa8d_8x8_internal2
+    HADDUW m0, m1
+    movd r4d, m0
+    add  r4d, 1
+    shr  r4d, 1
+    add  r4d, dword [esp+36]
+    mov dword [esp+36], r4d
+
+    mov  r0, [r6+20]
+    mov  r2, [r6+28]
+    add  r0, 16*SIZEOF_PIXEL
+    add  r2, 16*SIZEOF_PIXEL
+    lea  r4, [r1 + 2*r1]
+    call pixel_sa8d_8x8_internal2
+    HADDUW m0, m1
+    movd r4d, m0
+    add  r4d, 1
+    shr  r4d, 1
+    add  r4d, dword [esp+36]
+    mov dword [esp+36], r4d
+
+    mov  r0, [r6+20]
+    mov  r2, [r6+28]
+    add  r0, 24*SIZEOF_PIXEL
+    add  r2, 24*SIZEOF_PIXEL
+    lea  r4, [r1 + 2*r1]
+    call pixel_sa8d_8x8_internal2
+    HADDUW m0, m1
+    movd r4d, m0
+    add  r4d, 1
+    shr  r4d, 1
+    add  r4d, dword [esp+36]
+    mov eax, r4d
+    mov esp, r6
+    RET
+
 cglobal pixel_sa8d_32x16, 4,7,8
     FIX_STRIDES r1, r3
     mov  r6, esp


More information about the x265-devel mailing list