<div dir="ltr">ohh... It will be <font face="arial, sans-serif" style="font-family:arial,sans-serif;font-size:12.727272033691406px"> </font><span style="font-family:arial,sans-serif;font-size:12.727272033691406px">mova coef2, [tab_coeff + coeffIdx * 16]. </span></div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Oct 11, 2013 at 11:21 PM, Praveen Tiwari <span dir="ltr"><<a href="mailto:praveen@multicorewareinc.com" target="_blank">praveen@multicorewareinc.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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-family:arial,sans-serif;font-size:12.727272033691406px">mova coef2, [tab_coeff + height * 16]. Please Ignore this.</span><div>
<span style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:12.727272033691406px">Regards,</span></div><div><span style="font-family:arial,sans-serif;font-size:12.727272033691406px">Praveen</span></div>
</div><div class="HOEnZb"><div class="h5"><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="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"># 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, dststrideq<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 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 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>
</div></div></blockquote></div><br></div>