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

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

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.

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

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

Leave a Comment

Please sign in to add a comment. Not a member? Join today