]> granicus.if.org Git - libvpx/commitdiff
vp9-rc: Fix key frame setting in external RC
authorMarco Paniconi <marpan@google.com>
Fri, 11 Nov 2022 02:50:19 +0000 (18:50 -0800)
committerMarco Paniconi <marpan@google.com>
Fri, 11 Nov 2022 06:10:07 +0000 (22:10 -0800)
Bug: b/257368998

Change-Id: I03e35915ac99b50cb6bdf7bce8b8f9ec5aef75b7

vp9/ratectrl_rtc.cc

index f4d7f7e9e75e12ea50295598e2a754331d970b5a..1326456c4424b8d68da9c64bd6b5e6a74adbd546 100644 (file)
@@ -158,6 +158,8 @@ void VP9RateControlRTC::ComputeQP(const VP9FrameParamsQpRTC &frame_params) {
   }
   vp9_set_mb_mi(cm, cm->width, cm->height);
   cm->frame_type = frame_params.frame_type;
+  // This is needed to ensure key frame does not get unset in rc_get_svc_params.
+  cpi_->frame_flags = (cm->frame_type == KEY_FRAME) ? FRAMEFLAGS_KEY : 0;
   cpi_->refresh_golden_frame = (cm->frame_type == KEY_FRAME) ? 1 : 0;
   cpi_->sf.use_nonrd_pick_mode = 1;
   if (cpi_->svc.number_spatial_layers == 1 &&