I have used IPP for years but have just started with the JPEG2000 capabilities. I am finding the sample code very difficult to unwind. For my first experiment, I have an RGB 3BBP buffer stream which I have managed to encode by creating a library from the sample code, cutting out code snippets from encode.cpp and writing my image data into ImageCoreC
Thanks very much.
I would recommend you to take a look on JPEGView sample which provides some level of simplification for JPEG2000 use. Additionally, we will update IPP sample package with absolutely new example, Unified Image Codecs layer on top of IPP image codecs. It will provide you unified API for any IPP image codec, just like Unified Media Codecs API do for media codecs.
Regardless of the build problem, JPEGView uses the same templatized classes from file. I'm back to wishing I could find an example snippet that I could use to stuff an encoded stream of known length into the required template class.
Thank you for your help
To compile JPEG2000 codec many of its internal folders should be added into the include files search list (please see Makefile to find what exactly folders should be in includes search path).
You are correct, in JPEGView JPEG2000 codec implementation is essentially the same as in j2kit application, but simplification I meant was about high level functions in jpeg.cpp or jpeg2k.cpp files, where we define functions like:
JERRCODE ReadImageJPEG2000(CBaseStreamInput* in, PARAMS_JPEG2K* param, CIppImage* image);
JERRCODE SaveImageJPEG2000(CIppImage* image, PARAMS_JPEG2K param, CBaseStreamOutput* out);
Here, CBaseStreamInput object might represent memory buffer and CIppImage object is memory buffer to keep decoded image.