1 /* SPDX-License-Identifier: Apache-2.0 OR MIT */ 2 /* 3 * Copyright (c) 2024 Rockchip Electronics Co., Ltd. 4 */ 5 6 #ifndef __VDPU383_H265D_H__ 7 #define __VDPU383_H265D_H__ 8 9 #include "vdpu383_com.h" 10 11 typedef struct Vdpu383RegH265dParas_t { 12 /* SWREG64_H26X_PARA */ 13 RK_U32 reg64_unused_bits; 14 15 /* SWREG65_STREAM_PARAM_SET */ 16 RK_U32 reg65_strm_start_bit; 17 18 /* SWREG66_STREAM_LEN */ 19 RK_U32 reg66_stream_len; 20 21 /* SWREG67_GLOBAL_LEN */ 22 RK_U32 reg67_global_len; 23 24 /* SWREG68_HOR_STRIDE */ 25 RK_U32 reg68_hor_virstride; 26 27 /* SWREG69_RASTER_UV_HOR_STRIDE */ 28 RK_U32 reg69_raster_uv_hor_virstride; 29 30 /* SWREG70_Y_STRIDE */ 31 RK_U32 reg70_y_virstride; 32 33 /* SWREG71_SCL_Y_HOR_VIRSTRIDE */ 34 RK_U32 reg71_scl_ref_hor_virstride; 35 36 /* SWREG72_SCL_UV_HOR_VIRSTRIDE */ 37 RK_U32 reg72_scl_ref_raster_uv_hor_virstride; 38 39 /* SWREG73_SCL_Y_VIRSTRIDE */ 40 RK_U32 reg73_scl_ref_virstride; 41 42 /* SWREG74_FGS_Y_HOR_VIRSTRIDE */ 43 RK_U32 reg74_fgs_ref_hor_virstride; 44 45 RK_U32 reserve_reg75_79[5]; 46 47 /* SWREG80_ERROR_REF_Y_HOR_VIRSTRIDE */ 48 RK_U32 reg80_error_ref_hor_virstride; 49 50 /* SWREG81_ERROR_REF_UV_HOR_VIRSTRIDE */ 51 RK_U32 reg81_error_ref_raster_uv_hor_virstride; 52 53 /* SWREG82_ERROR_REF_Y_VIRSTRIDE */ 54 RK_U32 reg82_error_ref_virstride; 55 56 /* SWREG83_REF0_Y_HOR_VIRSTRIDE */ 57 RK_U32 reg83_ref0_hor_virstride; 58 59 /* SWREG84_REF0_UV_HOR_VIRSTRIDE */ 60 RK_U32 reg84_ref0_raster_uv_hor_virstride; 61 62 /* SWREG85_REF0_Y_VIRSTRIDE */ 63 RK_U32 reg85_ref0_virstride; 64 65 /* SWREG86_REF1_Y_HOR_VIRSTRIDE */ 66 RK_U32 reg86_ref1_hor_virstride; 67 68 /* SWREG87_REF1_UV_HOR_VIRSTRIDE */ 69 RK_U32 reg87_ref1_raster_uv_hor_virstride; 70 71 /* SWREG88_REF1_Y_VIRSTRIDE */ 72 RK_U32 reg88_ref1_virstride; 73 74 /* SWREG89_REF2_Y_HOR_VIRSTRIDE */ 75 RK_U32 reg89_ref2_hor_virstride; 76 77 /* SWREG90_REF2_UV_HOR_VIRSTRIDE */ 78 RK_U32 reg90_ref2_raster_uv_hor_virstride; 79 80 /* SWREG91_REF2_Y_VIRSTRIDE */ 81 RK_U32 reg91_ref2_virstride; 82 83 /* SWREG92_REF3_Y_HOR_VIRSTRIDE */ 84 RK_U32 reg92_ref3_hor_virstride; 85 86 /* SWREG93_REF3_UV_HOR_VIRSTRIDE */ 87 RK_U32 reg93_ref3_raster_uv_hor_virstride; 88 89 /* SWREG94_REF3_Y_VIRSTRIDE */ 90 RK_U32 reg94_ref3_virstride; 91 92 /* SWREG95_REF4_Y_HOR_VIRSTRIDE */ 93 RK_U32 reg95_ref4_hor_virstride; 94 95 /* SWREG96_REF4_UV_HOR_VIRSTRIDE */ 96 RK_U32 reg96_ref4_raster_uv_hor_virstride; 97 98 /* SWREG97_REF4_Y_VIRSTRIDE */ 99 RK_U32 reg97_ref4_virstride; 100 101 /* SWREG98_REF5_Y_HOR_VIRSTRIDE */ 102 RK_U32 reg98_ref5_hor_virstride; 103 104 /* SWREG99_REF5_UV_HOR_VIRSTRIDE */ 105 RK_U32 reg99_ref5_raster_uv_hor_virstride; 106 107 /* SWREG100_REF5_Y_VIRSTRIDE */ 108 RK_U32 reg100_ref5_virstride; 109 110 /* SWREG101_REF6_Y_HOR_VIRSTRIDE */ 111 RK_U32 reg101_ref6_hor_virstride; 112 113 /* SWREG102_REF6_UV_HOR_VIRSTRIDE */ 114 RK_U32 reg102_ref6_raster_uv_hor_virstride; 115 116 /* SWREG103_REF6_Y_VIRSTRIDE */ 117 RK_U32 reg103_ref6_virstride; 118 119 /* SWREG104_REF7_Y_HOR_VIRSTRIDE */ 120 RK_U32 reg104_ref7_hor_virstride; 121 122 /* SWREG105_REF7_UV_HOR_VIRSTRIDE */ 123 RK_U32 reg105_ref7_raster_uv_hor_virstride; 124 125 /* SWREG106_REF7_Y_VIRSTRIDE */ 126 RK_U32 reg106_ref7_virstride; 127 128 } Vdpu383RegH265dParas; 129 130 typedef struct Vdpu383RegH265dAddr_t { 131 /* SWREG168_DECOUT_BASE */ 132 RK_U32 reg168_decout_base; 133 134 /* SWREG169_ERROR_REF_BASE */ 135 RK_U32 reg169_error_ref_base; 136 137 /* SWREG170_185_REF0_BASE */ 138 RK_U32 reg170_185_ref_base[16]; 139 140 RK_U32 reserve_reg186_191[6]; 141 142 /* SWREG192_PAYLOAD_ST_CUR_BASE */ 143 RK_U32 reg192_payload_st_cur_base; 144 145 /* SWREG193_FBC_PAYLOAD_OFFSET */ 146 RK_U32 reg193_fbc_payload_offset; 147 148 /* SWREG194_PAYLOAD_ST_ERROR_REF_BASE */ 149 RK_U32 reg194_payload_st_error_ref_base; 150 151 /* SWREG195_210_PAYLOAD_ST_REF0_BASE */ 152 RK_U32 reg195_210_payload_st_ref_base[16]; 153 154 RK_U32 reserve_reg211_215[5]; 155 156 /* SWREG216_COLMV_CUR_BASE */ 157 RK_U32 reg216_colmv_cur_base; 158 159 /* SWREG217_232_COLMV_REF0_BASE */ 160 RK_U32 reg217_232_colmv_ref_base[16]; 161 162 } Vdpu383RegH265dAddr; 163 164 typedef struct Vdpu383H265dRegSet_t { 165 Vdpu383RegVersion reg_version; /* 0 */ 166 Vdpu383CtrlReg ctrl_regs; /* 8-30 */ 167 Vdpu383RegCommonAddr common_addr; /* 128-134, 140-161 */ 168 Vdpu383RegH265dParas h265d_paras; /* 64-74, 80-106 */ 169 Vdpu383RegH265dAddr h265d_addrs; /* 168-185, 192-210, 216-232 */ 170 } Vdpu383H265dRegSet; 171 172 #endif /* __VDPU383_H265D_H__ */ 173