Add necessary structs definitions for first pass stats analysis.
Change-Id: I3662d478d4c6c0947c4aeb852a42a8618c75ba78
diff --git a/av1/encoder/ratectrl.h b/av1/encoder/ratectrl.h
index d9e8e4a..de46bae 100644
--- a/av1/encoder/ratectrl.h
+++ b/av1/encoder/ratectrl.h
@@ -92,6 +92,25 @@
typedef enum { ORIG = 0, THREE_QUARTER = 1, ONE_HALF = 2 } RESIZE_STATE;
+#define MAX_FIRSTPASS_ANALYSIS_FRAMES 150
+typedef enum region_types {
+ STABLE_REGION = 0,
+ HIGH_VAR_REGION = 1,
+ SCENECUT_REGION = 2,
+ BLENDING_REGION = 3,
+} REGION_TYPES;
+
+typedef struct regions {
+ int start;
+ int last;
+ double avg_noise_var;
+ double avg_cor_coeff;
+ double avg_sr_fr_ratio;
+ double avg_intra_err;
+ double avg_coded_err;
+ REGION_TYPES type;
+} REGIONS;
+
/*!\endcond */
/*!
* \brief Rate Control parameters and status
@@ -180,6 +199,10 @@
int cur_gf_index;
/*!\cond */
+ int num_regions;
+ REGIONS regions[MAX_FIRSTPASS_ANALYSIS_FRAMES];
+ double cor_coeff[MAX_FIRSTPASS_ANALYSIS_FRAMES];
+
int min_gf_interval;
int max_gf_interval;
int static_scene_max_gf_interval;