<div dir="ltr">LGTM. Can be pushed to stable branch.</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 4, 2017 at 4:30 PM,  <span dir="ltr"><<a href="mailto:santhoshini@multicorewareinc.com" target="_blank">santhoshini@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 Santhoshini Sekar <<a href="mailto:santhoshini@multicorewareinc.com">santhoshini@multicorewareinc.<wbr>com</a>><br>
# Date 1512383899 -19800<br>
#      Mon Dec 04 16:08:19 2017 +0530<br>
# Node ID ee9a82d856a5f726bbca9380c3539e<wbr>70a8ab8913<br>
# Parent  c353f34a532c16b0db02fbba7b928b<wbr>71e9300996<br>
wait until the last row of recon is complete. Waiting on m_reconEncoded doesn't<br>
ensure full recon generation.<br>
<br>
diff --git a/source/encoder/encoder.cpp b/source/encoder/encoder.cpp<br>
--- a/source/encoder/encoder.cpp<br>
+++ b/source/encoder/encoder.cpp<br>
@@ -463,8 +463,8 @@<br>
                 {<br>
                     int l0POC = framePtr->m_encData->m_slice-><wbr>m_refFrameList[0][j]->m_poc;<br>
                     Frame* l0Fp = m_dpb->m_picList.getPOC(l0POC)<wbr>;<br>
-                    if (l0Fp->m_reconPic->m_picOrg[0] == NULL)<br>
-                        l0Fp->m_reconEncoded.wait(); /* If recon is not ready, current frame encoder need to wait. */<br>
+                    while (l0Fp->m_reconRowFlag[l0Fp->m_<wbr>numRows - 1].get() == 0)<br>
+                        l0Fp->m_reconRowFlag[l0Fp->m_<wbr>numRows - 1].waitForChange(0); /* If recon is not ready, current frame encoder has to wait. */<br>
                     l0[j] = l0Fp->m_reconPic;<br>
                 }<br>
             }<br>
@@ -474,8 +474,8 @@<br>
                 {<br>
                     int l1POC = framePtr->m_encData->m_slice-><wbr>m_refFrameList[1][j]->m_poc;<br>
                     Frame* l1Fp = m_dpb->m_picList.getPOC(l1POC)<wbr>;<br>
-                    if (l1Fp->m_reconPic->m_picOrg[0] == NULL)<br>
-                        l1Fp->m_reconEncoded.wait(); /* If recon is not ready, current frame encoder need to wait. */<br>
+                    while (l1Fp->m_reconRowFlag[l1Fp->m_<wbr>numRows - 1].get() == 0)<br>
+                        l1Fp->m_reconRowFlag[l1Fp->m_<wbr>numRows - 1].waitForChange(0); /* If recon is not ready, current frame encoder has to wait. */<br>
                     l1[j] = l1Fp->m_reconPic;<br>
                 }<br>
             }<br>
<br>______________________________<wbr>_________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" rel="noreferrer" target="_blank">https://mailman.videolan.org/<wbr>listinfo/x265-devel</a><br>
<br></blockquote></div><br></div>