[x265] [PATCH 1 of 2] wait until the last row of recon is complete. Waiting on m_reconEncoded doesn't
Ashok Kumar Mishra
ashok at multicorewareinc.com
Tue Dec 5 14:18:22 CET 2017
LGTM. Can be pushed to stable branch.
On Mon, Dec 4, 2017 at 4:30 PM, <santhoshini at multicorewareinc.com> wrote:
> # HG changeset patch
> # User Santhoshini Sekar <santhoshini at multicorewareinc.com>
> # Date 1512383899 -19800
> # Mon Dec 04 16:08:19 2017 +0530
> # Node ID ee9a82d856a5f726bbca9380c3539e70a8ab8913
> # Parent c353f34a532c16b0db02fbba7b928b71e9300996
> wait until the last row of recon is complete. Waiting on m_reconEncoded
> doesn't
> ensure full recon generation.
>
> diff --git a/source/encoder/encoder.cpp b/source/encoder/encoder.cpp
> --- a/source/encoder/encoder.cpp
> +++ b/source/encoder/encoder.cpp
> @@ -463,8 +463,8 @@
> {
> int l0POC = framePtr->m_encData->m_slice->
> m_refFrameList[0][j]->m_poc;
> Frame* l0Fp = m_dpb->m_picList.getPOC(l0POC);
> - if (l0Fp->m_reconPic->m_picOrg[0] == NULL)
> - l0Fp->m_reconEncoded.wait(); /* If recon is not
> ready, current frame encoder need to wait. */
> + while (l0Fp->m_reconRowFlag[l0Fp->m_numRows -
> 1].get() == 0)
> + l0Fp->m_reconRowFlag[l0Fp->m_numRows -
> 1].waitForChange(0); /* If recon is not ready, current frame encoder has to
> wait. */
> l0[j] = l0Fp->m_reconPic;
> }
> }
> @@ -474,8 +474,8 @@
> {
> int l1POC = framePtr->m_encData->m_slice->
> m_refFrameList[1][j]->m_poc;
> Frame* l1Fp = m_dpb->m_picList.getPOC(l1POC);
> - if (l1Fp->m_reconPic->m_picOrg[0] == NULL)
> - l1Fp->m_reconEncoded.wait(); /* If recon is not
> ready, current frame encoder need to wait. */
> + while (l1Fp->m_reconRowFlag[l1Fp->m_numRows -
> 1].get() == 0)
> + l1Fp->m_reconRowFlag[l1Fp->m_numRows -
> 1].waitForChange(0); /* If recon is not ready, current frame encoder has to
> wait. */
> l1[j] = l1Fp->m_reconPic;
> }
> }
>
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20171205/3ccbabb5/attachment.html>
More information about the x265-devel
mailing list