[x265] [PATCH] Fix qp spikes in the row-level VBV rate-control when WPP enabled

Kirithika Kalirathnam kirithika at multicorewareinc.com
Fri Aug 28 07:20:23 CEST 2020


>From 1c18fa6dee969814d14875f6d90a7a156ee1ebb4 Mon Sep 17 00:00:00 2001
From: Kirithika <kirithika at multicorewareinc.com>
Date: Wed, 26 Aug 2020 16:44:32 +0530
Subject: [PATCH] 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
---
 source/encoder/ratecontrol.cpp | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/source/encoder/ratecontrol.cpp b/source/encoder/ratecontrol.cpp
index 32b24c23c..82d7c4f2a 100644
--- a/source/encoder/ratecontrol.cpp
+++ b/source/encoder/ratecontrol.cpp
@@ -2543,13 +2543,7 @@ int RateControl::rowVbvRateControl(Frame* curFrame,
uint32_t row, RateControlEnt
     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* curFrame,
uint32_t row, RateControlEnt
         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);
         }
-- 
2.28.0.windows.1

*Thanks,*
*Kirithika*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20200828/a8247702/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-fix-vbv.patch
Type: application/octet-stream
Size: 1926 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20200828/a8247702/attachment.obj>


More information about the x265-devel mailing list