WOW...
I think to have solved all my doubts and problems!!!
In fact just making some experiments with my modded uvcvideo driver, mplayer
and printing messages with printk(), I have found that also if mplayer
requests a 1280x960 or 1280x1024 image, the camera sends back a 640x480 one,
with all the resolutions supported with my camera (Sonix 1.3 Mpx -
174f:5a35) the bpp is constant and equal to 16 (2 bytes). I've also tried to
see the uvcvideo behaviour with skype and kopete video request from my
webcam.
At the end I've just modified again my modded function in "uvc_video.c"file:
static void uvc_video_decode_data(struct uvc_video_device *video,
struct uvc_buffer *buf, const __u8 *data, int len)
I've simply changed the declaration of "pixel_size" variable:
I don't give any more a constant value:
- pixel_size=2 was perfect with any resolutions, but colours (I don't know
why) were really pour (red and blue were exchanged each other);
- pixel_size=1280 gave back a perfect mirrored images, but with resolutions
lower than 640x480 there where problems in the consistancy of the image;
Now I've solved all my problem just using definig pixel_size in a dynamic
way:
pixel_size=video->streaming->cur_frame->wWidth *
video->streaming->format->bpp / 8;
each time pixel_size depens on the required width of the images, and I can
copy just line by line the whole image: in this way I got a mirrored image
with perfect colours.
The important thing is that this solutions DOES NOT DEPEND on the webcam you
are using or on the program you are running to use your webcam!!!!
So...just have fun with your camera!!!
Please report me any error!!! Thank you!!
Marco Argiolas
_______________________________________________
Linux-uvc-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel