[x265] [PATCH] vbv: log frame-average QPs for VBV; even when AQ is disabled
deepthi at multicorewareinc.com
deepthi at multicorewareinc.com
Tue Apr 8 12:56:59 CEST 2014
# HG changeset patch
# User Deepthi Nandakumar <deepthi at multicorewareinc.com>
# Date 1396954311 -19800
# Node ID c450e358329bca26d084daa86d9e4833b837fcdc
# Parent b5caca9954f36fc8e1cfb9e25f96288bf3aa18e2
vbv: log frame-average QPs for VBV; even when AQ is disabled.
diff -r b5caca9954f3 -r c450e358329b source/Lib/TLibCommon/TComPic.cpp
--- a/source/Lib/TLibCommon/TComPic.cpp Tue Apr 08 16:13:11 2014 +0530
+++ b/source/Lib/TLibCommon/TComPic.cpp Tue Apr 08 16:21:51 2014 +0530
@@ -114,7 +114,7 @@
int numRows = m_picSym->getFrameHeightInCU();
int numCols = m_picSym->getFrameWidthInCU();
- if (cfg->param->rc.aqMode)
+ if (cfg->param->rc.aqMode || isVbv)
CHECKED_MALLOC(m_qpaAq, double, numRows);
if (isVbv)
{
@@ -156,7 +156,7 @@
memset(m_intraCuCostsForVbv, 0, numRows * numCols * sizeof(uint32_t));
memset(m_qpaRc, 0, numRows * sizeof(double));
}
- if (cfg->param->rc.aqMode)
+ if (cfg->param->rc.aqMode || (cfg->param->rc.vbvBufferSize > 0 && cfg->param->rc.vbvMaxBitrate > 0))
memset(m_qpaAq, 0, m_picSym->getFrameHeightInCU() * sizeof(double));
}
diff -r b5caca9954f3 -r c450e358329b source/encoder/frameencoder.cpp
--- a/source/encoder/frameencoder.cpp Tue Apr 08 16:13:11 2014 +0530
+++ b/source/encoder/frameencoder.cpp Tue Apr 08 16:21:51 2014 +0530
@@ -1115,7 +1115,7 @@
setLambda(qp, row);
qp = Clip3(-QP_BD_OFFSET, MAX_QP, qp);
cu->setQPSubParts(char(qp), 0, 0);
- if (m_cfg->param->rc.aqMode)
+ if (m_cfg->param->rc.aqMode || bIsVbv)
m_pic->m_qpaAq[row] += qp;
}
More information about the x265-devel
mailing list