summaryrefslogtreecommitdiff
path: root/vp9/encoder
diff options
context:
space:
mode:
Diffstat (limited to 'vp9/encoder')
-rw-r--r--vp9/encoder/vp9_ratectrl.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/vp9/encoder/vp9_ratectrl.c b/vp9/encoder/vp9_ratectrl.c
index 4fe556111..2146b4fda 100644
--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -271,6 +271,13 @@ static void update_buffer_level(VP9_COMP *cpi, int encoded_frame_size) {
// Clip the buffer level to the maximum specified buffer size.
rc->bits_off_target = VPXMIN(rc->bits_off_target, rc->maximum_buffer_size);
+
+ // For screen-content mode, and if frame-dropper is off, don't let buffer
+ // level go below threshold, given here as -rc->maximum_ buffer_size.
+ if (cpi->oxcf.content == VP9E_CONTENT_SCREEN &&
+ cpi->oxcf.drop_frames_water_mark == 0)
+ rc->bits_off_target = VPXMAX(rc->bits_off_target, -rc->maximum_buffer_size);
+
rc->buffer_level = rc->bits_off_target;
if (is_one_pass_cbr_svc(cpi)) {