<div dir="ltr"><div dir="ltr">This patch has been pushed to the master branch. <br clear="all"><div><div dir="ltr" class="gmail_signature"><div dir="ltr"></div></div></div><div><div dir="ltr" class="gmail_signature"><div dir="ltr"></div></div></div><div><div dir="ltr" class="gmail_signature"><div dir="ltr"></div></div></div><div><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><b>__________________________</b></div><div><b>Karam Singh</b></div><div><b>Ph.D. IIT Guwahati</b></div><div><font size="1">Senior Software (Video Coding) Engineer  </font></div><div><font size="1">Mobile: +91 8011279030</font></div><div><font size="1">Block 9A, 6th floor, DLF Cyber City</font></div><div><font size="1">Manapakkam, Chennai 600 089</font></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Oct 4, 2024 at 2:12 PM Yaswanth Sastry <<a href="mailto:yaswanth.sastry@multicorewareinc.com">yaswanth.sastry@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>From 876a66a23aa4e6e8ed055073b774039ac9bd447a Mon Sep 17 00:00:00 2001</div><div>From: yaswanthsastry <<a href="mailto:yaswanth.sastry@multicorewareinc.com" target="_blank">yaswanth.sastry@multicorewareinc.com</a>></div><div>Date: Thu, 3 Oct 2024 16:24:50 +0530</div><div>Subject: [PATCH] Fix Initialization of VBV-End Flag error with multiple layers</div><div><br></div><div>---</div><div> source/encoder/encoder.cpp     | 2 +-</div><div> source/encoder/ratecontrol.cpp | 2 +-</div><div> 2 files changed, 2 insertions(+), 2 deletions(-)</div><div><br></div><div>diff --git a/source/encoder/encoder.cpp b/source/encoder/encoder.cpp</div><div>index f890cff10..ff3f2f8e5 100644</div><div>--- a/source/encoder/encoder.cpp</div><div>+++ b/source/encoder/encoder.cpp</div><div>@@ -1713,7 +1713,7 @@ int Encoder::encode(const x265_picture* pic_in, x265_picture** pic_out)</div><div>             inFrame[layer]->m_poc = (!layer) ? (++m_pocLast) : m_pocLast;</div><div>             inFrame[layer]->m_userData = inputPic[0]->userData;</div><div>             inFrame[layer]->m_pts = inputPic[0]->pts;</div><div>-              inFrame[layer]->vbvEndFlag = inputPic[layer]->vbvEndFlag;</div><div>+            inFrame[layer]->vbvEndFlag = inputPic[0]->vbvEndFlag;</div><div> </div><div>             if ((m_param->bEnableSceneCutAwareQp & BACKWARD) && m_param->rc.bStatRead)</div><div>             {</div><div>diff --git a/source/encoder/ratecontrol.cpp b/source/encoder/ratecontrol.cpp</div><div>index fc79e88ab..d031e8d99 100644</div><div>--- a/source/encoder/ratecontrol.cpp</div><div>+++ b/source/encoder/ratecontrol.cpp</div><div>@@ -1466,7 +1466,7 @@ int RateControl::rateControlStart(Frame* curFrame, RateControlEntry* rce, Encode</div><div>          if (m_param->vbvBufferEnd && ((curFrame->vbvEndFlag) || ((m_param->totalFrames) && (rce->encodeOrder >= (m_param->vbvEndFrameAdjust * m_param->totalFrames)))))</div><div>          {</div><div>               if (m_totalFrames == -1)</div><div>-                   m_totalFrames = curFrame->vbvEndFlag ? (1 / m_param->vbvEndFrameAdjust) * rce->encodeOrder : m_param->totalFrames;</div><div>+<span style="white-space:pre-wrap">                           </span>m_totalFrames = curFrame->vbvEndFlag ? static_cast<int>((1 / m_param->vbvEndFrameAdjust) * rce->encodeOrder) : m_param->totalFrames;</div><div>               rce->remainingVbvEndFrames = ((m_totalFrames) - (rce->encodeOrder));</div><div>               rce->vbvEndAdj = true;</div><div>               rce->targetFill = 0;</div><div>-- </div><div>2.37.3.windows.1</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>