changeset 12692:f1c17b7ffb79

Fix qp spikes in the row-level VBV rate-control when WPP enabled This commit fixes the unwanted QP spikes that comes due to irrelevant entropy information
author Kirithika <kirithika@multicorewareinc.com>
date Wed, 02 Sep 2020 08:25:18 +0530
parents b900d64a35b7
children ed592428babd
files source/encoder/ratecontrol.cpp
diffstat 1 files changed, 0 insertions(+-), 8 deletions(-) [+]
line wrap: on
line diff
--- a/source/encoder/ratecontrol.cpp	Sun Aug 30 17:37:13 2020 +0530
+++ b/source/encoder/ratecontrol.cpp	Wed Sep 02 08:25:18 2020 +0530
@@ -2543,13 +2543,7 @@ int RateControl::rowVbvRateControl(Frame
     double qScaleVbv = x265_qp2qScale(qpVbv);
     uint64_t rowSatdCost = curEncData.m_rowStat[row].rowSatd;
     double encodedBits = curEncData.m_rowStat[row].encodedBits;
-    uint32_t rowInSlice = row - m_sliceBaseRow[sliceId];
 
-    if (m_param->bEnableWavefront && rowInSlice == 1)
-    {
-        rowSatdCost += curEncData.m_rowStat[row - 1].rowSatd;
-        encodedBits += curEncData.m_rowStat[row - 1].encodedBits;
-    }
     rowSatdCost >>= X265_DEPTH - 8;
     updatePredictor(rce->rowPred[0], qScaleVbv, (double)rowSatdCost, encodedBits);
     if (curEncData.m_slice->m_sliceType != I_SLICE && !m_param->rc.bEnableConstVbv)
@@ -2558,8 +2552,6 @@ int RateControl::rowVbvRateControl(Frame
         if (qpVbv < refFrame->m_encData->m_rowStat[row].rowQp)
         {
             uint64_t intraRowSatdCost = curEncData.m_rowStat[row].rowIntraSatd;
-            if (m_param->bEnableWavefront && rowInSlice == 1)
-                intraRowSatdCost += curEncData.m_rowStat[row - 1].rowIntraSatd;
             intraRowSatdCost >>= X265_DEPTH - 8;
             updatePredictor(rce->rowPred[1], qScaleVbv, (double)intraRowSatdCost, encodedBits);
         }