From: Marco Paniconi Date: Mon, 11 Feb 2019 20:06:27 +0000 (-0800) Subject: vp8: Fix condition for update of last_pred_err_mb X-Git-Tag: v1.8.1~247 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a19242844966ba8b094fcb4fbe579b29d0576940;p=libvpx vp8: Fix condition for update of last_pred_err_mb For 1 pass cbr screen-content mode: quantity should only be updated on delta frames. Change-Id: I16fc47b2805c7527ab4ff25bd8b5a5bd9c2b8976 --- diff --git a/vp8/encoder/onyx_if.c b/vp8/encoder/onyx_if.c index 9aca0f24b..07be0d989 100644 --- a/vp8/encoder/onyx_if.c +++ b/vp8/encoder/onyx_if.c @@ -3950,7 +3950,9 @@ static void encode_frame_to_data_rate(VP8_COMP *cpi, size_t *size, if (cpi->pass == 0 && cpi->oxcf.end_usage == USAGE_STREAM_FROM_SERVER) { if (vp8_drop_encodedframe_overshoot(cpi, Q)) return; - cpi->last_pred_err_mb = (int)(cpi->mb.prediction_error / cpi->common.MBs); + if (cm->frame_type != KEY_FRAME) + cpi->last_pred_err_mb = + (int)(cpi->mb.prediction_error / cpi->common.MBs); } cpi->projected_frame_size -= vp8_estimate_entropy_savings(cpi);