shithub: libvpx

Download patch

ref: ea78306257fa185255ef922541306d2a9ab1b744
parent: 7a1ac4712b96db9ce48cbddfdc59d8d6adda10e6
author: Jingning Han <jingning@google.com>
date: Mon May 21 05:31:13 EDT 2018

Add data structure for frame dependent mode decision

Add block and frame level data structures to support frame
dependent mode decision.

Change-Id: I996fc84155fcba8e2ec2a114bb0799d6aa5539dd

--- a/vp9/encoder/vp9_encoder.h
+++ b/vp9/encoder/vp9_encoder.h
@@ -278,6 +278,21 @@
   return cfg->best_allowed_q == 0 && cfg->worst_allowed_q == 0;
 }
 
+typedef struct TplDepStats {
+  uint64_t intra_cost;
+  uint64_t inter_cost;
+  uint64_t mc_flow;
+  uint64_t mc_dep_cost;
+} TplDepStats;
+
+typedef struct TplDepFrame {
+  uint8_t is_valid;
+  TplDepStats *tpl_stats_ptr;
+  int stride;
+  int width;
+  int height;
+} TplDepFrame;
+
 // TODO(jingning) All spatially adaptive variables should go to TileDataEnc.
 typedef struct TileDataEnc {
   TileInfo tile_info;
@@ -475,6 +490,8 @@
   YV12_BUFFER_CONFIG raw_scaled_source;
 #endif
   YV12_BUFFER_CONFIG *raw_source_frame;
+
+  TplDepFrame tpl_stats[MAX_LAG_BUFFERS];
 
   TileDataEnc *tile_data;
   int allocated_tiles;  // Keep track of memory allocated for tiles.