diff options
author | Jerome Jiang <jianj@google.com> | 2021-09-24 14:56:00 -0700 |
---|---|---|
committer | Jerome Jiang <jianj@google.com> | 2021-09-24 14:56:00 -0700 |
commit | b68877a7ebfe764714f8ce7aeb2a7f6d12b77989 (patch) | |
tree | a795759d9034b94693e1800992832ebfde3f5b46 | |
parent | f84650be2de062eedf35afab3ffab4e42609e796 (diff) | |
download | libvpx-b68877a7ebfe764714f8ce7aeb2a7f6d12b77989.tar.gz |
vp8 rc: Clear system state at the end of calls
Clear system state at the end of rc calls to make sure the state is
consistent before and after
Change-Id: I59fe9c99485b1a8603c20db37961339b7575455f
-rw-r--r-- | vp8/vp8_ratectrl_rtc.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/vp8/vp8_ratectrl_rtc.cc b/vp8/vp8_ratectrl_rtc.cc index 2098edaf9..2f23c5b1d 100644 --- a/vp8/vp8_ratectrl_rtc.cc +++ b/vp8/vp8_ratectrl_rtc.cc @@ -168,6 +168,7 @@ void VP8RateControlRTC::UpdateRateControl( } vp8_new_framerate(cpi_, cpi_->framerate); + vpx_clear_system_state(); } void VP8RateControlRTC::ComputeQP(const VP8FrameParamsQpRTC &frame_params) { @@ -251,6 +252,7 @@ void VP8RateControlRTC::ComputeQP(const VP8FrameParamsQpRTC &frame_params) { q_ = vp8_regulate_q(cpi_, cpi_->this_frame_target); vp8_set_quantizer(cpi_, q_); + vpx_clear_system_state(); } int VP8RateControlRTC::GetQP() const { return q_; } @@ -340,5 +342,6 @@ void VP8RateControlRTC::PostEncodeUpdate(uint64_t encoded_frame_size) { cpi_->frames_since_key++; if (cpi_->oxcf.number_of_layers > 1) vp8_save_layer_context(cpi_); + vpx_clear_system_state(); } } // namespace libvpx |