Hi Marco,

On Tuesday 01 July 2008, Marco Argiolas wrote:
> Other two questions:
> my patches just works with YUYV format and Memory Mapped streaming method.
> I'd like to make them more flexible!!
> 1) Are the following all the supported image formats? (I took them from
> videodev2.h)
>
> /*      Pixel format         FOURCC                        depth
> Description  */
> #define V4L2_PIX_FMT_RGB332
> <http://v4l2spec.bytesex.org/spec/r2492.htm#V4L2-PIX-FMT-RGB332>
> v4l2_fourcc('R','G','B','1') /*  8  RGB-3-3-2     */
> #define V4L2_PIX_FMT_RGB444
> <http://v4l2spec.bytesex.org/spec/r2492.htm#V4L2-PIX-FMT-RGB444>
> v4l2_fourcc('R','4','4','4') /* 16  xxxxrrrr ggggbbbb */
> #define V4L2_PIX_FMT_RGB555
> <http://v4l2spec.bytesex.org/spec/r2492.htm#V4L2-PIX-FMT-RGB555>
> v4l2_fourcc('R','G','B','O') /* 16  RGB-5-5-5     */
> #define V4L2_PIX_FMT_RGB565
> <http://v4l2spec.bytesex.org/spec/r2492.htm#V4L2-PIX-FMT-RGB565>
> v4l2_fourcc('R','G','B','P') /* 16  RGB-5-6-5     */
> #define V4L2_PIX_FMT_RGB555X
> <http://v4l2spec.bytesex.org/spec/r2492.htm#V4L2-PIX-FMT-RGB555X>
> v4l2_fourcc('R','G','B','Q') /* 16  RGB-5-5-5 BE  */
> #define V4L2_PIX_FMT_RGB565X
> <http://v4l2spec.bytesex.org/spec/r2492.htm#V4L2-PIX-FMT-RGB565X>
> v4l2_fourcc('R','G','B','R') /* 16  RGB-5-6-5 BE  */
> #define V4L2_PIX_FMT_BGR24
> <http://v4l2spec.bytesex.org/spec/r2492.htm#V4L2-PIX-FMT-BGR24>
> v4l2_fourcc('B','G','R','3') /* 24  BGR-8-8-8     */
> #define V4L2_PIX_FMT_RGB24
> <http://v4l2spec.bytesex.org/spec/r2492.htm#V4L2-PIX-FMT-RGB24>
> v4l2_fourcc('R','G','B','3') /* 24  RGB-8-8-8     */
> #define V4L2_PIX_FMT_BGR32
> <http://v4l2spec.bytesex.org/spec/r2492.htm#V4L2-PIX-FMT-BGR32>
> v4l2_fourcc('B','G','R','4') /* 32  BGR-8-8-8-8   */
> #define V4L2_PIX_FMT_RGB32
> <http://v4l2spec.bytesex.org/spec/r2492.htm#V4L2-PIX-FMT-RGB32>
> v4l2_fourcc('R','G','B','4') /* 32  RGB-8-8-8-8   */
> #define V4L2_PIX_FMT_GREY <http://v4l2spec.bytesex.org/spec/r4185.htm>
>    v4l2_fourcc('G','R','E','Y') /*  8  Greyscale     */
> #define V4L2_PIX_FMT_Y16 <http://v4l2spec.bytesex.org/spec/r4246.htm>
>    v4l2_fourcc('Y','1','6',' ') /* 16  Greyscale     */
> #define V4L2_PIX_FMT_PAL8
> <http://v4l2spec.bytesex.org/spec/x2428.htm#V4L2-PIX-FMT-PAL8>
> v4l2_fourcc('P','A','L','8') /*  8  8-bit palette */
> #define V4L2_PIX_FMT_YVU410
> <http://v4l2spec.bytesex.org/spec/r5016.htm#V4L2-PIX-FMT-YVU410>
> v4l2_fourcc('Y','V','U','9') /*  9  YVU 4:1:0     */
> #define V4L2_PIX_FMT_YVU420
> <http://v4l2spec.bytesex.org/spec/r4850.htm#V4L2-PIX-FMT-YVU420>
> v4l2_fourcc('Y','V','1','2') /* 12  YVU 4:2:0     */
> #define V4L2_PIX_FMT_YUYV <http://v4l2spec.bytesex.org/spec/r4339.htm>
>    v4l2_fourcc('Y','U','Y','V') /* 16  YUV 4:2:2     */
> #define V4L2_PIX_FMT_UYVY <http://v4l2spec.bytesex.org/spec/r4484.htm>
>    v4l2_fourcc('U','Y','V','Y') /* 16  YUV 4:2:2     */
> #define V4L2_PIX_FMT_YUV422P
> <http://v4l2spec.bytesex.org/spec/r5154.htm>
> v4l2_fourcc('4','2','2','P') /* 16  YVU422 planar */
> #define V4L2_PIX_FMT_YUV411P
> <http://v4l2spec.bytesex.org/spec/r5319.htm>
> v4l2_fourcc('4','1','1','P') /* 16  YVU411 planar */
> #define V4L2_PIX_FMT_Y41P <http://v4l2spec.bytesex.org/spec/r4629.htm>
>    v4l2_fourcc('Y','4','1','P') /* 12  YUV 4:1:1     */
> #define V4L2_PIX_FMT_YUV444
> <http://v4l2spec.bytesex.org/spec/r3896.htm#V4L2-PIX-FMT-YUV444>
> v4l2_fourcc('Y','4','4','4') /* 16  xxxxyyyy uuuuvvvv */
> #define V4L2_PIX_FMT_YUV555
> <http://v4l2spec.bytesex.org/spec/r3896.htm#V4L2-PIX-FMT-YUV555>
> v4l2_fourcc('Y','U','V','O') /* 16  YUV-5-5-5     */
> #define V4L2_PIX_FMT_YUV565
> <http://v4l2spec.bytesex.org/spec/r3896.htm#V4L2-PIX-FMT-YUV565>
> v4l2_fourcc('Y','U','V','P') /* 16  YUV-5-6-5     */
> #define V4L2_PIX_FMT_YUV32
> <http://v4l2spec.bytesex.org/spec/r3896.htm#V4L2-PIX-FMT-YUV32>
> v4l2_fourcc('Y','U','V','4') /* 32  YUV-8-8-8-8   */
>
> /* two planes -- one Y, one Cr + Cb interleaved  */
> #define V4L2_PIX_FMT_NV12
> <http://v4l2spec.bytesex.org/spec/r5470.htm#V4L2-PIX-FMT-NV12>
> v4l2_fourcc('N','V','1','2') /* 12  Y/CbCr 4:2:0  */
> #define V4L2_PIX_FMT_NV21
> <http://v4l2spec.bytesex.org/spec/r5470.htm#V4L2-PIX-FMT-NV21>
> v4l2_fourcc('N','V','2','1') /* 12  Y/CrCb 4:2:0  */
>
> /*  The following formats are not defined in the V4L2 specification */
> #define V4L2_PIX_FMT_YUV410
> <http://v4l2spec.bytesex.org/spec/r5016.htm#V4L2-PIX-FMT-YUV410>
> v4l2_fourcc('Y','U','V','9') /*  9  YUV 4:1:0     */
> #define V4L2_PIX_FMT_YUV420
> <http://v4l2spec.bytesex.org/spec/r4850.htm#V4L2-PIX-FMT-YUV420>
> v4l2_fourcc('Y','U','1','2') /* 12  YUV 4:2:0     */
> #define V4L2_PIX_FMT_YYUV
> <http://v4l2spec.bytesex.org/spec/x5665.htm#V4L2-PIX-FMT-YYUV>
> v4l2_fourcc('Y','Y','U','V') /* 16  YUV 4:2:2     */
> #define V4L2_PIX_FMT_HI240
> <http://v4l2spec.bytesex.org/spec/x5665.htm#V4L2-PIX-FMT-HI240>
> v4l2_fourcc('H','I','2','4') /*  8  8-bit color   */
> #define V4L2_PIX_FMT_HM12
> <http://v4l2spec.bytesex.org/spec/x5665.htm#V4L2-PIX-FMT-HM12>
> v4l2_fourcc('H','M','1','2') /*  8  YUV 4:2:0 16x16 macroblocks */
>
> /* see http://www.siliconimaging.com/RGB%20Bayer.htm */
> #define V4L2_PIX_FMT_SBGGR8
> <http://v4l2spec.bytesex.org/spec/r3735.htm>
> v4l2_fourcc('B','A','8','1') /*  8  BGBG.. GRGR.. */
> #define V4L2_PIX_FMT_SBGGR16
> <http://v4l2spec.bytesex.org/spec/r3796.htm>
> v4l2_fourcc('B','Y','R','2') /* 16  BGBG.. GRGR.. */
>
> /* compressed formats */
> #define V4L2_PIX_FMT_MJPEG
> <http://v4l2spec.bytesex.org/spec/x5665.htm#V4L2-PIX-FMT-MJPEG>
> v4l2_fourcc('M','J','P','G') /* Motion-JPEG   */
> #define V4L2_PIX_FMT_JPEG
> <http://v4l2spec.bytesex.org/spec/x5634.htm#V4L2-PIX-FMT-JPEG>
> v4l2_fourcc('J','P','E','G') /* JFIF JPEG     */
> #define V4L2_PIX_FMT_DV
> <http://v4l2spec.bytesex.org/spec/x5665.htm#V4L2-PIX-FMT-DV>
> v4l2_fourcc('d','v','s','d') /* 1394          */
> #define V4L2_PIX_FMT_MPEG
> <http://v4l2spec.bytesex.org/spec/x5634.htm#V4L2-PIX-FMT-MPEG>
> v4l2_fourcc('M','P','E','G') /* MPEG-1/2/4    */
>
> /*  Vendor-specific formats   */
> #define V4L2_PIX_FMT_WNVA
> <http://v4l2spec.bytesex.org/spec/x5665.htm#V4L2-PIX-FMT-WNVA>
> v4l2_fourcc('W','N','V','A') /* Winnov hw compress */
> #define V4L2_PIX_FMT_SN9C10X
> <http://v4l2spec.bytesex.org/spec/x5665.htm#V4L2-PIX-FMT-SN9C10X>
> v4l2_fourcc('S','9','1','0') /* SN9C10x compression */
> #define V4L2_PIX_FMT_PWC1
> <http://v4l2spec.bytesex.org/spec/x5665.htm#V4L2-PIX-FMT-PWC1>
> v4l2_fourcc('P','W','C','1') /* pwc older webcam */
> #define V4L2_PIX_FMT_PWC2
> <http://v4l2spec.bytesex.org/spec/x5665.htm#V4L2-PIX-FMT-PWC2>
> v4l2_fourcc('P','W','C','2') /* pwc newer webcam */
> #define V4L2_PIX_FMT_ET61X251
> <http://v4l2spec.bytesex.org/spec/x5665.htm#V4L2-PIX-FMT-ET61X251>
> v4l2_fourcc('E','6','2','5') /* ET61X251 compression */

