]> granicus.if.org Git - libvpx/commitdiff
Add data structure for frame dependent mode decision
authorJingning Han <jingning@google.com>
Mon, 21 May 2018 16:31:13 +0000 (09:31 -0700)
committerJingning Han <jingning@google.com>
Thu, 14 Jun 2018 16:50:56 +0000 (09:50 -0700)
Add block and frame level data structures to support frame
dependent mode decision.

Change-Id: I996fc84155fcba8e2ec2a114bb0799d6aa5539dd

vp9/encoder/vp9_encoder.h

index f66c13046a9097da3b5eb91d1323a07d7f50eab5..d6d32abf99a9adb202b72c2720ac3ba8d38f220a 100644 (file)
@@ -278,6 +278,21 @@ static INLINE int is_lossless_requested(const VP9EncoderConfig *cfg) {
   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;
@@ -476,6 +491,8 @@ typedef struct VP9_COMP {
 #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.