]> granicus.if.org Git - libvpx/commitdiff
vp8: Fix condition for update of last_pred_err_mb
authorMarco Paniconi <marpan@google.com>
Mon, 11 Feb 2019 20:06:27 +0000 (12:06 -0800)
committerMarco Paniconi <marpan@google.com>
Mon, 11 Feb 2019 20:07:47 +0000 (12:07 -0800)
For 1 pass cbr screen-content mode: quantity should
only be updated on delta frames.

Change-Id: I16fc47b2805c7527ab4ff25bd8b5a5bd9c2b8976

vp8/encoder/onyx_if.c

index 9aca0f24b77c4c3a4f487c9b2253c0ebe41529d7..07be0d98908c51e559ab8a53571d324ae3504472 100644 (file)
@@ -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);