summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJingning Han <jingning@google.com>2018-10-23 20:30:35 -0700
committerJingning Han <jingning@google.com>2018-10-23 20:30:35 -0700
commit47922cc140b6293194f4b26a5aa25d31f03bc1a0 (patch)
treef8713b6528fa1a0d26784b844f1a7827bcbad15e
parentfe471693acbf0d5bb61018b38ea11bdc342eec08 (diff)
downloadlibvpx-47922cc140b6293194f4b26a5aa25d31f03bc1a0.tar
libvpx-47922cc140b6293194f4b26a5aa25d31f03bc1a0.tar.gz
libvpx-47922cc140b6293194f4b26a5aa25d31f03bc1a0.tar.bz2
libvpx-47922cc140b6293194f4b26a5aa25d31f03bc1a0.zip
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
-rw-r--r--vp9/encoder/vp9_encodeframe.c7
1 files changed, 4 insertions, 3 deletions
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) {