radeonsi/vce: Support intra refresh

Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
This commit is contained in:
David Rosca 2024-12-30 19:31:33 +01:00 committed by Marge Bot
parent f05acb6703
commit f13c5fe53e

View file

@ -21,6 +21,8 @@
#define REF_LIST_MODIFICATION_OP_LONG_TERM 2
#define REF_LIST_MODIFICATION_OP_VIEW_ADD 3
#define INTRAREFRESH_METHOD_BAR_BASED 6
static void get_rate_control_param(struct rvce_encoder *enc, struct pipe_h264_enc_picture_desc *pic)
{
enc->enc_pic.rc.rc_method = pic->rate_ctrl[0].rate_ctrl_method;
@ -260,6 +262,13 @@ static void get_param(struct rvce_encoder *enc, struct pipe_h264_enc_picture_des
enc->enc_pic.ec.enc_vbaq_mode =
pic->rate_ctrl[0].rate_ctrl_method != PIPE_H2645_ENC_RATE_CONTROL_METHOD_DISABLE &&
pic->quality_modes.vbaq_mode;
if (pic->intra_refresh.mode != PIPE_VIDEO_ENC_INTRA_REFRESH_NONE) {
enc->enc_pic.eo.enable_intra_refresh = 1;
enc->enc_pic.pc.enc_force_intra_refresh = INTRAREFRESH_METHOD_BAR_BASED;
enc->enc_pic.pc.enc_intra_refresh_num_mbs_per_slot = pic->intra_refresh.region_size;
} else {
enc->enc_pic.eo.enable_intra_refresh = 0;
}
enc->enc_pic.eo.insert_headers = 0;
enc->enc_pic.eo.insert_aud = 0;