video: driver: Align buffer interface file with CL: 30395412

Align driver buffer macro interface file with firmware file.

Change-Id: I5f3d2a581150452f9becb2dec871040ced6803c5
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
This commit is contained in:
Akshata Sahukar
2021-04-29 10:44:51 -07:00
父節點 550a5599b9
當前提交 6ec3f9e960
共有 2 個文件被更改,包括 19 次插入28 次删除

查看文件

@@ -973,7 +973,8 @@ _yuv_bufcount_min, is_opb, num_vpp_pipes) \
HFI_U32 num_ref = 1; \
if (n_bframe) \
num_ref = 2; \
if (_total_hp_layers > 1) { \
if (_total_hp_layers > 1) \
{ \
if (hybrid_hp) \
num_ref = (_total_hp_layers + 1) >> 1; \
else if (codec_standard == HFI_CODEC_ENCODE_HEVC) \
@@ -986,7 +987,8 @@ _yuv_bufcount_min, is_opb, num_vpp_pipes) \
} \
if (ltr_count) \
num_ref = num_ref + ltr_count; \
if (_total_hb_layers > 1) { \
if (_total_hb_layers > 1) \
{ \
if (codec_standard == HFI_CODEC_ENCODE_HEVC) \
num_ref = (_total_hb_layers); \
else if (codec_standard == HFI_CODEC_ENCODE_AVC) \
@@ -997,12 +999,14 @@ _yuv_bufcount_min, is_opb, num_vpp_pipes) \
#define SIZE_BIN_BITSTREAM_ENC(_size, rc_type, frame_width, frame_height, \
work_mode, lcu_size) \
do { \
do \
{ \
HFI_U32 size_aligned_width = 0, size_aligned_height = 0; \
HFI_U32 bitstream_size_eval = 0; \
size_aligned_width = HFI_ALIGN((frame_width), lcu_size); \
size_aligned_height = HFI_ALIGN((frame_height), lcu_size); \
if (work_mode == HFI_WORKMODE_2) { \
if (work_mode == HFI_WORKMODE_2) \
{ \
if ((rc_type == HFI_RC_CQ) || (rc_type == HFI_RC_OFF)) \
{ \
bitstream_size_eval = (((size_aligned_width) * \
@@ -1041,7 +1045,8 @@ _yuv_bufcount_min, is_opb, num_vpp_pipes) \
#define SIZE_ENC_SINGLE_PIPE(size, rc_type, bitbin_size, num_vpp_pipes, \
frame_width, frame_height, lcu_size) \
do { \
do \
{ \
HFI_U32 size_single_pipe_eval = 0, sao_bin_buffer_size = 0, \
_padded_bin_sz = 0; \
HFI_U32 size_aligned_width = 0, size_aligned_height = 0; \
@@ -1537,32 +1542,23 @@ _yuv_bufcount_min, is_opb, num_vpp_pipes) \
HFI_BUFFER_DPB_ENC(_size, frame_width, frame_height, is_ten_bit); \
} while (0)
#define HFI_BUFFER_VPSS_ENC(vpss_size, frame_width, frame_height, ds_enable, \
rot_enable, flip_enable, is_ten_bit) \
#define HFI_BUFFER_VPSS_ENC(vpss_size, bitstream_framewidth, bitstream_frameheight, ds_enable, \
rotation, is_ten_bit) \
do \
{ \
HFI_U32 vpss_size = 0; \
vpss_size = 0; \
if (ds_enable) \
{ \
if (rot_enable) \
if (rotation == HFI_ROTATION_90 || rotation == HFI_ROTATION_270 ) \
{ \
HFI_BUFFER_DPB_ENC(vpss_size, frame_height, \
frame_width, is_ten_bit); \
} \
else if (flip_enable) \
{ \
HFI_BUFFER_DPB_ENC(vpss_size, frame_width, \
frame_height, is_ten_bit); \
HFI_BUFFER_DPB_ENC(vpss_size, bitstream_frameheight, \
bitstream_framewidth, is_ten_bit); \
} \
else \
{ \
vpss_size = 0; \
HFI_BUFFER_DPB_ENC(vpss_size, bitstream_framewidth, \
bitstream_frameheight, is_ten_bit); \
} \
vpss_size = vpss_size; \
} \
else \
{ \
vpss_size = vpss_size; \
} \
} while (0)

查看文件

@@ -443,7 +443,6 @@ static u32 msm_vidc_encoder_vpss_size_iris2(struct msm_vidc_inst* inst)
u32 size = 0;
bool ds_enable = false, is_tenbit = false;
u32 rotation_val = HFI_ROTATION_NONE;
u32 flip_val = HFI_DISABLE_FLIP;
u32 width, height, driver_colorfmt;
struct v4l2_format* f;
@@ -454,10 +453,6 @@ static u32 msm_vidc_encoder_vpss_size_iris2(struct msm_vidc_inst* inst)
ds_enable = is_scaling_enabled(inst);
msm_vidc_v4l2_to_hfi_enum(inst, ROTATION, &rotation_val);
if (inst->capabilities->cap[HFLIP].value)
flip_val |= HFI_HORIZONTAL_FLIP;
if (inst->capabilities->cap[VFLIP].value)
flip_val = HFI_VERTICAL_FLIP;
width = inst->compose.width;
height = inst->compose.height;
@@ -468,7 +463,7 @@ static u32 msm_vidc_encoder_vpss_size_iris2(struct msm_vidc_inst* inst)
is_tenbit = is_10bit_colorformat(driver_colorfmt);
HFI_BUFFER_VPSS_ENC(size, width, height, ds_enable,
rotation_val, flip_val, is_tenbit);
rotation_val, is_tenbit);
i_vpr_l(inst, "%s: size %d\n", __func__, size);
return size;
}