ref: 2bfcc7179b9a2d692290d3bd06e86e6726d9bdc1
parent: 90a65c2064c20728ee689381628221036b56491f
author: angiebird <[email protected]>
date: Tue Oct 29 14:52:40 EDT 2019
Remove bits_left update in encoder_encode() It's already updated properly in vp9_init_second_pass() Change-Id: I94ee2e8536387c94a2abf9a7686011c76489c2f9
--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -1457,7 +1457,6 @@
lc->level_index = -1;
lc->max_cpb_size = INT_MAX;
lc->max_frame_size = INT_MAX;
- lc->rc_config_updated = 0;
lc->fail_flag = 0;
}
--- a/vp9/encoder/vp9_encoder.h
+++ b/vp9/encoder/vp9_encoder.h
@@ -483,7 +483,6 @@
typedef struct {
int8_t level_index;
- uint8_t rc_config_updated;
uint8_t fail_flag;
int max_frame_size; // in bits
double max_cpb_size; // in bits
--- a/vp9/vp9_cx_iface.c
+++ b/vp9/vp9_cx_iface.c
@@ -1116,16 +1116,6 @@
if (cpi == NULL) return VPX_CODEC_INVALID_PARAM;
- if (cpi->oxcf.pass == 2 && cpi->level_constraint.level_index >= 0 &&
- !cpi->level_constraint.rc_config_updated) {
- const VP9EncoderConfig *const oxcf = &cpi->oxcf;
- TWO_PASS *const twopass = &cpi->twopass;
- FIRSTPASS_STATS *stats = &twopass->total_stats;
- twopass->bits_left =
- (int64_t)(stats->duration * oxcf->target_bandwidth / 10000000.0);
- cpi->level_constraint.rc_config_updated = 1;
- }
-
if (img != NULL) {
res = validate_img(ctx, img);
if (res == VPX_CODEC_OK) {