[x265] [PATCH 3 of 3] rc: scale down intra costs to predict bits when bitdepth > 8

aarthi at multicorewareinc.com aarthi at multicorewareinc.com
Tue Sep 22 11:50:58 CEST 2015


# HG changeset patch
# User Aarthi Thirumalai
# Date 1442909471 -19800
#      Tue Sep 22 13:41:11 2015 +0530
# Node ID 8557bc303897a88e34b3ebb8ed4f9b16cfc68234
# Parent  5a3c92b92a049f49e7712ad3d2ba458937e0c55d
rc: scale down intra costs to predict bits when bitdepth > 8.

diff -r 5a3c92b92a04 -r 8557bc303897 source/encoder/ratecontrol.cpp
--- a/source/encoder/ratecontrol.cpp	Tue Sep 22 13:40:07 2015 +0530
+++ b/source/encoder/ratecontrol.cpp	Tue Sep 22 13:41:11 2015 +0530
@@ -1935,6 +1935,7 @@
             else if (picType == P_SLICE)
             {
                 intraCostForPendingCus = curEncData.m_rowStat[row].intraSatdForVbv - curEncData.m_rowStat[row].diagIntraSatd;
+                intraCostForPendingCus >>= X265_DEPTH - 8;
                 /* Our QP is lower than the reference! */
                 double pred_intra = predictSize(rce->rowPred[1], qScale, intraCostForPendingCus);
                 /* Sum: better to overestimate than underestimate by using only one of the two predictors. */
@@ -1970,7 +1971,7 @@
             uint64_t intraRowSatdCost = curEncData.m_rowStat[row].diagIntraSatd;
             if (row == 1)
                 intraRowSatdCost += curEncData.m_rowStat[0].diagIntraSatd;
-
+            intraRowSatdCost >>= X265_DEPTH - 8;
             updatePredictor(rce->rowPred[1], qScaleVbv, (double)intraRowSatdCost, encodedBits);
         }
     }


More information about the x265-devel mailing list