mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 02:48:06 +02:00
radeonsi/vcn: Fix HEVC encode cu_qp_delta with old FW
VCN2 needs interface version bump to enable it.
Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36845>
(cherry picked from commit 26fc4798c1)
This commit is contained in:
parent
734d42d72f
commit
3b26509439
3 changed files with 17 additions and 4 deletions
|
|
@ -4974,7 +4974,7 @@
|
|||
"description": "radeonsi/vcn: Fix HEVC encode cu_qp_delta with old FW",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -627,6 +627,20 @@ static void radeon_vcn_enc_hevc_get_dbk_param(struct radeon_encoder *enc,
|
|||
!pic->seq.sample_adaptive_offset_enabled_flag;
|
||||
}
|
||||
|
||||
static bool cu_qp_delta_supported(struct si_screen *sscreen)
|
||||
{
|
||||
if (sscreen->info.vcn_ip_version >= VCN_5_0_0)
|
||||
return true;
|
||||
else if (sscreen->info.vcn_ip_version >= VCN_4_0_0)
|
||||
return sscreen->info.vcn_enc_minor_version >= 7;
|
||||
else if (sscreen->info.vcn_ip_version >= VCN_3_0_0)
|
||||
return sscreen->info.vcn_enc_minor_version >= 26;
|
||||
else if (sscreen->info.vcn_ip_version >= VCN_2_0_0)
|
||||
return sscreen->info.vcn_enc_minor_version >= 20;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
static void radeon_vcn_enc_hevc_get_spec_misc_param(struct radeon_encoder *enc,
|
||||
struct pipe_h265_enc_picture_desc *pic)
|
||||
{
|
||||
|
|
@ -648,8 +662,7 @@ static void radeon_vcn_enc_hevc_get_spec_misc_param(struct radeon_encoder *enc,
|
|||
sscreen->info.vcn_ip_version < VCN_3_0_0 ||
|
||||
!pic->pic.transform_skip_enabled_flag;
|
||||
enc->enc_pic.hevc_spec_misc.cu_qp_delta_enabled_flag =
|
||||
(sscreen->info.vcn_ip_version >= VCN_2_0_0 &&
|
||||
pic->pic.cu_qp_delta_enabled_flag) ||
|
||||
(cu_qp_delta_supported(sscreen) && pic->pic.cu_qp_delta_enabled_flag) ||
|
||||
enc->enc_pic.enc_qp_map.qp_map_type ||
|
||||
enc->enc_pic.rc_session_init.rate_control_method;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
#include <stdio.h>
|
||||
|
||||
#define RENCODE_FW_INTERFACE_MAJOR_VERSION 1
|
||||
#define RENCODE_FW_INTERFACE_MINOR_VERSION 1
|
||||
#define RENCODE_FW_INTERFACE_MINOR_VERSION 20
|
||||
|
||||
static void radeon_enc_op_preset(struct radeon_encoder *enc)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue