<div dir="ltr">Thanks for the response BugMaster.<div><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 14, 2016 at 3:18 AM, BugMaster <span dir="ltr"><<a href="mailto:BugMaster@narod.ru" target="_blank">BugMaster@narod.ru</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Thu, 13 Oct 2016 16:32:15 +0530, Aishwarya wrote:<br>
> Hi<br>
<br>
Hi<br>
<br>
> ...<br>
<span class=""><br>
> static void integral_init4v( uint16_t *sum8, uint16_t *sum4, intptr_t stride )<br>
> {<br>
> for( int x = 0; x < stride-8; x++ )<br>
> sum4[x] = sum8[x+4*stride] - sum8[x];<br>
> for( int x = 0; x < stride-8; x++ )<br>
> sum8[x] = sum8[x+8*stride] + sum8[x+8*stride+4] - sum8[x] - sum8[x+4];<br>
> }<br>
> To get sum4, why the loop is upto stride-8? If my understanding is<br>
> correct, loop had to be upto stride - 4.<br>
<br>
</span>I am not sure. stride - 4 really looks more correct to me also.<br></blockquote><div>Here what I mean is that while computing sum4, the loop should go till stride, and while computing sum8, it should go till stride - 4 (since in sum8, sum8[x+4] is accessed).</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class=""><br>
> static void integral_init8v( uint16_t *sum8, intptr_t stride )<br>
> {<br>
> for( int x = 0; x < stride-8; x++ )<br>
> sum8[x] = sum8[x+8*stride] - sum8[x];<br>
> }<br>
> In the above function why the loop is only upto stride - 8? As far<br>
> as I understood, since it is for vertical, loop could go well till stride.<br>
<br>
</span>Here stride - 8 is correct same as in integral_init4v for sum8 because<br>
in integral_init8h we calculate sum only up to stride - 8:<br>
<br>
static void integral_init8h( uint16_t *sum, pixel *pix, intptr_t stride )<br>
{<br>
int v = pix[0]+pix[1]+pix[2]+pix[3]+<wbr>pix[4]+pix[5]+pix[6]+pix[7];<br>
<span class=""> for( int x = 0; x < stride-8; x++ )<br>
</span> {<br>
sum[x] = v + sum[x-stride];<br>
v += pix[x+8] - pix[x];<br>
}<br>
}<br>
</blockquote><div> </div><div>I agree that in init8h we need only till stride-8, as we keep adding pix[x+8]. But that is not the case with init8v.</div><div>In init8v we are adding one pixel with a pixel which lies below a few rows. So I think we can go till stride.</div><div>Please clarify.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
______________________________<wbr>_________________<br>
x264-devel mailing list<br>
<a href="mailto:x264-devel@videolan.org">x264-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x264-devel" rel="noreferrer" target="_blank">https://mailman.videolan.org/<wbr>listinfo/x264-devel</a><br>
</blockquote></div><br></div></div></div>