Re: [Linux-uvc-devel] uvcview videograbber with preview available for testing
Linux UVC driver and tools
Brought to you by:
pinchartl
From: michel X. <mx...@ma...> - 2006-01-09 20:13:43
|
Le Lundi 9 Janvier 2006 19:53, Luc Saillard a écrit : > On Mon, Jan 09, 2006 at 07:37:52PM +0100, michel Xhaard wrote: > > > You definitely need a library to decode MJPEG. libjpeg might be a bit > > > too big to do the job (MJPEG is a small subset of all possible JPEG > > > formats), but it's the easiest to use for prototyping. > > > > Why don't used the library from uvcview in utils.c > > int jpeg_decode(unsigned char **pic, unsigned char *buf, int *width, > > int *height); > > If you need i can patch this function to accept jpeg data without huffman > > table :) > > Because i've not look in this file :) > I'll will try to understand your code and adapt it if necessary, later i'll > ask your permission to put the code under the MPL. > > Luc Luc, You only need to pass your output buffer to pic, your input buffer to buf if the jpeg data width or height in the header are different from *width and *height jpeg_decode realloc the pic buffer (that is why we need **pic) and of course change *width and *height so the caller can adjust the output windows on the fly. The routine provide YUYV palette in pic Of course you can used it .The original code is from the bootstrap project adapted by Suse and by me for the UVC need (YUYV palette) . It should be simple for me to patch the routine to get something shortest and able to decode the stream without the huffman table, if you need just tell me. Regards -- Michel Xhaard http://mxhaard.free.fr |