[x265] [PATCH 1 of 2] rc: record one more field in 1st pass stats

aarthi at multicorewareinc.com aarthi at multicorewareinc.com
Mon Nov 23 09:46:21 CET 2015


# HG changeset patch
# User Aarthi Thirumalai
# Date 1448261805 -19800
#      Mon Nov 23 12:26:45 2015 +0530
# Branch stable
# Node ID 6b308775b6f065ea5002a76a40aa6f5d81e8ee50
# Parent  1f0d4dee7e3b3c34dd6b8c3305c61fa79b03b9ce
rc: record one more field in 1st pass stats

diff -r 1f0d4dee7e3b -r 6b308775b6f0 source/encoder/ratecontrol.cpp
--- a/source/encoder/ratecontrol.cpp	Mon Oct 12 15:51:23 2015 +0530
+++ b/source/encoder/ratecontrol.cpp	Mon Nov 23 12:26:45 2015 +0530
@@ -507,7 +507,7 @@
                 char picType;
                 int e;
                 char *next;
-                double qpRc, qpAq;
+                double qpRc, qpAq, qNoVbv;
                 next = strstr(p, ";");
                 if (next)
                     *next++ = 0;
@@ -518,8 +518,8 @@
                     return false;
                 }
                 rce = &m_rce2Pass[frameNumber];
-                e += sscanf(p, " in:%*d out:%*d type:%c q:%lf q-aq:%lf tex:%d mv:%d misc:%d icu:%lf pcu:%lf scu:%lf",
-                       &picType, &qpRc, &qpAq, &rce->coeffBits,
+                e += sscanf(p, " in:%*d out:%*d type:%c q:%lf q-aq:%lf q-noVbv:%lf tex:%d mv:%d misc:%d icu:%lf pcu:%lf scu:%lf",
+                       &picType, &qpRc, &qpAq, &qNoVbv, &rce->coeffBits,
                        &rce->mvBits, &rce->miscBits, &rce->iCuCount, &rce->pCuCount,
                        &rce->skipCuCount);
                 rce->keptAsRef = true;
@@ -540,6 +540,9 @@
                 }
                 rce->qScale = x265_qp2qScale(qpRc);
                 totalQpAq += qpAq;
+                rce->qpNoVbv = qNoVbv;
+                rce->qpaRc = qpRc;
+                rce->qpAq = qpAq;
                 p = next;
             }
             X265_FREE(statsBuf);
@@ -2325,9 +2328,10 @@
         : rce->sliceType == P_SLICE ? 'P'
         : IS_REFERENCED(curFrame) ? 'B' : 'b';
     if (fprintf(m_statFileOut,
-                "in:%d out:%d type:%c q:%.2f q-aq:%.2f tex:%d mv:%d misc:%d icu:%.2f pcu:%.2f scu:%.2f ;\n",
+                "in:%d out:%d type:%c q:%.2f q-aq:%.2f q-noVbv:%.2f tex:%d mv:%d misc:%d icu:%.2f pcu:%.2f scu:%.2f ;\n",
                 rce->poc, rce->encodeOrder,
                 cType, curEncData.m_avgQpRc, curEncData.m_avgQpAq,
+                rce->qpNoVbv,
                 curFrame->m_encData->m_frameStats.coeffBits,
                 curFrame->m_encData->m_frameStats.mvBits,
                 curFrame->m_encData->m_frameStats.miscBits,


More information about the x265-devel mailing list