<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Nov 6, 2013 at 1:36 AM, <span dir="ltr"><<a href="mailto:praveen@multicorewareinc.com" target="_blank">praveen@multicorewareinc.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"># HG changeset patch<br>
# User Praveen Tiwari<br>
# Date 1383723375 -19800<br>
# Node ID 6f9534cb74935fb1593a84a96b495f3ea30ccec4<br>
# Parent 49db88288b33314b7157793c3a71ef613bfe5f21<br>
asm code for blockcopy_sp, 4xN blocks<br></blockquote><div><br></div><div>both of these are queued</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
diff -r 49db88288b33 -r 6f9534cb7493 source/common/x86/asm-primitives.cpp<br>
--- a/source/common/x86/asm-primitives.cpp Wed Nov 06 12:04:35 2013 +0530<br>
+++ b/source/common/x86/asm-primitives.cpp Wed Nov 06 13:06:15 2013 +0530<br>
@@ -330,6 +330,10 @@<br>
//This function pointer initaliztion is temprory will be remove later with macro definitions.<br>
//It is used to avoid linker error until all partion are coded and commit smaller patches, easier to review.<br>
<br>
+ p.chroma_copy_sp[CHROMA_4x2] = x265_blockcopy_sp_4x2_sse2;<br>
+ p.chroma_copy_sp[CHROMA_4x4] = x265_blockcopy_sp_4x4_sse2;<br>
+ p.chroma_copy_sp[CHROMA_4x8] = x265_blockcopy_sp_4x8_sse2;<br>
+ p.chroma_copy_sp[CHROMA_4x16] = x265_blockcopy_sp_4x16_sse2;<br>
p.chroma_copy_sp[CHROMA_8x2] = x265_blockcopy_sp_8x2_sse2;<br>
p.chroma_copy_sp[CHROMA_8x4] = x265_blockcopy_sp_8x4_sse2;<br>
p.chroma_copy_sp[CHROMA_8x6] = x265_blockcopy_sp_8x6_sse2;<br>
diff -r 49db88288b33 -r 6f9534cb7493 source/common/x86/blockcopy8.asm<br>
--- a/source/common/x86/blockcopy8.asm Wed Nov 06 12:04:35 2013 +0530<br>
+++ b/source/common/x86/blockcopy8.asm Wed Nov 06 13:06:15 2013 +0530<br>
@@ -799,6 +799,162 @@<br>
BLOCKCOPY_PP_W64_H2 64, 48<br>
BLOCKCOPY_PP_W64_H2 64, 64<br>
<br>
+<br>
+;-----------------------------------------------------------------------------<br>
+; void blockcopy_sp_4x2(pixel *dest, intptr_t destStride, int16_t *src, intptr_t srcStride)<br>
+;-----------------------------------------------------------------------------<br>
+INIT_XMM sse2<br>
+cglobal blockcopy_sp_4x2, 4, 4, 3, dest, destStride, src, srcStride<br>
+<br>
+add r3, r3<br>
+<br>
+mova m0, [tab_Vm]<br>
+<br>
+movh m1, [r2]<br>
+movh m2, [r2 + r3]<br>
+<br>
+pshufb m1, m0<br>
+pshufb m2, m0<br>
+<br>
+movd [r0], m1<br>
+movd [r0 + r1], m2<br>
+<br>
+RET<br>
+<br>
+;-----------------------------------------------------------------------------<br>
+; void blockcopy_sp_4x4(pixel *dest, intptr_t destStride, int16_t *src, intptr_t srcStride)<br>
+;-----------------------------------------------------------------------------<br>
+INIT_XMM sse2<br>
+cglobal blockcopy_sp_4x4, 4, 5, 5, dest, destStride, src, srcStride<br>
+<br>
+add r3, r3<br>
+<br>
+mova m0, [tab_Vm]<br>
+<br>
+movh m1, [r2]<br>
+movh m2, [r2 + r3]<br>
+movh m3, [r2 + 2 * r3]<br>
+lea r4, [r2 + 2 * r3]<br>
+movh m4, [r4 + r3]<br>
+<br>
+pshufb m1, m0<br>
+pshufb m2, m0<br>
+pshufb m3, m0<br>
+pshufb m4, m0<br>
+<br>
+movd [r0], m1<br>
+movd [r0 + r1], m2<br>
+movd [r0 + 2 * r1], m3<br>
+lea r4, [r0 + 2 * r1]<br>
+movd [r4 + r1], m4<br>
+<br>
+RET<br>
+<br>
+;-----------------------------------------------------------------------------<br>
+; void blockcopy_sp_4x8(pixel *dest, intptr_t destStride, int16_t *src, intptr_t srcStride)<br>
+;-----------------------------------------------------------------------------<br>
+INIT_XMM sse2<br>
+cglobal blockcopy_sp_4x8, 4, 6, 8, dest, destStride, src, srcStride<br>
+<br>
+add r3, r3<br>
+<br>
+mova m0, [tab_Vm]<br>
+<br>
+movh m1, [r2]<br>
+movh m2, [r2 + r3]<br>
+movh m3, [r2 + 2 * r3]<br>
+lea r4, [r2 + 2 * r3]<br>
+movh m4, [r4 + r3]<br>
+movh m5, [r4 + 2 * r3]<br>
+lea r4, [r4 + 2 * r3]<br>
+movh m6, [r4 + r3]<br>
+movh m7, [r4 + 2 * r3]<br>
+lea r5, [r4 + 2 * r3]<br>
+<br>
+pshufb m1, m0<br>
+pshufb m2, m0<br>
+pshufb m3, m0<br>
+pshufb m4, m0<br>
+pshufb m5, m0<br>
+pshufb m6, m0<br>
+pshufb m7, m0<br>
+<br>
+movd [r0], m1<br>
+movd [r0 + r1], m2<br>
+movd [r0 + 2 * r1], m3<br>
+lea r4, [r0 + 2 * r1]<br>
+movd [r4 + r1], m4<br>
+movd [r4 + 2 * r1], m5<br>
+lea r4, [r4 + 2 * r1]<br>
+movd [r4 + r1], m6<br>
+movd [r4 + 2 * r1], m7<br>
+<br>
+movh m1, [r5 + r3]<br>
+pshufb m1, m0<br>
+lea r4, [r4 + 2 * r1]<br>
+movd [r4 + r1], m1<br>
+<br>
+RET<br>
+<br>
+;-----------------------------------------------------------------------------<br>
+; void blockcopy_sp_%1x%2(pixel *dest, intptr_t destStride, int16_t *src, intptr_t srcStride)<br>
+;-----------------------------------------------------------------------------<br>
+%macro BLOCKCOPY_SP_W4_H8 2<br>
+INIT_XMM sse2<br>
+cglobal blockcopy_sp_%1x%2, 4, 7, 8, dest, destStride, src, srcStride<br>
+<br>
+mov r6d, %2<br>
+<br>
+add r3, r3<br>
+<br>
+mova m0, [tab_Vm]<br>
+<br>
+.loop<br>
+ movh m1, [r2]<br>
+ movh m2, [r2 + r3]<br>
+ movh m3, [r2 + 2 * r3]<br>
+ lea r4, [r2 + 2 * r3]<br>
+ movh m4, [r4 + r3]<br>
+ movh m5, [r4 + 2 * r3]<br>
+ lea r4, [r4 + 2 * r3]<br>
+ movh m6, [r4 + r3]<br>
+ movh m7, [r4 + 2 * r3]<br>
+ lea r5, [r4 + 2 * r3]<br>
+<br>
+ pshufb m1, m0<br>
+ pshufb m2, m0<br>
+ pshufb m3, m0<br>
+ pshufb m4, m0<br>
+ pshufb m5, m0<br>
+ pshufb m6, m0<br>
+ pshufb m7, m0<br>
+<br>
+ movd [r0], m1<br>
+ movd [r0 + r1], m2<br>
+ movd [r0 + 2 * r1], m3<br>
+ lea r4, [r0 + 2 * r1]<br>
+ movd [r4 + r1], m4<br>
+ movd [r4 + 2 * r1], m5<br>
+ lea r4, [r4 + 2 * r1]<br>
+ movd [r4 + r1], m6<br>
+ movd [r4 + 2 * r1], m7<br>
+<br>
+ movh m1, [r5 + r3]<br>
+ pshufb m1, m0<br>
+ lea r4, [r4 + 2 * r1]<br>
+ movd [r4 + r1], m1<br>
+<br>
+ lea r0, [r0 + 8 * r1]<br>
+ lea r2, [r2 + 8 * r3]<br>
+<br>
+ sub r6d, 8<br>
+ jnz .loop<br>
+<br>
+RET<br>
+%endmacro<br>
+<br>
+BLOCKCOPY_SP_W4_H8 4, 16<br>
+<br>
;-----------------------------------------------------------------------------<br>
; void blockcopy_sp_8x2(pixel *dest, intptr_t destStride, int16_t *src, intptr_t srcStride)<br>
;-----------------------------------------------------------------------------<br>
_______________________________________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Steve Borho
</div></div>