<div dir="ltr">Crashing on vc11-x86-8bpp, Release mode. Min, can you check your code ?<div><br></div><div><br></div><div>Regards,</div><div>Praveen </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 31, 2014 at 4:16 AM, Min Chen <span dir="ltr"><<a href="mailto:chenm003@163.com" target="_blank">chenm003@163.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 Min Chen <<a href="mailto:chenm003@163.com">chenm003@163.com</a>><br>
# Date 1414709200 25200<br>
# Node ID 5d0b20f6e4de0b59b8c3306793c7267e01b9a41b<br>
# Parent 529ff7eca135838dc50c227d52db97725a79f0db<br>
asm: AVX2 version luma_vpp[4x4], improve 391c -> 302c<br>
<br>
diff -r 529ff7eca135 -r 5d0b20f6e4de source/common/x86/asm-primitives.cpp<br>
--- a/source/common/x86/asm-primitives.cpp Thu Oct 30 15:46:23 2014 -0700<br>
+++ b/source/common/x86/asm-primitives.cpp Thu Oct 30 15:46:40 2014 -0700<br>
@@ -1799,6 +1799,7 @@<br>
p.transpose[BLOCK_64x64] = x265_transpose64_avx2;<br>
#endif<br>
p.luma_hpp[LUMA_4x4] = x265_interp_8tap_horiz_pp_4x4_avx2;<br>
+ p.luma_vpp[LUMA_4x4] = x265_interp_8tap_vert_pp_4x4_avx2;<br>
}<br>
#endif // if HIGH_BIT_DEPTH<br>
}<br>
diff -r 529ff7eca135 -r 5d0b20f6e4de source/common/x86/ipfilter8.asm<br>
--- a/source/common/x86/ipfilter8.asm Thu Oct 30 15:46:23 2014 -0700<br>
+++ b/source/common/x86/ipfilter8.asm Thu Oct 30 15:46:40 2014 -0700<br>
@@ -3420,6 +3420,88 @@<br>
RET<br>
%endmacro<br>
<br>
+<br>
+INIT_YMM avx2<br>
+cglobal interp_8tap_vert_pp_4x4, 4,6,8<br>
+ mov r4d, r4m<br>
+ lea r5, [r1 * 3]<br>
+ sub r0, r5<br>
+<br>
+ ; TODO: VPGATHERDD<br>
+ movd xm1, [r0] ; m1 = row0<br>
+ movd xm2, [r0 + r1] ; m2 = row1<br>
+ punpcklbw xm1, xm2 ; m1 = [13 03 12 02 11 01 10 00]<br>
+<br>
+ movd xm3, [r0 + r1 * 2] ; m3 = row2<br>
+ punpcklbw xm2, xm3 ; m2 = [23 13 22 12 21 11 20 10]<br>
+ movd xm4, [r0 + r5]<br>
+ punpcklbw xm3, xm4 ; m3 = [33 23 32 22 31 21 30 20]<br>
+ punpcklwd xm1, xm3 ; m1 = [33 23 13 03 32 22 12 02 31 21 11 01 30 20 10 00]<br>
+<br>
+ lea r0, [r0 + r1 * 4]<br>
+ movd xm5, [r0] ; m5 = row4<br>
+ punpcklbw xm4, xm5 ; m4 = [43 33 42 32 41 31 40 30]<br>
+ punpcklwd xm2, xm4 ; m2 = [43 33 21 13 42 32 22 12 41 31 21 11 40 30 20 10]<br>
+ vinserti128 m1, m1, xm2, 1 ; m1 = [43 33 21 13 42 32 22 12 41 31 21 11 40 30 20 10] - [33 23 13 03 32 22 12 02 31 21 11 01 30 20 10 00]<br>
+ movd xm2, [r0 + r1] ; m2 = row5<br>
+ punpcklbw xm5, xm2 ; m5 = [53 43 52 42 51 41 50 40]<br>
+ punpcklwd xm3, xm5 ; m3 = [53 43 44 23 52 42 32 22 51 41 31 21 50 40 30 20]<br>
+ movd xm6, [r0 + r1 * 2] ; m6 = row6<br>
+ punpcklbw xm2, xm6 ; m2 = [63 53 62 52 61 51 60 50]<br>
+ punpcklwd xm4, xm2 ; m4 = [63 53 43 33 62 52 42 32 61 51 41 31 60 50 40 30]<br>
+ vinserti128 m3, m3, xm4, 1 ; m3 = [63 53 43 33 62 52 42 32 61 51 41 31 60 50 40 30] - [53 43 44 23 52 42 32 22 51 41 31 21 50 40 30 20]<br>
+ movd xm4, [r0 + r5] ; m4 = row7<br>
+ punpcklbw xm6, xm4 ; m6 = [73 63 72 62 71 61 70 60]<br>
+ punpcklwd xm5, xm6 ; m5 = [73 63 53 43 72 62 52 42 71 61 51 41 70 60 50 40]<br>
+<br>
+ lea r0, [r0 + r1 * 4]<br>
+ movd xm7, [r0] ; m7 = row8<br>
+ punpcklbw xm4, xm7 ; m4 = [83 73 82 72 81 71 80 70]<br>
+ punpcklwd xm2, xm4 ; m2 = [83 73 63 53 82 72 62 52 81 71 61 51 80 70 60 50]<br>
+ vinserti128 m5, m5, xm2, 1 ; m5 = [83 73 63 53 82 72 62 52 81 71 61 51 80 70 60 50] - [73 63 53 43 72 62 52 42 71 61 51 41 70 60 50 40]<br>
+ movd xm2, [r0 + r1] ; m2 = row9<br>
+ punpcklbw xm7, xm2 ; m7 = [93 83 92 82 91 81 90 80]<br>
+ punpcklwd xm6, xm7 ; m6 = [93 83 73 63 92 82 72 62 91 81 71 61 90 80 70 60]<br>
+ movd xm7, [r0 + r1 * 2] ; m7 = rowA<br>
+ punpcklbw xm2, xm7 ; m2 = [A3 93 A2 92 A1 91 A0 90]<br>
+ punpcklwd xm4, xm2 ; m4 = [A3 93 83 73 A2 92 82 72 A1 91 81 71 A0 90 80 70]<br>
+ vinserti128 m6, m6, xm4, 1 ; m6 = [A3 93 83 73 A2 92 82 72 A1 91 81 71 A0 90 80 70] - [93 83 73 63 92 82 72 62 91 81 71 61 90 80 70 60]<br>
+<br>
+ ; load filter coeff<br>
+%ifdef PIC<br>
+ lea r5, [tab_LumaCoeff]<br>
+ vpbroadcastd m0, [r5 + r4 * 8 + 0]<br>
+ vpbroadcastd m2, [r5 + r4 * 8 + 4]<br>
+%else<br>
+ vpbroadcastq m0, [tab_LumaCoeff + r4 * 8 + 0]<br>
+ vpbroadcastd m2, [tab_LumaCoeff + r4 * 8 + 4]<br>
+%endif<br>
+<br>
+ pmaddubsw m1, m0<br>
+ pmaddubsw m3, m0<br>
+ pmaddubsw m5, m2<br>
+ pmaddubsw m6, m2<br>
+ vbroadcasti128 m0, [pw_1]<br>
+ pmaddwd m1, m0<br>
+ pmaddwd m3, m0<br>
+ pmaddwd m5, m0<br>
+ pmaddwd m6, m0<br>
+ paddd m1, m5 ; m1 = DQWORD ROW[1 0]<br>
+ paddd m3, m6 ; m3 = DQWORD ROW[3 2]<br>
+ packssdw m1, m3 ; m1 = QWORD ROW[3 1 2 0]<br>
+<br>
+ ; TODO: does it overflow?<br>
+ pmulhrsw m1, [pw_512]<br>
+ vextracti128 xm2, m1, 1<br>
+ packuswb xm1, xm2 ; m1 = DWORD ROW[3 1 2 0]<br>
+ movd [r2], xm1<br>
+ pextrd [r2 + r3], xm1, 2<br>
+ pextrd [r2 + r3 * 2], xm1, 1<br>
+ lea r4, [r3 * 3]<br>
+ pextrd [r2 + r4], xm1, 3<br>
+ RET<br>
+<br>
+<br>
;-------------------------------------------------------------------------------------------------------------<br>
; void interp_8tap_vert_pp_4x4(pixel *src, intptr_t srcStride, pixel *dst, intptr_t dstStride, int coeffIdx)<br>
;-------------------------------------------------------------------------------------------------------------<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></div>