[x265] [PATCH] rc: enable abr reset in the first pass of two pass encode

aarthi at multicorewareinc.com aarthi at multicorewareinc.com
Fri Aug 1 15:24:27 CEST 2014


# HG changeset patch
# User Aarthi Thirumalai
# Date 1406898957 -19800
#      Fri Aug 01 18:45:57 2014 +0530
# Node ID 1e6f57c1d2fae37f1bbb813c0a01091195117e98
# Parent  3db5fda6abf08721efe7dcaf0ca57ff2965284fb
rc: enable abr reset in the first pass of two pass encode.

observe this improves second pass results in ultrafast presets for some videos.

diff -r 3db5fda6abf0 -r 1e6f57c1d2fa source/encoder/ratecontrol.cpp
--- a/source/encoder/ratecontrol.cpp	Fri Aug 01 16:31:20 2014 +0530
+++ b/source/encoder/ratecontrol.cpp	Fri Aug 01 18:45:57 2014 +0530
@@ -1467,7 +1467,7 @@
             }
             else
             {
-                if (!m_param->rc.bStatWrite && !m_param->rc.bStatRead)
+                if (!m_param->rc.bStatRead)
                     checkAndResetABR(rce, false);
                 q = getQScale(rce, m_wantedBitsWindow / m_cplxrSum);
 
@@ -2036,7 +2036,7 @@
     Slice *slice = pic->m_picSym->m_slice;
     if (m_isAbr)
     {
-        if (m_param->rc.rateControlMode == X265_RC_ABR && !m_param->rc.bStatRead && !m_param->rc.bStatWrite)
+        if (m_param->rc.rateControlMode == X265_RC_ABR && !m_param->rc.bStatRead)
             checkAndResetABR(rce, true);
 
         if (m_param->rc.rateControlMode == X265_RC_CRF)


More information about the x265-devel mailing list