--- a/luvcview.c 2008-06-08 16:21:41.000000000 +0200 +++ a/luvcview.c 2008-06-08 16:40:31.000000000 +0200 @@ -220,6 +220,7 @@ const char *videodevice = NULL; const char *mode = NULL; int format = V4L2_PIX_FMT_MJPEG; + int sdl_format = SDL_YUY2_OVERLAY; int i; int grabmethod = 1; int width = 320; @@ -269,6 +270,10 @@ if (strncmp(mode, "yuv", 3) == 0) { format = V4L2_PIX_FMT_YUYV; + } else if (strncmp(mode, "uyvy", 4) == 0) { + format = V4L2_PIX_FMT_UYVY; + sdl_format = SDL_UYVY_OVERLAY; + } else if (strncmp(mode, "jpg", 3) == 0) { format = V4L2_PIX_FMT_MJPEG; @@ -345,7 +350,7 @@ printf("-d /dev/videoX use videoX device\n"); printf("-g use read method for grab instead mmap \n"); printf("-w disable SDL hardware accel. \n"); - printf("-f video format default jpg others options are yuv jpg \n"); + printf("-f video format default jpg others options are yuv uyvy jpg \n"); printf("-i fps use specified frame interval \n"); printf("-s widthxheight use specified input size \n"); printf("-c enable raw frame capturing for the first frame\n"); @@ -447,7 +452,7 @@ overlay = SDL_CreateYUVOverlay(videoIn->width, videoIn->height + 32, - SDL_YUY2_OVERLAY, pscreen); + sdl_format, pscreen); p = (unsigned char *) overlay->pixels[0]; drect.x = 0; drect.y = 0; --- a/v4l2uvc.c 2008-06-08 16:26:02.000000000 +0200 +++ a/v4l2uvc.c 2008-06-08 16:40:31.000000000 +0200 @@ -125,6 +125,7 @@ 8) * 2); break; case V4L2_PIX_FMT_YUYV: + case V4L2_PIX_FMT_UYVY: vd->framebuffer = (unsigned char *) calloc(1, (size_t) vd->framesizeIn); break; @@ -572,6 +573,7 @@ printf("bytes in used %d \n", vd->buf.bytesused); break; case V4L2_PIX_FMT_YUYV: + case V4L2_PIX_FMT_UYVY: if (vd->buf.bytesused > vd->framesizeIn) memcpy(vd->framebuffer, vd->mem[vd->buf.index], (size_t) vd->framesizeIn);