author | jintao xu <jintao.xu@amlogic.com> | 2019-05-10 11:47:36 (GMT) |
---|---|---|
committer | Tao Zeng <tao.zeng@amlogic.com> | 2019-05-15 02:06:32 (GMT) |
commit | d8577459a60d189c4454133d318e2d439483ccba (patch) | |
tree | 3991f655855b1f9492178c947a4780fd783c5f79 | |
parent | 46c7243a2d56b6b48aa582c7f0ac6fc306c4688e (diff) | |
download | common-d8577459a60d189c4454133d318e2d439483ccba.zip common-d8577459a60d189c4454133d318e2d439483ccba.tar.gz common-d8577459a60d189c4454133d318e2d439483ccba.tar.bz2 |
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>
-rw-r--r-- | drivers/amlogic/media/video_processor/videosync/videosync.c | 12 | ||||
-rw-r--r-- | drivers/amlogic/media/video_sink/video.c | 5 |
2 files changed, 13 insertions, 4 deletions
diff --git a/drivers/amlogic/media/video_processor/videosync/videosync.c b/drivers/amlogic/media/video_processor/videosync/videosync.c index 9f4c3dff..da53768 100644 --- a/drivers/amlogic/media/video_processor/videosync/videosync.c +++ b/drivers/amlogic/media/video_processor/videosync/videosync.c @@ -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; } diff --git a/drivers/amlogic/media/video_sink/video.c b/drivers/amlogic/media/video_sink/video.c index 458f60c..271e097 100644 --- a/drivers/amlogic/media/video_sink/video.c +++ b/drivers/amlogic/media/video_sink/video.c @@ -7086,10 +7086,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) @@ -7097,6 +7099,7 @@ SET_FILTER: else pip_vf_put(vf); } + vf = pip_vf_peek(); } #endif #if defined(CONFIG_AMLOGIC_MEDIA_ENHANCEMENT_VECM) |