ref: c34e5cafcaf3c648e8dcdb380010cd93d8b2f3f3
parent: 5fbc7a286b4d72883392fdbb10ec52bace662f66
author: Marco Paniconi <marpan@google.com>
date: Mon Dec 3 05:32:06 EST 2018
vp9: Rename post_encode drop function. Feature works also for non-screen content mode, so rename it. Change-Id: I665362d50cf9a4017f114973586ad0eead066ddd
--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -4847,8 +4847,7 @@
vp9_pack_bitstream(cpi, dest, size);
if (cpi->rc.use_post_encode_drop && cm->base_qindex < cpi->rc.worst_quality &&
- cpi->svc.spatial_layer_id == 0 &&
- post_encode_drop_screen_content(cpi, size)) {
+ cpi->svc.spatial_layer_id == 0 && post_encode_drop_cbr(cpi, size)) {
restore_coding_context(cpi);
return;
}
--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -550,7 +550,7 @@
}
}
-int post_encode_drop_screen_content(VP9_COMP *cpi, size_t *size) {
+int post_encode_drop_cbr(VP9_COMP *cpi, size_t *size) {
size_t frame_size = *size << 3;
int64_t new_buffer_level =
cpi->rc.buffer_level + cpi->rc.avg_frame_bandwidth - (int64_t)frame_size;
--- a/vp9/encoder/vp9_ratectrl.h
+++ b/vp9/encoder/vp9_ratectrl.h
@@ -256,8 +256,8 @@
// Changes only the rate correction factors in the rate control structure.
void vp9_rc_update_rate_correction_factors(struct VP9_COMP *cpi);
-// Post encode drop for CBR screen-content mode.
-int post_encode_drop_screen_content(struct VP9_COMP *cpi, size_t *size);
+// Post encode drop for CBR mode.
+int post_encode_drop_cbr(struct VP9_COMP *cpi, size_t *size);
// Decide if we should drop this frame: For 1-pass CBR.
// Changes only the decimation count in the rate control structure