[x265] [PATCH] stats: move FrameStats from ratecontrol.h to frameencoder.h

Divya Manivannan divya at multicorewareinc.com
Fri Jun 5 14:54:42 CEST 2015


# HG changeset patch
# User Divya Manivannan <divya at multicorewareinc.com>
# Date 1433508825 -19800
#      Fri Jun 05 18:23:45 2015 +0530
# Node ID e566df2db7b679f306e805ce7da01e388eb86852
# Parent  d790bd34659a36a2028e801a4bff6031fe4a712a
stats: move FrameStats from ratecontrol.h to frameencoder.h

diff -r d790bd34659a -r e566df2db7b6 source/encoder/frameencoder.h
--- a/source/encoder/frameencoder.h	Fri Jun 05 18:21:24 2015 +0530
+++ b/source/encoder/frameencoder.h	Fri Jun 05 18:23:45 2015 +0530
@@ -52,6 +52,23 @@
 #define INTER_MODES 4
 #define INTRA_MODES 3
 
+/* Current frame stats for 2 pass */
+struct FrameStats
+{
+    int         mvBits;    /* MV bits (MV+Ref+Block Type) */
+    int         coeffBits; /* Texture bits (DCT coefs) */
+    int         miscBits;
+
+    int         intra8x8Cnt;
+    int         inter8x8Cnt;
+    int         skip8x8Cnt;
+
+    /* CU type counts stored as percentage */
+    double      percentIntra;
+    double      percentInter;
+    double      percentSkip;
+};
+
 struct StatisticLog
 {
     uint64_t cntInter[4];
diff -r d790bd34659a -r e566df2db7b6 source/encoder/ratecontrol.cpp
--- a/source/encoder/ratecontrol.cpp	Fri Jun 05 18:21:24 2015 +0530
+++ b/source/encoder/ratecontrol.cpp	Fri Jun 05 18:23:45 2015 +0530
@@ -28,7 +28,7 @@
 #include "frame.h"
 #include "framedata.h"
 #include "picyuv.h"
-
+#include "frameencoder.h"
 #include "encoder.h"
 #include "slicetype.h"
 #include "ratecontrol.h"
diff -r d790bd34659a -r e566df2db7b6 source/encoder/ratecontrol.h
--- a/source/encoder/ratecontrol.h	Fri Jun 05 18:21:24 2015 +0530
+++ b/source/encoder/ratecontrol.h	Fri Jun 05 18:23:45 2015 +0530
@@ -36,6 +36,7 @@
 class Frame;
 class SEIBufferingPeriod;
 struct SPS;
+struct FrameStats;
 #define BASE_FRAME_DURATION 0.04
 
 /* Arbitrary limitations as a sanity check. */
@@ -46,23 +47,6 @@
 #define MIN_AMORTIZE_FRACTION 0.2
 #define CLIP_DURATION(f) x265_clip3(MIN_FRAME_DURATION, MAX_FRAME_DURATION, f)
 
-/* Current frame stats for 2 pass */
-struct FrameStats
-{
-    int         mvBits;    /* MV bits (MV+Ref+Block Type) */
-    int         coeffBits; /* Texture bits (DCT coefs) */
-    int         miscBits;
-
-    int         intra8x8Cnt;
-    int         inter8x8Cnt;
-    int         skip8x8Cnt;
-    
-    /* CU type counts stored as percentage */
-    double      percentIntra;
-    double      percentInter;
-    double      percentSkip;
-};
-
 struct Predictor
 {
     double coeff;


More information about the x265-devel mailing list