uclouvain / openjpeg

Official repository of the OpenJPEG project
Other
977 stars 457 forks source link

Add support for decoding into an externally supplied buffer #837

Open chafey opened 8 years ago

chafey commented 8 years ago

Currently openjpeg allocates the buffer for the decoded pixel data. This requires the library consumer to copy data out of obj_image->comps and into its own buffer. In some cases, the library consumer will already have the buffer allocated that it wants to store the decode pixel data in. It would be great if openJPEG could decode into this externally supplied buffer to avoid unnecessary memory use and copying.

novalain commented 7 years ago

Any updates on this? I'm using openjpeg to decode many images on disk to display as a video stream and have my own allocated buffer. This feature would be really helpful to save the extra copy