Module: Mesa Branch: main Commit: 434a53ebbeb1a2ca70273bef0ba77a71237f4da7 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=434a53ebbeb1a2ca70273bef0ba77a71237f4da7
Author: Ruijing Dong <[email protected]> Date: Fri Dec 8 17:20:11 2023 -0500 radesonsi/vcn add qp_map definition This is for enabling ROI (region of interest) feature in VAAPI interface. It will support both CQP and rate control mode. Reviewed-by: Boyuan Zhang <[email protected]> Signed-off-by: Ruijing Dong <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26659> --- src/amd/common/ac_vcn_enc.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/amd/common/ac_vcn_enc.h b/src/amd/common/ac_vcn_enc.h index dcb088ac8bd..73f2154387e 100644 --- a/src/amd/common/ac_vcn_enc.h +++ b/src/amd/common/ac_vcn_enc.h @@ -532,6 +532,7 @@ typedef struct rvcn_enc_cmd_s { uint32_t input_format; uint32_t output_format; uint32_t enc_statistics; + uint32_t enc_qp_map; } rvcn_enc_cmd_t; typedef struct rvcn_enc_quality_modes_s @@ -622,4 +623,28 @@ typedef struct rvcn_enc_av1_recon_slot_s bool is_orphaned; } rvcn_enc_av1_recon_slot_t; +#define RENCODE_QP_MAP_TYPE_NONE 0 +#define RENCODE_QP_MAP_TYPE_DELTA 1 +#define RENCODE_QP_MAP_TYPE_MAP_PA 4 +#define RENCODE_QP_MAP_MAX_REGIONS 32 + +struct rvcn_enc_qp_map_region +{ + bool is_valid; + int32_t qp_delta; + uint32_t x_in_unit; + uint32_t y_in_unit; + uint32_t width_in_unit; + uint32_t height_in_unit; +}; + +typedef struct rvcn_enc_qp_map_s +{ + uint32_t qp_map_type; + uint32_t qp_map_buffer_address_hi; + uint32_t qp_map_buffer_address_lo; + uint32_t qp_map_pitch; + struct rvcn_enc_qp_map_region map[RENCODE_QP_MAP_MAX_REGIONS]; +}rvcn_enc_qp_map_t; + #endif
