From: Jingning Han Date: Wed, 24 Oct 2018 03:30:35 +0000 (-0700) Subject: Enable tpl model to support multi-layer ARF X-Git-Tag: v1.8.0~208^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=47922cc140b6293194f4b26a5aa25d31f03bc1a0;p=libvpx Enable tpl model to support multi-layer ARF Enable temporal dependency model for the base layer ARF. It improves the multi-layer ARF compression performance (results are tested in speed 0 vbr mode): avg PSNR overall PSNR SSIM lowres -0.40% -0.46% -0.32% midres -0.59% -0.68% -0.45% 720p -0.55% -0.59% -1.07% Change-Id: I7790b89ccfb6e61f9b7965f34d348c7440220dd0 --- diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c index b69ee6181..b7ef88d36 100644 --- a/vp9/encoder/vp9_encodeframe.c +++ b/vp9/encoder/vp9_encodeframe.c @@ -3561,7 +3561,8 @@ static void ml_predict_var_rd_paritioning(VP9_COMP *cpi, MACROBLOCK *x, int get_rdmult_delta(VP9_COMP *cpi, BLOCK_SIZE bsize, int mi_row, int mi_col, int orig_rdmult) { - TplDepFrame *tpl_frame = &cpi->tpl_stats[cpi->twopass.gf_group.index]; + const int gf_group_index = cpi->twopass.gf_group.index; + TplDepFrame *tpl_frame = &cpi->tpl_stats[gf_group_index]; TplDepStats *tpl_stats = tpl_frame->tpl_stats_ptr; int tpl_stride = tpl_frame->stride; int64_t intra_cost = 0; @@ -3576,9 +3577,9 @@ int get_rdmult_delta(VP9_COMP *cpi, BLOCK_SIZE bsize, int mi_row, int mi_col, if (tpl_frame->is_valid == 0) return orig_rdmult; - if (cpi->common.show_frame) return orig_rdmult; + if (cpi->twopass.gf_group.layer_depth[gf_group_index] > 1) return orig_rdmult; - if (cpi->twopass.gf_group.index >= MAX_ARF_GOP_SIZE) return orig_rdmult; + if (gf_group_index >= MAX_ARF_GOP_SIZE) return orig_rdmult; for (row = mi_row; row < mi_row + mi_high; ++row) { for (col = mi_col; col < mi_col + mi_wide; ++col) {