<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Feb 19, 2020 at 3:28 PM Snehaa Giridharan <<a href="mailto:snehaa@multicorewareinc.com">snehaa@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"># HG changeset patch<br># User Snehaa Giridharan <<a href="mailto:snehaa@multicorewareinc.com" target="_blank">snehaa@multicorewareinc.com</a>><br># Date 1582105413 -19800<br># Wed Feb 19 15:13:33 2020 +0530<br># Node ID 968e8839eade282f6cd687d43c18bb4ee512ee01<br># Parent 495e78dfd32bcdeee0c48a8732eba135be12cb8e<br>Add option to get global maxrate<br><br>This global maxrate can be used for HRD signaling<br><br>diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt<br>--- a/source/CMakeLists.txt<br>+++ b/source/CMakeLists.txt<br>@@ -29,7 +29,7 @@<br> option(STATIC_LINK_CRT "Statically link C runtime for release builds" OFF)<br> mark_as_advanced(FPROFILE_USE FPROFILE_GENERATE NATIVE_BUILD)<br> # X265_BUILD must be incremented each time the public API is changed<br>-set(X265_BUILD 189)<br>+set(X265_BUILD 190)<br> configure_file("${PROJECT_SOURCE_DIR}/<a href="http://x265.def.in" target="_blank">x265.def.in</a>"<br> "${PROJECT_BINARY_DIR}/x265.def")<br> configure_file("${PROJECT_SOURCE_DIR}/<a href="http://x265_config.h.in" target="_blank">x265_config.h.in</a>"<br>diff --git a/source/common/param.cpp b/source/common/param.cpp<br>--- a/source/common/param.cpp<br>+++ b/source/common/param.cpp<br>@@ -286,6 +286,7 @@<br> param->rc.bEnableConstVbv = 0;<br> param->bResetZoneConfig = 1;<br> param->reconfigWindowSize = 0;<br>+ param->decoderVbvMaxRate = 0;<br> <br> /* Video Usability Information (VUI) */<br> param->vui.aspectRatioIdc = 0;<br>@@ -2435,6 +2436,7 @@<br> dst->rc.zonefileCount = src->rc.zonefileCount;<br> dst->reconfigWindowSize = src->reconfigWindowSize;<br> dst->bResetZoneConfig = src->bResetZoneConfig;<br>+ dst->decoderVbvMaxRate = src->decoderVbvMaxRate;<br></div></blockquote><div>Missing corresponding entries in info SEI and x265_check_param. </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"> <br> if (src->rc.zonefileCount && src->rc.zones)<br> {<br>diff --git a/source/encoder/ratecontrol.cpp b/source/encoder/ratecontrol.cpp<br>--- a/source/encoder/ratecontrol.cpp<br>+++ b/source/encoder/ratecontrol.cpp<br>@@ -335,7 +335,7 @@<br> int vbvBufferSize = m_param->rc.vbvBufferSize * 1000;<br> int vbvMaxBitrate = m_param->rc.vbvMaxBitrate * 1000;<br> <br>- if (m_param->bEmitHRDSEI)<br>+ if (m_param->bEmitHRDSEI && !m_param->decoderVbvMaxRate)<br> {<br> const HRDInfo* hrd = &sps.vuiParameters.hrdParameters;<br> vbvBufferSize = hrd->cpbSizeValue << (hrd->cpbSizeScale + CPB_SHIFT);<br>@@ -781,8 +781,10 @@<br> // Init HRD<br> HRDInfo* hrd = &sps.vuiParameters.hrdParameters;<br> hrd->cbrFlag = m_isCbr;<br>- if (m_param->reconfigWindowSize)<br>+ if (m_param->reconfigWindowSize) {<br> hrd->cbrFlag = 0;<br>+ vbvMaxBitrate = m_param->decoderVbvMaxRate * 1000;<br>+ }<br> <br> // normalize HRD size and rate to the value / scale notation<br> hrd->bitRateScale = x265_clip3(0, 15, calcScale(vbvMaxBitrate) - BR_SHIFT);<br>diff --git a/source/x265.h b/source/x265.h<br>--- a/source/x265.h<br>+++ b/source/x265.h<br>@@ -1905,6 +1905,9 @@<br> <br> /* Edge variance threshold for quad tree establishment. */<br> float edgeVarThreshold;<br>+<br>+ /*Maxrate that could be signaled to the decoder. Default 0. API only. */<br>+ int decoderVbvMaxRate;<br></div></blockquote><div>Indentation issue.</div><div>Add an entry for the same in cli.rst </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"> } x265_param;<br> <br> /* x265_param_alloc:<br><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div><i><font face="georgia, serif">Thanks and Regards,</font></i></div><div><i><b><font face="georgia, serif">Snehaa.G</font></b></i></div></div></div></div></div></div></div></div></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><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><font face="georgia, serif">Regards,</font><div><b><font face="georgia, serif">Aruna Matheswaran,</font></b></div><div><font face="georgia, serif">Video Codec Engineer,</font></div><div><font face="georgia, serif">Media & AI analytics BU,</font></div><div><span><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><span style="border:none;display:inline-block;overflow:hidden;width:153px;height:58px"><img src="https://lh5.googleusercontent.com/gjX5cPNIZgwUrhfqkTwQUZWztIKmmo0qs3kbwvkS5H-bDVE2ftte9pMTVnFLSjOcjYWLtfc6_OGpxW4vraLg2r5QAIf1Q3MpldFDgWtzK_gXi8ptw5B3joIbsGL6mxj-JRdjHzT5" width="96" height="36" style="margin-left: 0px; margin-top: 0px;"></span></span></span><font face="georgia, serif"><br></font></div><div><span><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><span style="border:none;display:inline-block;overflow:hidden;width:153px;height:58px"><img src="https://lh5.googleusercontent.com/gjX5cPNIZgwUrhfqkTwQUZWztIKmmo0qs3kbwvkS5H-bDVE2ftte9pMTVnFLSjOcjYWLtfc6_OGpxW4vraLg2r5QAIf1Q3MpldFDgWtzK_gXi8ptw5B3joIbsGL6mxj-JRdjHzT5" style="margin-left: 0px; margin-top: 0px;"></span></span></span><font face="georgia, serif"><br></font></div><div><font face="georgia, serif"><br></font></div></div></div></div></div></div></div></div></div></div>