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

YUV plane 4:4:4 to 4:2:2

li__steve
Beginner
351 Views
Hi,

I am wondering if thereis a function in IPP that can help me convert planar YUV 8-bit 4:4:4 into4:2:2 and vice versa. Technically I just need toconvert the 2 chroma planes.

Thanks
Steve
0 Kudos
4 Replies
PaulF_IntelCorp
Employee
351 Views
Hello Steve,

See this page in the documentation for a complete list of the conversion functions:

http://software.intel.com/sites/products/documentation/hpc/composerxe/en-us/ippxe/ipp_manual_lnx/hh_goto.htm#IPPI/ippi_ch6/ch6_format_conversion.htm

Possibly, you could convert twice, through a differenc color space, but you might lose some color fidelity and using a second step might defeat the performance advantage. See this doc page:

http://software.intel.com/sites/products/documentation/hpc/composerxe/en-us/ippxe/ipp_manual_lnx/hh_goto.htm#IPPI/ippi_ch6/ch6_color_model_conversion.htm

Paul
0 Kudos
IDZ_A_Intel
Employee
351 Views
Hi Steve,

With the format being planar, you should just subsample the chroma planes that you also seem to indicate. Use your favorite subsampling/resizing function for that, e.g. ippiResizeSqrPixel. The source Y-plane is obviously just copied to the destination Y-plane using an ordinary ippiCopy function. This keeps the color fidelity (except the unavoidable loss in color due to subsampling) and let's you choose the subsampling/interpolation you like. So it will consist of three independent IPP calls; one for each plane.

We do the exact same using bilinear downscaling and it seems to perform well. If Intel had made a specific IPP function for it, it could possibly have performed slightly better but I doubt that the difference would be significant.

Best regards,

- Jay
0 Kudos
pvonkaenel
New Contributor III
351 Views

If you resize, as suggested, you might want to add a parameter to the funciton you createthat allows the caller to specify if the frame is interlaced or not. In the interlaced case, you would want to resize top/bottom fields separately. This is fairly easy to do by doubling the stride. If you only deal with progressive content, you can ignore this suggestion.

Peter

0 Kudos
li__steve
Beginner
351 Views
In 4:2:2, Cb and Cr are co-sited, meaning going from 4:4:4 you just need to throw away every other sample. I suppose theresize functionsinvolve some kind of filtering, which is not ideal if you want to preserve the exact co-sited values.
0 Kudos
Reply