[x265] [PATCH] asm code for blockfil_s, 8x8

praveen at multicorewareinc.com praveen at multicorewareinc.com
Thu Nov 7 14:29:36 CET 2013


# HG changeset patch
# User Praveen Tiwari
# Date 1383830968 -19800
# Node ID b6f08fc7aef3141e2049701515d23169ef6e232d
# Parent  f2af7af43dfcb08135a08e755f654314a89efae7
asm code for blockfil_s, 8x8

diff -r f2af7af43dfc -r b6f08fc7aef3 source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp	Thu Nov 07 18:26:36 2013 +0530
+++ b/source/common/x86/asm-primitives.cpp	Thu Nov 07 18:59:28 2013 +0530
@@ -363,6 +363,7 @@
         p.luma_copy_sp[LUMA_64x64] = x265_blockcopy_sp_64x64_sse2;
 
         p.blockfill_s[BLOCK_4x4] = x265_blockfil_s_4x4_sse2;
+        p.blockfill_s[BLOCK_8x8] = x265_blockfil_s_8x8_sse2;
 #if X86_64
         p.satd[LUMA_8x32] = x265_pixel_satd_8x32_sse2;
         p.satd[LUMA_16x4] = x265_pixel_satd_16x4_sse2;
diff -r f2af7af43dfc -r b6f08fc7aef3 source/common/x86/blockcopy8.asm
--- a/source/common/x86/blockcopy8.asm	Thu Nov 07 18:26:36 2013 +0530
+++ b/source/common/x86/blockcopy8.asm	Thu Nov 07 18:59:28 2013 +0530
@@ -1665,3 +1665,32 @@
 movh       [r0 + r1],     m0
 
 RET
+
+;-----------------------------------------------------------------------------
+; void blockfil_s_8x8(int16_t *dest, intptr_t destride, int16_t val)
+;-----------------------------------------------------------------------------
+INIT_XMM sse2
+cglobal blockfil_s_8x8, 3, 3, 1, dest, destStride, val
+
+add        r1,            r1
+
+movd       m0,            r2d
+pshuflw    m0,            m0,         0
+pshufd     m0,            m0,         0
+
+movu       [r0],          m0
+movu       [r0 + r1],     m0
+movu       [r0 + 2 * r1], m0
+
+lea        r0,            [r0 + 2 * r1]
+movu       [r0 + r1],     m0
+movu       [r0 + 2 * r1], m0
+
+lea        r0,            [r0 + 2 * r1]
+movu       [r0 + r1],     m0
+movu       [r0 + 2 * r1], m0
+
+lea        r0,            [r0 + 2 * r1]
+movu       [r0 + r1],     m0
+
+RET
diff -r f2af7af43dfc -r b6f08fc7aef3 source/common/x86/pixel.h
--- a/source/common/x86/pixel.h	Thu Nov 07 18:26:36 2013 +0530
+++ b/source/common/x86/pixel.h	Thu Nov 07 18:59:28 2013 +0530
@@ -267,6 +267,7 @@
 DECL_ADS(1, avx2)
 
 void x265_blockfil_s_4x4_sse2(int16_t *dst, intptr_t dstride, int16_t val);
+void x265_blockfil_s_8x8_sse2(int16_t *dst, intptr_t dstride, int16_t val);
 
 #undef DECL_PIXELS
 #undef DECL_SUF


More information about the x265-devel mailing list