mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 06:09:23 -04:00
Merge "msm: vidc: Update cycle count requirement of B frames."
This commit is contained in:
commit
f22ff30abf
4 changed files with 12 additions and 3 deletions
|
|
@ -1536,6 +1536,7 @@ void *msm_vidc_open(int core_id, int session_type)
|
|||
inst->bse_vpp_delay = DEFAULT_BSE_VPP_DELAY;
|
||||
inst->first_reconfig_done = 0;
|
||||
inst->active = true;
|
||||
inst->has_bframe = 0;
|
||||
|
||||
for (i = SESSION_MSG_INDEX(SESSION_MSG_START);
|
||||
i <= SESSION_MSG_INDEX(SESSION_MSG_END); i++) {
|
||||
|
|
|
|||
|
|
@ -701,9 +701,14 @@ static unsigned long msm_vidc_calc_freq_iris2(struct msm_vidc_inst *inst,
|
|||
|
||||
vpp_cycles = mbs_per_second * vpp_cycles_per_mb /
|
||||
inst->clk_data.work_route;
|
||||
/* 1.25 factor for IbP GOP structure */
|
||||
if (msm_comm_g_ctrl_for_id(inst, V4L2_CID_MPEG_VIDEO_B_FRAMES))
|
||||
/* Factor 1.25 for IbP and 1.375 for I1B2b1P GOP structure */
|
||||
if (is_hier_b_session(inst)) {
|
||||
vpp_cycles += (vpp_cycles / 4) + (vpp_cycles / 8);
|
||||
} else if (msm_comm_g_ctrl_for_id(inst,
|
||||
V4L2_CID_MPEG_VIDEO_B_FRAMES)) {
|
||||
vpp_cycles += vpp_cycles / 4;
|
||||
}
|
||||
|
||||
/* 21 / 20 is minimum overhead factor */
|
||||
vpp_cycles += max(div_u64(vpp_cycles, 20), fw_vpp_cycles);
|
||||
/* 1.01 is multi-pipe overhead */
|
||||
|
|
@ -758,7 +763,8 @@ static unsigned long msm_vidc_calc_freq_iris2(struct msm_vidc_inst *inst,
|
|||
|
||||
/* VSP */
|
||||
codec = get_v4l2_codec(inst);
|
||||
base_cycles = inst->clk_data.entry->vsp_cycles;
|
||||
base_cycles = inst->has_bframe ?
|
||||
80 : inst->clk_data.entry->vsp_cycles;
|
||||
vsp_cycles = fps * filled_len * 8;
|
||||
|
||||
if (codec == V4L2_PIX_FMT_VP9) {
|
||||
|
|
|
|||
|
|
@ -2615,6 +2615,7 @@ static void handle_fbd(enum hal_command_response cmd, void *data)
|
|||
break;
|
||||
case HFI_PICTURE_TYPE_B:
|
||||
mbuf->vvb.flags |= V4L2_BUF_FLAG_BFRAME;
|
||||
inst->has_bframe = 1;
|
||||
break;
|
||||
case HFI_FRAME_NOTCODED:
|
||||
case HFI_UNUSED_PICT:
|
||||
|
|
|
|||
|
|
@ -574,6 +574,7 @@ struct msm_vidc_inst {
|
|||
u32 first_reconfig_done;
|
||||
u64 last_qbuf_time_ns;
|
||||
bool active;
|
||||
bool has_bframe;
|
||||
};
|
||||
|
||||
extern struct msm_vidc_drv *vidc_driver;
|
||||
|
|
|
|||
Loading…
Reference in a new issue