[x265] [PATCH] rc: change reencode position for cappedvbr

Divya Manivannan divya at multicorewareinc.com
Fri Mar 11 03:55:09 CET 2016


# HG changeset patch
# User Divya Manivannan <divya at multicorewareinc.com>
# Date 1457609566 -19800
#      Thu Mar 10 17:02:46 2016 +0530
# Node ID aa8fee246af690108331e172a84282a24492398c
# Parent  0af38750a71aab5fe790993365aaaa3e209a7d5c
rc: change reencode position for cappedvbr

diff -r 0af38750a71a -r aa8fee246af6 source/encoder/encoder.cpp
--- a/source/encoder/encoder.cpp	Thu Mar 10 21:43:35 2016 +0530
+++ b/source/encoder/encoder.cpp	Thu Mar 10 17:02:46 2016 +0530
@@ -783,7 +783,7 @@
                 if (m_rateControl->writeRateControlFrameStats(outFrame, &curEncoder->m_rce))
                     m_aborted = true;
 
-            if (pic_out && !m_param->rc.bStatRead)
+            if (pic_out && m_param->rc.bStatWrite)
             {
                 pic_out->rcData.qpaRc = outFrame->m_encData->m_avgQpRc;
                 pic_out->rcData.qRceq = curEncoder->m_rce.qRceq;
diff -r 0af38750a71a -r aa8fee246af6 source/encoder/ratecontrol.cpp
--- a/source/encoder/ratecontrol.cpp	Thu Mar 10 21:43:35 2016 +0530
+++ b/source/encoder/ratecontrol.cpp	Thu Mar 10 17:02:46 2016 +0530
@@ -874,7 +874,7 @@
                         double step = 0;
                         if (endIndex + fps >= m_numEntries)
                         {
-                            m_start = endIndex - fps + 1;
+                            m_start = endIndex - (endIndex % fps);
                             return true;
                         }
                         for (int start = endIndex + 1; start <= endIndex + fps && start < m_numEntries; start++)


More information about the x265-devel mailing list