<div dir="ltr">Ignore this patch.<div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-02-07 16:02 GMT+05:30 <span dir="ltr"><<a href="mailto:murugan@multicorewareinc.com" target="_blank">murugan@multicorewareinc.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"># HG changeset patch<br>
# User Murugan Vairavel <<a href="mailto:murugan@multicorewareinc.com">murugan@multicorewareinc.com</a>><br>
# Date 1391769131 -19800<br>
# Fri Feb 07 16:02:11 2014 +0530<br>
# Node ID 3981a03c969f475538616fdf826864324cae5f6a<br>
# Parent c1cea0534e6b6ca359a7fc2a665c3ef6909dd041<br>
asm: intra_pred_ang16 code for all remaing modes<br>
<br>
diff -r c1cea0534e6b -r 3981a03c969f source/common/x86/asm-primitives.cpp<br>
--- a/source/common/x86/asm-primitives.cpp Fri Feb 07 13:14:45 2014 +0530<br>
+++ b/source/common/x86/asm-primitives.cpp Fri Feb 07 16:02:11 2014 +0530<br>
@@ -1041,8 +1041,35 @@<br>
<br>
SETUP_INTRA_ANG16(3, 3, sse4);<br>
SETUP_INTRA_ANG16(4, 4, sse4);<br>
+ SETUP_INTRA_ANG16(5, 5, sse4);<br>
+ SETUP_INTRA_ANG16(6, 6, sse4);<br>
+ SETUP_INTRA_ANG16(7, 7, sse4);<br>
+ SETUP_INTRA_ANG16(8, 8, sse4);<br>
+ SETUP_INTRA_ANG16(9, 9, sse4);<br>
+ SETUP_INTRA_ANG16(10, 10, sse4);<br>
+ SETUP_INTRA_ANG16(11, 11, sse4);<br>
+ SETUP_INTRA_ANG16(12, 12, sse4);<br>
+ SETUP_INTRA_ANG16(13, 13, sse4);<br>
+ SETUP_INTRA_ANG16(14, 14, sse4);<br>
+ SETUP_INTRA_ANG16(15, 15, sse4);<br>
+ SETUP_INTRA_ANG16(16, 16, sse4);<br>
+ SETUP_INTRA_ANG16(17, 17, sse4);<br>
+ SETUP_INTRA_ANG16(18, 18, sse4);<br>
+ SETUP_INTRA_ANG16(19, 19, sse4);<br>
+ SETUP_INTRA_ANG16(20, 20, sse4);<br>
+ SETUP_INTRA_ANG16(21, 21, sse4);<br>
+ SETUP_INTRA_ANG16(22, 22, sse4);<br>
+ SETUP_INTRA_ANG16(23, 23, sse4);<br>
+ SETUP_INTRA_ANG16(24, 24, sse4);<br>
+ SETUP_INTRA_ANG16(25, 25, sse4);<br>
+ SETUP_INTRA_ANG16(26, 26, sse4);<br>
+ SETUP_INTRA_ANG16(27, 27, sse4);<br>
+ SETUP_INTRA_ANG16(28, 28, sse4);<br>
+ SETUP_INTRA_ANG16(29, 29, sse4);<br>
+ SETUP_INTRA_ANG16(30, 30, sse4);<br>
+ SETUP_INTRA_ANG16(31, 31, sse4);<br>
+ SETUP_INTRA_ANG16(32, 32, sse4);<br>
SETUP_INTRA_ANG16(33, 33, sse4);<br>
- SETUP_INTRA_ANG16(32, 32, sse4);<br>
<br>
SETUP_INTRA_ANG8(3, 3, sse4);<br>
SETUP_INTRA_ANG8(4, 4, sse4);<br>
diff -r c1cea0534e6b -r 3981a03c969f source/common/x86/intrapred.h<br>
--- a/source/common/x86/intrapred.h Fri Feb 07 13:14:45 2014 +0530<br>
+++ b/source/common/x86/intrapred.h Fri Feb 07 16:02:11 2014 +0530<br>
@@ -93,9 +93,21 @@<br>
DECL_ANG(16, 16, sse4);<br>
DECL_ANG(16, 17, sse4);<br>
DECL_ANG(16, 18, sse4);<br>
+DECL_ANG(16, 19, sse4);<br>
+DECL_ANG(16, 20, sse4);<br>
+DECL_ANG(16, 21, sse4);<br>
+DECL_ANG(16, 22, sse4);<br>
+DECL_ANG(16, 23, sse4);<br>
+DECL_ANG(16, 24, sse4);<br>
+DECL_ANG(16, 25, sse4);<br>
DECL_ANG(16, 26, sse4);<br>
+DECL_ANG(16, 27, sse4);<br>
+DECL_ANG(16, 28, sse4);<br>
+DECL_ANG(16, 29, sse4);<br>
+DECL_ANG(16, 30, sse4);<br>
+DECL_ANG(16, 31, sse4);<br>
+DECL_ANG(16, 32, sse4);<br>
DECL_ANG(16, 33, sse4);<br>
-DECL_ANG(16, 32, sse4);<br>
<br>
DECL_ANG(32, 2, ssse3);<br>
DECL_ANG(32, 3, sse4);<br>
diff -r c1cea0534e6b -r 3981a03c969f source/common/x86/intrapred8.asm<br>
--- a/source/common/x86/intrapred8.asm Fri Feb 07 13:14:45 2014 +0530<br>
+++ b/source/common/x86/intrapred8.asm Fri Feb 07 16:02:11 2014 +0530<br>
@@ -45,9 +45,13 @@<br>
c_deinterval8: db 0, 8, 1, 9, 2, 10, 3, 11, 4, 12, 5, 13, 6, 14, 7, 15<br>
tab_S1: db 15, 14, 12, 11, 10, 9, 7, 6, 5, 4, 2, 1, 0, 0, 0, 0<br>
pb_unpackbq: db 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1<br>
+c_mode16_12: db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 6<br>
+c_mode16_13: db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 11, 7, 4<br>
+c_mode16_14: db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 12, 10, 7, 5, 2<br>
c_mode16_15: db 0, 0, 0, 0, 0, 0, 0, 0, 15, 13, 11, 9, 8, 6, 4, 2<br>
c_mode16_16: db 8, 6, 5, 3, 2, 0, 15, 14, 12, 11, 9, 8, 6, 5, 3, 2<br>
c_mode16_17: db 4, 2, 1, 0, 15, 14, 12, 11, 10, 9, 7, 6, 5, 4, 2, 1<br>
+c_mode16_18: db 0, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1<br>
<br>
const ang_table<br>
%assign x 0<br>
@@ -2478,6 +2482,3318 @@<br>
<br>
RET<br>
<br>
+INIT_XMM sse4<br>
+cglobal intra_pred_ang16_5, 3,7,8<br>
+<br>
+ lea r3, [ang_table + 16 * 16]<br>
+ mov r4d, 2<br>
+ lea r5, [r1 * 3] ; r5 -> 3 * stride<br>
+ lea r6, [r0 + r1 * 4] ; r6 -> 4 * stride<br>
+ mova m7, [pw_1024]<br>
+<br>
+.loop:<br>
+ movu m3, [r2 + 1] ;[16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1]<br>
+ movu m1, [r2 + 2] ;[17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2]<br>
+ punpckhbw m2, m3, m1 ;[17 16 16 15 15 14 14 13 13 12 12 11 11 10 10 9]<br>
+ punpcklbw m3, m1 ;[9 8 8 7 7 6 6 5 5 4 4 3 3 2 2 1]<br>
+<br>
+ palignr m5, m2, m3, 2<br>
+<br>
+ pmaddubsw m4, m3, [r3 + 16] ; [17]<br>
+ pmulhrsw m4, m7<br>
+ pmaddubsw m1, m5, [r3 - 14 * 16] ; [2]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m4, m1<br>
+<br>
+ palignr m6, m2, m3, 4<br>
+<br>
+ pmaddubsw m5, [r3 + 3 * 16] ; [19]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m1, m6, [r3 - 12 * 16] ; [4]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m5, m1<br>
+<br>
+ palignr m1, m2, m3, 6<br>
+<br>
+ pmaddubsw m6, [r3 + 5 * 16] ; [21]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m0, m1, [r3 - 10 * 16] ; [6]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m6, m0<br>
+<br>
+ palignr m0, m2, m3, 8<br>
+<br>
+ pmaddubsw m1, [r3 + 7 * 16] ; [23]<br>
+ pmulhrsw m1, m7<br>
+ pmaddubsw m0, [r3 - 8 * 16] ; [8]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m1, m0<br>
+<br>
+ TRANSPOSE_STORE_8x8 0, 1, m4, m5, m6, m1<br>
+<br>
+ palignr m4, m2, m3, 8<br>
+ palignr m5, m2, m3, 10<br>
+<br>
+ pmaddubsw m4, [r3 + 9 * 16] ; [25]<br>
+ pmulhrsw m4, m7<br>
+ pmaddubsw m1, m5, [r3 - 6 * 16] ; [10]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m4, m1<br>
+<br>
+ palignr m6, m2, m3, 12<br>
+<br>
+ pmaddubsw m5, [r3 + 11 * 16] ; [27]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m1, m6, [r3 - 4 * 16] ; [12]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m5, m1<br>
+<br>
+ palignr m1, m2, m3, 14<br>
+<br>
+ pmaddubsw m6, [r3 + 13 * 16] ; [29]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m0, m1, [r3 - 2 * 16] ; [14]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m6, m0<br>
+<br>
+ pmaddubsw m1, [r3 + 15 * 16] ; [31]<br>
+ pmulhrsw m1, m7<br>
+ pmaddubsw m2, [r3] ; [16]<br>
+ pmulhrsw m2, m7<br>
+ packuswb m1, m2<br>
+<br>
+ TRANSPOSE_STORE_8x8 1, 1, m4, m5, m6, m1<br>
+<br>
+ lea r0, [r6 + r1 * 4]<br>
+ lea r6, [r6 + r1 * 8]<br>
+ add r2, 8<br>
+ dec r4<br>
+ jnz .loop<br>
+<br>
+ RET<br>
+<br>
+INIT_XMM sse4<br>
+cglobal intra_pred_ang16_31, 3,7,8<br>
+ mov r2, r3mp<br>
+ lea r3, [ang_table + 16 * 16]<br>
+ mov r4d, 2<br>
+ lea r5, [r1 * 3] ; r5 -> 3 * stride<br>
+ mov r6, r0<br>
+ mova m7, [pw_1024]<br>
+<br>
+.loop:<br>
+ movu m3, [r2 + 1] ;[16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1]<br>
+ movu m1, [r2 + 2] ;[17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2]<br>
+ punpckhbw m2, m3, m1 ;[17 16 16 15 15 14 14 13 13 12 12 11 11 10 10 9]<br>
+ punpcklbw m3, m1 ;[9 8 8 7 7 6 6 5 5 4 4 3 3 2 2 1]<br>
+<br>
+ palignr m5, m2, m3, 2<br>
+<br>
+ pmaddubsw m4, m3, [r3 + 16] ; [17]<br>
+ pmulhrsw m4, m7<br>
+ pmaddubsw m1, m5, [r3 - 14 * 16] ; [2]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m4, m1<br>
+<br>
+ palignr m6, m2, m3, 4<br>
+<br>
+ pmaddubsw m5, [r3 + 3 * 16] ; [19]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m1, m6, [r3 - 12 * 16] ; [4]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m5, m1<br>
+<br>
+ palignr m1, m2, m3, 6<br>
+<br>
+ pmaddubsw m6, [r3 + 5 * 16] ; [21]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m0, m1, [r3 - 10 * 16] ; [6]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m6, m0<br>
+<br>
+ palignr m0, m2, m3, 8<br>
+<br>
+ pmaddubsw m1, [r3 + 7 * 16] ; [23]<br>
+ pmulhrsw m1, m7<br>
+ pmaddubsw m0, [r3 - 8 * 16] ; [8]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m1, m0<br>
+<br>
+ TRANSPOSE_STORE_8x8 0, 0, m4, m5, m6, m1<br>
+<br>
+ palignr m4, m2, m3, 8<br>
+ palignr m5, m2, m3, 10<br>
+<br>
+ pmaddubsw m4, [r3 + 9 * 16] ; [25]<br>
+ pmulhrsw m4, m7<br>
+ pmaddubsw m1, m5, [r3 - 6 * 16] ; [10]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m4, m1<br>
+<br>
+ palignr m6, m2, m3, 12<br>
+<br>
+ pmaddubsw m5, [r3 + 11 * 16] ; [27]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m1, m6, [r3 - 4 * 16] ; [12]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m5, m1<br>
+<br>
+ palignr m1, m2, m3, 14<br>
+<br>
+ pmaddubsw m6, [r3 + 13 * 16] ; [29]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m0, m1, [r3 - 2 * 16] ; [14]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m6, m0<br>
+<br>
+ pmaddubsw m1, [r3 + 15 * 16] ; [31]<br>
+ pmulhrsw m1, m7<br>
+ pmaddubsw m2, [r3] ; [16]<br>
+ pmulhrsw m2, m7<br>
+ packuswb m1, m2<br>
+<br>
+ TRANSPOSE_STORE_8x8 1, 0, m4, m5, m6, m1<br>
+<br>
+ lea r0, [r6 + 8]<br>
+ add r2, 8<br>
+ dec r4<br>
+ jnz .loop<br>
+<br>
+ RET<br>
+<br>
+INIT_XMM sse4<br>
+cglobal intra_pred_ang16_6, 3,7,8<br>
+<br>
+ lea r3, [ang_table + 16 * 16]<br>
+ mov r4d, 2<br>
+ lea r5, [r1 * 3] ; r5 -> 3 * stride<br>
+ lea r6, [r0 + r1 * 4] ; r6 -> 4 * stride<br>
+ mova m7, [pw_1024]<br>
+<br>
+.loop:<br>
+ movu m3, [r2 + 1] ;[16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1]<br>
+ palignr m1, m3, 1 ;[x 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2]<br>
+ punpckhbw m2, m3, m1 ;[x 16 16 15 15 14 14 13 13 12 12 11 11 10 10 9]<br>
+ punpcklbw m3, m1 ;[9 8 8 7 7 6 6 5 5 4 4 3 3 2 2 1]<br>
+<br>
+ pmaddubsw m4, m3, [r3 - 3 * 16] ; [13]<br>
+ pmulhrsw m4, m7<br>
+ pmaddubsw m1, m3, [r3 + 10 * 16] ; [26]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m4, m1<br>
+<br>
+ palignr m6, m2, m3, 2<br>
+<br>
+ pmaddubsw m5, m6, [r3 - 9 * 16] ; [7]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m6, [r3 + 4 * 16] ; [20]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ palignr m1, m2, m3, 4<br>
+<br>
+ pmaddubsw m6, m1, [r3 - 15 * 16] ; [1]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m0, m1, [r3 - 2 * 16] ; [14]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m6, m0<br>
+<br>
+ palignr m0, m2, m3, 6<br>
+<br>
+ pmaddubsw m1, [r3 + 11 * 16] ; [27]<br>
+ pmulhrsw m1, m7<br>
+ pmaddubsw m0, [r3 - 8 * 16] ; [8]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m1, m0<br>
+<br>
+ TRANSPOSE_STORE_8x8 0, 1, m4, m5, m6, m1<br>
+<br>
+ palignr m4, m2, m3, 6<br>
+ palignr m6, m2, m3, 8<br>
+<br>
+ pmaddubsw m4, [r3 + 5 * 16] ; [21]<br>
+ pmulhrsw m4, m7<br>
+ pmaddubsw m1, m6, [r3 - 14 * 16] ; [2]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m4, m1<br>
+<br>
+ pmaddubsw m5, m6, [r3 - 16] ; [15]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m6, [r3 + 12 * 16] ; [28]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ palignr m0, m2, m3, 10<br>
+<br>
+ pmaddubsw m6, m0, [r3 - 7 * 16] ; [9]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m0, [r3 + 6 * 16] ; [22]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m6, m0<br>
+<br>
+ palignr m2, m3, 12<br>
+<br>
+ pmaddubsw m1, m2, [r3 - 13 * 16] ; [3]<br>
+ pmulhrsw m1, m7<br>
+ pmaddubsw m2, [r3] ; [16]<br>
+ pmulhrsw m2, m7<br>
+ packuswb m1, m2<br>
+<br>
+ TRANSPOSE_STORE_8x8 1, 1, m4, m5, m6, m1<br>
+<br>
+ lea r0, [r6 + r1 * 4]<br>
+ lea r6, [r6 + r1 * 8]<br>
+ add r2, 8<br>
+ dec r4<br>
+ jnz .loop<br>
+<br>
+ RET<br>
+<br>
+INIT_XMM sse4<br>
+cglobal intra_pred_ang16_30, 3,7,8<br>
+ mov r2, r3mp<br>
+ lea r3, [ang_table + 16 * 16]<br>
+ mov r4d, 2<br>
+ lea r5, [r1 * 3] ; r5 -> 3 * stride<br>
+ mov r6, r0<br>
+ mova m7, [pw_1024]<br>
+<br>
+.loop:<br>
+ movu m3, [r2 + 1] ;[16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1]<br>
+ palignr m1, m3, 1 ;[x 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2]<br>
+ punpckhbw m2, m3, m1 ;[x 16 16 15 15 14 14 13 13 12 12 11 11 10 10 9]<br>
+ punpcklbw m3, m1 ;[9 8 8 7 7 6 6 5 5 4 4 3 3 2 2 1]<br>
+<br>
+ pmaddubsw m4, m3, [r3 - 3 * 16] ; [13]<br>
+ pmulhrsw m4, m7<br>
+ pmaddubsw m1, m3, [r3 + 10 * 16] ; [26]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m4, m1<br>
+<br>
+ palignr m6, m2, m3, 2<br>
+<br>
+ pmaddubsw m5, m6, [r3 - 9 * 16] ; [7]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m6, [r3 + 4 * 16] ; [20]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ palignr m1, m2, m3, 4<br>
+<br>
+ pmaddubsw m6, m1, [r3 - 15 * 16] ; [1]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m0, m1, [r3 - 2 * 16] ; [14]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m6, m0<br>
+<br>
+ palignr m0, m2, m3, 6<br>
+<br>
+ pmaddubsw m1, [r3 + 11 * 16] ; [27]<br>
+ pmulhrsw m1, m7<br>
+ pmaddubsw m0, [r3 - 8 * 16] ; [8]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m1, m0<br>
+<br>
+ TRANSPOSE_STORE_8x8 0, 0, m4, m5, m6, m1<br>
+<br>
+ palignr m4, m2, m3, 6<br>
+ palignr m6, m2, m3, 8<br>
+<br>
+ pmaddubsw m4, [r3 + 5 * 16] ; [21]<br>
+ pmulhrsw m4, m7<br>
+ pmaddubsw m1, m6, [r3 - 14 * 16] ; [2]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m4, m1<br>
+<br>
+ pmaddubsw m5, m6, [r3 - 16] ; [15]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m6, [r3 + 12 * 16] ; [28]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ palignr m0, m2, m3, 10<br>
+<br>
+ pmaddubsw m6, m0, [r3 - 7 * 16] ; [9]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m0, [r3 + 6 * 16] ; [22]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m6, m0<br>
+<br>
+ palignr m2, m3, 12<br>
+<br>
+ pmaddubsw m1, m2, [r3 - 13 * 16] ; [3]<br>
+ pmulhrsw m1, m7<br>
+ pmaddubsw m2, [r3] ; [16]<br>
+ pmulhrsw m2, m7<br>
+ packuswb m1, m2<br>
+<br>
+ TRANSPOSE_STORE_8x8 1, 0, m4, m5, m6, m1<br>
+<br>
+ lea r0, [r6 + 8]<br>
+ add r2, 8<br>
+ dec r4<br>
+ jnz .loop<br>
+<br>
+ RET<br>
+<br>
+INIT_XMM sse4<br>
+cglobal intra_pred_ang16_7, 3,7,8<br>
+<br>
+ lea r3, [ang_table + 16 * 16]<br>
+ mov r4d, 2<br>
+ lea r5, [r1 * 3] ; r5 -> 3 * stride<br>
+ lea r6, [r0 + r1 * 4] ; r6 -> 4 * stride<br>
+ mova m7, [pw_1024]<br>
+<br>
+.loop:<br>
+ movu m3, [r2 + 1] ;[16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1]<br>
+ palignr m1, m3, 1 ;[x 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2]<br>
+ punpckhbw m2, m3, m1 ;[x 16 16 15 15 14 14 13 13 12 12 11 11 10 10 9]<br>
+ punpcklbw m3, m1 ;[9 8 8 7 7 6 6 5 5 4 4 3 3 2 2 1]<br>
+<br>
+ pmaddubsw m4, m3, [r3 - 7 * 16] ; [9]<br>
+ pmulhrsw m4, m7<br>
+ pmaddubsw m0, m3, [r3 + 2 * 16] ; [18]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m4, m0<br>
+<br>
+ palignr m1, m2, m3, 2<br>
+<br>
+ pmaddubsw m5, m3, [r3 + 11 * 16] ; [27]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m6, m1, [r3 - 12 * 16] ; [4]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pmaddubsw m6, m1, [r3 - 3 * 16] ; [13]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m0, m1, [r3 + 6 * 16] ; [22]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m6, m0<br>
+<br>
+ palignr m0, m2, m3, 4<br>
+<br>
+ pmaddubsw m1, [r3 + 15 * 16] ; [31]<br>
+ pmulhrsw m1, m7<br>
+ pmaddubsw m0, [r3 - 8 * 16] ; [8]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m1, m0<br>
+<br>
+ TRANSPOSE_STORE_8x8 0, 1, m4, m5, m6, m1<br>
+<br>
+ palignr m1, m2, m3, 4<br>
+<br>
+ pmaddubsw m4, m1, [r3 + 16] ; [17]<br>
+ pmulhrsw m4, m7<br>
+ pmaddubsw m1, [r3 + 10 * 16] ; [26]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m4, m1<br>
+<br>
+ palignr m0, m2, m3, 6<br>
+<br>
+ pmaddubsw m5, m0, [r3 - 13 * 16] ; [03]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m6, m0, [r3 - 4 * 16] ; [12]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pmaddubsw m6, m0, [r3 + 5 * 16] ; [21]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m0, [r3 + 14 * 16] ; [30]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m6, m0<br>
+<br>
+ palignr m2, m3, 8<br>
+<br>
+ pmaddubsw m1, m2, [r3 - 9 * 16] ; [07]<br>
+ pmulhrsw m1, m7<br>
+ pmaddubsw m2, [r3] ; [16]<br>
+ pmulhrsw m2, m7<br>
+ packuswb m1, m2<br>
+<br>
+ TRANSPOSE_STORE_8x8 1, 1, m4, m5, m6, m1<br>
+<br>
+ lea r0, [r6 + r1 * 4]<br>
+ lea r6, [r6 + r1 * 8]<br>
+ add r2, 8<br>
+ dec r4<br>
+ jnz .loop<br>
+<br>
+ RET<br>
+<br>
+INIT_XMM sse4<br>
+cglobal intra_pred_ang16_29, 3,7,8<br>
+ mov r2, r3mp<br>
+ lea r3, [ang_table + 16 * 16]<br>
+ mov r4d, 2<br>
+ lea r5, [r1 * 3] ; r5 -> 3 * stride<br>
+ mov r6, r0<br>
+ mova m7, [pw_1024]<br>
+<br>
+.loop:<br>
+ movu m3, [r2 + 1] ;[16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1]<br>
+ palignr m1, m3, 1 ;[x 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2]<br>
+ punpckhbw m2, m3, m1 ;[x 16 16 15 15 14 14 13 13 12 12 11 11 10 10 9]<br>
+ punpcklbw m3, m1 ;[9 8 8 7 7 6 6 5 5 4 4 3 3 2 2 1]<br>
+<br>
+ pmaddubsw m4, m3, [r3 - 7 * 16] ; [9]<br>
+ pmulhrsw m4, m7<br>
+ pmaddubsw m0, m3, [r3 + 2 * 16] ; [18]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m4, m0<br>
+<br>
+ palignr m1, m2, m3, 2<br>
+<br>
+ pmaddubsw m5, m3, [r3 + 11 * 16] ; [27]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m6, m1, [r3 - 12 * 16] ; [4]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pmaddubsw m6, m1, [r3 - 3 * 16] ; [13]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m0, m1, [r3 + 6 * 16] ; [22]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m6, m0<br>
+<br>
+ palignr m0, m2, m3, 4<br>
+<br>
+ pmaddubsw m1, [r3 + 15 * 16] ; [31]<br>
+ pmulhrsw m1, m7<br>
+ pmaddubsw m0, [r3 - 8 * 16] ; [8]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m1, m0<br>
+<br>
+ TRANSPOSE_STORE_8x8 0, 0, m4, m5, m6, m1<br>
+<br>
+ palignr m1, m2, m3, 4<br>
+<br>
+ pmaddubsw m4, m1, [r3 + 16] ; [17]<br>
+ pmulhrsw m4, m7<br>
+ pmaddubsw m1, [r3 + 10 * 16] ; [26]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m4, m1<br>
+<br>
+ palignr m0, m2, m3, 6<br>
+<br>
+ pmaddubsw m5, m0, [r3 - 13 * 16] ; [03]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m6, m0, [r3 - 4 * 16] ; [12]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pmaddubsw m6, m0, [r3 + 5 * 16] ; [21]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m0, [r3 + 14 * 16] ; [30]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m6, m0<br>
+<br>
+ palignr m2, m3, 8<br>
+<br>
+ pmaddubsw m1, m2, [r3 - 9 * 16] ; [07]<br>
+ pmulhrsw m1, m7<br>
+ pmaddubsw m2, [r3] ; [16]<br>
+ pmulhrsw m2, m7<br>
+ packuswb m1, m2<br>
+<br>
+ TRANSPOSE_STORE_8x8 1, 0, m4, m5, m6, m1<br>
+<br>
+ lea r0, [r6 + 8]<br>
+ add r2, 8<br>
+ dec r4<br>
+ jnz .loop<br>
+<br>
+ RET<br>
+<br>
+INIT_XMM sse4<br>
+cglobal intra_pred_ang16_8, 3,7,8<br>
+<br>
+ lea r3, [ang_table + 16 * 16]<br>
+ mov r4d, 2<br>
+ lea r5, [r1 * 3] ; r5 -> 3 * stride<br>
+ lea r6, [r0 + r1 * 4] ; r6 -> 4 * stride<br>
+ mova m7, [pw_1024]<br>
+<br>
+.loop:<br>
+ movu m1, [r2 + 1] ;[16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1]<br>
+ palignr m3, m1, 1 ;[x 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2]<br>
+ punpckhbw m0, m1, m3 ;[x 16 16 15 15 14 14 13 13 12 12 11 11 10 10 9]<br>
+ punpcklbw m1, m3 ;[9 8 8 7 7 6 6 5 5 4 4 3 3 2 2 1]<br>
+<br>
+ pmaddubsw m4, m1, [r3 - 11 * 16] ; [5]<br>
+ pmulhrsw m4, m7<br>
+ pmaddubsw m2, m1, [r3 - 6 * 16] ; [10]<br>
+ pmulhrsw m2, m7<br>
+ packuswb m4, m2<br>
+<br>
+ pmaddubsw m5, m1, [r3 - 1 * 16] ; [15]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m6, m1, [r3 + 4 * 16] ; [20]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pmaddubsw m6, m1, [r3 + 9 * 16] ; [25]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m2, m1, [r3 + 14 * 16] ; [30]<br>
+ pmulhrsw m2, m7<br>
+ packuswb m6, m2<br>
+<br>
+ palignr m2, m0, m1, 2<br>
+ palignr m3, m0, m1, 4<br>
+<br>
+ pmaddubsw m1, m2, [r3 - 13 * 16] ; [3]<br>
+ pmulhrsw m1, m7<br>
+ pmaddubsw m0, m2, [r3 - 8 * 16] ; [8]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m1, m0<br>
+<br>
+ TRANSPOSE_STORE_8x8 0, 1, m4, m5, m6, m1<br>
+<br>
+ pmaddubsw m4, m2, [r3 - 3 * 16] ; [13]<br>
+ pmulhrsw m4, m7<br>
+ pmaddubsw m5, m2, [r3 + 2 * 16] ; [18]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ pmaddubsw m5, m2, [r3 + 7 * 16] ; [23]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m2, [r3 + 12 * 16] ; [28]<br>
+ pmulhrsw m2, m7<br>
+ packuswb m5, m2<br>
+<br>
+ pmaddubsw m6, m3, [r3 - 15 * 16] ; [01]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m1, m3, [r3 - 10 * 16] ; [06]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m6, m1<br>
+<br>
+ pmaddubsw m1, m3, [r3 - 5 * 16] ; [11]<br>
+ pmulhrsw m1, m7<br>
+ pmaddubsw m3, [r3] ; [16]<br>
+ pmulhrsw m3, m7<br>
+ packuswb m1, m3<br>
+<br>
+ TRANSPOSE_STORE_8x8 1, 1, m4, m5, m6, m1<br>
+<br>
+ lea r0, [r6 + r1 * 4]<br>
+ lea r6, [r6 + r1 * 8]<br>
+ add r2, 8<br>
+ dec r4<br>
+ jnz .loop<br>
+<br>
+ RET<br>
+<br>
+INIT_XMM sse4<br>
+cglobal intra_pred_ang16_28, 3,7,8<br>
+ mov r2, r3mp<br>
+ lea r3, [ang_table + 16 * 16]<br>
+ mov r4d, 2<br>
+ lea r5, [r1 * 3] ; r5 -> 3 * stride<br>
+ mov r6, r0<br>
+ mova m7, [pw_1024]<br>
+<br>
+.loop:<br>
+ movu m1, [r2 + 1] ;[16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1]<br>
+ palignr m3, m1, 1 ;[x 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2]<br>
+ punpckhbw m0, m1, m3 ;[x 16 16 15 15 14 14 13 13 12 12 11 11 10 10 9]<br>
+ punpcklbw m1, m3 ;[9 8 8 7 7 6 6 5 5 4 4 3 3 2 2 1]<br>
+<br>
+ pmaddubsw m4, m1, [r3 - 11 * 16] ; [5]<br>
+ pmulhrsw m4, m7<br>
+ pmaddubsw m2, m1, [r3 - 6 * 16] ; [10]<br>
+ pmulhrsw m2, m7<br>
+ packuswb m4, m2<br>
+<br>
+ pmaddubsw m5, m1, [r3 - 1 * 16] ; [15]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m6, m1, [r3 + 4 * 16] ; [20]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pmaddubsw m6, m1, [r3 + 9 * 16] ; [25]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m2, m1, [r3 + 14 * 16] ; [30]<br>
+ pmulhrsw m2, m7<br>
+ packuswb m6, m2<br>
+<br>
+ palignr m2, m0, m1, 2<br>
+ palignr m3, m0, m1, 4<br>
+<br>
+ pmaddubsw m1, m2, [r3 - 13 * 16] ; [3]<br>
+ pmulhrsw m1, m7<br>
+ pmaddubsw m0, m2, [r3 - 8 * 16] ; [8]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m1, m0<br>
+<br>
+ TRANSPOSE_STORE_8x8 0, 0, m4, m5, m6, m1<br>
+<br>
+ pmaddubsw m4, m2, [r3 - 3 * 16] ; [13]<br>
+ pmulhrsw m4, m7<br>
+ pmaddubsw m5, m2, [r3 + 2 * 16] ; [18]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ pmaddubsw m5, m2, [r3 + 7 * 16] ; [23]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m2, [r3 + 12 * 16] ; [28]<br>
+ pmulhrsw m2, m7<br>
+ packuswb m5, m2<br>
+<br>
+ pmaddubsw m6, m3, [r3 - 15 * 16] ; [01]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m1, m3, [r3 - 10 * 16] ; [06]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m6, m1<br>
+<br>
+ pmaddubsw m1, m3, [r3 - 5 * 16] ; [11]<br>
+ pmulhrsw m1, m7<br>
+ pmaddubsw m3, [r3] ; [16]<br>
+ pmulhrsw m3, m7<br>
+ packuswb m1, m3<br>
+<br>
+ TRANSPOSE_STORE_8x8 1, 0, m4, m5, m6, m1<br>
+<br>
+ lea r0, [r6 + 8]<br>
+ add r2, 8<br>
+ dec r4<br>
+ jnz .loop<br>
+<br>
+ RET<br>
+<br>
+INIT_XMM sse4<br>
+cglobal intra_pred_ang16_9, 3,7,8<br>
+<br>
+ lea r3, [ang_table + 16 * 16]<br>
+ mov r4d, 2<br>
+ lea r5, [r1 * 3] ; r5 -> 3 * stride<br>
+ lea r6, [r0 + r1 * 4] ; r6 -> 4 * stride<br>
+ mova m7, [pw_1024]<br>
+<br>
+.loop:<br>
+ movu m2, [r2 + 1] ;[16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1]<br>
+ palignr m3, m2, 1 ;[x 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2]<br>
+ punpcklbw m2, m3 ;[9 8 8 7 7 6 6 5 5 4 4 3 3 2 2 1]<br>
+<br>
+ pmaddubsw m4, m2, [r3 - 14 * 16] ; [2]<br>
+ pmulhrsw m4, m7<br>
+ pmaddubsw m0, m2, [r3 - 12 * 16] ; [4]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m4, m0<br>
+<br>
+ pmaddubsw m5, m2, [r3 - 10 * 16] ; [6]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m6, m2, [r3 - 8 * 16] ; [8]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pmaddubsw m6, m2, [r3 - 6 * 16] ; [10]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m0, m2, [r3 - 4 * 16] ; [12]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m6, m0<br>
+<br>
+ pmaddubsw m1, m2, [r3 - 2 * 16] ; [14]<br>
+ pmulhrsw m1, m7<br>
+ pmaddubsw m0, m2, [r3] ; [16]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m1, m0<br>
+<br>
+ TRANSPOSE_STORE_8x8 0, 1, m4, m5, m6, m1<br>
+<br>
+ pmaddubsw m4, m2, [r3 + 2 * 16] ; [18]<br>
+ pmulhrsw m4, m7<br>
+ pmaddubsw m5, m2, [r3 + 4 * 16] ; [20]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ pmaddubsw m5, m2, [r3 + 6 * 16] ; [22]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m6, m2, [r3 + 8 * 16] ; [24]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pmaddubsw m6, m2, [r3 + 10 * 16] ; [26]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m1, m2, [r3 + 12 * 16] ; [28]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m6, m1<br>
+<br>
+ pmaddubsw m1, m2, [r3 + 14 * 16] ; [30]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m1, m1<br>
+<br>
+ punpcklqdq m1, m3 ; [00]<br>
+<br>
+ TRANSPOSE_STORE_8x8 1, 1, m4, m5, m6, m1<br>
+<br>
+ lea r0, [r6 + r1 * 4]<br>
+ lea r6, [r6 + r1 * 8]<br>
+ add r2, 8<br>
+ dec r4<br>
+ jnz .loop<br>
+<br>
+ RET<br>
+<br>
+INIT_XMM sse4<br>
+cglobal intra_pred_ang16_27, 3,7,8<br>
+ mov r2, r3mp<br>
+ lea r3, [ang_table + 16 * 16]<br>
+ mov r4d, 2<br>
+ lea r5, [r1 * 3] ; r5 -> 3 * stride<br>
+ mov r6, r0<br>
+ mova m7, [pw_1024]<br>
+<br>
+.loop:<br>
+ movu m3, [r2 + 1] ;[16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1]<br>
+ palignr m2, m3, 1 ;[x 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2]<br>
+ punpcklbw m3, m2 ;[9 8 8 7 7 6 6 5 5 4 4 3 3 2 2 1]<br>
+<br>
+ pmaddubsw m4, m3, [r3 - 14 * 16] ; [2]<br>
+ pmulhrsw m4, m7<br>
+ pmaddubsw m0, m3, [r3 - 12 * 16] ; [4]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m4, m0<br>
+<br>
+ pmaddubsw m5, m3, [r3 - 10 * 16] ; [6]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m6, m3, [r3 - 8 * 16] ; [8]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pmaddubsw m6, m3, [r3 - 6 * 16] ; [10]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m0, m3, [r3 - 4 * 16] ; [12]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m6, m0<br>
+<br>
+ pmaddubsw m1, m3, [r3 - 2 * 16] ; [14]<br>
+ pmulhrsw m1, m7<br>
+ pmaddubsw m0, m3, [r3] ; [16]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m1, m0<br>
+<br>
+ TRANSPOSE_STORE_8x8 0, 0, m4, m5, m6, m1<br>
+<br>
+ pmaddubsw m4, m3, [r3 + 2 * 16] ; [18]<br>
+ pmulhrsw m4, m7<br>
+ pmaddubsw m5, m3, [r3 + 4 * 16] ; [20]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ pmaddubsw m5, m3, [r3 + 6 * 16] ; [22]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m6, m3, [r3 + 8 * 16] ; [24]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pmaddubsw m6, m3, [r3 + 10 * 16] ; [26]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m1, m3, [r3 + 12 * 16] ; [28]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m6, m1<br>
+<br>
+ pmaddubsw m1, m3, [r3 + 14 * 16] ; [30]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m1, m1<br>
+<br>
+ movh [r0 ], m4<br>
+ movhps [r0 + r1 ], m4<br>
+ movh [r0 + r1 * 2], m5<br>
+ movhps [r0 + r5 ], m5<br>
+ lea r0, [r0 + r1 * 4]<br>
+ movh [r0 ], m6<br>
+ movhps [r0 + r1 ], m6<br>
+ movh [r0 + r1 * 2], m1<br>
+ movh [r0 + r5 ], m2<br>
+<br>
+ lea r0, [r6 + 8]<br>
+ add r2, 8<br>
+ dec r4<br>
+ jnz .loop<br>
+<br>
+ RET<br>
+<br>
+INIT_XMM sse4<br>
+cglobal intra_pred_ang16_10, 6,6,8<br>
+ lea r4, [r1 * 3]<br>
+ pxor m7, m7<br>
+<br>
+ movu m0, [r2 + 1]<br>
+ palignr m1, m0, 1<br>
+ pshufb m1, m7<br>
+ palignr m2, m0, 2<br>
+ pshufb m2, m7<br>
+ palignr m3, m0, 3<br>
+ pshufb m3, m7<br>
+ palignr m4, m0, 4<br>
+ pshufb m4, m7<br>
+ palignr m5, m0, 5<br>
+ pshufb m5, m7<br>
+ palignr m6, m0, 6<br>
+ pshufb m6, m7<br>
+<br>
+ movu [r0 + r1], m1<br>
+ movu [r0 + r1 * 2], m2<br>
+ movu [r0 + r4], m3<br>
+ lea r2, [r0 + r1 * 4]<br>
+ movu [r2], m4<br>
+ movu [r2 + r1], m5<br>
+ movu [r2 + r1 * 2], m6<br>
+<br>
+ palignr m1, m0, 7<br>
+ pshufb m1, m7<br>
+ movhlps m2, m0<br>
+ pshufb m2, m7<br>
+ palignr m3, m0, 9<br>
+ pshufb m3, m7<br>
+ palignr m4, m0, 10<br>
+ pshufb m4, m7<br>
+ palignr m5, m0, 11<br>
+ pshufb m5, m7<br>
+ palignr m6, m0, 12<br>
+ pshufb m6, m7<br>
+<br>
+ movu [r2 + r4], m1<br>
+ lea r2, [r2 + r1 * 4]<br>
+ movu [r2], m2<br>
+ movu [r2 + r1], m3<br>
+ movu [r2 + r1 * 2], m4<br>
+ movu [r2 + r4], m5<br>
+ lea r2, [r2 + r1 * 4]<br>
+ movu [r2], m6<br>
+<br>
+ palignr m1, m0, 13<br>
+ pshufb m1, m7<br>
+ palignr m2, m0, 14<br>
+ pshufb m2, m7<br>
+ palignr m3, m0, 15<br>
+ pshufb m3, m7<br>
+ pshufb m0, m7<br>
+<br>
+ movu [r2 + r1], m1<br>
+ movu [r2 + r1 * 2], m2<br>
+ movu [r2 + r4], m3<br>
+<br>
+; filter<br>
+ cmp r5b, byte 0<br>
+ jz .quit<br>
+ pmovzxbw m0, m0<br>
+ mova m1, m0<br>
+ movu m2, [r3]<br>
+ movu m3, [r3 + 1]<br>
+<br>
+ pshufb m2, m7<br>
+ pmovzxbw m2, m2<br>
+ movhlps m4, m3<br>
+ pmovzxbw m3, m3<br>
+ pmovzxbw m4, m4<br>
+ psubw m3, m2<br>
+ psubw m4, m2<br>
+ psraw m3, 1<br>
+ psraw m4, 1<br>
+ paddw m0, m3<br>
+ paddw m1, m4<br>
+ packuswb m0, m1<br>
+<br>
+.quit:<br>
+ movu [r0], m0<br>
+<br>
+ RET<br>
+<br>
+INIT_XMM sse4<br>
+cglobal intra_pred_ang16_26, 6,7,5<br>
+<br>
+ movu m0, [r3 + 1]<br>
+<br>
+ lea r4, [r1 * 3]<br>
+ lea r3, [r0 + r1 * 4]<br>
+ lea r6, [r3 + r1 * 4]<br>
+<br>
+ movu [r0], m0<br>
+ movu [r0 + r1], m0<br>
+ movu [r0 + r1 * 2], m0<br>
+ movu [r0 + r4], m0<br>
+ movu [r3], m0<br>
+ movu [r3 + r1], m0<br>
+ movu [r3 + r1 * 2], m0<br>
+ movu [r3 + r4], m0<br>
+ movu [r6], m0<br>
+ movu [r6 + r1], m0<br>
+ movu [r6 + r1 * 2], m0<br>
+ movu [r6 + r4], m0<br>
+ lea r6, [r6 + r1 * 4]<br>
+ movu [r6], m0<br>
+ movu [r6 + r1], m0<br>
+ movu [r6 + r1 * 2], m0<br>
+ movu [r6 + r4], m0<br>
+<br>
+; filter<br>
+ cmp r5b, byte 0<br>
+ jz .quit<br>
+ lea r5, [r3 + r1 * 4]<br>
+ pxor m4, m4<br>
+ pshufb m0, m4<br>
+ pmovzxbw m0, m0<br>
+ mova m1, m0<br>
+ movu m2, [r2]<br>
+ movu m3, [r2 + 1]<br>
+<br>
+ pshufb m2, m4<br>
+ pmovzxbw m2, m2<br>
+ movhlps m4, m3<br>
+ pmovzxbw m3, m3<br>
+ pmovzxbw m4, m4<br>
+ psubw m3, m2<br>
+ psubw m4, m2<br>
+ psraw m3, 1<br>
+ psraw m4, 1<br>
+ paddw m0, m3<br>
+ paddw m1, m4<br>
+ packuswb m0, m1<br>
+<br>
+ pextrb [r0], m0, 0<br>
+ pextrb [r0 + r1], m0, 1<br>
+ pextrb [r0 + r1 * 2], m0, 2<br>
+ pextrb [r0 + r4], m0, 3<br>
+ pextrb [r3], m0, 4<br>
+ pextrb [r3 + r1], m0, 5<br>
+ pextrb [r3 + r1 * 2], m0, 6<br>
+ pextrb [r3 + r4], m0, 7<br>
+ pextrb [r5], m0, 8<br>
+ pextrb [r5 + r1], m0, 9<br>
+ pextrb [r5 + r1 * 2], m0, 10<br>
+ pextrb [r5 + r4], m0, 11<br>
+ pextrb [r6], m0, 12<br>
+ pextrb [r6 + r1], m0, 13<br>
+ pextrb [r6 + r1 * 2], m0, 14<br>
+ pextrb [r6 + r4], m0, 15<br>
+<br>
+.quit:<br>
+ RET<br>
+<br>
+INIT_XMM sse4<br>
+cglobal intra_pred_ang16_11, 3,7,8<br>
+<br>
+ lea r3, [ang_table + 16 * 16]<br>
+ mov r4d, 2<br>
+ lea r5, [r1 * 3] ; r5 -> 3 * stride<br>
+ lea r6, [r0 + r1 * 4] ; r6 -> 4 * stride<br>
+ mova m7, [pw_1024]<br>
+<br>
+.loop:<br>
+ movu m3, [r2] ;[15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0]<br>
+ mova m2, m3<br>
+ palignr m1, m3, 1 ;[15 14 13 12 11 10 9 8 7 6 5 4 3 2 1]<br>
+ punpcklbw m3, m1 ;[8 7 7 6 6 5 5 4 4 3 3 2 2 1 1 0]<br>
+<br>
+ pmaddubsw m4, m3, [r3 + 14 * 16] ; [30]<br>
+ pmulhrsw m4, m7<br>
+ pmaddubsw m0, m3, [r3 + 12 * 16] ; [28]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m4, m0<br>
+<br>
+ pmaddubsw m5, m3, [r3 + 10 * 16] ; [26]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m6, m3, [r3 + 8 * 16] ; [24]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pmaddubsw m6, m3, [r3 + 6 * 16] ; [22]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m0, m3, [r3 + 4 * 16] ; [20]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m6, m0<br>
+<br>
+ pmaddubsw m1, m3, [r3 + 2 * 16] ; [18]<br>
+ pmulhrsw m1, m7<br>
+ pmaddubsw m0, m3, [r3] ; [16]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m1, m0<br>
+<br>
+ TRANSPOSE_STORE_8x8 0, 1, m4, m5, m6, m1<br>
+<br>
+ pmaddubsw m4, m3, [r3 - 2 * 16] ; [14]<br>
+ pmulhrsw m4, m7<br>
+ pmaddubsw m5, m3, [r3 - 4 * 16] ; [12]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ pmaddubsw m5, m3, [r3 - 6 * 16] ; [10]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m6, m3, [r3 - 8 * 16] ; [08]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pmaddubsw m6, m3, [r3 - 10 * 16] ; [06]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m1, m3, [r3 - 12 * 16] ; [04]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m6, m1<br>
+<br>
+ pmaddubsw m1, m3, [r3 - 14 * 16] ; [02]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m1, m1<br>
+ punpcklqdq m1, m2 ;[00]<br>
+<br>
+ TRANSPOSE_STORE_8x8 1, 1, m4, m5, m6, m1<br>
+<br>
+ lea r0, [r6 + r1 * 4]<br>
+ lea r6, [r6 + r1 * 8]<br>
+ add r2, 8<br>
+ dec r4<br>
+ jnz .loop<br>
+<br>
+ RET<br>
+<br>
+INIT_XMM sse4<br>
+cglobal intra_pred_ang16_25, 3,7,8<br>
+ mov r2, r3mp<br>
+ lea r3, [ang_table + 16 * 16]<br>
+ mov r4d, 2<br>
+ lea r5, [r1 * 3] ; r5 -> 3 * stride<br>
+ mov r6, r0<br>
+ mova m7, [pw_1024]<br>
+<br>
+.loop:<br>
+ movu m3, [r2] ;[15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0]<br>
+ mova m2, m3<br>
+ palignr m1, m3, 1 ;[15 14 13 12 11 10 9 8 7 6 5 4 3 2 1]<br>
+ punpcklbw m3, m1 ;[8 7 7 6 6 5 5 4 4 3 3 2 2 1 1 0]<br>
+<br>
+ pmaddubsw m4, m3, [r3 + 14 * 16] ; [30]<br>
+ pmulhrsw m4, m7<br>
+ pmaddubsw m0, m3, [r3 + 12 * 16] ; [28]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m4, m0<br>
+<br>
+ pmaddubsw m5, m3, [r3 + 10 * 16] ; [26]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m6, m3, [r3 + 8 * 16] ; [24]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pmaddubsw m6, m3, [r3 + 6 * 16] ; [22]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m0, m3, [r3 + 4 * 16] ; [20]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m6, m0<br>
+<br>
+ pmaddubsw m1, m3, [r3 + 2 * 16] ; [18]<br>
+ pmulhrsw m1, m7<br>
+ pmaddubsw m0, m3, [r3] ; [16]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m1, m0<br>
+<br>
+ TRANSPOSE_STORE_8x8 0, 0, m4, m5, m6, m1<br>
+<br>
+ pmaddubsw m4, m3, [r3 - 2 * 16] ; [14]<br>
+ pmulhrsw m4, m7<br>
+ pmaddubsw m5, m3, [r3 - 4 * 16] ; [12]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ pmaddubsw m5, m3, [r3 - 6 * 16] ; [10]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m6, m3, [r3 - 8 * 16] ; [08]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pmaddubsw m6, m3, [r3 - 10 * 16] ; [06]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m1, m3, [r3 - 12 * 16] ; [04]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m6, m1<br>
+<br>
+ pmaddubsw m1, m3, [r3 - 14 * 16] ; [02]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m1, m1<br>
+<br>
+ movh [r0 ], m4<br>
+ movhps [r0 + r1 ], m4<br>
+ movh [r0 + r1 * 2], m5<br>
+ movhps [r0 + r5 ], m5<br>
+ lea r0, [r0 + r1 * 4]<br>
+ movh [r0 ], m6<br>
+ movhps [r0 + r1 ], m6<br>
+ movh [r0 + r1 * 2], m1<br>
+ movh [r0 + r5 ], m2<br>
+<br>
+ lea r0, [r6 + 8]<br>
+ add r2, 8<br>
+ dec r4<br>
+ jnz .loop<br>
+<br>
+ RET<br>
+<br>
+INIT_XMM sse4<br>
+cglobal intra_pred_ang16_12, 4,7,8<br>
+<br>
+ lea r4, [ang_table + 16 * 16]<br>
+ lea r5, [r1 * 3] ; r5 -> 3 * stride<br>
+ lea r6, [r0 + r1 * 4] ; r6 -> 4 * stride<br>
+ mova m7, [pw_1024]<br>
+<br>
+ movu m3, [r2] ; [15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0]<br>
+ punpckhbw m0, m3, m3 ; [15 15 14 14 13 13 12 12 11 11 10 10 9 9 8 8]<br>
+ punpcklbw m3, m3 ; [7 7 6 6 5 5 4 4 3 3 2 2 1 1 0 0]<br>
+ movu m2, [r3]<br>
+ pshufb m2, [c_mode16_12]<br>
+<br>
+ palignr m0, m3, 1 ; [8 7 7 6 6 5 5 4 4 3 3 2 2 1 1 0]<br>
+<br>
+ pmaddubsw m4, m0, [r4 + 11 * 16] ; [27]<br>
+ pmulhrsw m4, m7<br>
+ pmaddubsw m1, m0, [r4 + 6 * 16] ; [22]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m4, m1<br>
+<br>
+ pmaddubsw m5, m0, [r4 + 1 * 16] ; [17]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m6, m0, [r4 - 4 * 16] ; [12]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pmaddubsw m6, m0, [r4 - 9 * 16] ; [7]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m0, [r4 - 14 * 16] ; [2]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m6, m0<br>
+<br>
+ palignr m3, m2, 15<br>
+<br>
+ pmaddubsw m1, m3, [r4 + 13 * 16] ; [29]<br>
+ pmulhrsw m1, m7<br>
+ pmaddubsw m0, m3, [r4 + 8 * 16] ; [24]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m1, m0<br>
+<br>
+ TRANSPOSE_STORE_8x8 0, 1, m4, m5, m6, m1<br>
+<br>
+ pmaddubsw m4, m3, [r4 + 3 * 16] ; [19]<br>
+ pmulhrsw m4, m7<br>
+ pmaddubsw m5, m3, [r4 - 2 * 16] ; [14]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ pmaddubsw m5, m3, [r4 - 7 * 16] ; [09]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m6, m3, [r4 - 12 * 16] ; [04]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 + 15 * 16] ; [31]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m1, m3, [r4 + 10 * 16] ; [26]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m6, m1<br>
+<br>
+ pmaddubsw m1, m3, [r4 + 5 * 16] ; [21]<br>
+ pmulhrsw m1, m7<br>
+ pmaddubsw m3, [r4] ; [16]<br>
+ pmulhrsw m3, m7<br>
+ packuswb m1, m3<br>
+<br>
+ TRANSPOSE_STORE_8x8 1, 1, m4, m5, m6, m1<br>
+<br>
+ lea r0, [r6 + r1 * 4]<br>
+ lea r6, [r6 + r1 * 8]<br>
+<br>
+ movu m1, [r2 + 1] ; [16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1]<br>
+ pslldq m3, m1, 1 ; [15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 x]<br>
+ punpckhbw m3, m1 ; [16 15 15 14 14 13 13 12 12 11 11 10 10 9 9 8]<br>
+ movlhps m2, m1 ; [8 7 6 5 4 3 2 1 x x x x x x x]<br>
+<br>
+ pmaddubsw m4, m3, [r4 + 11 * 16] ; [27]<br>
+ pmulhrsw m4, m7<br>
+ pmaddubsw m5, m3, [r4 + 6 * 16] ; [22]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ pmaddubsw m5, m3, [r4 + 1 * 16] ; [17]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m6, m3, [r4 - 4 * 16] ; [12]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pmaddubsw m6, m3, [r4 - 9 * 16] ; [7]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m0, m3, [r4 - 14 * 16] ; [2]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m6, m0<br>
+<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m1, m3, [r4 + 13 * 16] ; [29]<br>
+ pmulhrsw m1, m7<br>
+ pmaddubsw m0, m3, [r4 + 8 * 16] ; [24]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m1, m0<br>
+<br>
+ TRANSPOSE_STORE_8x8 0, 1, m4, m5, m6, m1<br>
+<br>
+ pmaddubsw m4, m3, [r4 + 3 * 16] ; [19]<br>
+ pmulhrsw m4, m7<br>
+ pmaddubsw m5, m3, [r4 - 2 * 16] ; [14]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ pmaddubsw m5, m3, [r4 - 7 * 16] ; [09]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m6, m3, [r4 - 12 * 16] ; [04]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 + 15 * 16] ; [31]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m1, m3, [r4 + 10 * 16] ; [26]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m6, m1<br>
+<br>
+ pmaddubsw m1, m3, [r4 + 5 * 16] ; [21]<br>
+ pmulhrsw m1, m7<br>
+ pmaddubsw m3, [r4] ; [16]<br>
+ pmulhrsw m3, m7<br>
+ packuswb m1, m3<br>
+<br>
+ TRANSPOSE_STORE_8x8 1, 1, m4, m5, m6, m1<br>
+<br>
+ RET<br>
+<br>
+INIT_XMM sse4<br>
+cglobal intra_pred_ang16_24, 4,7,8<br>
+<br>
+ lea r4, [ang_table + 16 * 16]<br>
+ lea r5, [r1 * 3] ; r5 -> 3 * stride<br>
+ mov r6, r0<br>
+ mova m7, [pw_1024]<br>
+<br>
+ movu m3, [r3] ; [15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0]<br>
+ punpckhbw m0, m3, m3 ; [15 15 14 14 13 13 12 12 11 11 10 10 9 9 8 8]<br>
+ punpcklbw m3, m3 ; [7 7 6 6 5 5 4 4 3 3 2 2 1 1 0 0]<br>
+ movu m2, [r2]<br>
+ pshufb m2, [c_mode16_12]<br>
+<br>
+ palignr m0, m3, 1 ; [8 7 7 6 6 5 5 4 4 3 3 2 2 1 1 0]<br>
+<br>
+ pmaddubsw m4, m0, [r4 + 11 * 16] ; [27]<br>
+ pmulhrsw m4, m7<br>
+ pmaddubsw m1, m0, [r4 + 6 * 16] ; [22]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m4, m1<br>
+<br>
+ pmaddubsw m5, m0, [r4 + 1 * 16] ; [17]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m6, m0, [r4 - 4 * 16] ; [12]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pmaddubsw m6, m0, [r4 - 9 * 16] ; [7]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m0, [r4 - 14 * 16] ; [2]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m6, m0<br>
+<br>
+ palignr m3, m2, 15<br>
+<br>
+ pmaddubsw m1, m3, [r4 + 13 * 16] ; [29]<br>
+ pmulhrsw m1, m7<br>
+ pmaddubsw m0, m3, [r4 + 8 * 16] ; [24]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m1, m0<br>
+<br>
+ TRANSPOSE_STORE_8x8 0, 0, m4, m5, m6, m1<br>
+<br>
+ pmaddubsw m4, m3, [r4 + 3 * 16] ; [19]<br>
+ pmulhrsw m4, m7<br>
+ pmaddubsw m5, m3, [r4 - 2 * 16] ; [14]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ pmaddubsw m5, m3, [r4 - 7 * 16] ; [09]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m6, m3, [r4 - 12 * 16] ; [04]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 + 15 * 16] ; [31]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m1, m3, [r4 + 10 * 16] ; [26]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m6, m1<br>
+<br>
+ pmaddubsw m1, m3, [r4 + 5 * 16] ; [21]<br>
+ pmulhrsw m1, m7<br>
+ pmaddubsw m3, [r4] ; [16]<br>
+ pmulhrsw m3, m7<br>
+ packuswb m1, m3<br>
+<br>
+ TRANSPOSE_STORE_8x8 1, 0, m4, m5, m6, m1<br>
+<br>
+ lea r0, [r6 + 8]<br>
+<br>
+ movu m1, [r3 + 1] ; [16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1]<br>
+ pslldq m3, m1, 1 ; [15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 x]<br>
+ punpckhbw m3, m1 ; [16 15 15 14 14 13 13 12 12 11 11 10 10 9 9 8]<br>
+ movlhps m2, m1 ; [8 7 6 5 4 3 2 1 x x x x x x x]<br>
+<br>
+ pmaddubsw m4, m3, [r4 + 11 * 16] ; [27]<br>
+ pmulhrsw m4, m7<br>
+ pmaddubsw m5, m3, [r4 + 6 * 16] ; [22]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ pmaddubsw m5, m3, [r4 + 1 * 16] ; [17]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m6, m3, [r4 - 4 * 16] ; [12]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pmaddubsw m6, m3, [r4 - 9 * 16] ; [7]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m0, m3, [r4 - 14 * 16] ; [2]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m6, m0<br>
+<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m1, m3, [r4 + 13 * 16] ; [29]<br>
+ pmulhrsw m1, m7<br>
+ pmaddubsw m0, m3, [r4 + 8 * 16] ; [24]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m1, m0<br>
+<br>
+ TRANSPOSE_STORE_8x8 0, 0, m4, m5, m6, m1<br>
+<br>
+ pmaddubsw m4, m3, [r4 + 3 * 16] ; [19]<br>
+ pmulhrsw m4, m7<br>
+ pmaddubsw m5, m3, [r4 - 2 * 16] ; [14]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ pmaddubsw m5, m3, [r4 - 7 * 16] ; [09]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m6, m3, [r4 - 12 * 16] ; [04]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 + 15 * 16] ; [31]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m1, m3, [r4 + 10 * 16] ; [26]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m6, m1<br>
+<br>
+ pmaddubsw m1, m3, [r4 + 5 * 16] ; [21]<br>
+ pmulhrsw m1, m7<br>
+ pmaddubsw m3, [r4] ; [16]<br>
+ pmulhrsw m3, m7<br>
+ packuswb m1, m3<br>
+<br>
+ TRANSPOSE_STORE_8x8 1, 0, m4, m5, m6, m1<br>
+<br>
+ RET<br>
+<br>
+INIT_XMM sse4<br>
+cglobal intra_pred_ang16_13, 4,7,8<br>
+<br>
+ lea r4, [ang_table + 16 * 16]<br>
+ lea r5, [r1 * 3] ; r5 -> 3 * stride<br>
+ lea r6, [r0 + r1 * 4] ; r6 -> 4 * stride<br>
+ mova m7, [pw_1024]<br>
+<br>
+ movu m3, [r2] ; [15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0]<br>
+ punpckhbw m5, m3, m3 ; [15 15 14 14 13 13 12 12 11 11 10 10 9 9 8 8]<br>
+ punpcklbw m3, m3 ; [7 7 6 6 5 5 4 4 3 3 2 2 1 1 0 0]<br>
+ movu m2, [r3]<br>
+ pshufb m2, [c_mode16_13]<br>
+<br>
+ palignr m5, m3, 1 ; [8 7 7 6 6 5 5 4 4 3 3 2 2 1 1 0]<br>
+<br>
+ pmaddubsw m4, m5, [r4 + 7 * 16] ; [23]<br>
+ pmulhrsw m4, m7<br>
+ pmaddubsw m0, m5, [r4 - 2 * 16] ; [14]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m4, m0<br>
+<br>
+ pmaddubsw m5, [r4 - 11 * 16] ; [05]<br>
+ pmulhrsw m5, m7<br>
+<br>
+ palignr m3, m2, 15<br>
+<br>
+ pmaddubsw m6, m3, [r4 + 12 * 16] ; [28]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pmaddubsw m6, m3, [r4 + 3 * 16] ; [19]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m0, m3, [r4 - 6 * 16] ; [10]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m6, m0<br>
+<br>
+ pmaddubsw m1, m3, [r4 - 15 * 16] ; [01]<br>
+ pmulhrsw m1, m7<br>
+<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m0, m3, [r4 + 8 * 16] ; [24]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m1, m0<br>
+<br>
+ TRANSPOSE_STORE_8x8 0, 1, m4, m5, m6, m1<br>
+<br>
+ pmaddubsw m4, m3, [r4 - 16] ; [15]<br>
+ pmulhrsw m4, m7<br>
+ pmaddubsw m5, m3, [r4 - 10 * 16] ; [06]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m5, m3, [r4 + 13 * 16] ; [29]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m6, m3, [r4 + 4 * 16] ; [20]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pmaddubsw m6, m3, [r4 - 5 * 16] ; [11]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m1, m3, [r4 - 14 * 16] ; [02]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m6, m1<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m1, m3, [r4 + 9 * 16] ; [25]<br>
+ pmulhrsw m1, m7<br>
+ pmaddubsw m3, [r4] ; [16]<br>
+ pmulhrsw m3, m7<br>
+ packuswb m1, m3<br>
+<br>
+ TRANSPOSE_STORE_8x8 1, 1, m4, m5, m6, m1<br>
+<br>
+ lea r0, [r6 + r1 * 4]<br>
+ lea r6, [r6 + r1 * 8]<br>
+<br>
+ movu m1, [r2 + 1] ; [16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1]<br>
+ pslldq m3, m1, 1 ; [15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 x]<br>
+ punpckhbw m3, m1 ; [16 15 15 14 14 13 13 12 12 11 11 10 10 9 9 8]<br>
+ movlhps m2, m1 ; [8 7 6 5 4 3 2 1 x x x x x x x]<br>
+<br>
+ pmaddubsw m4, m3, [r4 + 7 * 16] ; [23]<br>
+ pmulhrsw m4, m7<br>
+ pmaddubsw m5, m3, [r4 - 2 * 16] ; [14]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ pmaddubsw m5, m3, [r4 - 11 * 16] ; [05]<br>
+ pmulhrsw m5, m7<br>
+<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 + 12 * 16] ; [28]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pmaddubsw m6, m3, [r4 + 3 * 16] ; [19]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m0, m3, [r4 - 6 * 16] ; [10]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m6, m0<br>
+<br>
+ pmaddubsw m1, m3, [r4 - 15 * 16] ; [01]<br>
+ pmulhrsw m1, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m0, m3, [r4 + 8 * 16] ; [24]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m1, m0<br>
+<br>
+ TRANSPOSE_STORE_8x8 0, 1, m4, m5, m6, m1<br>
+<br>
+ pmaddubsw m4, m3, [r4 - 16] ; [15]<br>
+ pmulhrsw m4, m7<br>
+ pmaddubsw m5, m3, [r4 - 10 * 16] ; [06]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m5, m3, [r4 + 13 * 16] ; [29]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m6, m3, [r4 + 4 * 16] ; [20]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pmaddubsw m6, m3, [r4 - 5 * 16] ; [11]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m1, m3, [r4 - 14 * 16] ; [02]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m6, m1<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m1, m3, [r4 + 9 * 16] ; [25]<br>
+ pmulhrsw m1, m7<br>
+ pmaddubsw m3, [r4] ; [16]<br>
+ pmulhrsw m3, m7<br>
+ packuswb m1, m3<br>
+<br>
+ TRANSPOSE_STORE_8x8 1, 1, m4, m5, m6, m1<br>
+<br>
+ RET<br>
+<br>
+INIT_XMM sse4<br>
+cglobal intra_pred_ang16_23, 4,7,8<br>
+<br>
+ lea r4, [ang_table + 16 * 16]<br>
+ lea r5, [r1 * 3] ; r5 -> 3 * stride<br>
+ mov r6, r0<br>
+ mova m7, [pw_1024]<br>
+<br>
+ movu m3, [r3] ; [15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0]<br>
+ punpckhbw m5, m3, m3 ; [15 15 14 14 13 13 12 12 11 11 10 10 9 9 8 8]<br>
+ punpcklbw m3, m3 ; [7 7 6 6 5 5 4 4 3 3 2 2 1 1 0 0]<br>
+ movu m2, [r2]<br>
+ pshufb m2, [c_mode16_13]<br>
+<br>
+ palignr m5, m3, 1 ; [8 7 7 6 6 5 5 4 4 3 3 2 2 1 1 0]<br>
+<br>
+ pmaddubsw m4, m5, [r4 + 7 * 16] ; [23]<br>
+ pmulhrsw m4, m7<br>
+ pmaddubsw m0, m5, [r4 - 2 * 16] ; [14]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m4, m0<br>
+<br>
+ pmaddubsw m5, [r4 - 11 * 16] ; [05]<br>
+ pmulhrsw m5, m7<br>
+<br>
+ palignr m3, m2, 15<br>
+<br>
+ pmaddubsw m6, m3, [r4 + 12 * 16] ; [28]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pmaddubsw m6, m3, [r4 + 3 * 16] ; [19]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m0, m3, [r4 - 6 * 16] ; [10]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m6, m0<br>
+<br>
+ pmaddubsw m1, m3, [r4 - 15 * 16] ; [01]<br>
+ pmulhrsw m1, m7<br>
+<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m0, m3, [r4 + 8 * 16] ; [24]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m1, m0<br>
+<br>
+ TRANSPOSE_STORE_8x8 0, 0, m4, m5, m6, m1<br>
+<br>
+ pmaddubsw m4, m3, [r4 - 16] ; [15]<br>
+ pmulhrsw m4, m7<br>
+ pmaddubsw m5, m3, [r4 - 10 * 16] ; [06]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m5, m3, [r4 + 13 * 16] ; [29]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m6, m3, [r4 + 4 * 16] ; [20]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pmaddubsw m6, m3, [r4 - 5 * 16] ; [11]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m1, m3, [r4 - 14 * 16] ; [02]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m6, m1<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m1, m3, [r4 + 9 * 16] ; [25]<br>
+ pmulhrsw m1, m7<br>
+ pmaddubsw m3, [r4] ; [16]<br>
+ pmulhrsw m3, m7<br>
+ packuswb m1, m3<br>
+<br>
+ TRANSPOSE_STORE_8x8 1, 0, m4, m5, m6, m1<br>
+<br>
+ lea r0, [r6 + 8]<br>
+<br>
+ movu m1, [r3 + 1] ; [16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1]<br>
+ pslldq m3, m1, 1 ; [15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 x]<br>
+ punpckhbw m3, m1 ; [16 15 15 14 14 13 13 12 12 11 11 10 10 9 9 8]<br>
+ movlhps m2, m1 ; [8 7 6 5 4 3 2 1 x x x x x x x]<br>
+<br>
+ pmaddubsw m4, m3, [r4 + 7 * 16] ; [23]<br>
+ pmulhrsw m4, m7<br>
+ pmaddubsw m5, m3, [r4 - 2 * 16] ; [14]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ pmaddubsw m5, m3, [r4 - 11 * 16] ; [05]<br>
+ pmulhrsw m5, m7<br>
+<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 + 12 * 16] ; [28]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pmaddubsw m6, m3, [r4 + 3 * 16] ; [19]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m0, m3, [r4 - 6 * 16] ; [10]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m6, m0<br>
+<br>
+ pmaddubsw m1, m3, [r4 - 15 * 16] ; [01]<br>
+ pmulhrsw m1, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m0, m3, [r4 + 8 * 16] ; [24]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m1, m0<br>
+<br>
+ TRANSPOSE_STORE_8x8 0, 0, m4, m5, m6, m1<br>
+<br>
+ pmaddubsw m4, m3, [r4 - 16] ; [15]<br>
+ pmulhrsw m4, m7<br>
+ pmaddubsw m5, m3, [r4 - 10 * 16] ; [06]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m5, m3, [r4 + 13 * 16] ; [29]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m6, m3, [r4 + 4 * 16] ; [20]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pmaddubsw m6, m3, [r4 - 5 * 16] ; [11]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m1, m3, [r4 - 14 * 16] ; [02]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m6, m1<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m1, m3, [r4 + 9 * 16] ; [25]<br>
+ pmulhrsw m1, m7<br>
+ pmaddubsw m3, [r4] ; [16]<br>
+ pmulhrsw m3, m7<br>
+ packuswb m1, m3<br>
+<br>
+ TRANSPOSE_STORE_8x8 1, 0, m4, m5, m6, m1<br>
+<br>
+ RET<br>
+<br>
+INIT_XMM sse4<br>
+cglobal intra_pred_ang16_14, 4,7,8<br>
+<br>
+ lea r4, [ang_table + 16 * 16]<br>
+ lea r5, [r1 * 3] ; r5 -> 3 * stride<br>
+ lea r6, [r0 + r1 * 4] ; r6 -> 4 * stride<br>
+ mova m7, [pw_1024]<br>
+<br>
+ movu m3, [r2] ; [15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0]<br>
+ punpckhbw m5, m3, m3 ; [15 15 14 14 13 13 12 12 11 11 10 10 9 9 8 8]<br>
+ punpcklbw m3, m3 ; [7 7 6 6 5 5 4 4 3 3 2 2 1 1 0 0]<br>
+ movu m2, [r3]<br>
+ pshufb m2, [c_mode16_14]<br>
+<br>
+ palignr m5, m3, 1 ; [8 7 7 6 6 5 5 4 4 3 3 2 2 1 1 0]<br>
+<br>
+ pmaddubsw m4, m5, [r4 + 3 * 16] ; [19]<br>
+ pmulhrsw m4, m7<br>
+ pmaddubsw m5, [r4 - 10 * 16] ; [06]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ palignr m3, m2, 15<br>
+<br>
+ pmaddubsw m5, m3, [r4 + 9 * 16] ; [25]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m6, m3, [r4 - 4 * 16] ; [12]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 + 15 * 16] ; [31]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m0, m3, [r4 + 2 * 16] ; [18]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m6, m0<br>
+<br>
+ pmaddubsw m1, m3, [r4 - 11 * 16] ; [05]<br>
+ pmulhrsw m1, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m0, m3, [r4 + 8 * 16] ; [24]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m1, m0<br>
+<br>
+ TRANSPOSE_STORE_8x8 0, 1, m4, m5, m6, m1<br>
+<br>
+ pmaddubsw m4, m3, [r4 - 5 * 16] ; [11]<br>
+ pmulhrsw m4, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m5, m3, [r4 + 14 * 16] ; [30]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ pmaddubsw m5, m3, [r4 + 16] ; [17]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m6, m3, [r4 - 12 * 16] ; [04]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 + 7 * 16] ; [23]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m1, m3, [r4 - 6 * 16] ; [10]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m6, m1<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m1, m3, [r4 + 13 * 16] ; [29]<br>
+ pmulhrsw m1, m7<br>
+ pmaddubsw m3, [r4] ; [16]<br>
+ pmulhrsw m3, m7<br>
+ packuswb m1, m3<br>
+<br>
+ TRANSPOSE_STORE_8x8 1, 1, m4, m5, m6, m1<br>
+<br>
+ lea r0, [r6 + r1 * 4]<br>
+ lea r6, [r6 + r1 * 8]<br>
+<br>
+ movu m1, [r2 + 1] ; [16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1]<br>
+ pslldq m3, m1, 1 ; [15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 x]<br>
+ punpckhbw m3, m1 ; [16 15 15 14 14 13 13 12 12 11 11 10 10 9 9 8]<br>
+ movlhps m2, m1 ; [8 7 6 5 4 3 2 1 x x x x x x x]<br>
+<br>
+ pmaddubsw m4, m3, [r4 + 3 * 16] ; [19]<br>
+ pmulhrsw m4, m7<br>
+ pmaddubsw m5, m3, [r4 - 10 * 16] ; [06]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m5, m3, [r4 + 9 * 16] ; [25]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m6, m3, [r4 - 4 * 16] ; [12]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 + 15 * 16] ; [31]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m0, m3, [r4 + 2 * 16] ; [18]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m6, m0<br>
+<br>
+ pmaddubsw m1, m3, [r4 - 11 * 16] ; [05]<br>
+ pmulhrsw m1, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m0, m3, [r4 + 8 * 16] ; [24]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m1, m0<br>
+<br>
+ TRANSPOSE_STORE_8x8 0, 1, m4, m5, m6, m1<br>
+<br>
+ pmaddubsw m4, m3, [r4 - 5 * 16] ; [11]<br>
+ pmulhrsw m4, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m5, m3, [r4 + 14 * 16] ; [30]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ pmaddubsw m5, m3, [r4 + 16] ; [17]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m6, m3, [r4 - 12 * 16] ; [04]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 + 7 * 16] ; [23]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m1, m3, [r4 - 6 * 16] ; [10]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m6, m1<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m1, m3, [r4 + 13 * 16] ; [29]<br>
+ pmulhrsw m1, m7<br>
+ pmaddubsw m3, [r4] ; [16]<br>
+ pmulhrsw m3, m7<br>
+ packuswb m1, m3<br>
+<br>
+ TRANSPOSE_STORE_8x8 1, 1, m4, m5, m6, m1<br>
+<br>
+ RET<br>
+<br>
+INIT_XMM sse4<br>
+cglobal intra_pred_ang16_22, 4,7,8<br>
+<br>
+ lea r4, [ang_table + 16 * 16]<br>
+ lea r5, [r1 * 3] ; r5 -> 3 * stride<br>
+ mov r6, r0<br>
+ mova m7, [pw_1024]<br>
+<br>
+ movu m3, [r3] ; [15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0]<br>
+ punpckhbw m5, m3, m3 ; [15 15 14 14 13 13 12 12 11 11 10 10 9 9 8 8]<br>
+ punpcklbw m3, m3 ; [7 7 6 6 5 5 4 4 3 3 2 2 1 1 0 0]<br>
+ movu m2, [r2]<br>
+ pshufb m2, [c_mode16_14]<br>
+<br>
+ palignr m5, m3, 1 ; [8 7 7 6 6 5 5 4 4 3 3 2 2 1 1 0]<br>
+<br>
+ pmaddubsw m4, m5, [r4 + 3 * 16] ; [19]<br>
+ pmulhrsw m4, m7<br>
+ pmaddubsw m5, [r4 - 10 * 16] ; [06]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ palignr m3, m2, 15<br>
+<br>
+ pmaddubsw m5, m3, [r4 + 9 * 16] ; [25]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m6, m3, [r4 - 4 * 16] ; [12]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 + 15 * 16] ; [31]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m0, m3, [r4 + 2 * 16] ; [18]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m6, m0<br>
+<br>
+ pmaddubsw m1, m3, [r4 - 11 * 16] ; [05]<br>
+ pmulhrsw m1, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m0, m3, [r4 + 8 * 16] ; [24]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m1, m0<br>
+<br>
+ TRANSPOSE_STORE_8x8 0, 0, m4, m5, m6, m1<br>
+<br>
+ pmaddubsw m4, m3, [r4 - 5 * 16] ; [11]<br>
+ pmulhrsw m4, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m5, m3, [r4 + 14 * 16] ; [30]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ pmaddubsw m5, m3, [r4 + 16] ; [17]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m6, m3, [r4 - 12 * 16] ; [04]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 + 7 * 16] ; [23]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m1, m3, [r4 - 6 * 16] ; [10]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m6, m1<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m1, m3, [r4 + 13 * 16] ; [29]<br>
+ pmulhrsw m1, m7<br>
+ pmaddubsw m3, [r4] ; [16]<br>
+ pmulhrsw m3, m7<br>
+ packuswb m1, m3<br>
+<br>
+ TRANSPOSE_STORE_8x8 1, 0, m4, m5, m6, m1<br>
+<br>
+ lea r0, [r6 + 8]<br>
+<br>
+ movu m1, [r3 + 1] ; [16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1]<br>
+ pslldq m3, m1, 1 ; [15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 x]<br>
+ punpckhbw m3, m1 ; [16 15 15 14 14 13 13 12 12 11 11 10 10 9 9 8]<br>
+ movlhps m2, m1 ; [8 7 6 5 4 3 2 1 x x x x x x x]<br>
+<br>
+ pmaddubsw m4, m3, [r4 + 3 * 16] ; [19]<br>
+ pmulhrsw m4, m7<br>
+ pmaddubsw m5, m3, [r4 - 10 * 16] ; [06]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m5, m3, [r4 + 9 * 16] ; [25]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m6, m3, [r4 - 4 * 16] ; [12]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 + 15 * 16] ; [31]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m0, m3, [r4 + 2 * 16] ; [18]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m6, m0<br>
+<br>
+ pmaddubsw m1, m3, [r4 - 11 * 16] ; [05]<br>
+ pmulhrsw m1, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m0, m3, [r4 + 8 * 16] ; [24]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m1, m0<br>
+<br>
+ TRANSPOSE_STORE_8x8 0, 0, m4, m5, m6, m1<br>
+<br>
+ pmaddubsw m4, m3, [r4 - 5 * 16] ; [11]<br>
+ pmulhrsw m4, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m5, m3, [r4 + 14 * 16] ; [30]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ pmaddubsw m5, m3, [r4 + 16] ; [17]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m6, m3, [r4 - 12 * 16] ; [04]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 + 7 * 16] ; [23]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m1, m3, [r4 - 6 * 16] ; [10]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m6, m1<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m1, m3, [r4 + 13 * 16] ; [29]<br>
+ pmulhrsw m1, m7<br>
+ pmaddubsw m3, [r4] ; [16]<br>
+ pmulhrsw m3, m7<br>
+ packuswb m1, m3<br>
+<br>
+ TRANSPOSE_STORE_8x8 1, 0, m4, m5, m6, m1<br>
+<br>
+ RET<br>
+<br>
+INIT_XMM sse4<br>
+cglobal intra_pred_ang16_15, 4,7,8<br>
+<br>
+ lea r4, [ang_table + 16 * 16]<br>
+ lea r5, [r1 * 3] ; r5 -> 3 * stride<br>
+ lea r6, [r0 + r1 * 4] ; r6 -> 4 * stride<br>
+ mova m7, [pw_1024]<br>
+<br>
+ movu m3, [r2] ; [15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0]<br>
+ punpckhbw m4, m3, m3 ; [15 15 14 14 13 13 12 12 11 11 10 10 9 9 8 8]<br>
+ punpcklbw m3, m3 ; [7 7 6 6 5 5 4 4 3 3 2 2 1 1 0 0]<br>
+ movu m2, [r3]<br>
+ pshufb m2, [c_mode16_15]<br>
+<br>
+ palignr m4, m3, 1 ; [8 7 7 6 6 5 5 4 4 3 3 2 2 1 1 0]<br>
+<br>
+ pmaddubsw m4, [r4 - 16] ; [15]<br>
+ pmulhrsw m4, m7<br>
+<br>
+ palignr m3, m2, 15<br>
+<br>
+ pmaddubsw m5, m3, [r4 + 14 * 16] ; [30]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ pmaddubsw m5, m3, [r4 - 3 * 16] ; [13]<br>
+ pmulhrsw m5, m7<br>
+<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 + 12 * 16] ; [28]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pmaddubsw m6, m3, [r4 - 5 * 16] ; [11]<br>
+ pmulhrsw m6, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m0, m3, [r4 + 10 * 16] ; [26]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m6, m0<br>
+<br>
+ pmaddubsw m1, m3, [r4 - 7 * 16] ; [09]<br>
+ pmulhrsw m1, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m0, m3, [r4 + 8 * 16] ; [24]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m1, m0<br>
+<br>
+ TRANSPOSE_STORE_8x8 0, 1, m4, m5, m6, m1<br>
+<br>
+ pmaddubsw m4, m3, [r4 - 9 * 16] ; [07]<br>
+ pmulhrsw m4, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m5, m3, [r4 + 6 * 16] ; [22]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ pmaddubsw m5, m3, [r4 - 11 * 16] ; [05]<br>
+ pmulhrsw m5, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 + 4 * 16] ; [20]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pmaddubsw m6, m3, [r4 - 13 * 16] ; [03]<br>
+ pmulhrsw m6, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m1, m3, [r4 + 2 * 16] ; [18]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m6, m1<br>
+<br>
+ pmaddubsw m1, m3, [r4 - 15 * 16] ; [01]<br>
+ pmulhrsw m1, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m3, [r4] ; [16]<br>
+ pmulhrsw m3, m7<br>
+ packuswb m1, m3<br>
+<br>
+ TRANSPOSE_STORE_8x8 1, 1, m4, m5, m6, m1<br>
+<br>
+ lea r0, [r6 + r1 * 4]<br>
+ lea r6, [r6 + r1 * 8]<br>
+<br>
+ movu m1, [r2 + 1] ; [16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1]<br>
+ pslldq m3, m1, 1 ; [15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 x]<br>
+ punpckhbw m3, m1 ; [16 15 15 14 14 13 13 12 12 11 11 10 10 9 9 8]<br>
+ movlhps m2, m1 ; [8 7 6 5 4 3 2 1 0 0 0 0 0 0 0 15L]<br>
+<br>
+ pmaddubsw m4, m3, [r4 - 16] ; [15]<br>
+ pmulhrsw m4, m7<br>
+<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m5, m3, [r4 + 14 * 16] ; [30]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ pmaddubsw m5, m3, [r4 - 3 * 16] ; [13]<br>
+ pmulhrsw m5, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 + 12 * 16] ; [28]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pmaddubsw m6, m3, [r4 - 5 * 16] ; [11]<br>
+ pmulhrsw m6, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m0, m3, [r4 + 10 * 16] ; [26]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m6, m0<br>
+<br>
+ pmaddubsw m1, m3, [r4 - 7 * 16] ; [09]<br>
+ pmulhrsw m1, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m0, m3, [r4 + 8 * 16] ; [24]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m1, m0<br>
+<br>
+ TRANSPOSE_STORE_8x8 0, 1, m4, m5, m6, m1<br>
+<br>
+ pmaddubsw m4, m3, [r4 - 9 * 16] ; [07]<br>
+ pmulhrsw m4, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m5, m3, [r4 + 6 * 16] ; [22]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ pmaddubsw m5, m3, [r4 - 11 * 16] ; [05]<br>
+ pmulhrsw m5, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 + 4 * 16] ; [20]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pmaddubsw m6, m3, [r4 - 13 * 16] ; [03]<br>
+ pmulhrsw m6, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m1, m3, [r4 + 2 * 16] ; [18]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m6, m1<br>
+<br>
+ pmaddubsw m1, m3, [r4 - 15 * 16] ; [01]<br>
+ pmulhrsw m1, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m3, [r4] ; [16]<br>
+ pmulhrsw m3, m7<br>
+ packuswb m1, m3<br>
+<br>
+ TRANSPOSE_STORE_8x8 1, 1, m4, m5, m6, m1<br>
+<br>
+ RET<br>
+<br>
+INIT_XMM sse4<br>
+cglobal intra_pred_ang16_21, 4,7,8<br>
+<br>
+ lea r4, [ang_table + 16 * 16]<br>
+ lea r5, [r1 * 3] ; r5 -> 3 * stride<br>
+ mov r6, r0<br>
+ mova m7, [pw_1024]<br>
+<br>
+ movu m3, [r3] ; [15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0]<br>
+ punpckhbw m4, m3, m3 ; [15 15 14 14 13 13 12 12 11 11 10 10 9 9 8 8]<br>
+ punpcklbw m3, m3 ; [7 7 6 6 5 5 4 4 3 3 2 2 1 1 0 0]<br>
+ movu m2, [r2]<br>
+ pshufb m2, [c_mode16_15]<br>
+<br>
+ palignr m4, m3, 1 ; [8 7 7 6 6 5 5 4 4 3 3 2 2 1 1 0]<br>
+<br>
+ pmaddubsw m4, [r4 - 16] ; [15]<br>
+ pmulhrsw m4, m7<br>
+<br>
+ palignr m3, m2, 15<br>
+<br>
+ pmaddubsw m5, m3, [r4 + 14 * 16] ; [30]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ pmaddubsw m5, m3, [r4 - 3 * 16] ; [13]<br>
+ pmulhrsw m5, m7<br>
+<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 + 12 * 16] ; [28]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pmaddubsw m6, m3, [r4 - 5 * 16] ; [11]<br>
+ pmulhrsw m6, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m0, m3, [r4 + 10 * 16] ; [26]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m6, m0<br>
+<br>
+ pmaddubsw m1, m3, [r4 - 7 * 16] ; [09]<br>
+ pmulhrsw m1, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m0, m3, [r4 + 8 * 16] ; [24]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m1, m0<br>
+<br>
+ TRANSPOSE_STORE_8x8 0, 0, m4, m5, m6, m1<br>
+<br>
+ pmaddubsw m4, m3, [r4 - 9 * 16] ; [07]<br>
+ pmulhrsw m4, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m5, m3, [r4 + 6 * 16] ; [22]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ pmaddubsw m5, m3, [r4 - 11 * 16] ; [05]<br>
+ pmulhrsw m5, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 + 4 * 16] ; [20]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pmaddubsw m6, m3, [r4 - 13 * 16] ; [03]<br>
+ pmulhrsw m6, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m1, m3, [r4 + 2 * 16] ; [18]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m6, m1<br>
+<br>
+ pmaddubsw m1, m3, [r4 - 15 * 16] ; [01]<br>
+ pmulhrsw m1, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m3, [r4] ; [16]<br>
+ pmulhrsw m3, m7<br>
+ packuswb m1, m3<br>
+<br>
+ TRANSPOSE_STORE_8x8 1, 0, m4, m5, m6, m1<br>
+<br>
+ lea r0, [r6 + 8]<br>
+<br>
+ movu m1, [r3 + 1] ; [16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1]<br>
+ pslldq m3, m1, 1 ; [15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 x]<br>
+ punpckhbw m3, m1 ; [16 15 15 14 14 13 13 12 12 11 11 10 10 9 9 8]<br>
+ movlhps m2, m1 ; [8 7 6 5 4 3 2 1 0 0 0 0 0 0 0 15L]<br>
+<br>
+ pmaddubsw m4, m3, [r4 - 16] ; [15]<br>
+ pmulhrsw m4, m7<br>
+<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m5, m3, [r4 + 14 * 16] ; [30]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ pmaddubsw m5, m3, [r4 - 3 * 16] ; [13]<br>
+ pmulhrsw m5, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 + 12 * 16] ; [28]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pmaddubsw m6, m3, [r4 - 5 * 16] ; [11]<br>
+ pmulhrsw m6, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m0, m3, [r4 + 10 * 16] ; [26]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m6, m0<br>
+<br>
+ pmaddubsw m1, m3, [r4 - 7 * 16] ; [09]<br>
+ pmulhrsw m1, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m0, m3, [r4 + 8 * 16] ; [24]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m1, m0<br>
+<br>
+ TRANSPOSE_STORE_8x8 0, 0, m4, m5, m6, m1<br>
+<br>
+ pmaddubsw m4, m3, [r4 - 9 * 16] ; [07]<br>
+ pmulhrsw m4, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m5, m3, [r4 + 6 * 16] ; [22]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ pmaddubsw m5, m3, [r4 - 11 * 16] ; [05]<br>
+ pmulhrsw m5, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 + 4 * 16] ; [20]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pmaddubsw m6, m3, [r4 - 13 * 16] ; [03]<br>
+ pmulhrsw m6, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m1, m3, [r4 + 2 * 16] ; [18]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m6, m1<br>
+<br>
+ pmaddubsw m1, m3, [r4 - 15 * 16] ; [01]<br>
+ pmulhrsw m1, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m3, [r4] ; [16]<br>
+ pmulhrsw m3, m7<br>
+ packuswb m1, m3<br>
+<br>
+ TRANSPOSE_STORE_8x8 1, 0, m4, m5, m6, m1<br>
+<br>
+ RET<br>
+<br>
+INIT_XMM sse4<br>
+cglobal intra_pred_ang16_16, 4,7,8<br>
+<br>
+ lea r4, [ang_table + 16 * 16]<br>
+ lea r5, [r1 * 3] ; r5 -> 3 * stride<br>
+ lea r6, [r0 + r1 * 4] ; r6 -> 4 * stride<br>
+ mova m7, [pw_1024]<br>
+<br>
+ movu m3, [r2] ; [15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0]<br>
+ punpckhbw m4, m3, m3 ; [15 15 14 14 13 13 12 12 11 11 10 10 9 9 8 8]<br>
+ punpcklbw m3, m3 ; [7 7 6 6 5 5 4 4 3 3 2 2 1 1 0 0]<br>
+ movu m2, [r3]<br>
+ pshufb m2, [c_mode16_16] ; [2, 3, 5, 6, 8, 9, 11, 12, 14, 15, 0, 2, 3, 5, 6, 8]<br>
+ palignr m4, m3, 1 ; [8 7 7 6 6 5 5 4 4 3 3 2 2 1 1 0]<br>
+<br>
+ pmaddubsw m4, [r4 - 5 * 16] ; [11]<br>
+ pmulhrsw m4, m7<br>
+<br>
+ palignr m3, m2, 15<br>
+<br>
+ pmaddubsw m5, m3, [r4 + 6 * 16] ; [22]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ pmaddubsw m5, m3, [r4 - 15 * 16] ; [01]<br>
+ pmulhrsw m5, m7<br>
+<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 - 4 * 16] ; [12]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pslldq m2, 1 ; [3, 5, 6, 8, 9, 11, 12, 14, 15, 0, 2, 3, 5, 6, 8, x]<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 + 7 * 16] ; [23]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m0, m3, [r4 - 14 * 16] ; [02]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m6, m0<br>
+<br>
+ pslldq m2, 1 ; [5, 6, 8, 9, 11, 12, 14, 15, 0, 2, 3, 5, 6, 8, x, x]<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m1, m3, [r4 - 3 * 16] ; [13]<br>
+ pmulhrsw m1, m7<br>
+<br>
+ pslldq m2, 1 ; [6, 8, 9, 11, 12, 14, 15, 0, 2, 3, 5, 6, 8, x, x, x]<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m0, m3, [r4 + 8 * 16] ; [24]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m1, m0<br>
+<br>
+ TRANSPOSE_STORE_8x8 0, 1, m4, m5, m6, m1<br>
+<br>
+ pmaddubsw m4, m3, [r4 - 13 * 16] ; [03]<br>
+ pmulhrsw m4, m7<br>
+<br>
+ pslldq m2, 1 ; [8, 9, 11, 12, 14, 15, 0, 2, 3, 5, 6, 8, x, x, x, x]<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m5, m3, [r4 - 2 * 16] ; [14]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ pslldq m2, 1 ; [9, 11, 12, 14, 15, 0, 2, 3, 5, 6, 8, x, x, x, x, x]<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m5, m3, [r4 + 9 * 16] ; [25]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m6, m3, [r4 - 12 * 16] ; [04]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pslldq m2, 1 ; [11, 12, 14, 15, 0, 2, 3, 5, 6, 8, x, x, x, x, x, x]<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 - 16] ; [15]<br>
+ pmulhrsw m6, m7<br>
+<br>
+ pslldq m2, 1 ; [12, 14, 15, 0, 2, 3, 5, 6, 8, x, x, x, x, x, x, x]<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m1, m3, [r4 + 10 * 16] ; [26]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m6, m1<br>
+<br>
+ pmaddubsw m1, m3, [r4 - 11 * 16] ; [05]<br>
+ pmulhrsw m1, m7<br>
+<br>
+ pslldq m2, 1 ; [14, 15, 0, 2, 3, 5, 6, 8, x, x, x, x, x, x, x, x]<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m3, [r4] ; [16]<br>
+ pmulhrsw m3, m7<br>
+ packuswb m1, m3<br>
+<br>
+ TRANSPOSE_STORE_8x8 1, 1, m4, m5, m6, m1<br>
+<br>
+ lea r0, [r6 + r1 * 4]<br>
+ lea r6, [r6 + r1 * 8]<br>
+<br>
+ movu m1, [r2 + 1] ; [16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1]<br>
+ pslldq m3, m1, 1 ; [15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 x]<br>
+ punpckhbw m3, m1 ; [16 15 15 14 14 13 13 12 12 11 11 10 10 9 9 8]<br>
+ palignr m2, m2, 6 ; [x, x, x, x, x, x, 14, 15, 0, 2, 3, 5, 6, 8, x, x]<br>
+ movlhps m2, m1 ; [8 7 6 5 4 3 2 1 0, 2, 3, 5, 6, 8, x, x]<br>
+<br>
+ pmaddubsw m4, m3, [r4 - 5 * 16] ; [11]<br>
+ pmulhrsw m4, m7<br>
+<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m5, m3, [r4 + 6 * 16] ; [22]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ pmaddubsw m5, m3, [r4 - 15 * 16] ; [01]<br>
+ pmulhrsw m5, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 - 4 * 16] ; [12]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 + 7 * 16] ; [23]<br>
+ pmulhrsw m6, m7<br>
+<br>
+ pmaddubsw m0, m3, [r4 - 14 * 16] ; [02]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m6, m0<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m1, m3, [r4 - 3 * 16] ; [13]<br>
+ pmulhrsw m1, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m0, m3, [r4 + 8 * 16] ; [24]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m1, m0<br>
+<br>
+ TRANSPOSE_STORE_8x8 0, 1, m4, m5, m6, m1<br>
+<br>
+ pmaddubsw m4, m3, [r4 - 13 * 16] ; [03]<br>
+ pmulhrsw m4, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m5, m3, [r4 - 2 * 16] ; [14]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m5, m3, [r4 + 9 * 16] ; [25]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m6, m3, [r4 - 12 * 16] ; [04]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 - 16] ; [15]<br>
+ pmulhrsw m6, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m1, m3, [r4 + 10 * 16] ; [26]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m6, m1<br>
+<br>
+ pmaddubsw m1, m3, [r4 - 11 * 16] ; [05]<br>
+ pmulhrsw m1, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m3, [r4] ; [16]<br>
+ pmulhrsw m3, m7<br>
+ packuswb m1, m3<br>
+<br>
+ TRANSPOSE_STORE_8x8 1, 1, m4, m5, m6, m1<br>
+<br>
+ RET<br>
+<br>
+INIT_XMM sse4<br>
+cglobal intra_pred_ang16_20, 4,7,8<br>
+<br>
+ lea r4, [ang_table + 16 * 16]<br>
+ lea r5, [r1 * 3] ; r5 -> 3 * stride<br>
+ mov r6, r0<br>
+ mova m7, [pw_1024]<br>
+<br>
+ movu m3, [r3] ; [15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0]<br>
+ punpckhbw m4, m3, m3 ; [15 15 14 14 13 13 12 12 11 11 10 10 9 9 8 8]<br>
+ punpcklbw m3, m3 ; [7 7 6 6 5 5 4 4 3 3 2 2 1 1 0 0]<br>
+ movu m2, [r2]<br>
+ pshufb m2, [c_mode16_16] ; [2, 3, 5, 6, 8, 9, 11, 12, 14, 15, 0, 2, 3, 5, 6, 8]<br>
+ palignr m4, m3, 1 ; [8 7 7 6 6 5 5 4 4 3 3 2 2 1 1 0]<br>
+<br>
+ pmaddubsw m4, [r4 - 5 * 16] ; [11]<br>
+ pmulhrsw m4, m7<br>
+<br>
+ palignr m3, m2, 15<br>
+<br>
+ pmaddubsw m5, m3, [r4 + 6 * 16] ; [22]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ pmaddubsw m5, m3, [r4 - 15 * 16] ; [01]<br>
+ pmulhrsw m5, m7<br>
+<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 - 4 * 16] ; [12]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pslldq m2, 1 ; [3, 5, 6, 8, 9, 11, 12, 14, 15, 0, 2, 3, 5, 6, 8, x]<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 + 7 * 16] ; [23]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m0, m3, [r4 - 14 * 16] ; [02]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m6, m0<br>
+<br>
+ pslldq m2, 1 ; [5, 6, 8, 9, 11, 12, 14, 15, 0, 2, 3, 5, 6, 8, x, x]<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m1, m3, [r4 - 3 * 16] ; [13]<br>
+ pmulhrsw m1, m7<br>
+<br>
+ pslldq m2, 1 ; [6, 8, 9, 11, 12, 14, 15, 0, 2, 3, 5, 6, 8, x, x, x]<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m0, m3, [r4 + 8 * 16] ; [24]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m1, m0<br>
+<br>
+ TRANSPOSE_STORE_8x8 0, 0, m4, m5, m6, m1<br>
+<br>
+ pmaddubsw m4, m3, [r4 - 13 * 16] ; [03]<br>
+ pmulhrsw m4, m7<br>
+<br>
+ pslldq m2, 1 ; [8, 9, 11, 12, 14, 15, 0, 2, 3, 5, 6, 8, x, x, x, x]<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m5, m3, [r4 - 2 * 16] ; [14]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ pslldq m2, 1 ; [9, 11, 12, 14, 15, 0, 2, 3, 5, 6, 8, x, x, x, x, x]<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m5, m3, [r4 + 9 * 16] ; [25]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m6, m3, [r4 - 12 * 16] ; [04]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pslldq m2, 1 ; [11, 12, 14, 15, 0, 2, 3, 5, 6, 8, x, x, x, x, x, x]<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 - 16] ; [15]<br>
+ pmulhrsw m6, m7<br>
+<br>
+ pslldq m2, 1 ; [12, 14, 15, 0, 2, 3, 5, 6, 8, x, x, x, x, x, x, x]<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m1, m3, [r4 + 10 * 16] ; [26]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m6, m1<br>
+<br>
+ pmaddubsw m1, m3, [r4 - 11 * 16] ; [05]<br>
+ pmulhrsw m1, m7<br>
+<br>
+ pslldq m2, 1 ; [14, 15, 0, 2, 3, 5, 6, 8, x, x, x, x, x, x, x, x]<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m3, [r4] ; [16]<br>
+ pmulhrsw m3, m7<br>
+ packuswb m1, m3<br>
+<br>
+ TRANSPOSE_STORE_8x8 1, 0, m4, m5, m6, m1<br>
+<br>
+ lea r0, [r6 + 8]<br>
+<br>
+ movu m1, [r3 + 1] ; [16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1]<br>
+ pslldq m3, m1, 1 ; [15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 x]<br>
+ punpckhbw m3, m1 ; [16 15 15 14 14 13 13 12 12 11 11 10 10 9 9 8]<br>
+ palignr m2, m2, 6 ; [x, x, x, x, x, x, 14, 15, 0, 2, 3, 5, 6, 8, x, x]<br>
+ movlhps m2, m1 ; [8 7 6 5 4 3 2 1 0, 2, 3, 5, 6, 8, x, x]<br>
+<br>
+ pmaddubsw m4, m3, [r4 - 5 * 16] ; [11]<br>
+ pmulhrsw m4, m7<br>
+<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m5, m3, [r4 + 6 * 16] ; [22]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ pmaddubsw m5, m3, [r4 - 15 * 16] ; [01]<br>
+ pmulhrsw m5, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 - 4 * 16] ; [12]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 + 7 * 16] ; [23]<br>
+ pmulhrsw m6, m7<br>
+<br>
+ pmaddubsw m0, m3, [r4 - 14 * 16] ; [02]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m6, m0<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m1, m3, [r4 - 3 * 16] ; [13]<br>
+ pmulhrsw m1, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m0, m3, [r4 + 8 * 16] ; [24]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m1, m0<br>
+<br>
+ TRANSPOSE_STORE_8x8 0, 0, m4, m5, m6, m1<br>
+<br>
+ pmaddubsw m4, m3, [r4 - 13 * 16] ; [03]<br>
+ pmulhrsw m4, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m5, m3, [r4 - 2 * 16] ; [14]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m5, m3, [r4 + 9 * 16] ; [25]<br>
+ pmulhrsw m5, m7<br>
+ pmaddubsw m6, m3, [r4 - 12 * 16] ; [04]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 - 16] ; [15]<br>
+ pmulhrsw m6, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m1, m3, [r4 + 10 * 16] ; [26]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m6, m1<br>
+<br>
+ pmaddubsw m1, m3, [r4 - 11 * 16] ; [05]<br>
+ pmulhrsw m1, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m3, [r4] ; [16]<br>
+ pmulhrsw m3, m7<br>
+ packuswb m1, m3<br>
+<br>
+ TRANSPOSE_STORE_8x8 1, 0, m4, m5, m6, m1<br>
+<br>
+ RET<br>
+<br>
+INIT_XMM sse4<br>
+cglobal intra_pred_ang16_17, 4,7,8<br>
+<br>
+ lea r4, [ang_table + 16 * 16]<br>
+ lea r5, [r1 * 3] ; r5 -> 3 * stride<br>
+ lea r6, [r0 + r1 * 4] ; r6 -> 4 * stride<br>
+ mova m7, [pw_1024]<br>
+<br>
+ movu m3, [r2] ; [15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0]<br>
+ punpckhbw m4, m3, m3 ; [15 15 14 14 13 13 12 12 11 11 10 10 9 9 8 8]<br>
+ punpcklbw m3, m3 ; [7 7 6 6 5 5 4 4 3 3 2 2 1 1 0 0]<br>
+ movu m2, [r3]<br>
+ pshufb m2, [c_mode16_17] ; [1, 2, 4, 5, 6, 7, 9, 10, 11, 12, 14, 15, 0, 1, 2, 4]<br>
+ palignr m4, m3, 1 ; [8 7 7 6 6 5 5 4 4 3 3 2 2 1 1 0]<br>
+<br>
+ pmaddubsw m4, [r4 - 10 * 16] ; [06]<br>
+ pmulhrsw m4, m7<br>
+<br>
+ palignr m3, m2, 15<br>
+<br>
+ pmaddubsw m5, m3, [r4 - 4 * 16] ; [12]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m5, m3, [r4 + 2 * 16] ; [18]<br>
+ pmulhrsw m5, m7<br>
+<br>
+ pslldq m2, 1 ; [2, 4, 5, 6, 7, 9, 10, 11, 12, 14, 15, 0, 1, 2, 4, x]<br>
+ pinsrb m2, [r3 + 5], 0 ; [2, 4, 5, 6, 7, 9, 10, 11, 12, 14, 15, 0, 1, 2, 4, 5]<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 + 8 * 16] ; [24]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pslldq m2, 1 ; [4, 5, 6, 7, 9, 10, 11, 12, 14, 15, 0, 1, 2, 4, 5, x]<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 + 14 * 16] ; [30]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m0, m3, [r4 - 12 * 16] ; [04]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m6, m0<br>
+<br>
+ pslldq m2, 1 ; [5, 6, 7, 9, 10, 11, 12, 14, 15, 0, 1, 2, 4, 5, x, x]<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m1, m3, [r4 - 6 * 16] ; [10]<br>
+ pmulhrsw m1, m7<br>
+<br>
+ pslldq m2, 1 ; [6, 7, 9, 10, 11, 12, 14, 15, 0, 1, 2, 4, 5, x, x, x]<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m0, m3, [r4] ; [16]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m1, m0<br>
+<br>
+ TRANSPOSE_STORE_8x8 0, 1, m4, m5, m6, m1<br>
+<br>
+ pslldq m2, 1 ; [7, 9, 10, 11, 12, 14, 15, 0, 1, 2, 4, 5, x, x, x, x]<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m4, m3, [r4 + 6 * 16] ; [22]<br>
+ pmulhrsw m4, m7<br>
+<br>
+ pslldq m2, 1 ; [9, 10, 11, 12, 14, 15, 0, 1, 2, 4, 5, x, x, x, x, x]<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m5, m3, [r4 + 12 * 16] ; [28]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ pmaddubsw m5, m3, [r4 - 14 * 16] ; [02]<br>
+ pmulhrsw m5, m7<br>
+<br>
+ pslldq m2, 1 ; [10, 11, 12, 14, 15, 0, 1, 2, 4, 5, x, x, x, x, x, x]<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 - 8 * 16] ; [08]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pslldq m2, 1 ; [11, 12, 14, 15, 0, 1, 2, 4, 5, x, x, x, x, x, x, x]<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 - 2 * 16] ; [14]<br>
+ pmulhrsw m6, m7<br>
+<br>
+ pslldq m2, 1 ; [12, 14, 15, 0, 1, 2, 4, 5, x, x, x, x, x, x, x, x]<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m1, m3, [r4 + 4 * 16] ; [20]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m6, m1<br>
+<br>
+ pslldq m2, 1 ; [14, 15, 0, 1, 2, 4, 5, x, x, x, x, x, x, x, x, x]<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m1, m3, [r4 + 10 * 16] ; [26]<br>
+ pmulhrsw m1, m7<br>
+ pmaddubsw m3, [r4 - 16 * 16] ; [00]<br>
+ pmulhrsw m3, m7<br>
+ packuswb m1, m3<br>
+<br>
+ TRANSPOSE_STORE_8x8 1, 1, m4, m5, m6, m1<br>
+<br>
+ lea r0, [r6 + r1 * 4]<br>
+ lea r6, [r6 + r1 * 8]<br>
+<br>
+ movu m1, [r2 + 1] ; [16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1]<br>
+ pslldq m3, m1, 1 ; [15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 x]<br>
+ punpckhbw m3, m1 ; [16 15 15 14 14 13 13 12 12 11 11 10 10 9 9 8]<br>
+ palignr m2, m2, 6 ; [x, x, x, x, x, x, 14, 15, 0, 1, 2, 4, 5, x, x, x]<br>
+ movlhps m2, m1 ; [8 7 6 5 4 3 2 1 0, 1, 2, 4, 5, x, x, x]<br>
+<br>
+ pmaddubsw m4, m3, [r4 - 10 * 16] ; [06]<br>
+ pmulhrsw m4, m7<br>
+<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m5, m3, [r4 - 4 * 16] ; [12]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m5, m3, [r4 + 2 * 16] ; [18]<br>
+ pmulhrsw m5, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 + 8 * 16] ; [24]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 + 14 * 16] ; [30]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m0, m3, [r4 - 12 * 16] ; [04]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m6, m0<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m1, m3, [r4 - 6 * 16] ; [10]<br>
+ pmulhrsw m1, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m0, m3, [r4] ; [16]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m1, m0<br>
+<br>
+ TRANSPOSE_STORE_8x8 0, 1, m4, m5, m6, m1<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m4, m3, [r4 + 6 * 16] ; [22]<br>
+ pmulhrsw m4, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m5, m3, [r4 + 12 * 16] ; [28]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ pmaddubsw m5, m3, [r4 - 14 * 16] ; [02]<br>
+ pmulhrsw m5, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 - 8 * 16] ; [08]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 - 2 * 16] ; [14]<br>
+ pmulhrsw m6, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m1, m3, [r4 + 4 * 16] ; [20]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m6, m1<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m1, m3, [r4 + 10 * 16] ; [26]<br>
+ pmulhrsw m1, m7<br>
+ pmaddubsw m3, [r4 - 16 * 16] ; [00]<br>
+ pmulhrsw m3, m7<br>
+ packuswb m1, m3<br>
+<br>
+ TRANSPOSE_STORE_8x8 1, 1, m4, m5, m6, m1<br>
+<br>
+ RET<br>
+<br>
+INIT_XMM sse4<br>
+cglobal intra_pred_ang16_19, 4,7,8<br>
+<br>
+ lea r4, [ang_table + 16 * 16]<br>
+ lea r5, [r1 * 3] ; r5 -> 3 * stride<br>
+ mov r6, r0<br>
+ mova m7, [pw_1024]<br>
+<br>
+ movu m3, [r3] ; [15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0]<br>
+ punpckhbw m4, m3, m3 ; [15 15 14 14 13 13 12 12 11 11 10 10 9 9 8 8]<br>
+ punpcklbw m3, m3 ; [7 7 6 6 5 5 4 4 3 3 2 2 1 1 0 0]<br>
+ movu m2, [r2]<br>
+ pshufb m2, [c_mode16_17] ; [1, 2, 4, 5, 6, 7, 9, 10, 11, 12, 14, 15, 0, 1, 2, 4]<br>
+ palignr m4, m3, 1 ; [8 7 7 6 6 5 5 4 4 3 3 2 2 1 1 0]<br>
+<br>
+ pmaddubsw m4, [r4 - 10 * 16] ; [06]<br>
+ pmulhrsw m4, m7<br>
+<br>
+ palignr m3, m2, 15<br>
+<br>
+ pmaddubsw m5, m3, [r4 - 4 * 16] ; [12]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m5, m3, [r4 + 2 * 16] ; [18]<br>
+ pmulhrsw m5, m7<br>
+<br>
+ pslldq m2, 1 ; [2, 4, 5, 6, 7, 9, 10, 11, 12, 14, 15, 0, 1, 2, 4, x]<br>
+ pinsrb m2, [r2 + 5], 0 ; [2, 4, 5, 6, 7, 9, 10, 11, 12, 14, 15, 0, 1, 2, 4, 5]<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 + 8 * 16] ; [24]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pslldq m2, 1 ; [4, 5, 6, 7, 9, 10, 11, 12, 14, 15, 0, 1, 2, 4, 5, x]<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 + 14 * 16] ; [30]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m0, m3, [r4 - 12 * 16] ; [04]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m6, m0<br>
+<br>
+ pslldq m2, 1 ; [5, 6, 7, 9, 10, 11, 12, 14, 15, 0, 1, 2, 4, 5, x, x]<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m1, m3, [r4 - 6 * 16] ; [10]<br>
+ pmulhrsw m1, m7<br>
+<br>
+ pslldq m2, 1 ; [6, 7, 9, 10, 11, 12, 14, 15, 0, 1, 2, 4, 5, x, x, x]<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m0, m3, [r4] ; [16]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m1, m0<br>
+<br>
+ TRANSPOSE_STORE_8x8 0, 0, m4, m5, m6, m1<br>
+<br>
+ pslldq m2, 1 ; [7, 9, 10, 11, 12, 14, 15, 0, 1, 2, 4, 5, x, x, x, x]<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m4, m3, [r4 + 6 * 16] ; [22]<br>
+ pmulhrsw m4, m7<br>
+<br>
+ pslldq m2, 1 ; [9, 10, 11, 12, 14, 15, 0, 1, 2, 4, 5, x, x, x, x, x]<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m5, m3, [r4 + 12 * 16] ; [28]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ pmaddubsw m5, m3, [r4 - 14 * 16] ; [02]<br>
+ pmulhrsw m5, m7<br>
+<br>
+ pslldq m2, 1 ; [10, 11, 12, 14, 15, 0, 1, 2, 4, 5, x, x, x, x, x, x]<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 - 8 * 16] ; [08]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pslldq m2, 1 ; [11, 12, 14, 15, 0, 1, 2, 4, 5, x, x, x, x, x, x, x]<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 - 2 * 16] ; [14]<br>
+ pmulhrsw m6, m7<br>
+<br>
+ pslldq m2, 1 ; [12, 14, 15, 0, 1, 2, 4, 5, x, x, x, x, x, x, x, x]<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m1, m3, [r4 + 4 * 16] ; [20]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m6, m1<br>
+<br>
+ pslldq m2, 1 ; [14, 15, 0, 1, 2, 4, 5, x, x, x, x, x, x, x, x, x]<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m1, m3, [r4 + 10 * 16] ; [26]<br>
+ pmulhrsw m1, m7<br>
+ pmaddubsw m3, [r4 - 16 * 16] ; [00]<br>
+ pmulhrsw m3, m7<br>
+ packuswb m1, m3<br>
+<br>
+ TRANSPOSE_STORE_8x8 1, 0, m4, m5, m6, m1<br>
+<br>
+ lea r0, [r6 + 8]<br>
+<br>
+ movu m1, [r3 + 1] ; [16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1]<br>
+ pslldq m3, m1, 1 ; [15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 x]<br>
+ punpckhbw m3, m1 ; [16 15 15 14 14 13 13 12 12 11 11 10 10 9 9 8]<br>
+ palignr m2, m2, 6 ; [x, x, x, x, x, 14, 15, 0, 1, 2, 4, 5, x, x, x]<br>
+ movlhps m2, m1 ; [8 7 6 5 4 3 2 1 0, 2, 3, 5, 6, 8, x, x]<br>
+<br>
+ pmaddubsw m4, m3, [r4 - 10 * 16] ; [06]<br>
+ pmulhrsw m4, m7<br>
+<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m5, m3, [r4 - 4 * 16] ; [12]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m5, m3, [r4 + 2 * 16] ; [18]<br>
+ pmulhrsw m5, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 + 8 * 16] ; [24]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 + 14 * 16] ; [30]<br>
+ pmulhrsw m6, m7<br>
+ pmaddubsw m0, m3, [r4 - 12 * 16] ; [04]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m6, m0<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m1, m3, [r4 - 6 * 16] ; [10]<br>
+ pmulhrsw m1, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m0, m3, [r4] ; [16]<br>
+ pmulhrsw m0, m7<br>
+ packuswb m1, m0<br>
+<br>
+ TRANSPOSE_STORE_8x8 0, 0, m4, m5, m6, m1<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m4, m3, [r4 + 6 * 16] ; [22]<br>
+ pmulhrsw m4, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m5, m3, [r4 + 12 * 16] ; [28]<br>
+ pmulhrsw m5, m7<br>
+ packuswb m4, m5<br>
+<br>
+ pmaddubsw m5, m3, [r4 - 14 * 16] ; [02]<br>
+ pmulhrsw m5, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 - 8 * 16] ; [08]<br>
+ pmulhrsw m6, m7<br>
+ packuswb m5, m6<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m6, m3, [r4 - 2 * 16] ; [14]<br>
+ pmulhrsw m6, m7<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m1, m3, [r4 + 4 * 16] ; [20]<br>
+ pmulhrsw m1, m7<br>
+ packuswb m6, m1<br>
+<br>
+ pslldq m2, 1<br>
+ palignr m3, m2, 14<br>
+<br>
+ pmaddubsw m1, m3, [r4 + 10 * 16] ; [26]<br>
+ pmulhrsw m1, m7<br>
+ pmaddubsw m3, [r4 - 16 * 16] ; [00]<br>
+ pmulhrsw m3, m7<br>
+ packuswb m1, m3<br>
+<br>
+ TRANSPOSE_STORE_8x8 1, 0, m4, m5, m6, m1<br>
+<br>
+ RET<br>
+<br>
+INIT_XMM sse4<br>
+cglobal intra_pred_ang16_18, 4,5,3<br>
+<br>
+ movu m0, [r3]<br>
+ movu m1, [r2]<br>
+ mova m2, [c_mode16_18]<br>
+ pshufb m1, m2<br>
+<br>
+ lea r2, [r1 * 2]<br>
+ lea r3, [r1 * 3]<br>
+ lea r4, [r1 * 4]<br>
+ movu [r0], m0<br>
+ palignr m2, m0, m1, 15<br>
+ movu [r0 + r1], m2<br>
+ palignr m2, m0, m1, 14<br>
+ movu [r0 + r2], m2<br>
+ palignr m2, m0, m1, 13<br>
+ movu [r0 + r3], m2<br>
+ lea r0, [r0 + r4]<br>
+ palignr m2, m0, m1, 12<br>
+ movu [r0], m2<br>
+ palignr m2, m0, m1, 11<br>
+ movu [r0 + r1], m2<br>
+ palignr m2, m0, m1, 10<br>
+ movu [r0 + r2], m2<br>
+ palignr m2, m0, m1, 9<br>
+ movu [r0 + r3], m2<br>
+ lea r0, [r0 + r4]<br>
+ palignr m2, m0, m1, 8<br>
+ movu [r0], m2<br>
+ palignr m2, m0, m1, 7<br>
+ movu [r0 + r1], m2<br>
+ palignr m2, m0, m1, 6<br>
+ movu [r0 + r2], m2<br>
+ palignr m2, m0, m1, 5<br>
+ movu [r0 + r3], m2<br>
+ lea r0, [r0 + r4]<br>
+ palignr m2, m0, m1, 4<br>
+ movu [r0], m2<br>
+ palignr m2, m0, m1, 3<br>
+ movu [r0 + r1], m2<br>
+ palignr m2, m0, m1, 2<br>
+ movu [r0 + r2], m2<br>
+ palignr m2, m0, m1, 1<br>
+ movu [r0 + r3], m2<br>
+ RET<br>
+<br>
;---------------------------------------------------------------------------------------------------------------<br>
; void intraPredAng32(pixel* dst, intptr_t dstStride, pixel *refLeft, pixel *refAbove, int dirMode, int bFilter)<br>
;---------------------------------------------------------------------------------------------------------------<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">With Regards,<div><br></div><div>Murugan. V</div><div>+919659287478</div></div>
</div>