pipvideo: add frame drop mechanism [1/1]

PD#OTT-3616

Problem:
when HDMI output is 30HZ, video is 60fps, pipvideo only can display 30fps,
need drop 30fps.

Solution:
drop frames when there is no time to display

Verify:
U212

Change-Id: I3c946aa49ccc40b8e69e6e7c5031df0b5af34454
Signed-off-by: jintao xu <jintao.xu@amlogic.com>
This commit is contained in:
jintao xu
2019-05-10 19:47:36 +08:00
committed by Luan Yuan
parent 4d127507b5
commit 8d3ecc9ce1
2 changed files with 13 additions and 4 deletions

View File

@@ -1002,10 +1002,16 @@ static int videosync_receiver_event_fun(int type, void *data,
videosync_buffer_states(&states, dev_s);
if (states.buf_queued_num + states.buf_ready_num > 0)
return RECEIVER_ACTIVE;
vp_print(dev_s->vf_receiver_name, 0,
else {
vp_print(dev_s->vf_receiver_name, 0,
"buf queue empty!!\n");
return RECEIVER_ACTIVE;/*return RECEIVER_INACTIVE;*/
if (vf_notify_receiver(
dev_s->vf_provider_name,
VFRAME_EVENT_PROVIDER_QUREY_STATE,
NULL) == RECEIVER_ACTIVE)
return RECEIVER_ACTIVE;
return RECEIVER_INACTIVE;
}
}
return 0;
}

View File

@@ -6754,10 +6754,12 @@ static irqreturn_t vsync_isr_in(int irq, void *dev_id)
SET_FILTER:
#ifdef VIDEO_PIP
vf = pip_vf_peek();
/* setting video display property in underflow mode */
if ((!vf) && cur_pipbuf && (pip_property_changed))
pip_toggle_frame(cur_pipbuf);
if (vf) {
while (vf) {
vf = pip_vf_get();
if (vf) {
if (!vf->frame_dirty)
@@ -6765,6 +6767,7 @@ SET_FILTER:
else
pip_vf_put(vf);
}
vf = pip_vf_peek();
}
#endif
#if defined(CONFIG_AMLOGIC_MEDIA_ENHANCEMENT_VECM)