<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 5, 2018 at 3:58 PM, Divya Manivannan <span dir="ltr"><<a href="mailto:divya@multicorewareinc.com" target="_blank">divya@multicorewareinc.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""># HG changeset patch<br>
# User Divya Manivannan <<a href="mailto:divya@multicorewareinc.com">divya@multicorewareinc.com</a>><br>
# Date 1520243074 -19800<br>
#      Mon Mar 05 15:14:34 2018 +0530<br>
</span># Node ID 0cdb54dc3f66e6986689adb72a6738<wbr>7a4fa3378c<br>
<span class=""># Parent  59c02e68410fcb2846cd7a021e2639<wbr>f96e0a9609<br>
Add reorderedPts to x265_picture to signal the reordered pts value of each picture in encode order.<br>
Also shared the reordered pts value when analysis load is done by disabling lookahead.<br>
<br>
</span>diff -r 59c02e68410f -r 0cdb54dc3f66 source/CMakeLists.txt<br>
<span class="">--- a/source/CMakeLists.txt     Tue Feb 27 15:50:42 2018 +0530<br>
+++ b/source/CMakeLists.txt     Mon Mar 05 15:14:34 2018 +0530<br>
@@ -29,7 +29,7 @@<br>
 option(STATIC_LINK_CRT "Statically link C runtime for release builds" OFF)<br>
 mark_as_advanced(FPROFILE_USE FPROFILE_GENERATE NATIVE_BUILD)<br>
 # X265_BUILD must be incremented each time the public API is changed<br>
-set(X265_BUILD 153)<br>
+set(X265_BUILD 154)<br>
 configure_file("${PROJECT_<wbr>SOURCE_DIR}/<a href="http://x265.def.in" rel="noreferrer" target="_blank">x265.def.in</a>"<br>
                "${PROJECT_BINARY_DIR}/x265.<wbr>def")<br>
 configure_file("${PROJECT_<wbr>SOURCE_DIR}/<a href="http://x265_config.h.in" rel="noreferrer" target="_blank">x265_config.h.in</a>"<br>
</span>diff -r 59c02e68410f -r 0cdb54dc3f66 source/encoder/encoder.cpp<br>
<span class="">--- a/source/encoder/encoder.cpp        Tue Feb 27 15:50:42 2018 +0530<br>
+++ b/source/encoder/encoder.cpp        Mon Mar 05 15:14:34 2018 +0530<br>
@@ -1146,6 +1146,7 @@<br>
<br>
                 pic_out->pts = outFrame->m_pts;<br>
                 pic_out->dts = outFrame->m_dts;<br>
+                pic_out->reorderedPts = outFrame->m_reorderedPts;<br>
                 pic_out->sliceType = outFrame->m_lowres.sliceType;<br>
                 pic_out->planes[0] = recpic->m_picOrg[0];<br>
                 pic_out->stride[0] = (int)(recpic->m_stride * sizeof(pixel));<br>
@@ -1178,6 +1179,7 @@<br>
                             factor = m_param->scaleFactor * 2;<br>
                         pic_out->analysisData.<wbr>numCuInHeight = outFrame->m_analysisData.<wbr>numCuInHeight;<br>
                         pic_out->analysisData.<wbr>lookahead.dts = outFrame->m_dts;<br>
+                        pic_out->analysisData.<wbr>lookahead.reorderedPts = outFrame->m_reorderedPts;<br>
                         pic_out->analysisData.satdCost *= factor;<br>
                         pic_out->analysisData.<wbr>lookahead.keyframe = outFrame->m_lowres.bKeyframe;<br>
                         pic_out->analysisData.<wbr>lookahead.lastMiniGopBFrame = outFrame->m_lowres.<wbr>bLastMiniGopBFrame;<br>
@@ -1370,6 +1372,7 @@<br>
             if (m_param->analysisLoad && m_param->bDisableLookahead)<br>
             {<br>
                 frameEnc->m_dts = frameEnc->m_analysisData.<wbr>lookahead.dts;<br>
+                frameEnc->m_reorderedPts = frameEnc->m_analysisData.<wbr>lookahead.reorderedPts;<br>
                 if (m_rateControl->m_isVbv)<br>
                 {<br>
                     for (uint32_t index = 0; index < frameEnc->m_analysisData.<wbr>numCuInHeight; index++)<br>
</span>diff -r 59c02e68410f -r 0cdb54dc3f66 source/x265.h<br>
<span class="">--- a/source/x265.h     Tue Feb 27 15:50:42 2018 +0530<br>
+++ b/source/x265.h     Mon Mar 05 15:14:34 2018 +0530<br>
@@ -105,6 +105,7 @@<br>
     int       lastMiniGopBFrame;<br>
     int       plannedType[X265_LOOKAHEAD_MAX + 1];<br>
     int64_t   dts;<br>
+    int64_t   reorderedPts;<br>
 } x265_lookahead_data;<br>
<br>
 /* Stores all analysis data for a single frame */<br>
</span>@@ -363,6 +364,9 @@<br>
<span class="">     int    height;<br>
<br>
     x265_analysis_2Pass analysis2Pass;<br>
+<br>
</span>+    // pts is reordered in the order of encoding.<br>
<div class="HOEnZb"><div class="h5">+    int64_t reorderedPts;<br>
 } x265_picture;<br>
<br>
 typedef enum<br>
</div></div><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><div class="gmail_extra">Pushed.</div></div>