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

uic jpec encoder

pas059
Beginner
419 Views
Hi,

I'm trying to evaluate uic jpeg encoder performancesand encounter manydifficulties. I can present source image in BGRA or YUV422 (YUY2) and i just want to convert it in jpeg in a memory stream (CMemBuffOutput). I started from samples and generally all seam to be correct beforethecall to encoder.WriteHeader() wich returns -1 (which is not informative) or simply crashes.

Someone can indicate a sample that just works or a more complete documentation?

thanks in advance

Pascal
0 Kudos
6 Replies
Chao_Y_Intel
Moderator
419 Views

Pascal,

do you have a chance to check the following example file? for encoder, the SaveImageJPEG() function include the example code:

uic\src\application\wic_uic_codec\src\jpeg.cpp

Thanks,
Chao

0 Kudos
pas059
Beginner
419 Views
Hi,

yes i also tried something similar to this sample with the same result, error while calling the method encoder.WriteHeader().

I really think that uic is not able to convert YUV422.

What is the recommended image formats for UIC Jpeg encoder? (from a performance point of view)

best regards,
Pascal
0 Kudos
Chao_Y_Intel
Moderator
419 Views

Pascal,

Check the following code in the function:

if(JPEG_LOSSLESS == param.mode)

{

if(param.sampling != 0) // JS_444 only for lossless mode

return IE_AIMAGE;

param.color = (nOfComponents == 1) ? JC_GRAY : (nOfComponents == 3) ? JC_RGB : JC_CMYK;

}

else

param.color = (nOfComponents == 1) ? JC_GRAY : (nOfComponents == 3) ? JC_YCBCR : JC_CMYK;

If it is three channel loss compression, it takes YCbCr format (YUV420). For other format, you need convert the color first.

Thanks,
chao

0 Kudos
pas059
Beginner
419 Views
Hi Chao,

sorry for the late reply.
But i had decided to stop using UIC. Nevertheless, i had verified your suggestion.... without success.
Fortunately, i found another sample called 3d-viewer in the directory ipp-samples\realistic-rendering; this sample contains a project called jpegcodec; the code inside this project has many "similitudes" with the one of UIC jpeg codec. I restarted from this project, i builded a dll and tried to used it in my applications .... with success and in a short time. My first objective was to evaluate the performances of a jpeg codec and i was unable to do it with uic. For cons, i have done it relativelyeasilywith pureIPP code. And as the observedperformances correspond to my expectations, my choice is done: IPP only.

regards,
Pascal
0 Kudos
Vladimir_Dudnik
Employee
419 Views
Hi Pascal,

JPEG implementation found in 3d viewer sample is a few generation back base code we use to implement UIC framework. As far as we test there is no significant performance difference in JPEG code from 3d viewer and UIC. But our focus is solely on UIC framework support, so you may find there are some improvements and bug fixes available in UIC code only.

To simplify UIC benchmarking we also provide precompiled UIC applications (uic_transcoder_con is one of them and should be a good fit for benchmarking purposes).

Regards,
Vladimir
0 Kudos
pas059
Beginner
419 Views
Hi Vladimir,

as i explained in my previous mails, i did not succeed with uic (despite many tries)and the supplied uic application crashes on my machines; so, from my point of view, there is more problems with uic than with the implementation in 3d viewer. I'm sure that uic works, but i did not have the "good user manual". As the implementation in 3d viewer responds to my expectations, i use it.
Regards,
Pascal
0 Kudos
Reply