summaryrefslogtreecommitdiff
path: root/vp8/encoder/ratectrl.c
diff options
context:
space:
mode:
Diffstat (limited to 'vp8/encoder/ratectrl.c')
-rw-r--r--vp8/encoder/ratectrl.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/vp8/encoder/ratectrl.c b/vp8/encoder/ratectrl.c
index 8455b7bdb..b69a1965e 100644
--- a/vp8/encoder/ratectrl.c
+++ b/vp8/encoder/ratectrl.c
@@ -1550,12 +1550,21 @@ void vp8_compute_frame_size_bounds(VP8_COMP *cpi, int *frame_under_shoot_limit,
*frame_under_shoot_limit = cpi->this_frame_target * 5 / 8;
}
}
- // VBR
+ // VBR and CQ mode
// Note that tighter restrictions here can help quality but hurt encode speed
else
{
- *frame_over_shoot_limit = cpi->this_frame_target * 11 / 8;
- *frame_under_shoot_limit = cpi->this_frame_target * 5 / 8;
+ // Stron overshoot limit for constrained quality
+ if (cpi->oxcf.end_usage == USAGE_CONSTRAINED_QUALITY)
+ {
+ *frame_over_shoot_limit = cpi->this_frame_target * 11 / 8;
+ *frame_under_shoot_limit = cpi->this_frame_target * 2 / 8;
+ }
+ else
+ {
+ *frame_over_shoot_limit = cpi->this_frame_target * 11 / 8;
+ *frame_under_shoot_limit = cpi->this_frame_target * 5 / 8;
+ }
}
}
}