amlvideo: set omx output buffer size to compWidth*compHeight
authorYao.Liu <yao.liu@amlogic.com>
Tue, 5 Sep 2017 09:05:37 +0000 (17:05 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Wed, 6 Sep 2017 06:39:12 +0000 (23:39 -0700)
PD#150218: amlvideo: set omx output buffer size to compWidth*compHeight

Change-Id: I69ff2e5defb8344cd4aec05582f4696faa0abe7f
Signed-off-by: Yao.Liu <yao.liu@amlogic.com>
drivers/amlogic/media/video_processor/video_dev/amlvideo.c

index c3e41c5..66453e3 100644 (file)
@@ -538,8 +538,14 @@ static int vidioc_dqbuf(struct file *file, void *priv, struct v4l2_buffer *p)
        p->timestamp.tv_sec = pts_us64 >> 32;
        p->timestamp.tv_usec = pts_us64 & 0xFFFFFFFF;
        dev->last_pts_us64 = pts_us64;
-       p->timecode.type = dev->vf->width;
-       p->timecode.flags = dev->vf->height;
+
+       if ((dev->vf->type & VIDTYPE_COMPRESS) != 0) {
+               p->timecode.type = dev->vf->compWidth;
+               p->timecode.flags = dev->vf->compHeight;
+       } else {
+               p->timecode.type = dev->vf->width;
+               p->timecode.flags = dev->vf->height;
+       }
 
        vf_notify_receiver(
                        dev->vf_provider_name,