<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Oct 8, 2013 at 6:41 AM,  <span dir="ltr"><<a href="mailto:shazeb@multicorewareinc.com" target="_blank">shazeb@multicorewareinc.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"># HG changeset patch<br>
# User Shazeb Nawaz Khan <<a href="mailto:shazeb@multicorewareinc.com">shazeb@multicorewareinc.com</a>><br>
# Date 1381231599 -19800<br>
#      Tue Oct 08 16:56:39 2013 +0530<br>
# Node ID 18a5d7c3464d1a3fa98afa95a0fe7a8894bcd3d2<br>
# Parent  70e6c0cd3f961f89b53106da3da7a28aaaddd63b<br>
Check against numRows in applyweight<br>
<br>
applyWeight() processes rows a 'refLag' number of rows in advance as compared to the current iteration in compressCTURows()<br>
<br>
diff -r 70e6c0cd3f96 -r 18a5d7c3464d source/common/reference.cpp<br>
--- a/source/common/reference.cpp       Tue Oct 08 16:52:07 2013 +0530<br>
+++ b/source/common/reference.cpp       Tue Oct 08 16:56:39 2013 +0530<br>
@@ -91,6 +91,10 @@<br>
<br>
 void MotionReference::applyWeight(TComPic* ref, int rows, int numRows)<br>
 {<br>
+    if(rows >= numRows)</blockquote><div>white-space </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

+    {<br>
+        return;<br>
+    }<br></blockquote><div><br></div><div>I think a better check would be:</div><div><br></div><div><div>    rows = X265_MIN(rows, numRows-1);</div><div>    if (m_numWeightedRows >= rows)</div><div>        return;</div>
</div><div><br></div><div>Queued as such</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

     TComPicYuv* pic = ref->getPicYuvRec();<br></blockquote><div><br></div><div>is this pic any different from m_reconPic?</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

     int marginX = pic->m_lumaMarginX;<br>
     int marginY = pic->m_lumaMarginY;<br></blockquote></div><div><br></div>-- <br>Steve Borho
</div></div>