radeonsi/vcn: Fix H264 slice header when encoding I frames
Cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27029>
This commit is contained in:
@@ -920,7 +920,8 @@ static void radeon_enc_slice_header(struct radeon_encoder *enc)
|
||||
radeon_enc_code_fixed_bits(enc, enc->enc_pic.pic_order_cnt % 32, 5);
|
||||
|
||||
/* ref_pic_list_modification() */
|
||||
if (enc->enc_pic.picture_type != PIPE_H2645_ENC_PICTURE_TYPE_IDR) {
|
||||
if (enc->enc_pic.picture_type != PIPE_H2645_ENC_PICTURE_TYPE_IDR &&
|
||||
enc->enc_pic.picture_type != PIPE_H2645_ENC_PICTURE_TYPE_I) {
|
||||
radeon_enc_code_fixed_bits(enc, 0x0, 1);
|
||||
|
||||
/* long-term reference */
|
||||
@@ -962,6 +963,7 @@ static void radeon_enc_slice_header(struct radeon_encoder *enc)
|
||||
}
|
||||
|
||||
if ((enc->enc_pic.picture_type != PIPE_H2645_ENC_PICTURE_TYPE_IDR) &&
|
||||
(enc->enc_pic.picture_type != PIPE_H2645_ENC_PICTURE_TYPE_I) &&
|
||||
(enc->enc_pic.spec_misc.cabac_enable))
|
||||
radeon_enc_code_ue(enc, enc->enc_pic.spec_misc.cabac_init_idc);
|
||||
|
||||
|
||||
@@ -301,7 +301,8 @@ static void radeon_enc_slice_header(struct radeon_encoder *enc)
|
||||
radeon_enc_code_fixed_bits(enc, 0x1, 1); /* direct_spatial_mv_pred_flag */
|
||||
|
||||
/* ref_pic_list_modification() */
|
||||
if (enc->enc_pic.picture_type != PIPE_H2645_ENC_PICTURE_TYPE_IDR) {
|
||||
if (enc->enc_pic.picture_type != PIPE_H2645_ENC_PICTURE_TYPE_IDR &&
|
||||
enc->enc_pic.picture_type != PIPE_H2645_ENC_PICTURE_TYPE_I) {
|
||||
radeon_enc_code_fixed_bits(enc, 0x0, 1);
|
||||
|
||||
/* long-term reference */
|
||||
@@ -347,6 +348,7 @@ static void radeon_enc_slice_header(struct radeon_encoder *enc)
|
||||
}
|
||||
|
||||
if ((enc->enc_pic.picture_type != PIPE_H2645_ENC_PICTURE_TYPE_IDR) &&
|
||||
(enc->enc_pic.picture_type != PIPE_H2645_ENC_PICTURE_TYPE_I) &&
|
||||
(enc->enc_pic.spec_misc.cabac_enable))
|
||||
radeon_enc_code_ue(enc, enc->enc_pic.spec_misc.cabac_init_idc);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user