<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Feb 26, 2014 at 6:26 AM, Deepthi Nandakumar <span dir="ltr"><<a href="mailto:deepthi@multicorewareinc.com" target="_blank">deepthi@multicorewareinc.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote"><div class="">On Mon, Feb 24, 2014 at 6:26 PM,  <span dir="ltr"><<a href="mailto:aarthi@multicorewareinc.com" target="_blank">aarthi@multicorewareinc.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"># HG changeset patch<br>
# User Aarthi Thirumalai<br>
# Date 1393244455 -19800<br>
#      Mon Feb 24 17:50:55 2014 +0530<br>
# Node ID dce74082c20eea1f7ef9eb10f9a9addc5e7c7bb7<br>
# Parent  57ce7f0f4f4cbb9acd401751e8bef7b522774e38<br>
vbv: refactor, implement row wise qp updates only if vbv is enabled.<br>
<br>
diff -r 57ce7f0f4f4c -r dce74082c20e source/encoder/frameencoder.cpp<br>
--- a/source/encoder/frameencoder.cpp   Thu Feb 20 16:01:28 2014 -0800<br>
+++ b/source/encoder/frameencoder.cpp   Mon Feb 24 17:50:55 2014 +0530<br>
@@ -1058,6 +1058,7 @@<br>
     const uint32_t numCols = m_pic->getPicSym()->getFrameWidthInCU();<br>
     const uint32_t lineStartCUAddr = row * numCols;<br>
     double qpBase = m_pic->m_avgQpRc;<br>
+    bool isVbv = m_cfg->param.rc.vbvBufferSize > 0 && m_cfg->param.rc.vbvMaxBitrate > 0;<br></blockquote><div><br></div></div><div>Shouldnt this be just vbvBufferSize >0? Even if max bitrate is not specified, vbv is still enabled? <br>
</div></div></div></div></blockquote><div> vbv needs both bufsize and max bitrate to function. if ABR and maxrate is not specified, it copies abr bitrate to maxrate internally. else vbv is disabled.</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>
 <br></div><div class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
     for (uint32_t col = curRow.m_completed; col < numCols; col++)<br>
     {<br>
         const uint32_t cuAddr = lineStartCUAddr + col;<br>
@@ -1068,10 +1069,10 @@<br>
         codeRow.m_entropyCoder.resetEntropy();<br>
         TEncSbac *bufSbac = (m_cfg->param.bEnableWavefront && col == 0 && row > 0) ? &m_rows[row - 1].m_bufferSbacCoder : NULL;<br>
<br>
-        if ((uint32_t)row >= col && (row != 0))<br>
+        if ((uint32_t)row >= col && (row != 0) && isVbv)<br>
             qpBase = m_pic->getCU(cuAddr - numCols + 1)->m_baseQp;<br>
<br>
-        if (m_cfg->param.rc.aqMode || (m_cfg->param.rc.vbvBufferSize > 0 && m_cfg->param.rc.vbvMaxBitrate > 0))<br>
+        if (m_cfg->param.rc.aqMode || isVbv)<br>
         {<br>
             int qp = calcQpForCu(m_pic, cuAddr, qpBase);<br>
             setLambda(qp, row);<br>
@@ -1080,7 +1081,7 @@<br>
             cu->m_baseQp = qpBase;<br>
         }<br></blockquote><div><br></div></div><div>As I understand, qp = qpBase + average of qp offsets for that CU. This will be the final QP based on which mode decision happens. So, why are we storing qp and qpBase both in cu? <br>
</div></div></div></div></blockquote><div>we are triggering row wise vbv at each diagonal point and all cus falling to left of diagonal always get their base qp from their top right cu. so we need to track baseQP at each CU. </div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>
 <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">
         codeRow.processCU(cu, m_pic->getSlice(), bufSbac, m_cfg->param.bEnableWavefront && col == 1);<br>
-        if (m_cfg->param.rc.vbvBufferSize && m_cfg->param.rc.vbvMaxBitrate)<br>
+        if (isVbv)<br>
         {<br>
             // Update encoded bits, satdCost, baseQP for each CU<br>
             m_pic->m_rowDiagSatd[row] += m_pic->m_cuCostsForVbv[cuAddr];<br></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" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a><br>
</blockquote></div><br></div></div>
<br>_______________________________________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a><br>
<br></blockquote></div><br></div></div>