[x265] [PATCH] rc: qpvbv is between qpMin and prevRowQp when specifies the rfConstantMin

Steve Borho steve at borho.org
Thu May 8 20:34:22 CEST 2014


On Thu, May 8, 2014 at 1:30 AM,  <gopu at multicorewareinc.com> wrote:
> # HG changeset patch
> # User Gopu Govindaswamy
> # Date 1399530575 -19800
> #      Thu May 08 11:59:35 2014 +0530
> # Node ID 06991c82909f631e86fead3dbe0a408552b0c4a0
> # Parent  6871636e99cb7d26d1d693415d7f8bf52cd190cf
> rc: qpvbv is between qpMin and prevRowQp when specifies the rfConstantMin
>
> diff -r 6871636e99cb -r 06991c82909f source/encoder/ratecontrol.cpp
> --- a/source/encoder/ratecontrol.cpp    Thu May 08 10:10:53 2014 +0530
> +++ b/source/encoder/ratecontrol.cpp    Thu May 08 11:59:35 2014 +0530
> @@ -859,7 +859,7 @@
>          qpAbsoluteMax = X265_MIN(qpAbsoluteMax, rce->qpNoVbv + rateFactorMaxIncrement);
>
>      if (rateFactorMaxDecrement)
> -        qpAbsoluteMin = X265_MAX(qpAbsoluteMin, rce->qpNoVbv - rateFactorMaxIncrement);
> +        qpAbsoluteMin = X265_MAX(qpAbsoluteMin, rce->qpNoVbv - rateFactorMaxDecrement);
>
>      double qpMax = X265_MIN(prevRowQp + param->rc.qpStep, qpAbsoluteMax);
>      double qpMin = X265_MAX(prevRowQp - param->rc.qpStep, qpAbsoluteMin);
> @@ -931,10 +931,13 @@
>              return -1;
>          }
>
> -        if (qpVbv < qpMin && prevRowQp > qpMin && canReencodeRow)
> +        if (param->rc.rfConstantMin)
>          {
> -            qpVbv = Clip3(prevRowQp + 1.0f, (prevRowQp + qpVbv) * 0.5, qpMin);
> -            return -1;
> +            if (qpVbv < qpMin && prevRowQp > qpMin && canReencodeRow)
> +            {
> +                qpVbv = Clip3(qpMin, prevRowQp ,(prevRowQp + qpVbv) * 0.5);

queued with a white-space cleanup on this line

> +                return -1;
> +            }
>          }
>      }
>      else
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel



-- 
Steve Borho


More information about the x265-devel mailing list