diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c index bd991397b747ecd706c46716b13ef6a1300c1427..775e107458083acfe50b5cef43891e5f685d4c93 100644 --- a/vp9/encoder/vp9_rdopt.c +++ b/vp9/encoder/vp9_rdopt.c @@ -2189,6 +2189,8 @@ static int64_t rd_pick_best_mbsegmentation(VP9_COMP *cpi, MACROBLOCK *x, rd_check_segment_txsize(cpi, x, bsi_buf, filter_idx, 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++) { mode_idx = inter_mode_offset(bsi->modes[i]);