<div dir="ltr"><div><div class="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"># HG changeset patch</div><div dir="ltr"># User Vignesh Vijayakumar <<a href="mailto:vignesh@multicorewareinc.com">vignesh@multicorewareinc.com</a>></div><div dir="ltr"># Date 1480914995 -19800</div><div dir="ltr"># Mon Dec 05 10:46:35 2016 +0530</div><div dir="ltr"># Node ID fb436beef19588e35160624e32fdffcf9506efce</div><div dir="ltr"># Parent c97c64ab8b8eaea8b1de611adc9022815d88b09b</div><div dir="ltr">API function to reconfigure scalinglists</div><div dir="ltr"><br></div><div dir="ltr">diff -r c97c64ab8b8e -r fb436beef195 source/CMakeLists.txt</div><div dir="ltr">--- a/source/CMakeLists.txt<span class="gmail-Apple-tab-span" style="white-space:pre"> </span>Thu May 26 17:49:25 2016 +0530</div><div dir="ltr">+++ b/source/CMakeLists.txt<span class="gmail-Apple-tab-span" style="white-space:pre"> </span>Mon Dec 05 10:46:35 2016 +0530</div><div dir="ltr">@@ -30,7 +30,7 @@</div><div dir="ltr"> mark_as_advanced(FPROFILE_USE FPROFILE_GENERATE NATIVE_BUILD)</div><div dir="ltr"> </div><div dir="ltr"> # X265_BUILD must be incremented each time the public API is changed</div><div dir="ltr">-set(X265_BUILD 102)</div><div dir="ltr">+set(X265_BUILD 103)</div><div dir="ltr"> configure_file("${PROJECT_SOURCE_DIR}/<a href="http://x265.def.in">x265.def.in</a>"</div><div dir="ltr"> "${PROJECT_BINARY_DIR}/x265.def")</div><div dir="ltr"> configure_file("${PROJECT_SOURCE_DIR}/<a href="http://x265_config.h.in">x265_config.h.in</a>"</div><div dir="ltr">diff -r c97c64ab8b8e -r fb436beef195 source/encoder/api.cpp</div><div dir="ltr">--- a/source/encoder/api.cpp<span class="gmail-Apple-tab-span" style="white-space:pre"> </span>Thu May 26 17:49:25 2016 +0530</div><div dir="ltr">+++ b/source/encoder/api.cpp<span class="gmail-Apple-tab-span" style="white-space:pre"> </span>Mon Dec 05 10:46:35 2016 +0530</div><div dir="ltr">@@ -31,6 +31,10 @@</div><div dir="ltr"> #include "nal.h"</div><div dir="ltr"> #include "bitcost.h"</div><div dir="ltr"> </div><div dir="ltr">+#ifdef _WIN32</div><div dir="ltr">+#define strdup _strdup</div><div dir="ltr">+#endif</div><div dir="ltr">+</div><div dir="ltr"> /* multilib namespace reflectors */</div><div dir="ltr"> #if LINKED_8BIT</div><div dir="ltr"> namespace x265_8bit {</div><div dir="ltr">@@ -189,6 +193,23 @@</div><div dir="ltr"> return ret;</div><div dir="ltr"> }</div><div dir="ltr"> </div><div dir="ltr">+int x265_scalinglists_reconfig(x265_encoder* enc, const char *filename)</div><div dir="ltr">+{</div><div dir="ltr">+ if (!enc || !filename)</div><div dir="ltr">+ return -1;</div><div dir="ltr">+ Encoder* encoder = static_cast<Encoder*>(enc);</div><div dir="ltr">+ if (!encoder->m_latestParam)</div><div dir="ltr">+ return -1;</div><div dir="ltr">+ encoder->m_latestParam->bRepeatHeaders = true;</div><div dir="ltr">+ encoder->m_latestParam->scalingLists = strdup(filename);</div><div dir="ltr">+ if (encoder->m_scalingList.parseScalingList(encoder->m_latestParam->scalingLists))</div><div dir="ltr">+ return -1;</div><div dir="ltr">+ encoder->m_scalingList.setupQuantMatrices();</div><div dir="ltr">+ encoder->m_reconfigure = true;</div><div dir="ltr">+ encoder->printReconfigureParams();</div><div dir="ltr">+ return 0;</div><div dir="ltr">+}</div><div dir="ltr">+</div><div dir="ltr"> int x265_encoder_encode(x265_encoder *enc, x265_nal **pp_nal, uint32_t *pi_nal, x265_picture *pic_in, x265_picture *pic_out)</div><div dir="ltr"> {</div><div dir="ltr"> if (!enc)</div><div dir="ltr">diff -r c97c64ab8b8e -r fb436beef195 source/encoder/encoder.cpp</div><div dir="ltr">--- a/source/encoder/encoder.cpp<span class="gmail-Apple-tab-span" style="white-space:pre"> </span>Thu May 26 17:49:25 2016 +0530</div><div dir="ltr">+++ b/source/encoder/encoder.cpp<span class="gmail-Apple-tab-span" style="white-space:pre"> </span>Mon Dec 05 10:46:35 2016 +0530</div><div dir="ltr">@@ -408,6 +408,14 @@</div><div dir="ltr"> if (m_analysisFile)</div><div dir="ltr"> fclose(m_analysisFile);</div><div dir="ltr"> </div><div dir="ltr">+ if (m_latestParam != NULL && m_latestParam != m_param)</div><div dir="ltr">+ {</div><div dir="ltr">+ if (m_latestParam->scalingLists != m_param->scalingLists)</div><div dir="ltr">+ free((char*)m_latestParam->scalingLists);</div><div dir="ltr">+</div><div dir="ltr">+ PARAM_NS::x265_param_free(m_latestParam);</div><div dir="ltr">+ }</div><div dir="ltr">+</div><div dir="ltr"> if (m_param)</div><div dir="ltr"> {</div><div dir="ltr"> /* release string arguments that were strdup'd */</div><div dir="ltr">@@ -420,8 +428,6 @@</div><div dir="ltr"> </div><div dir="ltr"> PARAM_NS::x265_param_free(m_param);</div><div dir="ltr"> }</div><div dir="ltr">-</div><div dir="ltr">- PARAM_NS::x265_param_free(m_latestParam);</div><div dir="ltr"> }</div><div dir="ltr"> </div><div dir="ltr"> void Encoder::updateVbvPlan(RateControl* rc)</div><div dir="ltr">@@ -2474,6 +2480,7 @@</div><div dir="ltr"> TOOLCMP(oldParam->bEnableRectInter, newParam->bEnableRectInter, "rect=%d to %d\n");</div><div dir="ltr"> TOOLCMP(oldParam->maxNumMergeCand, newParam->maxNumMergeCand, "max-merge=%d to %d\n");</div><div dir="ltr"> TOOLCMP(oldParam->bIntraInBFrames, newParam->bIntraInBFrames, "b-intra=%d to %d\n");</div><div dir="ltr">+ TOOLCMP(oldParam->scalingLists, newParam->scalingLists, "scalinglists=%s to %s\n");</div><div dir="ltr"> }</div><div dir="ltr"> </div><div dir="ltr"> bool Encoder::computeSPSRPSIndex()</div><div dir="ltr">diff -r c97c64ab8b8e -r fb436beef195 source/x265.h</div><div dir="ltr">--- a/source/x265.h<span class="gmail-Apple-tab-span" style="white-space:pre"> </span>Thu May 26 17:49:25 2016 +0530</div><div dir="ltr">+++ b/source/x265.h<span class="gmail-Apple-tab-span" style="white-space:pre"> </span>Mon Dec 05 10:46:35 2016 +0530</div><div dir="ltr">@@ -1498,6 +1498,10 @@</div><div dir="ltr"> * parameters to take this into account. */</div><div dir="ltr"> int x265_encoder_reconfig(x265_encoder *, x265_param *);</div><div dir="ltr"> </div><div dir="ltr">+/* x265_scalinglists_reconfig:</div><div dir="ltr">+ * quantization coefficients from the input file will be copied. */</div><div dir="ltr">+int x265_scalinglists_reconfig(x265_encoder* enc, const char *filename);</div><div dir="ltr">+</div><div dir="ltr"> /* x265_encoder_get_stats:</div><div dir="ltr"> * returns encoder statistics */</div><div dir="ltr"> void x265_encoder_get_stats(x265_encoder *encoder, x265_stats *, uint32_t statsSizeBytes);</div><div><br></div><div><br></div></div></div></div></div></div></div>
</div>