From: Marco Paniconi Date: Fri, 1 Oct 2021 18:54:53 +0000 (-0700) Subject: vp8: For screen mode: clip buffer from below X-Git-Tag: v1.12.0-rc1~137 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f8733b3fb7eb3cf1154a9e693351097ec42005a2;p=libvpx vp8: For screen mode: clip buffer from below Condition already existed for screen content mode, but only when frame-dropper was off. Remove the frame drop condition. Change-Id: Ie7357041f5ca05b01e78b4bd3b40da060382591b --- diff --git a/vp8/encoder/onyx_if.c b/vp8/encoder/onyx_if.c index c57c74646..6890a470a 100644 --- a/vp8/encoder/onyx_if.c +++ b/vp8/encoder/onyx_if.c @@ -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; }