<div dir="ltr">pushed <div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>Thanks,</div><div dir="ltr"><span></span><span></span>Kalyan Goswami, PhD</div><div dir="ltr"><span style="font-size:12.8px">Video Architect @ MulticoreWare</span></div><div dir="ltr"><div><a href="http://www.multicorewareinc.com/" target="_blank">http:</a><a href="http://www.multicorewareinc.com/" style="font-size:12.8px" target="_blank">//www.multicorewareinc.com</a></div><div><span style="font-size:12.8px">+91 9884989331</span><br></div><div></div></div></div></div></div></div></div></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Dec 20, 2018 at 11:10 AM Pooja Venkatesan <<a href="mailto:pooja@multicorewareinc.com">pooja@multicorewareinc.com</a>> wrote:<br></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># HG changeset patch</div><div># User Pooja Venkatesan <<a href="mailto:pooja@multicorewareinc.com" target="_blank">pooja@multicorewareinc.com</a>></div><div># Date 1544770885 -19800</div><div># Fri Dec 14 12:31:25 2018 +0530</div><div># Node ID d5d79e22bfddda8c103da2182a68137757340425</div><div># Parent 1a62483c0b7549ef677ce2f343e9c7f1fcd45c44</div><div>zone: Add support for RADL pictures</div><div><br></div><div>diff -r 1a62483c0b75 -r d5d79e22bfdd source/common/param.cpp</div><div>--- a/source/common/param.cpp<span style="white-space:pre-wrap"> </span>Fri Dec 14 12:28:56 2018 +0530</div><div>+++ b/source/common/param.cpp<span style="white-space:pre-wrap"> </span>Fri Dec 14 12:31:25 2018 +0530</div><div>@@ -624,6 +624,7 @@</div><div> OPT("amp") p->bEnableAMP = atobool(value);</div><div> OPT("max-merge") p->maxNumMergeCand = (uint32_t)atoi(value);</div><div> OPT("rd") p->rdLevel = atoi(value);</div><div>+ OPT("radl") p->radl = atoi(value);</div><div> OPT2("rdoq", "rdoq-level")</div><div> {</div><div> int bval = atobool(value);</div><div>diff -r 1a62483c0b75 -r d5d79e22bfdd source/encoder/dpb.h</div><div>--- a/source/encoder/dpb.h<span style="white-space:pre-wrap"> </span>Fri Dec 14 12:28:56 2018 +0530</div><div>+++ b/source/encoder/dpb.h<span style="white-space:pre-wrap"> </span>Fri Dec 14 12:31:25 2018 +0530</div><div>@@ -52,6 +52,14 @@</div><div> m_lastIDR = 0;</div><div> m_pocCRA = 0;</div><div> m_bhasLeadingPicture = param->radl;</div><div>+ for (int i = 0; i < param->rc.zonefileCount; i++)</div><div>+ {</div><div>+ if (param->rc.zones[i].zoneParam->radl)</div><div>+ {</div><div>+ m_bhasLeadingPicture = param->rc.zones[i].zoneParam->radl;</div><div>+ break;</div><div>+ }</div><div>+ }</div><div> m_bRefreshPending = false;</div><div> m_frameDataFreeList = NULL;</div><div> m_bOpenGOP = param->bOpenGOP;</div><div>diff -r 1a62483c0b75 -r d5d79e22bfdd source/encoder/encoder.cpp</div><div>--- a/source/encoder/encoder.cpp<span style="white-space:pre-wrap"> </span>Fri Dec 14 12:28:56 2018 +0530</div><div>+++ b/source/encoder/encoder.cpp<span style="white-space:pre-wrap"> </span>Fri Dec 14 12:31:25 2018 +0530</div><div>@@ -2652,6 +2652,7 @@</div><div> p->rc.qp = zone->rc.qp;</div><div> p->rc.aqMode = X265_AQ_NONE;</div><div> }</div><div>+ p->radl = zone->radl;</div><div> </div><div> memcpy(zone, p, sizeof(x265_param));</div><div> }</div><div>diff -r 1a62483c0b75 -r d5d79e22bfdd source/encoder/slicetype.cpp</div><div>--- a/source/encoder/slicetype.cpp<span style="white-space:pre-wrap"> </span>Fri Dec 14 12:28:56 2018 +0530</div><div>+++ b/source/encoder/slicetype.cpp<span style="white-space:pre-wrap"> </span>Fri Dec 14 12:31:25 2018 +0530</div><div>@@ -1117,7 +1117,9 @@</div><div> }</div><div> for (int i = 0; i < m_param->rc.zonefileCount; i++)</div><div> {</div><div>- if (m_param->rc.zones[i].startFrame == frm.frameNum)</div><div>+ int curZoneStart = m_param->rc.zones[i].startFrame;</div><div>+ curZoneStart += curZoneStart ? m_param->rc.zones[i].zoneParam->radl : 0;</div><div>+ if (curZoneStart == frm.frameNum)</div><div> frm.sliceType = X265_TYPE_IDR;</div><div> }</div><div> if ((frm.sliceType == X265_TYPE_I && frm.frameNum - m_lastKeyframe >= m_param->keyframeMin) || (frm.frameNum == (m_param->chunkStart - 1)) || (frm.frameNum == m_param->chunkEnd))</div><div>@@ -1135,7 +1137,20 @@</div><div> /* Closed GOP */</div><div> m_lastKeyframe = frm.frameNum;</div><div> frm.bKeyframe = true;</div><div>- if (bframes > 0 && !m_param->radl)</div><div>+ int zoneRadl = 0;</div><div>+ for (int i = 0; i < m_param->rc.zonefileCount; i++)</div><div>+ {</div><div>+ int zoneStart = m_param->rc.zones[i].startFrame;</div><div>+ zoneStart += zoneStart ? m_param->rc.zones[i].zoneParam->radl : 0;</div><div>+ if (zoneStart == frm.frameNum)</div><div>+ {</div><div>+ zoneRadl = m_param->rc.zones[i].zoneParam->radl;</div><div>+ m_param->radl = 0;</div><div>+ m_param->rc.zones->zoneParam->radl = i < m_param->rc.zonefileCount - 1? m_param->rc.zones[i + 1].zoneParam->radl : 0;</div><div>+ break;</div><div>+ }</div><div>+ }</div><div>+ if (bframes > 0 && !m_param->radl && !zoneRadl)</div><div> {</div><div> list[bframes - 1]->m_lowres.sliceType = X265_TYPE_P;</div><div> bframes--;</div><div>@@ -1423,6 +1438,14 @@</div><div> }</div><div> frames[framecnt + 1] = NULL;</div><div> </div><div>+ for (int i = 0; i < m_param->rc.zonefileCount; i++)</div><div>+ {</div><div>+ int curZoneStart = m_param->rc.zones[i].startFrame, nextZoneStart = 0;</div><div>+ curZoneStart += curZoneStart ? m_param->rc.zones[i].zoneParam->radl : 0;</div><div>+ nextZoneStart += (i + 1 < m_param->rc.zonefileCount) ? m_param->rc.zones[i + 1].startFrame + m_param->rc.zones[i + 1].zoneParam->radl : m_param->totalFrames;</div><div>+ if (curZoneStart <= frames[0]->frameNum && nextZoneStart > frames[0]->frameNum)</div><div>+ m_param->keyframeMax = nextZoneStart - curZoneStart;</div><div>+ }</div><div> int keylimit = m_param->keyframeMax;</div><div> if (frames[0]->frameNum < m_param->chunkEnd)</div><div> {</div><div>@@ -1632,14 +1655,16 @@</div><div> frames[numFrames]->sliceType = X265_TYPE_P;</div><div> }</div><div> </div><div>- bool bForceRADL = m_param->radl && !m_param->bOpenGOP;</div><div>+ int zoneRadl = m_param->rc.zonefileCount ? m_param->rc.zones->zoneParam->radl : 0;</div><div>+ bool bForceRADL = (m_param->radl || zoneRadl) && !m_param->bOpenGOP;</div><div> bool bLastMiniGop = (framecnt >= m_param->bframes + 1) ? false : true;</div><div>- int preRADL = m_lastKeyframe + m_param->keyframeMax - m_param->radl - 1; /*Frame preceeding RADL in POC order*/</div><div>+ int radl = m_param->radl ? m_param->radl : zoneRadl;</div><div>+ int preRADL = m_lastKeyframe + m_param->keyframeMax - radl - 1; /*Frame preceeding RADL in POC order*/</div><div> if (bForceRADL && (frames[0]->frameNum == preRADL) && !bLastMiniGop)</div><div> {</div><div> int j = 1;</div><div>- numBFrames = m_param->radl;</div><div>- for (; j <= m_param->radl; j++)</div><div>+ numBFrames = m_param->radl ? m_param->radl : zoneRadl;</div><div>+ for (; j <= numBFrames; j++)</div><div> frames[j]->sliceType = X265_TYPE_B;</div><div> frames[j]->sliceType = X265_TYPE_I;</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>