Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

JPEG2000 Decoder Help

cperz
Beginner
368 Views
Hi,
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 channel[3]; I was very encouraged. Now I am trying to take that encoded stream and decode it. This is very confusing. I saw the post related to creating a NetworkInput but it was not enough. I know that I want to get the encoded byte stream into a j2kCodestream but all of abstraction of these template classes has overwhelmed me. If you could show me how to take an unsigned char *buff of know size into a data structure XXX so that I can call DJP2Codestream j2kCodestream I would be very grateful.
Thanks very much.
Cindy

0 Kudos
5 Replies
Vladimir_Dudnik
Employee
368 Views

Hello,

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.

Regards,
Vladimir

0 Kudos
cperz
Beginner
368 Views
Thanks for the quick reply. I'll take a look at JPEGView (I had the impression from the name that it didn't apply to JPEG200 - silly me). Can you tell me when the sample package will be updated? That sounds really great and I could sure use the help!

0 Kudos
Vladimir_Dudnik
Employee
368 Views

I expect it should take week or two to update sample.

Vladimir

0 Kudos
cperz
Beginner
368 Views
I've made aVS2005 project to build JPEGView and am now stuck on a problem in jpeg2k.cpp TReadImageJPEG2000() where it declares MRstrImage metaImage; The error is: "error C2143: syntax error : missing ';' before '<'" It seems like a VS2005 problem that others might have run into already.

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

0 Kudos
Vladimir_Dudnik
Employee
368 Views

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.

Regards,
Vladimir

0 Kudos
Reply