<div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial"><div>It is read beyond array bound, I modify algorithm to avoid it.</div><div><br></div><div>My local smoke-test system failed, I will upload patch when I verify <br></div><div></div><div id="divNeteaseMailCard"></div><div><br></div>At 2015-07-17 08:19:35,"Deepthi Nandakumar" <deepthi@multicorewareinc.com> wrote:<br> <blockquote id="isReplyContent" style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;"><div dir="ltr">Thanks, Min. Do we know what exactly caused this on some Macs - unaligned access? The test farm Darwin machine has reported no smoke test failures. <br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 17, 2015 at 2:51 AM, Steve Borho <span dir="ltr"><<a href="mailto:steve@borho.org" target="_blank">steve@borho.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;"><span>On 06/26, <a href="mailto:rajesh@multicorewareinc.com">rajesh@multicorewareinc.com</a> wrote:<br>
> # HG changeset patch<br>
> # User Rajesh Paulraj<<a href="mailto:rajesh@multicorewareinc.com">rajesh@multicorewareinc.com</a>><br>
> # Date 1435311677 -19800<br>
> # Fri Jun 26 15:11:17 2015 +0530<br>
> # Node ID 818b70b015513a01993af0c48e4714cf4fd8dc84<br>
> # Parent 956401f1a679f1e71181b704d64e4acdb6f1a93f<br>
> asm: avx2 10bit code for planecopy_cp(10660.20 -> 5685.80)<br>
><br>
> avx2:<br>
> planecopy_cp 19.36x 5685.80 110052.08<br>
><br>
> sse4:<br>
> planecopy_cp 9.65x 10660.20 102850.27<br>
<br>
</span>FYI: this primitive has introduced a SIGBUS on some of the main10 smoke<br>
tests on Mac. Min is working on a rewrite of the primitive which should<br>
hopefully resolve this problem<br>
<div class="HOEnZb"><div class="h5"><br>
> diff -r 956401f1a679 -r 818b70b01551 source/common/x86/asm-primitives.cpp<br>
> --- a/source/common/x86/asm-primitives.cpp Fri Jun 26 15:01:16 2015 +0530<br>
> +++ b/source/common/x86/asm-primitives.cpp Fri Jun 26 15:11:17 2015 +0530<br>
> @@ -1522,6 +1522,7 @@<br>
> p.scale2D_64to32 = PFX(scale2D_64to32_avx2);<br>
> p.weight_pp = PFX(weight_pp_avx2);<br>
> p.sign = PFX(calSign_avx2);<br>
> + p.planecopy_cp = PFX(upShift_8_avx2);<br>
><br>
> <a href="http://p.cu" target="_blank" rel="noreferrer">p.cu</a>[BLOCK_16x16].calcresidual = PFX(getResidual16_avx2);<br>
> <a href="http://p.cu" target="_blank" rel="noreferrer">p.cu</a>[BLOCK_32x32].calcresidual = PFX(getResidual32_avx2);<br>
> diff -r 956401f1a679 -r 818b70b01551 source/common/x86/pixel-a.asm<br>
> --- a/source/common/x86/pixel-a.asm Fri Jun 26 15:01:16 2015 +0530<br>
> +++ b/source/common/x86/pixel-a.asm Fri Jun 26 15:11:17 2015 +0530<br>
> @@ -7388,6 +7388,96 @@<br>
> .end:<br>
> RET<br>
><br>
> +;---------------------------------------------------------------------------------------------------------------------<br>
> +;void planecopy_cp(uint8_t *src, intptr_t srcStride, pixel *dst, intptr_t dstStride, int width, int height, int shift)<br>
> +;---------------------------------------------------------------------------------------------------------------------<br>
> +%if ARCH_X86_64<br>
> +INIT_YMM avx2<br>
> +cglobal upShift_8, 7,8,3<br>
> + movd xm2, r6d<br>
> + add r3, r3<br>
> +<br>
> +.loopH:<br>
> + xor r7, r7<br>
> + mov r6d, r4d<br>
> +.loopW:<br>
> + pmovzxbw m0,[r0 + r7]<br>
> + pmovzxbw m1,[r0 + r7 + 16]<br>
> + psllw m0, xm2<br>
> + psllw m1, xm2<br>
> + movu [r2 + r7 * 2], m0<br>
> + movu [r2 + r7 * 2 + 32], m1<br>
> +<br>
> + add r7d, 32<br>
> + sub r6d, 32<br>
> + jg .loopW<br>
> +<br>
> + ; move to next row<br>
> + add r0, r1<br>
> + add r2, r3<br>
> + dec r5d<br>
> + jnz .loopH<br>
> +<br>
> +;processing last row of every frame [To handle width which not a multiple of 16]<br>
> +<br>
> +.loop16:<br>
> + pmovzxbw m0,[r0]<br>
> + psllw m0, xm2<br>
> + movu [r2], m0<br>
> +<br>
> + add r0, mmsize<br>
> + add r2, 2 * mmsize<br>
> + sub r4d, 16<br>
> + jg .loop16<br>
> + jz .end<br>
> +<br>
> + cmp r4d, 8<br>
> + jl .process4<br>
> + pmovzxbw m0,[r0]<br>
> + psllw m0, xm2<br>
> + movu [r2], m0<br>
> +<br>
> + add r0, 8<br>
> + add r2, mmsize<br>
> + sub r4d, 8<br>
> + jz .end<br>
> +<br>
> +.process4:<br>
> + cmp r4d, 4<br>
> + jl .process2<br>
> + movq xm0,[r0]<br>
> + pmovzxbw m0,xm0<br>
> + psllw xm0, xm2<br>
> + movq [r2], xm0<br>
> +<br>
> + add r0, 4<br>
> + add r2, 8<br>
> + sub r4d, 4<br>
> + jz .end<br>
> +<br>
> +.process2:<br>
> + cmp r4d, 2<br>
> + jl .process1<br>
> + movzx r3d, byte [r0]<br>
> + shl r3d, 2<br>
> + mov [r2], r3w<br>
> + movzx r3d, byte [r0 + 1]<br>
> + shl r3d, 2<br>
> + mov [r2 + 2], r3w<br>
> +<br>
> + add r0, 2<br>
> + add r2, 4<br>
> + sub r4d, 2<br>
> + jz .end<br>
> +<br>
> +.process1:<br>
> + movzx r3d, byte [r0]<br>
> + shl r3d, 2<br>
> + mov [r2], r3w<br>
> +.end:<br>
> + RET<br>
> +%endif<br>
> +<br>
> %macro ABSD2 6 ; dst1, dst2, src1, src2, tmp, tmp<br>
> %if cpuflag(ssse3)<br>
> pabsd %1, %3<br>
> diff -r 956401f1a679 -r 818b70b01551 source/common/x86/pixel.h<br>
> --- a/source/common/x86/pixel.h Fri Jun 26 15:01:16 2015 +0530<br>
> +++ b/source/common/x86/pixel.h Fri Jun 26 15:11:17 2015 +0530<br>
> @@ -31,6 +31,7 @@<br>
> void PFX(downShift_16_sse2)(const uint16_t* src, intptr_t srcStride, pixel* dst, intptr_t dstStride, int width, int height, int shift, uint16_t mask);<br>
> void PFX(downShift_16_avx2)(const uint16_t* src, intptr_t srcStride, pixel* dst, intptr_t dstStride, int width, int height, int shift, uint16_t mask);<br>
> void PFX(upShift_8_sse4)(const uint8_t* src, intptr_t srcStride, pixel* dst, intptr_t dstStride, int width, int height, int shift);<br>
> +void PFX(upShift_8_avx2)(const uint8_t* src, intptr_t srcStride, pixel* dst, intptr_t dstStride, int width, int height, int shift);<br>
><br>
> #define DECL_PIXELS(cpu) \<br>
> FUNCDEF_PU(int, pixel_ssd, cpu, const pixel*, intptr_t, const pixel*, intptr_t); \<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" rel="noreferrer">https://mailman.videolan.org/listinfo/x265-devel</a><br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
Steve Borho<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<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" rel="noreferrer">https://mailman.videolan.org/listinfo/x265-devel</a><br>
</div></div></blockquote></div><br></div>
</blockquote></div>