From 2899a9d438ce5243936428baf4b6f4f1e63faae8 Mon Sep 17 00:00:00 2001 From: Marco Paniconi Date: Wed, 27 Jun 2018 12:26:09 -0700 Subject: [PATCH] vp9-svc: Fix to early golden exit nonrd-pickmode For SVC: apply the sse_zeromv early exit also to the case where golden is second temporal reference. Set the thresh_svc_golden threshold for this case. This is reduce the encode time for case where golden is second temporal reference for SVC. Change-Id: I8c0c87dd746579d3c4f5e983c7f9dd0a1e1476e0 --- vp9/encoder/vp9_pickmode.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vp9/encoder/vp9_pickmode.c b/vp9/encoder/vp9_pickmode.c index eb9abf729..1761fa95d 100644 --- a/vp9/encoder/vp9_pickmode.c +++ b/vp9/encoder/vp9_pickmode.c @@ -1541,8 +1541,10 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, TileDataEnc *tile_data, if (!cpi->use_svc || (svc->use_gf_temporal_ref_current_layer && - !svc->layer_context[svc->temporal_layer_id].is_key_frame)) + !svc->layer_context[svc->temporal_layer_id].is_key_frame)) { gf_temporal_ref = 1; + thresh_svc_skip_golden = 500; + } init_ref_frame_cost(cm, xd, ref_frame_cost); memset(&mode_checked[0][0], 0, MB_MODE_COUNT * MAX_REF_FRAMES); @@ -1796,7 +1798,7 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, TileDataEnc *tile_data, // For SVC, skip the golden (spatial) reference search if sse of zeromv_last // is below threshold. - if (cpi->use_svc && ref_frame == GOLDEN_FRAME && !gf_temporal_ref && + if (cpi->use_svc && ref_frame == GOLDEN_FRAME && sse_zeromv_normalized < thresh_svc_skip_golden) continue; -- 2.40.0