<div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial"><DIV>I think x86 scale factor is less than or equal to 8, so your instruction <FONT size="2">[tab_coeff + height * 16] is invalid.</FONT></DIV>
<DIV><FONT size="2"></FONT> </DIV>
<DIV><FONT size="2">we can replace by below</FONT></DIV>
<DIV><FONT size="2">movq x, [tab_coeff + height * 8] </FONT></DIV>
<DIV><FONT size="2">punpcklqdq x, x (or pshufd x, 01000100b it faster on some kind of CPU)</FONT><BR></DIV>At 2013-10-12 01:51:57,"Praveen Tiwari" <praveen@multicorewareinc.com> wrote:<BR>
<BLOCKQUOTE id="isReplyContent" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<DIV dir="ltr">I have just missed to change the line <FONT face="arial, sans-serif"> mova coef2, [tab_coeff + 16] (I was just testing for coeffIdex 1 ) I will make it for random like </FONT><SPAN style="FONT-SIZE: 12px; FONT-FAMILY: arial,sans-serif">mova coef2, [tab_coeff + height * 16]. Please Ignore this.</SPAN>
<DIV><SPAN style="FONT-SIZE: 12px; FONT-FAMILY: arial,sans-serif"><BR></SPAN></DIV>
<DIV><SPAN style="FONT-SIZE: 12px; FONT-FAMILY: arial,sans-serif">Regards,</SPAN></DIV>
<DIV><SPAN style="FONT-SIZE: 12px; FONT-FAMILY: arial,sans-serif">Praveen</SPAN></DIV></DIV>
<DIV class="gmail_extra"><BR><BR>
<DIV class="gmail_quote">On Fri, Oct 11, 2013 at 10:20 PM, <SPAN dir="ltr"><<A href="mailto:praveen@multicorewareinc.com" target="_blank">praveen@multicorewareinc.com</A>></SPAN> wrote:<BR>
<BLOCKQUOTE class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"># HG changeset patch<BR># User Praveen Tiwari<BR># Date 1381510220 -19800<BR># Node ID 5a9160e8b0bdc3117c2417bc29453077488efd8e<BR># Parent c6d89dc62e191f56f63dbcb1781a6494da50a70d<BR>chroma 4XN block, coeffIdex insted of coeff pointer<BR><BR>diff -r c6d89dc62e19 -r 5a9160e8b0bd source/common/x86/ipfilter8.asm<BR>--- a/source/common/x86/ipfilter8.asm Fri Oct 11 01:47:53 2013 -0500<BR>+++ b/source/common/x86/ipfilter8.asm Fri Oct 11 22:20:20 2013 +0530<BR>@@ -26,107 +26,58 @@<BR> %include "x86inc.asm"<BR> %include "x86util.asm"<BR><BR>-%if ARCH_X86_64 == 0<BR>-<BR> SECTION_RODATA 32<BR>-tab_leftmask: db -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0<BR>-<BR> tab_Tm: db 0, 1, 2, 3, 1, 2, 3, 4, 2, 3, 4, 5, 3, 4, 5, 6<BR>- db 4, 5, 6, 7, 5, 6, 7, 8, 6, 7, 8, 9, 7, 8, 9
, 10<BR><BR> tab_c_512: times 8 dw 512<BR><BR>+tab_coeff: db 0, 64, 0, 0, 0, 64, 0, 0, 0, 64, 0, 0, 0, 64, 0, 0<BR>+ db -2, 58, 10, -2, -2, 58, 10, -2, -2, 58, 10, -2, -2, 58, 10, -2<BR>+ db -4, 54, 16, -2, -4, 54, 16, -2, -4, 54, 16, -2, -4, 54, 16, -2<BR>+ db -6, 46, 28, -4, -6, 46, 28, -4, -6, 46, 28, -4, -6, 46, 28, -4<BR>+ db -4, 36, 36, -4, -4, 36, 36, -4, -4, 36, 36, -4, -4, 36, 36, -4<BR>+ db -4, 28, 46, -6, -4, 28, 46, -6, -4, 28, 46, -6, -4, 28, 46, -6<BR>+ db -2, 16, 54, -4, -2, 16, 54, -4, -2, 16, 54, -4, -2, 16, 54, -4<BR>+ db -2, 10, 58, -2, -2, 10, 58, -2, -2, 10, 58, -2, -2, 10, 58, -2<BR>+<BR> SECTION
.text<BR><BR>-%macro FILTER_H4 3<BR>- movu %1, [src + col - 1]<BR>- pshufb %2, %1, Tm4<BR>+%macro FILTER_H4_w4 3<BR>+ movu %1, [srcq - 1]<BR>+ pshufb %2, %1, Tm0<BR> pmaddubsw %2, coef2<BR>- pshufb %1, %1, Tm5<BR>- pmaddubsw %1, coef2<BR> phaddw %2, %1<BR> pmulhrsw %2, %3<BR> packuswb %2, %2<BR> %endmacro<BR><BR>+%macro FILTER_H4_w4_CALL 0<BR>+ FILTER_H4_w4 x0, x1, x2<BR>+<BR>+ movd [dstq], x1<BR>+<BR>+ add srcq, srcstrideq<BR>+ add dstq, dstst
rideq<BR>+%endmacro<BR>+<BR> ;-----------------------------------------------------------------------------<BR>-; void filterHorizontal_p_p_4(pixel *src, intptr_t srcStride, pixel *dst, intptr_t dstStride, int width, int height, short const *coeff)<BR>+; void interp_4tap_horiz_pp_w4(pixel *src, intptr_t srcStride, pixel *dst, intptr_t dstStride, int height, int coeffIdx)<BR> ;-----------------------------------------------------------------------------<BR> INIT_XMM sse4<BR>-cglobal filterHorizontal_p_p_4, 0, 7, 8<BR>-%define src r0<BR>-%define dst r1<BR>-%define row r2<BR>-%define col r3<BR>-%define width r4<BR>-%define widthleft r5<BR>-%define mask_offset r6<BR>-%define coef2 m7<BR>-%define x3 m6<BR>-%define Tm5 m5<BR>-%define Tm4 &nb
sp; m4<BR>-%define x2 m3<BR>-%define x1 m2<BR>-%define x0 m1<BR>-%define leftmask m0<BR>-%define tmp r0<BR>-%define tmp1 r1<BR>-<BR>- mov tmp, r6m<BR>- movu coef2, [tmp]<BR>- packsswb coef2, coef2<BR>- pshufd coef2, coef2, 0<BR>+cglobal interp_4tap_horiz_pp_w4, 6, 6, 5, src, srcstride, dst, dststride, height, coeffIdx<BR>+%define coef2 m4<BR>+%define Tm0 m3<BR>+%define x2 m2<BR>+%define x1 m1<BR>+%define x0 m0<BR><BR>-
mova x3, [tab_c_512]<BR>+ mova coef2, [tab_coeff + 16]<BR>+ mova x2, [tab_c_512]<BR>+ mova Tm0, [tab_Tm]<BR><BR>- mov width, r4m<BR>- mov widthleft, width<BR>- and width, ~7<BR>- and widthleft, 7<BR>- mov mask_offset, widthleft<BR>- neg mask_offset<BR>+.loop<BR>+FILTER_H4_w4_CALL<BR>+dec r4d<BR>+jnz .loop<BR>+RET<BR><BR>- movq &nb
sp; leftmask, [tab_leftmask + (7 + mask_offset)]<BR>- mova Tm4, [tab_Tm]<BR>- mova Tm5, [tab_Tm + 16]<BR>-<BR>- mov src, r0m<BR>- mov dst, r2m<BR>- mov row, r5m<BR>-<BR>-_loop_row:<BR>- xor col, col<BR>-<BR>-_loop_col:<BR>- FILTER_H4 x0, x1, x3<BR>- movh [dst + col], x1<BR>-<BR>- add col, 8<BR>-<BR>- cmp col, width<BR>- jl _loop_col<BR>-<
BR>-_end_col:<BR>- test widthleft, widthleft<BR>- jz _next_row<BR>-<BR>- movq x2, [dst + col]<BR>- FILTER_H4 x0, x1, x3<BR>- pblendvb x2, x2, x1, leftmask<BR>- movh [dst + col], x2<BR>-<BR>-_next_row:<BR>- add src, r1m<BR>- add dst, r3m<BR>- dec row<BR>-<BR>- test row, row<BR>- jz _end_row<BR>-<BR>- jmp _loop_row<BR>-<BR>-_end_row:<BR>-<BR>- RET<BR>-<BR>-%endif ; ARCH_X86_64 == 0<BR></BLOCKQUOTE></DIV><BR></DIV></BLOCKQUOTE
></div>