[x265] [PATCH] vbv: clear row diagonal Satd costs, cu Satd costs when vbv row reset is triggered

aarthi at multicorewareinc.com aarthi at multicorewareinc.com
Tue Apr 15 18:34:36 CEST 2014


# HG changeset patch
# User Aarthi Thirumalai
# Date 1397579661 -19800
#      Tue Apr 15 22:04:21 2014 +0530
# Node ID bf48002755a3f5593732ca039ad38a3c799da808
# Parent  0a95a6bb0f8e71d7a7d0f8e3803ec2878ad558fe
vbv: clear row diagonal Satd costs, cu Satd costs when vbv row reset is triggered.

diff -r 0a95a6bb0f8e -r bf48002755a3 source/encoder/frameencoder.cpp
--- a/source/encoder/frameencoder.cpp	Tue Apr 15 12:34:36 2014 +0900
+++ b/source/encoder/frameencoder.cpp	Tue Apr 15 22:04:21 2014 +0530
@@ -1192,6 +1192,8 @@
                         m_pic->m_qpaRc[r] = 0;
                         m_pic->m_rowEncodedBits[r] = 0;
                         m_pic->m_numEncodedCusPerRow[r] = 0;
+                        m_pic->m_rowDiagSatd[r] = 0;
+                        m_pic->m_rowDiagIntraSatd[r] = 0;
                     }
 
                     m_bAllRowsStop = false;
@@ -1248,6 +1250,13 @@
     x265_emms();
     double qp = baseQp;
 
+    /*clear cuCostsForVbv when vbv row reset is triggered. */
+    if (m_pic->m_cuCostsForVbv[cuAddr] > 0 || m_pic->m_intraCuCostsForVbv[cuAddr] > 0)
+    {
+        m_pic->m_cuCostsForVbv[cuAddr] = 0;
+        m_pic->m_intraCuCostsForVbv[cuAddr] = 0;
+    }
+
     /* Derive qpOffet for each CU by averaging offsets for all 16x16 blocks in the cu. */
     double qp_offset = 0;
     int maxBlockCols = (m_pic->getPicYuvOrg()->getWidth() + (16 - 1)) / 16;


More information about the x265-devel mailing list