Driver can define new formats but are encouraged to submit them for inclusion 
in videodev2.h.

The uvcvideo driver currently supports the following formats:

YUV 4:2:2 (YUYV)        V4L2_PIX_FMT_YUYV
YUV 4:2:0 (NV12)        V4L2_PIX_FMT_NV12
MJPEG                   V4L2_PIX_FMT_MJPEG
YVU 4:2:0 (YV12)        V4L2_PIX_FMT_YVU420
YUV 4:2:0 (I420)        V4L2_PIX_FMT_YUV420
YUV 4:2:2 (UYVY)        V4L2_PIX_FMT_UYVY
Greyscale               V4L2_PIX_FMT_GREY
RGB Bayer               V4L2_PIX_FMT_SBGGR8

> 2) If I'd like to make a patch for the User Pointer streaming method, which
> is the function that does the same of "
>
> uvc_video_decode_data
>
> ()" in "uvc_video.c"?

The uvcvideo driver doesn't support the User Pointer streaming method yet. I'm 
not sure if any driver currently supports that streaming method.

> ps.
> what do you think about this kind of patch? do you think these adds are
> only a loss of time?

I think this should be implemented in userspace. The libv4l/libv4l2 projects 
are good candidates for this kind of functionality.

Best regards,

Laurent Pinchart
_______________________________________________
Linux-uvc-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel

Reply via email to