[x265] [PATCH 3 of 4] wait for the event of copying MV data if refine-mv-type is enabled

santhoshini at multicorewareinc.com santhoshini at multicorewareinc.com
Tue Nov 7 07:52:40 CET 2017


# HG changeset patch
# User Santhoshini Sekar <santhoshini at multicorewareinc.com>
# Date 1502274740 -19800
#      Wed Aug 09 16:02:20 2017 +0530
# Node ID 82708090cf1d29c4a81ff99acbb5945c86b81185
# Parent  429abad792be670195e22782b772eea814100f61
wait for the event of copying MV data if refine-mv-type is enabled

diff --git a/source/common/frame.h b/source/common/frame.h
--- a/source/common/frame.h
+++ b/source/common/frame.h
@@ -113,6 +113,8 @@
     x265_analysis_2Pass    m_analysis2Pass;
     RcStats*               m_rcData;
 
+    Event                  m_copyMVType;
+
     x265_ctu_info_t**      m_ctuInfo;
     Event                  m_copied;
     int*                   m_prevCtuInfoChange;
diff --git a/source/encoder/frameencoder.cpp b/source/encoder/frameencoder.cpp
--- a/source/encoder/frameencoder.cpp
+++ b/source/encoder/frameencoder.cpp
@@ -335,6 +335,11 @@
             while (!m_frame->m_ctuInfo)
                 m_frame->m_copied.wait();
         }
+        if ((m_param->bMVType == AVC_INFO) && !m_param->analysisReuseMode && !(IS_X265_TYPE_I(m_frame->m_lowres.sliceType)))
+        {
+            while (((m_frame->m_analysisData.interData == NULL && m_frame->m_analysisData.intraData == NULL) || (uint32_t)m_frame->m_poc != m_frame->m_analysisData.poc))
+                m_frame->m_copyMVType.wait();
+        }
         compressFrame();
         m_done.trigger(); /* FrameEncoder::getEncodedPicture() blocks for this event */
         if (m_frame != NULL)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x265-3.patch
Type: text/x-patch
Size: 1486 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20171107/06d04cc6/attachment-0001.bin>


More information about the x265-devel mailing list