d/v4l2: Add support for XRT_FORMAT_UYVY422

This commit is contained in:
Jakob Bornecrantz 2020-04-24 20:00:37 +01:00 committed by Jakob Bornecrantz
parent c7903e2d5e
commit cb90837d97

View file

@ -490,6 +490,7 @@ v4l2_list_modes_size(struct v4l2_fs *vid,
enum xrt_format format = (enum xrt_format)0; enum xrt_format format = (enum xrt_format)0;
switch (interval.pixel_format) { switch (interval.pixel_format) {
case V4L2_PIX_FMT_YUYV: format = XRT_FORMAT_YUYV422; break; case V4L2_PIX_FMT_YUYV: format = XRT_FORMAT_YUYV422; break;
case V4L2_PIX_FMT_UYVY: format = XRT_FORMAT_UYVY422; break;
case V4L2_PIX_FMT_MJPEG: format = XRT_FORMAT_MJPEG; break; case V4L2_PIX_FMT_MJPEG: format = XRT_FORMAT_MJPEG; break;
default: V_ERROR(vid, "error: Format not supported."); return; default: V_ERROR(vid, "error: Format not supported."); return;
} }
@ -525,6 +526,7 @@ v4l2_list_modes_fmt(struct v4l2_fs *vid, const struct v4l2_fmtdesc *fmt)
switch (fmt->pixelformat) { switch (fmt->pixelformat) {
case V4L2_PIX_FMT_YUYV: break; case V4L2_PIX_FMT_YUYV: break;
case V4L2_PIX_FMT_UYVY: break;
case V4L2_PIX_FMT_MJPEG: break; case V4L2_PIX_FMT_MJPEG: break;
default: default:
V_ERROR(vid, "error: Unknown pixelformat '%s' '%08x'", V_ERROR(vid, "error: Unknown pixelformat '%s' '%08x'",