mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 18:48:28 +02:00
radeon/vcn/enc: use surface swizzle mode instead of linear
It will be capable to have encoder tiling supported via modifier Signed-off-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Thong Thai <thong.thai@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11165>
This commit is contained in:
parent
700d4ce68f
commit
56714238ba
1 changed files with 12 additions and 2 deletions
|
|
@ -982,10 +982,15 @@ static void radeon_enc_encode_params(struct radeon_encoder *enc)
|
|||
enc->enc_pic.enc_params.pic_type = RENCODE_PICTURE_TYPE_I;
|
||||
}
|
||||
|
||||
if (enc->luma->meta_offset) {
|
||||
RVID_ERR("DCC surfaces not supported.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
enc->enc_pic.enc_params.allowed_max_bitstream_size = enc->bs_size;
|
||||
enc->enc_pic.enc_params.input_pic_luma_pitch = enc->luma->u.gfx9.surf_pitch;
|
||||
enc->enc_pic.enc_params.input_pic_chroma_pitch = enc->chroma->u.gfx9.surf_pitch;
|
||||
enc->enc_pic.enc_params.input_pic_swizzle_mode = RENCODE_INPUT_SWIZZLE_MODE_LINEAR;
|
||||
enc->enc_pic.enc_params.input_pic_swizzle_mode = enc->luma->u.gfx9.swizzle_mode;
|
||||
|
||||
if (enc->enc_pic.picture_type == PIPE_H2645_ENC_PICTURE_TYPE_IDR)
|
||||
enc->enc_pic.enc_params.reference_picture_index = 0xFFFFFFFF;
|
||||
|
|
@ -1027,10 +1032,15 @@ static void radeon_enc_encode_params_hevc(struct radeon_encoder *enc)
|
|||
enc->enc_pic.enc_params.pic_type = RENCODE_PICTURE_TYPE_I;
|
||||
}
|
||||
|
||||
if (enc->luma->meta_offset) {
|
||||
RVID_ERR("DCC surfaces not supported.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
enc->enc_pic.enc_params.allowed_max_bitstream_size = enc->bs_size;
|
||||
enc->enc_pic.enc_params.input_pic_luma_pitch = enc->luma->u.gfx9.surf_pitch;
|
||||
enc->enc_pic.enc_params.input_pic_chroma_pitch = enc->chroma->u.gfx9.surf_pitch;
|
||||
enc->enc_pic.enc_params.input_pic_swizzle_mode = RENCODE_INPUT_SWIZZLE_MODE_LINEAR;
|
||||
enc->enc_pic.enc_params.input_pic_swizzle_mode = enc->luma->u.gfx9.swizzle_mode;
|
||||
|
||||
if (enc->enc_pic.enc_params.pic_type == RENCODE_PICTURE_TYPE_I)
|
||||
enc->enc_pic.enc_params.reference_picture_index = 0xFFFFFFFF;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue