summaryrefslogtreecommitdiff
authorkunpeng.tang <kunpeng.tang@amlogic.com>2018-04-13 04:18:20 (GMT)
committer Xindong Xu <xindong.xu@amlogic.com>2018-04-19 06:00:42 (GMT)
commit44f814c0d3b4776d8a5c6cda800cde0414271a68 (patch)
tree53d77c2a52461a2d68717eca7047a1e0afd3f7cc
parentd0e91013a4fa8604e9615b7a0c427c885dd6f2c9 (diff)
downloadcommon-44f814c0d3b4776d8a5c6cda800cde0414271a68.zip
common-44f814c0d3b4776d8a5c6cda800cde0414271a68.tar.gz
common-44f814c0d3b4776d8a5c6cda800cde0414271a68.tar.bz2
amlvideo: fix H264/VP9 adaptiveSkipBack cts errors
PD#163463: fix H264/VP9 adaptiveSkipBack cts errors 1.android.media.cts.AdaptivePlaybackTest#testH264_adaptiveSkipBack 2.android.media.cts.AdaptivePlaybackTest#testVP9_adaptiveSkipBack Change-Id: Ib5f514ceb9a312b2bc608fa8192208dc49be74c9 Signed-off-by: kunpeng.tang <kunpeng.tang@amlogic.com>
Diffstat
-rw-r--r--drivers/amlogic/media/video_processor/video_dev/amlvideo.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/amlogic/media/video_processor/video_dev/amlvideo.c b/drivers/amlogic/media/video_processor/video_dev/amlvideo.c
index a9b4096..0dee419 100644
--- a/drivers/amlogic/media/video_processor/video_dev/amlvideo.c
+++ b/drivers/amlogic/media/video_processor/video_dev/amlvideo.c
@@ -524,9 +524,6 @@ static int vidioc_dqbuf(struct file *file, void *priv, struct v4l2_buffer *p)
}
dev->vf->omx_index = dev->frame_num;
- vfq_push(&dev->q_ready, dev->vf);
- p->index = 0;
-
if (dev->vf->pts_us64) {
dev->first_frame = 1;
pts_us64 = dev->vf->pts_us64;
@@ -536,7 +533,14 @@ static int vidioc_dqbuf(struct file *file, void *priv, struct v4l2_buffer *p)
} else {
pts_us64 = dev->last_pts_us64
+ (DUR2PTS(dev->vf->duration))*100/9;
+ dev->vf->pts = pts_us64*9/100;
+ AMLVIDEO_WARN("pts= %d, dev->vf->duration= %d\n",
+ dev->vf->pts, (DUR2PTS(dev->vf->duration)));
}
+
+ vfq_push(&dev->q_ready, dev->vf);
+ p->index = 0;
+
p->timestamp.tv_sec = pts_us64 >> 32;
p->timestamp.tv_usec = pts_us64 & 0xFFFFFFFF;
dev->last_pts_us64 = pts_us64;