diff options
author | Angie Chiang <angiebird@google.com> | 2019-02-08 17:28:43 -0800 |
---|---|---|
committer | Angie Chiang <angiebird@google.com> | 2019-02-13 11:10:48 -0800 |
commit | d804d8b9644f5ec911b9b756d5e7e7122e113b19 (patch) | |
tree | c41a373e46e8fa85d316114a94bc2f26a483f1da | |
parent | 1e12d19bbfbf4cc5a7ddce394b40f3ba00a4ec15 (diff) | |
download | libvpx-d804d8b9644f5ec911b9b756d5e7e7122e113b19.tar libvpx-d804d8b9644f5ec911b9b756d5e7e7122e113b19.tar.gz libvpx-d804d8b9644f5ec911b9b756d5e7e7122e113b19.tar.bz2 libvpx-d804d8b9644f5ec911b9b756d5e7e7122e113b19.zip |
Only discount new mv mode when tpl model is ready
Change-Id: I3326f0912627981fd604b16ddbf668d2262d4287
-rw-r--r-- | vp9/encoder/vp9_encoder.c | 2 | ||||
-rw-r--r-- | vp9/encoder/vp9_encoder.h | 1 | ||||
-rw-r--r-- | vp9/encoder/vp9_rdopt.c | 2 |
3 files changed, 4 insertions, 1 deletions
diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c index c69f581d6..d85c715f7 100644 --- a/vp9/encoder/vp9_encoder.c +++ b/vp9/encoder/vp9_encoder.c @@ -2369,6 +2369,7 @@ VP9_COMP *vp9_create_compressor(VP9EncoderConfig *oxcf, #if CONFIG_NON_GREEDY_MV cpi->feature_score_loc_alloc = 0; + cpi->tpl_ready = 0; #endif // CONFIG_NON_GREEDY_MV for (i = 0; i < MAX_ARF_GOP_SIZE; ++i) cpi->tpl_stats[i].tpl_stats_ptr = NULL; @@ -6884,6 +6885,7 @@ static void setup_tpl_stats(VP9_COMP *cpi) { mc_flow_dispenser(cpi, gf_picture, frame_idx, cpi->tpl_bsize); } #if CONFIG_NON_GREEDY_MV + cpi->tpl_ready = 1; #if DUMP_TPL_STATS dump_tpl_stats(cpi, tpl_group_frames, gf_picture, cpi->tpl_bsize); #endif // DUMP_TPL_STATS diff --git a/vp9/encoder/vp9_encoder.h b/vp9/encoder/vp9_encoder.h index e543ae70b..f571a384f 100644 --- a/vp9/encoder/vp9_encoder.h +++ b/vp9/encoder/vp9_encoder.h @@ -594,6 +594,7 @@ typedef struct VP9_COMP { YV12_BUFFER_CONFIG *tpl_recon_frames[REF_FRAMES]; EncFrameBuf enc_frame_buf[REF_FRAMES]; #if CONFIG_NON_GREEDY_MV + int tpl_ready; int feature_score_loc_alloc; FEATURE_SCORE_LOC *feature_score_loc_arr; FEATURE_SCORE_LOC **feature_score_loc_sort; diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c index a9c2c32d0..c4eefa846 100644 --- a/vp9/encoder/vp9_rdopt.c +++ b/vp9/encoder/vp9_rdopt.c @@ -2543,7 +2543,7 @@ static int discount_newmv_test(const VP9_COMP *cpi, int this_mode, #if CONFIG_NON_GREEDY_MV (void)mode_mv; (void)this_mv; - if (this_mode == NEWMV && bsize >= BLOCK_8X8) { + if (this_mode == NEWMV && bsize >= BLOCK_8X8 && cpi->tpl_ready) { const int gf_group_idx = cpi->twopass.gf_group.index; const int gf_rf_idx = ref_frame_to_gf_rf_idx(ref_frame); const TplDepFrame tpl_frame = cpi->tpl_stats[gf_group_idx]; |