vpx_clear_system_state after drop due to overshoot
authorJerome Jiang <jianj@google.com>
Tue, 10 Sep 2019 23:42:32 +0000 (16:42 -0700)
committerMarco Paniconi <marpan@google.com>
Wed, 11 Sep 2019 02:31:08 +0000 (19:31 -0700)
BUG=999780

Change-Id: I096fdc22812eab22a38a33135c0cbe60a6e64add

vp8/encoder/onyx_if.c

index 4fd1574..f72303d 100644 (file)
@@ -3958,7 +3958,10 @@ static void encode_frame_to_data_rate(VP8_COMP *cpi, size_t *size,
     vp8_encode_frame(cpi);
 
     if (cpi->pass == 0 && cpi->oxcf.end_usage == USAGE_STREAM_FROM_SERVER) {
-      if (vp8_drop_encodedframe_overshoot(cpi, Q)) return;
+      if (vp8_drop_encodedframe_overshoot(cpi, Q)) {
+        vpx_clear_system_state();
+        return;
+      }
       if (cm->frame_type != KEY_FRAME)
         cpi->last_pred_err_mb =
             (int)(cpi->mb.prediction_error / cpi->common.MBs);