[x265] [PATCH STABLE] rc: move stats-file write into if (outframe) conditional

Steve Borho steve at borho.org
Wed Aug 19 09:43:47 CEST 2015


# HG changeset patch
# User Steve Borho <steve at borho.org>
# Date 1439969805 -19800
#      Wed Aug 19 13:06:45 2015 +0530
# Branch stable
# Node ID 66b8ed59f37f19b8d0ecc3c861f5082422bf1b80
# Parent  90000888bb3d621b818edaa88a4f1b9b36e97ea6
rc: move stats-file write into if (outframe) conditional

diff -r 90000888bb3d -r 66b8ed59f37f source/encoder/encoder.cpp
--- a/source/encoder/encoder.cpp	Wed Aug 19 10:36:59 2015 +0530
+++ b/source/encoder/encoder.cpp	Wed Aug 19 13:06:45 2015 +0530
@@ -612,6 +612,11 @@
 
             finishFrameStats(outFrame, curEncoder, curEncoder->m_accessUnitBits, frameData);
 
+            /* Write RateControl Frame level stats in multipass encodes */
+            if (m_param->rc.bStatWrite)
+                if (m_rateControl->writeRateControlFrameStats(outFrame, &curEncoder->m_rce))
+                    m_aborted = true;
+
             /* Allow this frame to be recycled if no frame encoders are using it for reference */
             if (!pic_out)
             {
@@ -689,10 +694,6 @@
             /* Allow FrameEncoder::compressFrame() to start in the frame encoder thread */
             if (!curEncoder->startCompressFrame(frameEnc))
                 m_aborted = true;
-            /* Write RateControl Frame level stats in multipass encodes */
-            if (m_param->rc.bStatWrite)
-                if (m_rateControl->writeRateControlFrameStats(frameEnc, &curEncoder->m_rce))
-                    m_aborted = true;
         }
         else if (m_encodedFrameNum)
             m_rateControl->setFinalFrameCount(m_encodedFrameNum); 


More information about the x265-devel mailing list