<div dir="ltr">Hi<div><br></div><div>Thanks for clarifying the doubts BugMaster.</div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 14, 2016 at 11:21 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 Fri, 14 Oct 2016 10:11:16 +0530, Aishwarya wrote:<br>
> ...<br>
<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>
> 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>
> for( int x = 0; x < stride-8; x++ )<br>
> {<br>
> sum[x] = v + sum[x-stride];<br>
> v += pix[x+8] - pix[x];<br>
> }<br>
> }<br>
><br>
<br>
> <br>
> I agree that in init8h we need only till stride-8, as we keep<br>
> adding pix[x+8]. But that is not the case with init8v.<br>
> In init8v we are adding one pixel with a pixel which lies below a<br>
> few rows. So I think we can go till stride.<br>
> Please clarify.<br>
> <br>
<br>
</span>In init8v we use as source not the pix[] but sum[] which was result<br>
of init8h and which we filled only up to stride-8.<br>
<span class=""><br>
> Here what I mean is that while computing sum4, the loop should go<br>
> till stride, and while computing sum8, it should go till stride - 4<br>
> (since in sum8, sum8[x+4] is accessed).<br>
> <br>
<br>
</span>Same as above in init4v we use as source not pix[] but sum[] which was<br>
result of init4h and which we filled only up to stride-4. So it looks<br>
logical to use stide-4 for sum4 and stride-8 for sum8 (since in sum8,<br>
sum8[x+4] is accessed).<br>
<div class="HOEnZb"><div class="h5"><br>
______________________________<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>
</div></div></blockquote></div><br></div></div>