[x265] [PATCH] vbv: log frame-average QPs for VBV; even when AQ is disabled

Aarthi Priya Thirumalai aarthi at multicorewareinc.com
Tue Apr 8 17:03:06 CEST 2014


On Tue, Apr 8, 2014 at 4:26 PM, <deepthi at multicorewareinc.com> wrote:

> # 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;
>
aq/cutree offsets are computed only when aq/cutree is turned on. vbv can
still function without them. the above change has no effect when aq/cutree
is off (presets ultrafast/superfast). need to log m_avgQpaRc (where avg qp
for vbv is calculated) instead.

>          }
>
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20140408/a7eaa62e/attachment.html>


More information about the x265-devel mailing list