shithub: libvpx

Download patch

ref: a19242844966ba8b094fcb4fbe579b29d0576940
parent: db50d729450917504aff6576395ad03e4e5f586c
author: Marco Paniconi <marpan@google.com>
date: Mon Feb 11 07:06:27 EST 2019

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

--- a/vp8/encoder/onyx_if.c
+++ b/vp8/encoder/onyx_if.c
@@ -3950,7 +3950,9 @@
 
     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);