<div dir="ltr"><div dir="ltr">On Fri, Mar 1, 2019 at 3:39 PM Dinesh Kumar Reddy <<a href="mailto:dinesh@multicorewareinc.com">dinesh@multicorewareinc.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div># HG changeset patch</div><div># User Dinesh<<a href="mailto:dinesh@multicorewareinc.com" target="_blank">dinesh@multicorewareinc.com</a>></div><div># Date 1551246140 -19800</div><div># Wed Feb 27 11:12:20 2019 +0530</div><div># Node ID c9bc9aef4cde7b812fd97b8eac7a204904aa02ad</div><div># Parent 31ab7e09a3b5b15ffcc532826d4dd5d37e611483</div><div>Zone: fix for encoder crash</div></div></div></blockquote><div><br></div><div>Ignoring this patch as the fix isn't complete.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div><br></div><div>diff -r 31ab7e09a3b5 -r c9bc9aef4cde source/common/param.cpp</div><div>--- a/source/common/param.cpp<span style="white-space:pre-wrap"> </span>Tue Feb 26 13:52:24 2019 +0530</div><div>+++ b/source/common/param.cpp<span style="white-space:pre-wrap"> </span>Wed Feb 27 11:12:20 2019 +0530</div><div>@@ -94,6 +94,7 @@</div><div> x265_param *x265_param_alloc()</div><div> {</div><div> x265_param* param = (x265_param*)x265_malloc(sizeof(x265_param));</div><div>+<span style="white-space:pre-wrap"> </span>param->rc.zones = (x265_zone*)x265_malloc(sizeof(x265_zone));</div><div> #ifdef SVT_HEVC</div><div> param->svtHevcParam = (EB_H265_ENC_CONFIGURATION*)x265_malloc(sizeof(EB_H265_ENC_CONFIGURATION));</div><div> #endif</div><div>@@ -102,6 +103,7 @@</div><div> </div><div> void x265_param_free(x265_param* p)</div><div> {</div><div>+<span style="white-space:pre-wrap"> </span>x265_free(p->rc.zones);</div><div> #ifdef SVT_HEVC</div><div> x265_free(p->svtHevcParam);</div><div> #endif</div><div>@@ -2246,11 +2248,7 @@</div><div> </div><div> if (src->rc.zones)</div><div> {</div><div>- dst->rc.zones->startFrame = src->rc.zones->startFrame;</div><div>- dst->rc.zones->endFrame = src->rc.zones->endFrame;</div><div>- dst->rc.zones->bForceQp = src->rc.zones->bForceQp;</div><div>- dst->rc.zones->qp = src->rc.zones->qp;</div><div>- dst->rc.zones->bitrateFactor = src->rc.zones->bitrateFactor;</div><div>+<span style="white-space:pre-wrap"> </span>memcpy(dst->rc.zones, src->rc.zones, sizeof(x265_zone));</div><div> }</div><div> else</div><div> dst->rc.zones = NULL;</div><div>diff -r 31ab7e09a3b5 -r c9bc9aef4cde source/encoder/api.cpp</div><div>--- a/source/encoder/api.cpp<span style="white-space:pre-wrap"> </span>Tue Feb 26 13:52:24 2019 +0530</div><div>+++ b/source/encoder/api.cpp<span style="white-space:pre-wrap"> </span>Wed Feb 27 11:12:20 2019 +0530</div><div>@@ -94,7 +94,7 @@</div><div> </div><div> Encoder* encoder = NULL;</div><div> x265_param* param = PARAM_NS::x265_param_alloc();</div><div>- x265_param* latestParam = PARAM_NS::x265_param_alloc();</div><div>+<span style="white-space:pre-wrap"> </span>x265_param* latestParam = PARAM_NS::x265_param_alloc();</div><div> x265_param* zoneParam = PARAM_NS::x265_param_alloc();</div><div> if (!param || !latestParam)</div><div> goto fail;</div><div>@@ -177,7 +177,7 @@</div><div> </div><div> encoder->create();</div><div> </div><div>- memcpy(zoneParam, param, sizeof(x265_param));</div><div>+<span style="white-space:pre-wrap"> </span>x265_copy_params(zoneParam, param);</div><div> for (int i = 0; i < param->rc.zonefileCount; i++)</div><div> {</div><div> encoder->configureZone(zoneParam, param->rc.zones[i].zoneParam);</div><div>@@ -200,11 +200,11 @@</div><div> goto fail;</div><div> </div><div> x265_print_params(param);</div><div>- return encoder;</div><div>+<span style="white-space:pre-wrap"> </span>return encoder;</div><div> </div><div> fail:</div><div> delete encoder;</div><div>- PARAM_NS::x265_param_free(param);</div><div>+<span style="white-space:pre-wrap"> </span>PARAM_NS::x265_param_free(param);</div><div> PARAM_NS::x265_param_free(latestParam);</div><div> return NULL;</div><div> }</div><div>@@ -287,12 +287,13 @@</div><div> bool isReconfigureRc = encoder->isReconfigureRc(encoder->m_latestParam, param_in);</div><div> if ((encoder->m_reconfigure && !isReconfigureRc) || (encoder->m_reconfigureRc && isReconfigureRc)) /* Reconfigure in progress */</div><div> return 1;</div><div>- x265_copy_params(&save, encoder->m_latestParam);</div><div>+</div><div>+<span style="white-space:pre-wrap"> </span>memcpy(&save, encoder->m_latestParam, sizeof(x265_param));</div><div> int ret = encoder->reconfigureParam(encoder->m_latestParam, param_in);</div><div> if (ret)</div><div> {</div><div> /* reconfigure failed, recover saved param set */</div><div>- x265_copy_params(encoder->m_latestParam, &save);</div><div>+<span style="white-space:pre-wrap"> </span>memcpy(encoder->m_latestParam, &save, sizeof(x265_param));</div><div> ret = -1;</div><div> }</div><div> else</div><div>diff -r 31ab7e09a3b5 -r c9bc9aef4cde source/encoder/encoder.cpp</div><div>--- a/source/encoder/encoder.cpp<span style="white-space:pre-wrap"> </span>Tue Feb 26 13:52:24 2019 +0530</div><div>+++ b/source/encoder/encoder.cpp<span style="white-space:pre-wrap"> </span>Wed Feb 27 11:12:20 2019 +0530</div><div>@@ -850,7 +850,10 @@</div><div> free((char*)m_param->toneMapFile);</div><div> free((char*)m_param->analysisSave);</div><div> free((char*)m_param->analysisLoad);</div><div>- PARAM_NS::x265_param_free(m_param);</div><div>+#ifdef SVT_HEVC</div><div>+<span style="white-space:pre-wrap"> </span>x265_free(m_param->svtHevcParam);</div><div>+#endif</div><div>+<span style="white-space:pre-wrap"> </span>x265_free(m_param);</div><div> }</div><div> }</div><div> </div><div><br></div></div></div>
_______________________________________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org" target="_blank">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" rel="noreferrer" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a><br>
</blockquote></div></div>