aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/video/vivi.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c
index a848bd2af97f..b3ae1ba97fc6 100644
--- a/drivers/media/video/vivi.c
+++ b/drivers/media/video/vivi.c
@@ -852,6 +852,11 @@ static int vidioc_g_fmt_vid_cap(struct file *file, void *priv,
852 (f->fmt.pix.width * dev->fmt->depth) >> 3; 852 (f->fmt.pix.width * dev->fmt->depth) >> 3;
853 f->fmt.pix.sizeimage = 853 f->fmt.pix.sizeimage =
854 f->fmt.pix.height * f->fmt.pix.bytesperline; 854 f->fmt.pix.height * f->fmt.pix.bytesperline;
855 if (dev->fmt->fourcc == V4L2_PIX_FMT_YUYV ||
856 dev->fmt->fourcc == V4L2_PIX_FMT_UYVY)
857 f->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M;
858 else
859 f->fmt.pix.colorspace = V4L2_COLORSPACE_SRGB;
855 return 0; 860 return 0;
856} 861}
857 862
@@ -885,6 +890,11 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv,
885 (f->fmt.pix.width * fmt->depth) >> 3; 890 (f->fmt.pix.width * fmt->depth) >> 3;
886 f->fmt.pix.sizeimage = 891 f->fmt.pix.sizeimage =
887 f->fmt.pix.height * f->fmt.pix.bytesperline; 892 f->fmt.pix.height * f->fmt.pix.bytesperline;
893 if (fmt->fourcc == V4L2_PIX_FMT_YUYV ||
894 fmt->fourcc == V4L2_PIX_FMT_UYVY)
895 f->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M;
896 else
897 f->fmt.pix.colorspace = V4L2_COLORSPACE_SRGB;
888 return 0; 898 return 0;
889} 899}
890 900