[x265] [PATCH] rc: Bug fix. use the slice type from the right context in rateControlEnd

aarthi at multicorewareinc.com aarthi at multicorewareinc.com
Fri Oct 25 20:20:59 CEST 2013


# HG changeset patch
# User Aarthi Thirumalai<aarthi at multicorewareinc.com>
# Date 1382725241 -19800
#      Fri Oct 25 23:50:41 2013 +0530
# Node ID 5f199bdd6c98f3167265a3807c13ed985dce55e6
# Parent  4ca4da7bdd36fbef00b9eefe54c0a56bf11633f3
rc: Bug fix. use the slice type from the right context in rateControlEnd.

diff -r 4ca4da7bdd36 -r 5f199bdd6c98 source/encoder/ratecontrol.cpp
--- a/source/encoder/ratecontrol.cpp	Fri Oct 25 12:11:31 2013 +0530
+++ b/source/encoder/ratecontrol.cpp	Fri Oct 25 23:50:41 2013 +0530
@@ -177,7 +177,7 @@
 {
     curSlice = pic->getSlice();
     sliceType = curSlice->getSliceType();
-
+    rce->sliceType = sliceType;
     switch (cfg->param.rc.rateControlMode)
     {
     case X265_RC_ABR:
@@ -382,7 +382,7 @@
 {
     if (cfg->param.rc.rateControlMode == X265_RC_ABR)
     {
-        if (sliceType != B_SLICE)
+        if (rce->sliceType != B_SLICE)
             /* The factor 1.5 is to tune up the actual bits, otherwise the cplxrSum is scaled too low
              * to improve short term compensation for next frame. */
             cplxrSum += 1.5 * bits * qp2qScale(rce->qpaRc) / rce->qRceq;


More information about the x265-devel mailing list