[x265] [PATCH 2 of 3] ratecontrol: remove RateControl->qpNoVbv

deepthi at multicorewareinc.com deepthi at multicorewareinc.com
Tue May 6 12:18:09 CEST 2014


# HG changeset patch
# User Deepthi Nandakumar <deepthi at multicorewareinc.com>
# Date 1399370659 -19800
# Node ID f824c1f583f8dea91c3685b7d3228f36ac6d4878
# Parent  33772b1766588c9088dbf7c3c7f6f6e92b92d27d
ratecontrol: remove RateControl->qpNoVbv.

Less confusion, and we have whatever info we need in rce->qpNoVbv anyway

diff -r 33772b176658 -r f824c1f583f8 source/encoder/ratecontrol.cpp
--- a/source/encoder/ratecontrol.cpp	Tue May 06 15:31:18 2014 +0530
+++ b/source/encoder/ratecontrol.cpp	Tue May 06 15:34:19 2014 +0530
@@ -414,7 +414,6 @@
         rce->qpaRc = pic->m_avgQpRc = pic->m_avgQpAq = q;
         /* copy value of lastRceq into thread local rce struct *to be used in RateControlEnd() */
         rce->qRceq = lastRceq;
-        rce->qpNoVbv = qpNoVbv;
         accumPQpUpdate();
     }
     else //CQP
@@ -491,8 +490,8 @@
             q += pbOffset / 2;
         else
             q += pbOffset;
-        qpNoVbv = q;
-        double qScale = x265_qp2qScale(qpNoVbv);
+        rce->qpNoVbv = q;
+        double qScale = x265_qp2qScale(q);
         rce->frameSizePlanned = predictSize(&predBfromP, qScale, (double)leadingNoBSatd);
         rce->frameSizeEstimated = rce->frameSizePlanned;
         return qScale;
@@ -586,7 +585,7 @@
         }
 
         q = Clip3(MIN_QPSCALE, MAX_MAX_QPSCALE, q);
-        qpNoVbv = x265_qScale2qp(q);
+        rce->qpNoVbv = x265_qScale2qp(q);
 
         if(isVbv && currentSatd > 0)
             q = clipQscale(pic, q);
diff -r 33772b176658 -r f824c1f583f8 source/encoder/ratecontrol.h
--- a/source/encoder/ratecontrol.h	Tue May 06 15:31:18 2014 +0530
+++ b/source/encoder/ratecontrol.h	Tue May 06 15:34:19 2014 +0530
@@ -121,7 +121,6 @@
     double lastRceq;
     int framesDone;           /* framesDone keeps track of # of frames passed through RateCotrol already */
     double qCompress;
-    double qpNoVbv;             /* QP for the current frame if 1-pass VBV was disabled. */
     RateControl(Encoder * _cfg);
 
     // to be called for each frame to process RateControl and set QP


More information about the x265-devel mailing list