diff options
author | Jerome Jiang <jianj@google.com> | 2023-05-05 23:02:14 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2023-05-05 23:02:14 +0000 |
commit | 905f991acd22b4d1cbfab22223bb5c979fb5c3c9 (patch) | |
tree | 96bbc0e8367d008b2b9829ec818a3052d48e3ebe | |
parent | 497f246d2925a2866644e542df158b4421ebab0d (diff) | |
parent | 5636f098b38e0c013f802c1b411e2cf54d32b183 (diff) | |
download | libvpx-905f991acd22b4d1cbfab22223bb5c979fb5c3c9.tar.gz |
Merge "Set setjmp flag in VP9 RTC rate control library" into main
-rw-r--r-- | vp9/ratectrl_rtc.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/vp9/ratectrl_rtc.cc b/vp9/ratectrl_rtc.cc index 29033d4ba..d92b09571 100644 --- a/vp9/ratectrl_rtc.cc +++ b/vp9/ratectrl_rtc.cc @@ -140,7 +140,16 @@ bool VP9RateControlRTC::UpdateRateControl( cpi_->framerate = rc_cfg.framerate; cpi_->svc.number_spatial_layers = rc_cfg.ss_number_layers; cpi_->svc.number_temporal_layers = rc_cfg.ts_number_layers; + vp9_set_mb_mi(cm, cm->width, cm->height); + + if (setjmp(cpi_->common.error.jmp)) { + cpi_->common.error.setjmp = 0; + vpx_clear_system_state(); + return false; + } + cpi_->common.error.setjmp = 1; + for (int tl = 0; tl < cpi_->svc.number_temporal_layers; ++tl) { oxcf->ts_rate_decimator[tl] = rc_cfg.ts_rate_decimator[tl]; } @@ -168,6 +177,8 @@ bool VP9RateControlRTC::UpdateRateControl( (int)cpi_->oxcf.target_bandwidth); } vp9_check_reset_rc_flag(cpi_); + + cpi_->common.error.setjmp = 0; return true; } |