diff options
author | Yojiro Uo <yuo@cvs.openbsd.org> | 2008-12-03 03:47:26 +0000 |
---|---|---|
committer | Yojiro Uo <yuo@cvs.openbsd.org> | 2008-12-03 03:47:26 +0000 |
commit | 558c5814c21c8024a2fa0f22c34593b333cbd170 (patch) | |
tree | 2f55616b35d6eac8f99191dfebec6a4cb85e7535 | |
parent | d91b4fb629021bd3955b5202e56cbc65045271b3 (diff) |
add UYVY video format support for uncompressed video
ok mglocker@
-rw-r--r-- | sys/dev/usb/uvideo.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/uvideo.h | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/sys/dev/usb/uvideo.c b/sys/dev/usb/uvideo.c index 3afd7fdb34f..9753e16f4d0 100644 --- a/sys/dev/usb/uvideo.c +++ b/sys/dev/usb/uvideo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvideo.c,v 1.95 2008/12/03 03:38:53 yuo Exp $ */ +/* $OpenBSD: uvideo.c,v 1.96 2008/12/03 03:47:25 yuo Exp $ */ /* * Copyright (c) 2008 Robert Nagy <robert@openbsd.org> @@ -842,6 +842,8 @@ uvideo_vs_parse_desc_format_uncompressed(struct uvideo_softc *sc, sc->sc_fmtgrp[i].pixelformat = V4L2_PIX_FMT_YUYV; } else if (!strcmp(sc->sc_fmtgrp[i].format->u.uc.guidFormat, "NV12")) { sc->sc_fmtgrp[i].pixelformat = V4L2_PIX_FMT_NV12; + } else if (!strcmp(sc->sc_fmtgrp[i].format->u.uc.guidFormat, "UYVY")) { + sc->sc_fmtgrp[i].pixelformat = V4L2_PIX_FMT_UYVY; } else { sc->sc_fmtgrp[i].pixelformat = 0; } diff --git a/sys/dev/usb/uvideo.h b/sys/dev/usb/uvideo.h index 762ce2626ba..8c746cda29b 100644 --- a/sys/dev/usb/uvideo.h +++ b/sys/dev/usb/uvideo.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uvideo.h,v 1.37 2008/12/03 03:44:25 yuo Exp $ */ +/* $OpenBSD: uvideo.h,v 1.38 2008/12/03 03:47:25 yuo Exp $ */ /* * Copyright (c) 2007 Robert Nagy <robert@openbsd.org> @@ -304,6 +304,10 @@ struct usb_video_probe_commit { 0x4e, 0x56, 0x31, 0x32, 0x00, 0x00, 0x10, 0x00, \ 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 } +#define UVIDEO_FORMAT_GUID_UYVY { \ + 0x55, 0x59, 0x56, 0x59, 0x00, 0x00, 0x10, 0x00, \ + 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 } + /* * USB Video Payload MJPEG */ |