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 */


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"?

Thank you very much,

Marco Argiolas

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

2008/7/1 Marco Argiolas <[EMAIL PROTECTED]>:

> Hi Laurent,
> just one question:
> I didn't understand why it is not possible to add my patch to the driver.
> You said because it's a userspace job...
> yes I know...but I also know there are also other driver that do this kind
> of job!!
>
> Let me know,
> thank you very much.
>
> Regards,
>
> Marco Argiolas
>
> 2008/6/26 Marco Argiolas <[EMAIL PROTECTED]>:
>
> Hey Laurent,
>> I've tried to follow all your suggestion, I hope I didn't any mistakes.
>>
>> However you can find the updated HOW-TO always here:
>> http://ubuntuforums.org/showthread.php?t=838210
>>
>> I did the following changes:
>> - used PATCHES instead of the source of the modded function;
>> - I've tried to speed up for the solutions with memory allocation, just
>> allocating half the size of a frame;
>> - I've rolled back the last "if (len >= maxlen)" to "if (len > maxlen)";
>> - I've deleted some variable that where not needed;
>> - in the solutions without allocation, I've modified a little bit the
>> "filosofy" on counting the offset where to copy data. In this way it should
>> be more clear to understand;
>> - added a complete explaination of the code with a lot of comments (I hope
>> they are clear and meaningful).
>>
>> I hope all these changes can help the final users and make the code more
>> clear!!  ;)
>>
>> If you have any other suggestions...please let me know!!
>>
>> Thank you,
>> Regards
>>
>> Marco Argiolas
>
>


-- 
Marco Argiolas
[EMAIL PROTECTED]
[EMAIL PROTECTED]
skype: arjos85
msn: [EMAIL PROTECTED]
_______________________________________________
Linux-uvc-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel

Reply via email to