From ea78306257fa185255ef922541306d2a9ab1b744 Mon Sep 17 00:00:00 2001 From: Jingning Han Date: Mon, 21 May 2018 09:31:13 -0700 Subject: [PATCH] Add data structure for frame dependent mode decision Add block and frame level data structures to support frame dependent mode decision. Change-Id: I996fc84155fcba8e2ec2a114bb0799d6aa5539dd --- vp9/encoder/vp9_encoder.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/vp9/encoder/vp9_encoder.h b/vp9/encoder/vp9_encoder.h index f66c13046..d6d32abf9 100644 --- a/vp9/encoder/vp9_encoder.h +++ b/vp9/encoder/vp9_encoder.h @@ -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. -- 2.40.0