[x265] [PATCH] rc: add 2 pass states in RateControl

aarthi at multicorewareinc.com aarthi at multicorewareinc.com
Tue Jun 17 16:39:02 CEST 2014


# HG changeset patch
# User Aarthi Thirumalai<aarthi at multicorewareinc.com>
# Date 1403010851 -19800
#      Tue Jun 17 18:44:11 2014 +0530
# Node ID dcccf4b46c3da05eb86e3d42b11d0aa282298ad1
# Parent  4bccab85e50bbe15ba7e9d757381b3fc014a357f
rc: add 2 pass states in RateControl

diff -r 4bccab85e50b -r dcccf4b46c3d source/encoder/ratecontrol.h
--- a/source/encoder/ratecontrol.h	Tue Jun 17 18:32:27 2014 +0530
+++ b/source/encoder/ratecontrol.h	Tue Jun 17 18:44:11 2014 +0530
@@ -137,8 +137,22 @@
     double   m_nominalRemovalTime;
     double   m_prevCpbFinalAT;
 
+    /*2 pass */
+    bool m_2pass;
+    FILE *m_statFileOut;
+    char *m_cutreeStatFileTmpname;
+    char *m_statFileTmpname;
+    FILE *m_cutreeStatFileOut;
+    FILE *m_cutreeStatFileIn;
+
+    struct
+    {
+        uint16_t *qpBuffer[2]; /* Global buffers for converting MB-tree quantizer data. */
+        int qpBufPos;          /* In order to handle pyramid reordering, QP buffer acts as a stack.
+                                * This value is the current position (0 or 1). */
+    } m_cuTreeStats;
+
     RateControl(x265_param *p);
-
     // to be called for each frame to process RateControl and set QP
     void rateControlStart(TComPic* pic, Lookahead *, RateControlEntry* rce, Encoder* enc);
     void calcAdaptiveQuantFrame(TComPic *pic);


More information about the x265-devel mailing list