vp8: For screen mode: clip buffer from below
authorMarco Paniconi <marpan@google.com>
Fri, 1 Oct 2021 18:54:53 +0000 (11:54 -0700)
committerMarco Paniconi <marpan@google.com>
Fri, 1 Oct 2021 18:58:37 +0000 (11:58 -0700)
Condition already existed for screen content mode,
but only when frame-dropper was off. Remove the
frame drop condition.

Change-Id: Ie7357041f5ca05b01e78b4bd3b40da060382591b

vp8/encoder/onyx_if.c

index c57c746..6890a47 100644 (file)
@@ -4516,10 +4516,10 @@ static void encode_frame_to_data_rate(VP8_COMP *cpi, size_t *size,
     cpi->bits_off_target = cpi->oxcf.maximum_buffer_size;
   }
 
-  // If the frame dropper is not enabled, don't let the buffer level go below
-  // some threshold, given here by -|maximum_buffer_size|. For now we only do
-  // this for screen content input.
-  if (cpi->drop_frames_allowed == 0 && cpi->oxcf.screen_content_mode &&
+  // Don't let the buffer level go below some threshold, given here
+  // by -|maximum_buffer_size|. For now we only do this for
+  // screen content input.
+  if (cpi->oxcf.screen_content_mode &&
       cpi->bits_off_target < -cpi->oxcf.maximum_buffer_size) {
     cpi->bits_off_target = -cpi->oxcf.maximum_buffer_size;
   }