video: driver: update cycle count requirement of B frames
Decoder base cycle requirement of B frames has increased to 80. Also, updated cycle count requirement for Encoder HIER B usecase. Pulled from CL: 3302650. Change-Id: I0f56166b7261e161630feeb8793473491dacccd7 Signed-off-by: Darshana Patil <darshana@codeaurora.org>
This commit is contained in:
@@ -76,8 +76,11 @@ u64 msm_vidc_calc_freq_iris2(struct msm_vidc_inst *inst, u32 data_size)
|
||||
|
||||
vpp_cycles = mbs_per_second * vpp_cycles_per_mb /
|
||||
inst->capabilities->cap[PIPE].value;
|
||||
/* 1.25 factor for IBP GOP structure */
|
||||
if (inst->capabilities->cap[B_FRAME].value)
|
||||
|
||||
/* Factor 1.25 for IbP and 1.375 for I1B2b1P GOP structure */
|
||||
if (inst->capabilities->cap[B_FRAME].value > 1)
|
||||
vpp_cycles += (vpp_cycles / 4) + (vpp_cycles / 8);
|
||||
else if (inst->capabilities->cap[B_FRAME].value)
|
||||
vpp_cycles += vpp_cycles / 4;
|
||||
/* 21 / 20 is minimum overhead factor */
|
||||
vpp_cycles += max(div_u64(vpp_cycles, 20), fw_vpp_cycles);
|
||||
@@ -133,7 +136,8 @@ u64 msm_vidc_calc_freq_iris2(struct msm_vidc_inst *inst, u32 data_size)
|
||||
vpp_cycles += div_u64(vpp_cycles * 59, 1000);
|
||||
|
||||
/* VSP */
|
||||
base_cycles = inst->capabilities->cap[MB_CYCLES_VSP].value;
|
||||
base_cycles = inst->has_bframe ?
|
||||
80 : inst->capabilities->cap[MB_CYCLES_VSP].value;
|
||||
vsp_cycles = fps * data_size * 8;
|
||||
|
||||
if (inst->codec == MSM_VIDC_VP9) {
|
||||
|
@@ -149,5 +149,6 @@ struct msm_vidc_inst {
|
||||
u32 dpb_list_payload[MAX_DPB_LIST_ARRAY_SIZE];
|
||||
u32 max_map_output_count;
|
||||
u32 auto_framerate;
|
||||
bool has_bframe;
|
||||
};
|
||||
#endif // _MSM_VIDC_INST_H_
|
||||
|
@@ -790,6 +790,7 @@ void *msm_vidc_open(void *vidc_core, u32 session_type)
|
||||
inst->request = false;
|
||||
inst->ipsc_properties_set = false;
|
||||
inst->opsc_properties_set = false;
|
||||
inst->has_bframe = false;
|
||||
inst->auto_framerate = DEFAULT_FPS << 16;
|
||||
kref_init(&inst->kref);
|
||||
mutex_init(&inst->lock);
|
||||
|
@@ -1336,6 +1336,8 @@ static int handle_session_property(struct msm_vidc_inst *inst,
|
||||
break;
|
||||
case HFI_PROP_PICTURE_TYPE:
|
||||
inst->hfi_frame_info.picture_type = payload_ptr[0];
|
||||
if (inst->hfi_frame_info.picture_type & HFI_PICTURE_B)
|
||||
inst->has_bframe = true;
|
||||
break;
|
||||
case HFI_PROP_NO_OUTPUT:
|
||||
if (port != INPUT_PORT) {
|
||||
|
Reference in New Issue
Block a user