struct vdec_info tmp4x;
int stream_offset = pic->stream_offset;
set_vframe(dec, vf, pic, 0);
- decoder_do_frame_check(pvdec, vf);
+ vdec_vframe_ready(pvdec, vf);
kfifo_put(&dec->display_q, (const struct vframe_s *)vf);
ATRACE_COUNTER(MODULE_NAME, vf->pts);
vf->pts_us64 = offset;
vf->pts = 0;
}
+ vdec_vframe_ready(hw_to_vdec(hw), vf);
kfifo_put(&hw->display_q,
(const struct vframe_s *)vf);
avs_vf_notify_receiver(hw, PROVIDER_NAME,
}
avs_update_gvs(hw);
vdec_fill_vdec_frame(hw_to_vdec(hw), NULL, hw->gvs, vf, 0);
-
+
/* pr_info("PicType = %d, PTS = 0x%x\n",
* picture_type, vf->pts);
*/
pvdec = hw_to_vdec(hw);
memset(&vs, 0, sizeof(struct vdec_info));
pvdec->dec_status(pvdec, &vs);
- decoder_do_frame_check(pvdec, vf);
+ vdec_vframe_ready(pvdec, vf);
vdec_fill_vdec_frame(pvdec, &hw->vframe_qos, &vs, vf, frame->hw_decode_time);
dpb_print(DECODE_ID(hw), PRINT_FLAG_DPB_DETAIL,
hevc->gvs->ratio_control = hevc->ratio_control;
}
+static void put_vf_to_display_q(struct hevc_state_s *hevc, struct vframe_s *vf)
+{
+ hevc->vf_pre_count++;
+ vdec_vframe_ready(hw_to_vdec(hevc), vf);
+ kfifo_put(&hevc->display_q, (const struct vframe_s *)vf);
+ ATRACE_COUNTER(MODULE_NAME, vf->pts);
+}
+
static int prepare_display_buf(struct hevc_state_s *hevc, struct PIC_s *pic)
{
struct vdec_s *vdec = hw_to_vdec(hevc);
vf2->type = VIDTYPE_INTERLACE_TOP
| nv_order;
}
- hevc->vf_pre_count++;
- decoder_do_frame_check(vdec, vf);
- kfifo_put(&hevc->display_q,
- (const struct vframe_s *)vf);
- ATRACE_COUNTER(MODULE_NAME, vf->pts);
+ put_vf_to_display_q(hevc, vf);
hevc->vf_pre_count++;
kfifo_put(&hevc->display_q,
(const struct vframe_s *)vf2);
vf3->type = VIDTYPE_INTERLACE_BOTTOM
| nv_order;
}
- hevc->vf_pre_count++;
- decoder_do_frame_check(vdec, vf);
- kfifo_put(&hevc->display_q,
- (const struct vframe_s *)vf);
- ATRACE_COUNTER(MODULE_NAME, vf->pts);
+ put_vf_to_display_q(hevc, vf);
hevc->vf_pre_count++;
kfifo_put(&hevc->display_q,
(const struct vframe_s *)vf2);
process_pending_vframe(hevc,
pic, (pic->pic_struct == 9));
- decoder_do_frame_check(vdec, vf);
+ vdec_vframe_ready(vdec, vf);
/* process current vf */
kfifo_put(&hevc->pending_q,
(const struct vframe_s *)vf);
nv_order | VIDTYPE_VIU_FIELD;
vf->index = (pic->index << 8) | 0xff;
}
- decoder_do_frame_check(vdec, vf);
+ vdec_vframe_ready(vdec, vf);
kfifo_put(&hevc->pending_q,
(const struct vframe_s *)vf);
if (hevc->vf_pre_count == 0)
hevc->pre_bot_pic = pic;
break;
}
- hevc->vf_pre_count++;
- decoder_do_frame_check(vdec, vf);
- kfifo_put(&hevc->display_q,
- (const struct vframe_s *)vf);
- ATRACE_COUNTER(MODULE_NAME, vf->pts);
+ put_vf_to_display_q(hevc, vf);
}
#else
vf->type_original = vf->type;
pic->vf_ref = 1;
- hevc->vf_pre_count++;
- decoder_do_frame_check(vdec, vf);
- kfifo_put(&hevc->display_q, (const struct vframe_s *)vf);
- ATRACE_COUNTER(MODULE_NAME, vf->pts);
+ put_vf_to_display_q(hevc, vf);
#endif
/*count info*/
vdec_count_info(hevc->gvs, 0, stream_offset);
vf->mem_handle =
decoder_bmmu_box_get_mem_handle(
hw->mm_blk_handle, index);
- decoder_do_frame_check(vdec, vf);
+ vdec_vframe_ready(vdec, vf);
kfifo_put(&hw->display_q, (const struct vframe_s *)vf);
ATRACE_COUNTER(MODULE_NAME, vf->pts);
hw->frame_num++;
if (i == 0) {
struct vdec_s *vdec = hw_to_vdec(hw);
- decoder_do_frame_check(vdec, vf);
+ vdec_vframe_ready(vdec, vf);
hw_update_gvs(hw);
vdec_fill_vdec_frame(vdec, &hw->vframe_qos,
&hw->gvs, vf, pic->hw_decode_time);
vf->mem_handle =
decoder_bmmu_box_get_mem_handle(
hw->mm_blk_handle, index);
+ vdec_vframe_ready(vdec, vf);
kfifo_put(&hw->display_q,
(const struct vframe_s *)vf);
ATRACE_COUNTER(MODULE_NAME, vf->pts);
vdec->vdec_fps_detec(vdec->id);
- decoder_do_frame_check(vdec, vf);
hw->frame_num++;
if (pic->pic_type == I_PICTURE) {
hw->i_decoded_frames++;
vf->mem_handle =
decoder_bmmu_box_get_mem_handle(
hw->mm_blk_handle, index);
+ vdec_vframe_ready(vdec, vf);
kfifo_put(&hw->display_q,
(const struct vframe_s *)vf);
ATRACE_COUNTER(MODULE_NAME, vf->pts);
vdec->vdec_fps_detec(vdec->id);
- decoder_do_frame_check(vdec, vf);
hw->frame_num++;
if (pic->pic_type == I_PICTURE) {
hw->i_decoded_frames++;
}
EXPORT_SYMBOL(vdec_fill_vdec_frame);
+void vdec_vframe_ready(struct vdec_s *vdec, struct vframe_s *vf) {
+ decoder_do_frame_check(vdec, vf);
+ if (vdec_secure(vdec)) {
+ vf->flag |= VFRAME_FLAG_VIDEO_SECURE;
+ } else {
+ vf->flag &= ~VFRAME_FLAG_VIDEO_SECURE;
+ }
+}
+EXPORT_SYMBOL(vdec_vframe_ready);
+
/* In this function,if we use copy_to_user, we may encounter sleep,
which may block the vdec_fill_vdec_frame,this is not acceptable.
So, we should use a tmp buffer(passed by caller) to get the content */
struct vframe_qos_s *vframe_qos,
struct vdec_info *vinfo,
struct vframe_s *vf, u32 hw_dec_time);
+
+extern void vdec_vframe_ready(struct vdec_s *vdec, struct vframe_s *vf);
extern void vdec_set_vframe_comm(struct vdec_s *vdec, char *n);
update_vf_memhandle(hw, vf, pic_config);
av1_inc_vf_ref(hw, pic_config->index);
- decoder_do_frame_check(hw_to_vdec(hw), vf);
+ vdec_vframe_ready(hw_to_vdec(hw), vf);
kfifo_put(&hw->display_q, (const struct vframe_s *)vf);
ATRACE_COUNTER(MODULE_NAME, vf->pts);
hw->vf_pre_count++;
struct vdec_info tmp4x;
inc_vf_ref(pbi, pic_config->index);
- decoder_do_frame_check(pvdec, vf);
+ vdec_vframe_ready(pvdec, vf);
kfifo_put(&pbi->display_q, (const struct vframe_s *)vf);
ATRACE_COUNTER(MODULE_NAME, vf->pts);
pbi->vf_pre_count++;