<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 21, 2016 at 10:15 AM, <span dir="ltr"><<a href="mailto:vignesh@multicorewareinc.com" target="_blank">vignesh@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 Vignesh Vijayakumar <<a href="mailto:vignesh@multicorewareinc.com">vignesh@multicorewareinc.com</a>><br>
# Date 1482232112 -19800<br>
# Tue Dec 20 16:38:32 2016 +0530<br>
# Node ID 97d011cd7fe2b7dc1ecd2cebb887e1<wbr>536b810052<br>
# Parent 88285bf550a4f88bb09ff5b49ec46b<wbr>81140a025d<br>
Set frame as keyint if scalinglist reconfigure<br>
<br>
diff -r 88285bf550a4 -r 97d011cd7fe2 source/encoder/encoder.cpp<br>
--- a/source/encoder/encoder.cpp Tue Dec 20 16:35:53 2016 +0530<br>
+++ b/source/encoder/encoder.cpp Tue Dec 20 16:38:32 2016 +0530<br>
@@ -78,6 +78,7 @@<br>
m_iPPSQpMinus26 = 0;<br>
m_iLastSliceQp = 0;<br>
m_rpsInSpsCount = 0;<br>
+ m_reconfigureScalingLists = false;<br>
for (int i = 0; i < X265_MAX_FRAME_THREADS; i++)<br>
m_frameEncoder[i] = NULL;<br>
<br>
@@ -842,6 +843,12 @@<br>
frameEnc = m_lookahead-><wbr>getDecidedPicture();<br>
if (frameEnc && !pass)<br>
{<br></blockquote><div>You can't make it a keyframe this way. A keyframe can't be of any slicetype. It needs to be IDR. You need to change the slicetype as well.</div><div>You need to set the m_reconfigureScalingLists to true while you are reconfiguring the scaling List inside the x265_encoder_reconfig() </div><div>and based on this, you need to set the next incoming frame's slice type to I/IDR and set it as keyframe during the slicetype analysis of that frame. </div><div>It will in turn change the slice types of the following frames accordingly. </div><div><br></div><div>Else, reconfigure scaling list only at every keyframe interval - this is what I would recommend.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+ if (m_param->bRepeatHeaders && m_reconfigure && m_latestParam != NULL && (m_latestParam->scalingLists != m_param->scalingLists) && !m_reconfigureScalingLists)<br>
+ {<br>
+ frameEnc->m_lowres.bKeyframe = true;<br>
+ m_reconfigureScalingLists = true;<br>
+ }<br>
+<br>
if (curEncoder->m_reconfigure)<br>
{<br>
/* One round robin cycle of FE reconfigure is complete */<br>
diff -r 88285bf550a4 -r 97d011cd7fe2 source/encoder/encoder.h<br>
--- a/source/encoder/encoder.h Tue Dec 20 16:35:53 2016 +0530<br>
+++ b/source/encoder/encoder.h Tue Dec 20 16:38:32 2016 +0530<br>
@@ -150,6 +150,7 @@<br>
bool m_bZeroLatency; // x265_encoder_encode() returns NALs for the input picture, zero lag<br>
bool m_aborted; // fatal error detected<br>
bool m_reconfigure; // Encoder reconfigure in progress<br>
+ bool m_reconfigureScalingLists; // Change in scalinglists<br>
<br>
/* Begin intra refresh when one not in progress or else begin one as soon as the current<br>
* one is done. Requires bIntraRefresh to be set.*/<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>
</blockquote></div><br></div></div>