This patch simply adds UYVY pixel format support to the vivi driver.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
.fourcc = V4L2_PIX_FMT_YUYV,
.depth = 16,
},
+ {
+ .name = "4:2:2, packed, UYVY",
+ .fourcc = V4L2_PIX_FMT_UYVY,
+ .depth = 16,
+ },
};
static struct vivi_fmt *get_format(struct v4l2_format *f)
break;
}
break;
+ case V4L2_PIX_FMT_UYVY:
+ switch (color) {
+ case 1:
+ case 3:
+ *p = r_y;
+ break;
+ case 0:
+ *p = g_u;
+ break;
+ case 2:
+ *p = b_v;
+ break;
+ }
+ break;
}
}
}
switch (fh->fmt->fourcc) {
case V4L2_PIX_FMT_YUYV:
+ case V4L2_PIX_FMT_UYVY:
is_yuv = 1;
break;
}