On Thu, Jan 12, 2006 at 05:56:18PM +0100, Tim Braun wrote:
> Hi folks,
>
> I need to transmit webcam images over a very low bandwidth connection
> (at most 100kbit/s) and therefore want to directly get the compressed
> image from the pwc driver, transmit this and decompress it at the remote
> end.
so a 1fps, the image need to be under 12kbytes. You must have a very good
compression ration to send image, i hope not in full resolution.
> Unfortunately, I'm unable to find much documentation, although I'm
> pretty sure that I read something about this maybe 2 years ago. Right
> now, all I have is a link to a (now outdated?) small program that just
> grabs the raw stream:
>
> http://lists.saillard.org/pipermail/pwc/attachments/20050426/c1069c26/pwcgrab.c
>
> and some decompression(?) routines in the 'libpwc'-package on the
> webpage. I did not find any further documentation about these programs.
Ok, the driver can now report the buffer in two formats: YUV420P, and PWC2
(see the exact name in videodev2.h). The buffer size is dynamic, but i always
return the size of the buffer in fmt.bytesused. Now use the library to
uncompress and convert the raw image to YUV420P or RGB. I've put two
programs: one capture.c that is the application sample to grab an image with
V4L2. This program capture the image in PWC2 format, or YUV420P. In the
library package, i've put a test program to convert the image into a YUV420P
or RGB.
> Also, does anyone know how high the compression factor of the built-in
> algorithm is?
Just play with resolution, and compression factor, and check your kernel log.
I print the size of 4 lines. Just multiply by your number of lines and you
have the size of the buffer.
Luc
_______________________________________________
pwc mailing list
http://lists.saillard.org/mailman/listinfo/pwc
|