[x265] [PATCH] Add reorderedPts to x265_picture to signal the reordered pts value of each picture in encode order
Divya Manivannan
divya at multicorewareinc.com
Mon Mar 5 10:45:30 CET 2018
# HG changeset patch
# User Divya Manivannan <divya at multicorewareinc.com>
# Date 1520243074 -19800
# Mon Mar 05 15:14:34 2018 +0530
# Node ID 34b89a4d02509d4cbecca69695de1c10185c53af
# Parent 59c02e68410fcb2846cd7a021e2639f96e0a9609
Add reorderedPts to x265_picture to signal the reordered pts value of each picture in encode order.
Also shared the reordered pts value when analysis load is done by disabling lookahead.
diff -r 59c02e68410f -r 34b89a4d0250 source/CMakeLists.txt
--- a/source/CMakeLists.txt Tue Feb 27 15:50:42 2018 +0530
+++ b/source/CMakeLists.txt Mon Mar 05 15:14:34 2018 +0530
@@ -29,7 +29,7 @@
option(STATIC_LINK_CRT "Statically link C runtime for release builds" OFF)
mark_as_advanced(FPROFILE_USE FPROFILE_GENERATE NATIVE_BUILD)
# X265_BUILD must be incremented each time the public API is changed
-set(X265_BUILD 153)
+set(X265_BUILD 154)
configure_file("${PROJECT_SOURCE_DIR}/x265.def.in"
"${PROJECT_BINARY_DIR}/x265.def")
configure_file("${PROJECT_SOURCE_DIR}/x265_config.h.in"
diff -r 59c02e68410f -r 34b89a4d0250 source/encoder/encoder.cpp
--- a/source/encoder/encoder.cpp Tue Feb 27 15:50:42 2018 +0530
+++ b/source/encoder/encoder.cpp Mon Mar 05 15:14:34 2018 +0530
@@ -1146,6 +1146,7 @@
pic_out->pts = outFrame->m_pts;
pic_out->dts = outFrame->m_dts;
+ pic_out->reorderedPts = outFrame->m_reorderedPts;
pic_out->sliceType = outFrame->m_lowres.sliceType;
pic_out->planes[0] = recpic->m_picOrg[0];
pic_out->stride[0] = (int)(recpic->m_stride * sizeof(pixel));
@@ -1178,6 +1179,7 @@
factor = m_param->scaleFactor * 2;
pic_out->analysisData.numCuInHeight = outFrame->m_analysisData.numCuInHeight;
pic_out->analysisData.lookahead.dts = outFrame->m_dts;
+ pic_out->analysisData.lookahead.reorderedPts = outFrame->m_reorderedPts;
pic_out->analysisData.satdCost *= factor;
pic_out->analysisData.lookahead.keyframe = outFrame->m_lowres.bKeyframe;
pic_out->analysisData.lookahead.lastMiniGopBFrame = outFrame->m_lowres.bLastMiniGopBFrame;
@@ -1370,6 +1372,7 @@
if (m_param->analysisLoad && m_param->bDisableLookahead)
{
frameEnc->m_dts = frameEnc->m_analysisData.lookahead.dts;
+ frameEnc->m_reorderedPts = frameEnc->m_analysisData.lookahead.reorderedPts;
if (m_rateControl->m_isVbv)
{
for (uint32_t index = 0; index < frameEnc->m_analysisData.numCuInHeight; index++)
diff -r 59c02e68410f -r 34b89a4d0250 source/x265.h
--- a/source/x265.h Tue Feb 27 15:50:42 2018 +0530
+++ b/source/x265.h Mon Mar 05 15:14:34 2018 +0530
@@ -105,6 +105,7 @@
int lastMiniGopBFrame;
int plannedType[X265_LOOKAHEAD_MAX + 1];
int64_t dts;
+ int64_t reorderedPts;
} x265_lookahead_data;
/* Stores all analysis data for a single frame */
@@ -363,6 +364,8 @@
int height;
x265_analysis_2Pass analysis2Pass;
+
+ int64_t reorderedPts;
} x265_picture;
typedef enum
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x265-clone.patch
Type: text/x-patch
Size: 3238 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20180305/23d5ab8f/attachment.bin>
More information about the x265-devel
mailing list