radeonsi/vcn: Disable AV1 unidir compound with rate control
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

It causes significant bitrate overshoot currently.

Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34237>
This commit is contained in:
David Rosca 2025-03-27 13:40:21 +01:00 committed by Marge Bot
parent 2063084903
commit a5edb9faac

View file

@ -1016,6 +1016,9 @@ static void radeon_vcn_enc_av1_get_param(struct radeon_encoder *enc,
enc_pic->enc_params.reconstructed_picture_index = pic->dpb_curr_pic;
if (sscreen->info.vcn_ip_version >= VCN_5_0_0) {
bool allow_unidir =
pic->rc[0].rate_ctrl_method == PIPE_H2645_ENC_RATE_CONTROL_METHOD_DISABLE;
for (uint32_t i = 0; i < RENCODE_AV1_REFS_PER_FRAME; i++)
enc_pic->av1_enc_params.ref_frames[i] = pic->dpb_ref_frame_idx[i];
@ -1027,7 +1030,7 @@ static void radeon_vcn_enc_av1_get_param(struct radeon_encoder *enc,
if (pic->ref_list1[0] != PIPE_H2645_LIST_REF_INVALID_ENTRY) {
enc_pic->av1.compound = true; /* BIDIR_COMP */
enc_pic->av1_enc_params.lsm_reference_frame_index[1] = pic->ref_list1[0];
} else if (pic->ref_list0[1] != PIPE_H2645_LIST_REF_INVALID_ENTRY) {
} else if (allow_unidir && pic->ref_list0[1] != PIPE_H2645_LIST_REF_INVALID_ENTRY) {
enc_pic->av1.compound = true; /* UNIDIR_COMP */
enc_pic->av1_enc_params.lsm_reference_frame_index[1] = pic->ref_list0[1];
}