mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-30 20:50:09 +01:00
radv/video: Override H265 SPS block size parameters
VCN only supports this set of parameters.
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Cc: mesa-stable
(cherry picked from commit 84b6d8e0d7)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38167>
This commit is contained in:
parent
2e17fd0cb2
commit
ac492d42be
2 changed files with 10 additions and 1 deletions
|
|
@ -204,7 +204,7 @@
|
|||
"description": "radv/video: Override H265 SPS block size parameters",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -3163,6 +3163,15 @@ radv_video_patch_encode_session_parameters(struct radv_device *device, struct vk
|
|||
}
|
||||
break;
|
||||
case VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR: {
|
||||
for (unsigned i = 0; i < params->h265_enc.h265_sps_count; i++) {
|
||||
/* VCN supports only the following block sizes (resulting in 64x64 CTBs with any coding
|
||||
* block size) */
|
||||
params->h265_enc.h265_sps[i].base.log2_min_luma_coding_block_size_minus3 = 0;
|
||||
params->h265_enc.h265_sps[i].base.log2_diff_max_min_luma_coding_block_size = 3;
|
||||
params->h265_enc.h265_sps[i].base.log2_min_luma_transform_block_size_minus2 = 0;
|
||||
params->h265_enc.h265_sps[i].base.log2_diff_max_min_luma_transform_block_size = 3;
|
||||
}
|
||||
|
||||
for (unsigned i = 0; i < params->h265_enc.h265_pps_count; i++) {
|
||||
/* cu_qp_delta needs to be enabled if rate control is enabled. VCN2 and newer can also enable
|
||||
* it with rate control disabled. Since we don't know what rate control will be used, we
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue