diff options
author | James Zern <jzern@google.com> | 2023-02-17 23:36:39 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2023-02-17 23:36:39 +0000 |
commit | 49ff9d095b5c5ccd784b5430c651763e87e99479 (patch) | |
tree | 07ff61be1997ddb98e63873efbd5cf4ebc49b564 /vp9/ratectrl_rtc.cc | |
parent | 6f710d29f638dc64370644643d6b2f1ba468deec (diff) | |
parent | 9274fdb00707b14d247c02e46a8e0209f7472ea4 (diff) | |
download | libvpx-49ff9d095b5c5ccd784b5430c651763e87e99479.tar.gz |
Merge "Merge commit 'v1.13.0' into m/master" am: 4b7acd814f am: 3a12316430 am: 9274fdb007
Original change: https://android-review.googlesource.com/c/platform/external/libvpx/+/2435878
Change-Id: I63c8ffbd8387206256c4280b65204f050e3d8ccf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'vp9/ratectrl_rtc.cc')
-rw-r--r-- | vp9/ratectrl_rtc.cc | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/vp9/ratectrl_rtc.cc b/vp9/ratectrl_rtc.cc index f4d7f7e9e..02e50a857 100644 --- a/vp9/ratectrl_rtc.cc +++ b/vp9/ratectrl_rtc.cc @@ -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 && @@ -205,12 +207,16 @@ int VP9RateControlRTC::GetLoopfilterLevel() const { return lf->filter_level; } -signed char *VP9RateControlRTC::GetCyclicRefreshMap() const { - return cpi_->cyclic_refresh->map; -} +bool VP9RateControlRTC::GetSegmentationData( + VP9SegmentationData *segmentation_data) const { + if (!cpi_->cyclic_refresh->apply_cyclic_refresh) return false; -int *VP9RateControlRTC::GetDeltaQ() const { - return cpi_->cyclic_refresh->qindex_delta; + segmentation_data->segmentation_map = cpi_->segmentation_map; + segmentation_data->segmentation_map_size = + cpi_->common.mi_cols * cpi_->common.mi_rows; + segmentation_data->delta_q = cpi_->cyclic_refresh->qindex_delta; + segmentation_data->delta_q_size = 3u; + return true; } void VP9RateControlRTC::PostEncodeUpdate(uint64_t encoded_frame_size) { |