From c725502bf32b0df223aaf179a828360433606a1c Mon Sep 17 00:00:00 2001 From: Jingning Han <jingning@google.com> Date: Fri, 19 Jul 2013 15:18:05 -0700 Subject: [PATCH] Skip buffer update in sub8x8 rd loop This commit allows the encoder to skip a few buffer update steps in rd_pick_best_mbsegmentation, when early breakout has been triggered in the rd_check_segment_txsize. It provides about 1% speed-up for bus_cif at 2000 kbps, in the settings of speed 0. Change-Id: Ica034f10a24dec572b397d8389a2b81020ebc0b9 --- vp9/encoder/vp9_rdopt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c index ae51a3317d..69e45e8001 100644 --- a/vp9/encoder/vp9_rdopt.c +++ b/vp9/encoder/vp9_rdopt.c @@ -2129,6 +2129,8 @@ static int64_t rd_pick_best_mbsegmentation(VP9_COMP *cpi, MACROBLOCK *x, rd_check_segment_txsize(cpi, x, &bsi, seg_mvs, mi_row, mi_col); + if (bsi.segment_rd > best_rd) + return INT64_MAX; /* set it to the best */ for (i = 0; i < 4; i++) { x->e_mbd.mode_info_context->bmi[i].as_mv[0].as_int = bsi.mvs[i].as_int; -- GitLab