From: Ronald S. Bultje Date: Mon, 16 Jul 2012 23:46:46 +0000 (-0700) Subject: Don't auto-default to comp-pred unless content is static. X-Git-Tag: v1.3.0~1217^2~371 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=84d2298828d668f843032834fbb42a476fa2596f;p=platform%2Fupstream%2Flibvpx.git Don't auto-default to comp-pred unless content is static. Although it can be useful, in some cases it causes artifacts in motion- based content. Change-Id: I27bb80901020c40636e2018a8217759175a23f5b --- diff --git a/vp8/encoder/encodeframe.c b/vp8/encoder/encodeframe.c index ee0ed29..52d3c86 100644 --- a/vp8/encoder/encodeframe.c +++ b/vp8/encoder/encodeframe.c @@ -1318,15 +1318,13 @@ void vp8_encode_frame(VP8_COMP *cpi) { if (frame_type == 3) pred_type = SINGLE_PREDICTION_ONLY; else if (cpi->rd_prediction_type_threshes[frame_type][1] > - cpi->rd_prediction_type_threshes[frame_type][0] && + cpi->rd_prediction_type_threshes[frame_type][0] && cpi->rd_prediction_type_threshes[frame_type][1] > - cpi->rd_prediction_type_threshes[frame_type][2] && - check_dual_ref_flags(cpi)) + cpi->rd_prediction_type_threshes[frame_type][2] && + check_dual_ref_flags(cpi) && cpi->static_mb_pct == 100) pred_type = COMP_PREDICTION_ONLY; else if (cpi->rd_prediction_type_threshes[frame_type][0] > - cpi->rd_prediction_type_threshes[frame_type][1] && - cpi->rd_prediction_type_threshes[frame_type][0] > - cpi->rd_prediction_type_threshes[frame_type][2]) + cpi->rd_prediction_type_threshes[frame_type][2]) pred_type = SINGLE_PREDICTION_ONLY; else pred_type = HYBRID_PREDICTION;