Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
114 Views

IPP sample code for JPEG encoder/decoder

Hello Ying or anybody,
After I go through IPP6.1 sample code for read and display JPEG from JPEGview, I feltit is more difficultto integrate it to our application. Our current application used your IJL 1.51 (Iijl15.lib) for JPEG read and write. It was very easy to implement it (just use some interface from IJL). However, IJL doesn't work with 64-bit system. Do you have some other libs just like ijl so that we can easy and fast to do integration to our application. thank you very much for your help.
P.S
Actually we just use some function like ijlread(), ijlwrite(), ijlfree()..., is it still available in IPP (I couldn't find them in jpegview sample)? and workfor 64 bits system ? I saw theyare from ijl20.lib now
0 Kudos
8 Replies
Highlighted
Employee
114 Views


Hello fanguts,

As you may know,JPEGView and IJL will be obsolete. IPPintegratethe current image codec in a newunified interfacenamed UIC. It is different IJL and JPEGVIEW interface, but it's interface issimple too. It can for both 32 bit sytem and 64t bitsystem.it mayworth totake a look it.http://software.intel.com/en-us/articles/intel-ipp-uic/.

UIC provide documentation tell how to use them. for example, jpeg codectakesimilar 5steps: init encoder, init output. SetParames, WriteHeader and WriteData().

JPEGEncoder encoder;
status = encoder.Init();
if(ExcStatusOk != status)
return 1;
status = encoder.AttachStream(out);
if(ExcStatusOk != status)
return 1;
status = jpegenc.SetParams(JPEG_BASELINE, JC_RGB, JSS_444, 0, 0, 75);
if(ExcStatusOk != status)
return 1;
status = encoder.WriteHeader();
if(ExcStatusOk != status)
return 1;
status = encoder.WriteData();
if(ExcStatusOk != status)
return 1;

Best Regards,
Ying
0 Kudos
Highlighted
Beginner
114 Views

Quoting - Ying Hu (Intel)

Hello fanguts,

As you may know,JPEGView and IJL will be obsolete. IPPintegratethe current image codec in a newunified interfacenamed UIC. It is different IJL and JPEGVIEW interface, but it's interface issimple too. It can for both 32 bit sytem and 64t bitsystem.it mayworth totake a look it.http://software.intel.com/en-us/articles/intel-ipp-uic/.

UIC provide documentation tell how to use them. for example, jpeg codectakesimilar 5steps: init encoder, init output. SetParames, WriteHeader and WriteData().

JPEGEncoder encoder;
status = encoder.Init();
if(ExcStatusOk != status)
return 1;
status = encoder.AttachStream(out);
if(ExcStatusOk != status)
return 1;
status = jpegenc.SetParams(JPEG_BASELINE, JC_RGB, JSS_444, 0, 0, 75);
if(ExcStatusOk != status)
return 1;
status = encoder.WriteHeader();
if(ExcStatusOk != status)
return 1;
status = encoder.WriteData();
if(ExcStatusOk != status)
return 1;

Best Regards,
Ying
Hi Ying, Thank you so much. I just download sample code forUIC (no C++ solution file there). By the way, could please provide solution file for that sample (w_ipp-samples_6.1XXipp-samplesimage-codecsuic) ? thank you again
0 Kudos
Highlighted
Beginner
114 Views

hi Ying, I looked through those function you mentioned in UIC. I found they are defined and implemented in a number of c files. I wonder if they are in .lib or DLL so that we will not need to include these c files to our application and just to link the related Lib files instead.

For the old ijl15.lib, they only provide us interface and we don't need to include lower level files. It was easy for us. thank you


0 Kudos
Highlighted
114 Views


After you build UIC sample you will get DLLs which might be used by your application.

Vladimir
0 Kudos
Highlighted
Beginner
114 Views

Hello Ying
Thank you for your advise.
Actually,I have a problem for using UIC,too.
I would like to decode from jpeg file and encode to jpeg file...

I read the Document of UIC includeing Jpeg decode and encode sample program.
so, I could get uncompressed data (UIC::Image img) from Jpegfile.
but,I dont know How do I encode from "UIC::Image img" to out.

Is it ok to just code "encoder.AttachImage(&img)" ?

and,If I alloc memory for uncompressed data by myself,
How do I Set uncompresed data to "JPEGEncoder encoder" for encoding ?

you said,
>jpeg codec take similar 5 steps: init encoder, init output. SetParames, WriteHeader and WriteData().

>JPEGEncoder encoder;
>status = encoder.Init();
>if(ExcStatusOk != status)
>return 1;
>status = encoder.AttachStream(out);
>if(ExcStatusOk != status)
>return 1;
>status = jpegenc.SetParams(JPEG_BASELINE, JC_RGB, JSS_444, 0, 0, 75);
>if(ExcStatusOk != status)
>return 1;
>status = encoder.WriteHeader();
>if(ExcStatusOk != status)
>return 1;
>status = encoder.WriteData();
>if(ExcStatusOk != status)
>return 1;

Best Regards,
Hide.

0 Kudos
Highlighted
114 Views


Hello,

did you notice UIC sample contains a couple applications (picnic and uic_transcder) which you may use as a reference on how to use UIC codecs.

Regards,
Vladimir
0 Kudos
Highlighted
Beginner
114 Views

Hello Vladimir
Thank you for your advise.I refered to only the UIC document of Ipp_samples:6.1.0.047.
I'll check out the sample program.

by the way, There are two misprints including of the Document on UIC::JPEGEncoder Usage(Page3-16).
AttachStream(out) --> AttachStream(fout)
jpegenc.SetParam --> encoder.SetParam

Regards,
Hide
0 Kudos
Highlighted
114 Views


Hide, thanks for report on this, we will correct UIC documents

Regards,
Vladimir
0 Kudos