<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Dec 19, 2016 at 6:43 PM, <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 1481959810 -19800<br>
# Sat Dec 17 13:00:10 2016 +0530<br>
# Branch stable<br></blockquote><div><br></div><div>This patch cannot go directly to stable branch as this is a new feature that needs to be tested first. Please send for default branch.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
# Node ID 176274eb5f2cee9733ba47697e7004<wbr>482b3bbc12<br>
# Parent ce19aaa0637df84d56fc985b0062c7<wbr>fe2664cdf6<br>
API changes to reconfigure scalinglists<br>
<br>
diff -r ce19aaa0637d -r 176274eb5f2c source/encoder/api.cpp<br>
--- a/source/encoder/api.cpp Fri Dec 16 11:01:59 2016 +0530<br>
+++ b/source/encoder/api.cpp Sat Dec 17 13:00:10 2016 +0530<br>
@@ -183,6 +183,13 @@<br>
}<br>
else<br>
{<br>
+ if (encoder->m_latestParam-><wbr>scalingLists && encoder->m_latestParam-><wbr>scalingLists != encoder->m_param-><wbr>scalingLists)<br>
+ {<br>
+ if (encoder->m_scalingList.<wbr>parseScalingList(encoder->m_<wbr>latestParam->scalingLists))<br>
+ return -1;<br>
+ encoder->m_scalingList.<wbr>setupQuantMatrices();<br>
+ encoder->m_latestParam-><wbr>bRepeatHeaders = true;<br></blockquote><div><br></div><div>I'm not so sure that this is a good idea. Enabling repeat-headers half way through the encode seems a little weird to be.</div><div>IMO, it would be more prudent to allow for reconfiguring scaling lists only when repeat headers is enabled. Else, just print a warning. </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+ }<br>
encoder->m_reconfigure = true;<br>
encoder-><wbr>printReconfigureParams();<br>
}<br>
diff -r ce19aaa0637d -r 176274eb5f2c source/encoder/encoder.cpp<br>
--- a/source/encoder/encoder.cpp Fri Dec 16 11:01:59 2016 +0530<br>
+++ b/source/encoder/encoder.cpp Sat Dec 17 13:00:10 2016 +0530<br>
@@ -408,6 +408,14 @@<br>
if (m_analysisFile)<br>
fclose(m_analysisFile);<br>
<br>
+ if (m_latestParam != NULL && m_latestParam != m_param)<br>
+ {<br>
+ if (m_latestParam->scalingLists != m_param->scalingLists)<br>
+ free((char*)m_latestParam-><wbr>scalingLists);<br>
+<br>
+ PARAM_NS::x265_param_free(m_<wbr>latestParam);<br>
+ }<br>
+<br>
if (m_param)<br>
{<br>
/* release string arguments that were strdup'd */<br>
@@ -420,8 +428,6 @@<br>
<br>
PARAM_NS::x265_param_free(m_<wbr>param);<br>
}<br>
-<br>
- PARAM_NS::x265_param_free(m_<wbr>latestParam);<br>
}<br>
<br>
void Encoder::updateVbvPlan(<wbr>RateControl* rc)<br>
@@ -986,6 +992,8 @@<br>
encParam->bEnableRectInter = param->bEnableRectInter;<br>
encParam->maxNumMergeCand = param->maxNumMergeCand;<br>
encParam->bIntraInBFrames = param->bIntraInBFrames;<br>
+ if (param->scalingLists && !encParam->scalingLists)<br>
+ encParam->scalingLists = strdup(param->scalingLists);<br>
/* To add: Loop Filter/deblocking controls, transform skip, signhide require PPS to be resent */<br>
/* To add: SAO, temporal MVP, AMP, TU depths require SPS to be resent, at every CVS boundary */<br>
return x265_check_params(encParam);<br>
@@ -2474,6 +2482,7 @@<br>
TOOLCMP(oldParam-><wbr>bEnableRectInter, newParam->bEnableRectInter, "rect=%d to %d\n");<br>
TOOLCMP(oldParam-><wbr>maxNumMergeCand, newParam->maxNumMergeCand, "max-merge=%d to %d\n");<br>
TOOLCMP(oldParam-><wbr>bIntraInBFrames, newParam->bIntraInBFrames, "b-intra=%d to %d\n");<br>
+ TOOLCMP(oldParam-><wbr>scalingLists, newParam->scalingLists, "scalinglists=%s to %s\n");<br>
}<br>
<br>
bool Encoder::computeSPSRPSIndex()<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>