radeonsi/vce: Don't check ref modification and marking flags

The number of operations is now correctly set to 0 when needed.

Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38050>
This commit is contained in:
David Rosca 2025-10-24 11:41:43 +02:00 committed by Marge Bot
parent 1232a7a754
commit 0977ca2854

View file

@ -232,9 +232,7 @@ static void get_param(struct rvce_encoder *enc, struct pipe_h264_enc_picture_des
enc->enc_pic.eo.num_ref_idx_l0_active_minus1 = pic->slice.num_ref_idx_l0_active_minus1;
enc->enc_pic.eo.num_ref_idx_l1_active_minus1 = pic->slice.num_ref_idx_l1_active_minus1;
i = 0;
if (pic->slice.ref_pic_list_modification_flag_l0) {
for (; i < MIN2(4, pic->slice.num_ref_list0_mod_operations); i++) {
for (i = 0; i < MIN2(4, pic->slice.num_ref_list0_mod_operations); i++) {
struct pipe_h264_ref_list_mod_entry *entry = &pic->slice.ref_list0_mod_operations[i];
switch (entry->modification_of_pic_nums_idc) {
case 0:
@ -255,15 +253,10 @@ static void get_param(struct rvce_encoder *enc, struct pipe_h264_enc_picture_des
break;
}
}
}
if (i < 4)
enc->enc_pic.eo.enc_ref_list_modification_op[i] = REF_LIST_MODIFICATION_OP_END;
i = 0;
if (pic->pic_ctrl.nal_unit_type == PIPE_H264_NAL_IDR_SLICE) {
enc->enc_pic.eo.enc_decoded_picture_marking_op[i++] = pic->slice.long_term_reference_flag ? 6 : 0;
} else if (pic->slice.adaptive_ref_pic_marking_mode_flag) {
for (; i < MIN2(4, pic->slice.num_ref_pic_marking_operations); i++) {
for (i = 0; i < MIN2(4, pic->slice.num_ref_pic_marking_operations); i++) {
struct pipe_h264_ref_pic_marking_entry *entry = &pic->slice.ref_pic_marking_operations[i];
enc->enc_pic.eo.enc_decoded_picture_marking_op[i] = entry->memory_management_control_operation;
switch (entry->memory_management_control_operation) {
@ -287,6 +280,9 @@ static void get_param(struct rvce_encoder *enc, struct pipe_h264_enc_picture_des
break;
}
}
if (pic->pic_ctrl.nal_unit_type == PIPE_H264_NAL_IDR_SLICE) {
assert(pic->slice.num_ref_pic_marking_operations == 0);
enc->enc_pic.eo.enc_decoded_picture_marking_op[i++] = pic->slice.long_term_reference_flag ? 6 : 0;
}
if (i < 4)
enc->enc_pic.eo.enc_decoded_picture_marking_op[i] = 0;