YUV422 -> YUV420 ?

YUV422 -> YUV420 ?

mac_kal@alnet.pl's picture


Could you advise me what function I should use to convert an image from YUV422 format to YUV420 ( format suitable for MPEG-4 encoder )?

Thanks in advance,
Kamil

9 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
vladimir-dudnik (Intel)'s picture

Hi,


you can use ippiResize_8u_C1 with IPPI_INTER_SUPER to downsample UV components by vertical axis. Is it answer your question?


Regards,
Vladimir


vladimir-dudnik (Intel)'s picture

Hi, a small clarification.


In the next version, which is coming soon, you can find new functions


ippiYCbCr422ToYCbCr420_8u_C2P3R (YUY2ToI420(IYUV))ippiYCbCr422ToYCbCr420_8u_P3R (P422ToI420(IYUV))ippiYCbCr422ToYCbCr420_8u_P3P2R ( P422ToNV12 )


Regards,
Vladimir
shlomo@vapisoft.com's picture

I need tjis converion.
Do you have a C function for it?

Shlomo.

vladimir-dudnik (Intel)'s picture

Hi Shlomo,

in IPP v4.1 you can find this functions, optimized for all supported platforms. Please refer to IPP documentation and ippi.h file for the details

/* ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Name: ippiYCbCr422ToYCbCr420_8u_C2P3R
// Purpose: Converts a 2-channel YUY2 image to the I420(IYUV) image
// Name: ippiCbYCr422ToYCbCr420_8u_C2P3R
// Purpose: Converts a 2-channel YUY2 image to the I420(IYUV) image
// Name: ippiYCrCb422ToYCbCr420_8u_C2P3R
// Purpose: Converts a 2-channel YVYU image to the I420(IYUV) image
// Return:
// ippStsNoErr Ok
// ippStsNullPtrErr One or more pointers are NULL
// ippStsSizeErr if roiSize.width < 2 || roiSize.height < 2
//
// Arguments:
// pSrc pointer to the source image
// srcStep step for the source image
// pDst array of pointers to the components of the destination image
// dstStep array of steps values for every component
// roiSize region of interest to be processed, in pixels
// Notes:
// roiSize.width and roiSize.height should be multiple 2.
*/
IPPAPI(IppStatus, ippiYCbCr422ToYCbCr420_8u_C2P3R,( const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3],
int dstStep[3], IppiSize roiSize ))
IPPAPI(IppStatus, ippiCbYCr422ToYCbCr420_8u_C2P3R,( const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3],
int dstStep[3], IppiSize roiSize ))
IPPAPI(IppStatus, ippiYCrCb422ToYCbCr420_8u_C2P3R,( const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3],
int dstStep[3], IppiSize roiSize ))

Regards,
Vladimir

shlomo@vapisoft.com's picture

Hi Vladmir,

I don't have the IPP (which I understand that it costs $199).
All I need is this function.
Can you send it to me?

shlomo@vapisoft.com

Shlomo;

vladimir-dudnik (Intel)'s picture

Hi Shlomo,

In case you need toestimate IPP (and this function in particular) you can get evaluation version of IPP for free.

We do not provide separate IPP functions or source code.

Regards,
Vladimir

shlomo@vapisoft.com's picture

Hi Vladimir,

Thanks.
How can I download the evaluation verion?
Can you give me a URL.

vladimir-dudnik (Intel)'s picture

Hi,

you should look here
https://shale.intel.com/EvalCenter/EvalForm.aspx?ProductID=263

Regards,
Vladimir

Login to leave a comment.