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

A question about IPP7.0 sample code regarding JPEG YUV420 support

ihkwon21
Beginner
264 Views

Hi~. I'm testing ipp7.0 sample code for jpeg decoding.

An interest thing is there is no defintion about YUV420 format(not pixel but planar).

The supported sampling formats are

JS_444, JS_422, JS_244, JS_411, JS_OTHER.

In addition, I think the function, JERRCODE CJPEGDecoder::DetectSampling(void) function in jpegdec.cpp file is used for acquring sampling format.

By the way, inside the function,

case 3:

if(m_ccomp[0].m_hsampling == 1 && m_ccomp[0].m_vsampling == 1 &&

m_ccomp[1].m_hsampling == 1 && m_ccomp[1].m_vsampling == 1 &&

m_ccomp[2].m_hsampling == 1 && m_ccomp[2].m_vsampling == 1)

{

m_jpeg_sampling = JS_444;

}

else if(m_ccomp[0].m_hsampling == 2 && m_ccomp[0].m_vsampling == 1 &&

m_ccomp[1].m_hsampling == 1 && m_ccomp[1].m_vsampling == 1 &&

m_ccomp[2].m_hsampling == 1 && m_ccomp[2].m_vsampling == 1)

{

m_jpeg_sampling = JS_422; <=== Is this correct? YUV420 is also the same hsampling and vsampling value if the function search the sampling like this. Isn't it?

}


If I am wrong, please forgive my ignorance. Anyway I would like to know how to decode YUV420 encoded jpeg image without using additional converting such as YUV422toYUV420....with ipp.

Many thanks ahead.


0 Kudos
1 Reply
Vladimir_Dudnik
Employee
264 Views
Hello,

UIC JPEG use 411 sampling name to refer to actually 420 sampling factors (that is by historic reasons). In other words, in UIC caseJS_411point to horizontal sampling 2:1 and vertical sampling 2:1 which is what other call as 420.

Regards,
Vladimir
0 Kudos
Reply