if (pic_display && hevc->sps_num_reorder_pics_0 &&
(hevc->vf_pre_count == 1) && (hevc->first_pic_flag == 1)) {
pic_display = NULL;
- hevc->first_pic_flag = 0;
+ hevc->first_pic_flag = 2;
}
return pic_display;
}
static struct PIC_s *get_new_pic(struct hevc_state_s *hevc,
union param_u *rpm_param)
{
+ struct vdec_s *vdec = hw_to_vdec(hevc);
struct PIC_s *new_pic = NULL;
struct PIC_s *pic;
int i;
new_pic->dis_mark = 0;
/* new_pic->output_ready = 0; */
new_pic->num_reorder_pic = rpm_param->p.sps_num_reorder_pics_0;
- new_pic->ip_mode = (!new_pic->num_reorder_pic && !disable_ip_mode) ? true : false;
+ new_pic->ip_mode = (!new_pic->num_reorder_pic &&
+ !(vdec->slave || vdec->master) &&
+ !disable_ip_mode) ? true : false;
new_pic->losless_comp_body_size = hevc->losless_comp_body_size;
new_pic->POC = hevc->curr_POC;
new_pic->pic_struct = hevc->curr_pic_struct;
static struct PIC_s *v4l_get_new_pic(struct hevc_state_s *hevc,
union param_u *rpm_param)
{
+ struct vdec_s *vdec = hw_to_vdec(hevc);
int ret;
struct aml_vcodec_ctx * v4l = hevc->v4l2_ctx;
struct v4l_buff_pool *pool = &v4l->cap_pool;
new_pic->dis_mark = 0;
/* new_pic->output_ready = 0; */
new_pic->num_reorder_pic = rpm_param->p.sps_num_reorder_pics_0;
- new_pic->ip_mode = (!new_pic->num_reorder_pic && !disable_ip_mode) ? true : false;
+ new_pic->ip_mode = (!new_pic->num_reorder_pic &&
+ !(vdec->slave || vdec->master) &&
+ !disable_ip_mode) ? true : false;
new_pic->losless_comp_body_size = hevc->losless_comp_body_size;
new_pic->POC = hevc->curr_POC;
new_pic->pic_struct = hevc->curr_pic_struct;
}
if (get_dbg_flag(hevc) & H265_DEBUG_BUFMGR)
dump_pic_list(hevc);
- pic = get_pic_by_POC(hevc, decoded_poc);
+ if (hevc->vf_pre_count == 1 &&
+ hevc->first_pic_flag == 1) {
+ hevc->first_pic_flag = 2;
+ pic = NULL;
+ }
+ else
+ pic = get_pic_by_POC(hevc, decoded_poc);
+
flush_output(hevc, pic);
}
if (hevc->wait_buf == 0) {
hevc->sps_num_reorder_pics_0 =
rpm_param->p.sps_num_reorder_pics_0;
- hevc->ip_mode = (!hevc->sps_num_reorder_pics_0 && !disable_ip_mode) ? true : false;
+ hevc->ip_mode = (!hevc->sps_num_reorder_pics_0 &&
+ !(vdec->slave || vdec->master) &&
+ !disable_ip_mode) ? true : false;
hevc->m_temporalId = rpm_param->p.m_temporalId;
hevc->m_nalUnitType = rpm_param->p.m_nalUnitType;
hevc->interlace_flag =
} else {
hevc->sps_num_reorder_pics_0 =
hevc->param.p.sps_num_reorder_pics_0;
- hevc->ip_mode = (!hevc->sps_num_reorder_pics_0 && !disable_ip_mode) ? true : false;
+ hevc->ip_mode = (!hevc->sps_num_reorder_pics_0 &&
+ !(vdec->slave || vdec->master) &&
+ !disable_ip_mode) ? true : false;
hevc->pic_list_init_flag = 1;
if ((!IS_4K_SIZE(hevc->pic_w, hevc->pic_h)) &&
((hevc->param.p.profile_etc & 0xc) == 0x4)