video: driver: resolve some checker err
Resolve some static checker err. Change-Id: I0aa1d8c905ac7fd1defa16dd28d4386465f09ff3 Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
Cette révision appartient à :
@@ -230,28 +230,30 @@ typedef HFI_U32 HFI_BOOL;
|
||||
#define HFI_RGBA8888_UBWC_BUF_SIZE(buf_size, data_buf_size, \
|
||||
metadata_buffer_size, stride, buf_height, _metadata_tride, \
|
||||
_metadata_buf_height) \
|
||||
HFI_RGBA8888_UBWC_CALC_DATA_PLANE_BUF_SIZE(data_buf_size, \
|
||||
stride, buf_height); \
|
||||
HFI_UBWC_METADATA_PLANE_BUFFER_SIZE(metadata_buffer_size, \
|
||||
_metadata_tride, _metadata_buf_height); \
|
||||
buf_size = data_buf_size + metadata_buffer_size
|
||||
do { \
|
||||
HFI_RGBA8888_UBWC_CALC_DATA_PLANE_BUF_SIZE(data_buf_size, \
|
||||
stride, buf_height); \
|
||||
HFI_UBWC_METADATA_PLANE_BUFFER_SIZE(metadata_buffer_size, \
|
||||
_metadata_tride, _metadata_buf_height); \
|
||||
buf_size = data_buf_size + metadata_buffer_size \
|
||||
} while (0)
|
||||
|
||||
#define HFI_UBWC_CALC_METADATA_PLANE_STRIDE(metadata_stride, frame_width,\
|
||||
metadata_stride_multiple, tile_width_in_pels) \
|
||||
(metadata_stride = HFI_ALIGN(((frame_width + (tile_width_in_pels - 1)) /\
|
||||
tile_width_in_pels), metadata_stride_multiple))
|
||||
((metadata_stride = HFI_ALIGN(((frame_width + (tile_width_in_pels - 1)) /\
|
||||
tile_width_in_pels), metadata_stride_multiple)))
|
||||
|
||||
#define HFI_UBWC_METADATA_PLANE_BUFHEIGHT(metadata_buf_height, frame_height, \
|
||||
metadata_height_multiple, tile_height_in_pels) \
|
||||
(metadata_buf_height = HFI_ALIGN(((frame_height + \
|
||||
((metadata_buf_height = HFI_ALIGN(((frame_height + \
|
||||
(tile_height_in_pels - 1)) / tile_height_in_pels), \
|
||||
metadata_height_multiple))
|
||||
metadata_height_multiple)))
|
||||
|
||||
#define HFI_UBWC_UV_METADATA_PLANE_STRIDE(metadata_stride, frame_width, \
|
||||
metadata_stride_multiple, tile_width_in_pels) \
|
||||
(metadata_stride = HFI_ALIGN(((((frame_width + 1) >> 1) +\
|
||||
((metadata_stride = HFI_ALIGN(((((frame_width + 1) >> 1) +\
|
||||
(tile_width_in_pels - 1)) / tile_width_in_pels), \
|
||||
metadata_stride_multiple))
|
||||
metadata_stride_multiple)))
|
||||
|
||||
#define HFI_UBWC_UV_METADATA_PLANE_BUFHEIGHT(metadata_buf_height, frame_height,\
|
||||
metadata_height_multiple, tile_height_in_pels) \
|
||||
@@ -261,8 +263,8 @@ typedef HFI_U32 HFI_BOOL;
|
||||
|
||||
#define HFI_UBWC_METADATA_PLANE_BUFFER_SIZE(buffer_size, _metadata_tride, \
|
||||
_metadata_buf_height) \
|
||||
(buffer_size = HFI_ALIGN(_metadata_tride * _metadata_buf_height, \
|
||||
HFI_ALIGNMENT_4096))
|
||||
((buffer_size = HFI_ALIGN(_metadata_tride * _metadata_buf_height, \
|
||||
HFI_ALIGNMENT_4096)))
|
||||
|
||||
#define BUFFER_ALIGNMENT_512_BYTES 512
|
||||
#define BUFFER_ALIGNMENT_256_BYTES 256
|
||||
@@ -428,7 +430,7 @@ typedef HFI_U32 HFI_BOOL;
|
||||
} while (0)
|
||||
|
||||
#define HFI_BUFFER_LINE_H264D(_size, frame_width, frame_height, \
|
||||
is_opb, num_vpp_pipes) \
|
||||
is_opb, num_vpp_pipes) \
|
||||
do { \
|
||||
HFI_U32 vpss_lb_size = 0; \
|
||||
_size = HFI_ALIGN(SIZE_H264D_LB_FE_TOP_DATA(frame_width, \
|
||||
@@ -493,8 +495,7 @@ typedef HFI_U32 HFI_BOOL;
|
||||
if (!is_interlaced) { \
|
||||
SIZE_H264D_HW_BIN_BUFFER(_size, n_aligned_w, \
|
||||
n_aligned_h, delay, num_vpp_pipes); \
|
||||
} \
|
||||
else { \
|
||||
} else { \
|
||||
_size = 0; \
|
||||
} \
|
||||
} while (0)
|
||||
@@ -686,8 +687,7 @@ typedef HFI_U32 HFI_BOOL;
|
||||
if (!is_interlaced) { \
|
||||
SIZE_H265D_HW_BIN_BUFFER(_size, n_aligned_w, \
|
||||
n_aligned_h, delay, num_vpp_pipes); \
|
||||
} \
|
||||
else { \
|
||||
} else { \
|
||||
_size = 0; \
|
||||
} \
|
||||
} while (0)
|
||||
@@ -1095,8 +1095,7 @@ _yuv_bufcount_min, is_opb, num_vpp_pipes) \
|
||||
if (!isInterlaced) { \
|
||||
SIZE_AV1D_HW_BIN_BUFFER(_size, nAlignedW, nAlignedH, \
|
||||
delay, num_vpp_pipes); \
|
||||
} \
|
||||
else { \
|
||||
} else { \
|
||||
_size = 0; \
|
||||
} \
|
||||
} while (0)
|
||||
@@ -1147,8 +1146,7 @@ _yuv_bufcount_min, is_opb, num_vpp_pipes) \
|
||||
else if (aligned_width * aligned_height > (1280 * 720)) { \
|
||||
/* bitstream_size = 0.5 * yuv_size; */ \
|
||||
bitstream_size = (bitstream_size >> 2); \
|
||||
} \
|
||||
else { \
|
||||
} else { \
|
||||
/* bitstream_size = 2 * yuv_size; */ \
|
||||
} \
|
||||
if (((rc_type == HFI_RC_CQ) || (rc_type == HFI_RC_OFF)) \
|
||||
@@ -1177,8 +1175,7 @@ _yuv_bufcount_min, is_opb, num_vpp_pipes) \
|
||||
tile_count -= 1; \
|
||||
last_tile_size = (tile_size + min_tile_size); \
|
||||
} \
|
||||
} \
|
||||
else { \
|
||||
} else { \
|
||||
tile_size = frame_width_coded; \
|
||||
tile_count = 1; \
|
||||
last_tile_size = 0; \
|
||||
@@ -1207,8 +1204,7 @@ _yuv_bufcount_min, is_opb, num_vpp_pipes) \
|
||||
(mbs_in_last_tile + multi_slice_max_mb_count - 1) / (multi_slice_max_mb_count); \
|
||||
total_slice_count = \
|
||||
(slice_count_per_tile * (tile_count - 1)) + slice_count_in_last_tile; \
|
||||
} \
|
||||
else { \
|
||||
} else { \
|
||||
total_slice_count = (slice_count_per_tile * tile_count); \
|
||||
} \
|
||||
} while (0)
|
||||
@@ -1330,8 +1326,7 @@ _yuv_bufcount_min, is_opb, num_vpp_pipes) \
|
||||
bitstream_size_eval = (bitstream_size_eval * 5 >> 2); \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
else { \
|
||||
} else { \
|
||||
bitstream_size_eval = size_aligned_width * \
|
||||
size_aligned_height * 3; \
|
||||
} \
|
||||
@@ -1352,8 +1347,7 @@ _yuv_bufcount_min, is_opb, num_vpp_pipes) \
|
||||
} \
|
||||
else if (num_vpp_pipes > 2) { \
|
||||
size_single_pipe_eval = bitbin_size / 2; \
|
||||
} \
|
||||
else { \
|
||||
} else { \
|
||||
size_single_pipe_eval = bitbin_size; \
|
||||
} \
|
||||
if (rc_type == HFI_RC_LOSSLESS) { \
|
||||
@@ -1528,13 +1522,13 @@ _yuv_bufcount_min, is_opb, num_vpp_pipes) \
|
||||
#define SIZE_OVERRIDE_BUF(num_lcumb) (HFI_ALIGN(((16 * (((num_lcumb) + 7)\
|
||||
>> 3))), VENUS_DMA_ALIGNMENT) * 2)
|
||||
#define SIZE_IR_BUF(num_lcu_in_frame) HFI_ALIGN((((((num_lcu_in_frame) << 1) + 7) &\
|
||||
(~7)) * 3), VENUS_DMA_ALIGNMENT)
|
||||
(~7)) * 3), VENUS_DMA_ALIGNMENT)
|
||||
|
||||
#define SIZE_VPSS_LINE_BUF(num_vpp_pipes_enc, frame_height_coded, \
|
||||
frame_width_coded) \
|
||||
(HFI_ALIGN(((((((8192) >> 2) << 5) * (num_vpp_pipes_enc)) + 64) + \
|
||||
(((((MAX((frame_width_coded), (frame_height_coded)) + 3) >> 2) << 5) +\
|
||||
256) * 16)), VENUS_DMA_ALIGNMENT))
|
||||
256) * 16)), VENUS_DMA_ALIGNMENT))
|
||||
|
||||
#define SIZE_TOP_LINE_BUF_FIRST_STG_SAO(frame_width_coded) \
|
||||
HFI_ALIGN((16 * ((frame_width_coded) >> 5)), VENUS_DMA_ALIGNMENT)
|
||||
@@ -1737,8 +1731,7 @@ _yuv_bufcount_min, is_opb, num_vpp_pipes) \
|
||||
HFI_UBWC_METADATA_PLANE_BUFFER_SIZE(meta_size_c, \
|
||||
metadata_stride, metadata_buf_height); \
|
||||
_size = ref_buf_size + meta_size_y + meta_size_c; \
|
||||
} \
|
||||
else { \
|
||||
} else { \
|
||||
SIZE_ENC_TEN_BIT_REF_BUFFER(ten_bit_ref_buf_size, \
|
||||
frame_width, frame_height); \
|
||||
HFI_UBWC_CALC_METADATA_PLANE_STRIDE(metadata_stride, \
|
||||
@@ -1777,8 +1770,7 @@ _yuv_bufcount_min, is_opb, num_vpp_pipes) \
|
||||
#define HFI_IRIS3_ENC_MIN_INPUT_BUF_COUNT(numInput, TotalHBLayers) \
|
||||
do { \
|
||||
numInput = 3; \
|
||||
if (TotalHBLayers >= 2) \
|
||||
{ \
|
||||
if (TotalHBLayers >= 2) { \
|
||||
numInput = (1 << (TotalHBLayers - 1)) + 2; \
|
||||
} \
|
||||
} while (0)
|
||||
|
Référencer dans un nouveau ticket
Bloquer un utilisateur