Marc,

you better use something like libjpeg for that, it's better suited for
that goal and has a good interface for your own memory management.

http://www.ijg.org/

Regards,

Edwin

On Thu, Apr 2, 2009 at 6:21 PM, Marc Mason <[email protected]> wrote:
> Hello everyone,
>
> I'm trying to use lavc on an embedded platform to solve what is in fact a
> very simple problem. I need lavc to decode a single JPEG image into a
> user-supplied buffer.
>
> The image might be "large" e.g. 4000x3000 (resulting in an uncompressed size
> of 36 MB). The user-supplied buffer is allocated through some
> platform-specific code (not malloc).
>
> Ideally, lavc would provide something like the following
>
>  int decode_jpeg(char *filename, uint8_t *buf, int bufsiz);
>
> where decode_jpeg() would open the JPEG file named by filename, decode it to
> an RGB bitmap (3 bytes per pixel) and store the result in buf (up to a limit
> of bufsiz).
>
> The result would be the number of octets written to buf, or some negative
> value in case of error.
>
> Do you know of some such function in lavc or lavf?
>
> --
> Regards.
>
> _______________________________________________
> libav-user mailing list
> [email protected]
> https://lists.mplayerhq.hu/mailman/listinfo/libav-user
>
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to