IPP Feature request

IPP Feature request

I would like to see the YUV->YUV Join/Split support 3 plane 420.

Right now it only seems to support UV interleaved data.

The workaround is to scale the U,V planes and then use 4:2:2 functions.Not all that efficient.

Peter Doege

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

Hi,

did you see these function in ippi.h file for IPP v4.0? It seems to be what you are looking for.

/* ////////////////////////////////////////////////////////////////////////////
// Name: ippiJoin420_8u_P2C2R, ippiJoin420_Filter_8u_P2C2R
//
// Purpose: Convert from 420 plane image format to 2-channal pixel
// image format.
//
// Return:
// ippStsNoErr Ok
// ippStsNullPtrErr One or more pointers are NULL
// ippStsSizeErr if imgSize.width < 2 || imgSize.height < 2
//
// Arguments:
// pSrcY Pointer to the source image Y plane.
// srcYStepY The step for source image Y plane.
// pSrcUV Pointer to the source image UV plane.
// srcUVStep The step for source image UV plane.
// pDst The pointer to destination image
// dstStep The step for destination image
// roiSize Size of ROI should be multiple 2.
// layout the order of the slice processing with deinterlace filter.
// The following are allowed
// IPP_UPPER - the first slice.
// IPP_CENTER - the midlle slices.
// IPP_LOWER - the last slice.
// IPP_LOWER && IPP_UPPER && IPP_CENTER - the whole image.
// Notes:
// Sequence of bytes in the source image is( NV12 ):
// A format in which all Y(pSrcY) samples are found first in memory as an array of
// unsigned char with an even number of lines memory alignment),
// followed immediately by an array(pSrcUV) of unsigned char
// containing interleaved U and V samples (such that if addressed as a little-endian
// WORD type, U would be in the LSBs and V would be in the MSBs).
// This is the 4:2:0 pixel format.
// Sequence of bytes in the destination image is(YUY2):
// Y0U0Y1V0,Y2U1Y3V1,... This is the 4:2:2 pixel format.
//
// f. ippiJoin420_Filter_8u_P2C2R serves for processing the image on slice( height of slice
// should be multiple 16).
//
*/
IPPAPI(IppStatus, ippiJoin420_8u_P2C2R,(const Ipp8u* pSrcY, int srcYStep,const Ipp8u* pSrcUV,
int srcUVStep, Ipp8u* pDst, int dstStep, IppiSize roiSize))
IPPAPI(IppStatus, ippiJoin420_Filter_8u_P2C2R,(const Ipp8u* pSrcY, int srcYStep,const Ipp8u* pSrcUV,
int srcUVStep, Ipp8u* pDst, int dstStep, IppiSize roiSize,int layout))
/* ////////////////////////////////////////////////////////////////////////////
// Name: ippiSplit420_8u_P2P3R, ippiSplit420_Filter_8u_P2P3R
//
// Purpose: Convert from 420 plane image format to 3-channal plane
// image format.
//
// Return:
// ippStsNoErr Ok
// ippStsNullPtrErr One or more pointers are NULL
// ippStsSizeErr if imgSize.width < 2 || imgSize.height < 2
//
// Arguments:
// pSrcY Pointer to the source image Y plane.
// srcYStepY The step for source image Y plane.
// pSrcUV Pointer to the source image UV plane.
// srcUVStep The step for source image UV plane.
// pDst[3] It is three pointers to destination i
mages
// dstStep[3] It is three steps for previous three images
// roiSize Size of ROI should be multiple 2.
// layout the order of the slice processing with deinterlace filter.
// The following are allowed
// IPP_UPPER - the first slice.
// IPP_CENTER - the midlle slices.
// IPP_LOWER - the last slice.
// IPP_LOWER && IPP_UPPER && IPP_CENTER - the whole image.
// Notes:
// Sequence of bytes in the source image is( NV12 ):
// A format in which all Y(pSrcY) samples are found first in memory as an array of
// unsigned char with an even number of lines memory alignment),
// followed immediately by an array(pSrcUV) of unsigned char
// containing interleaved U and V samples (such that if addressed as a little-endian
// WORD type, U would be in the LSBs and V would be in the MSBs).
// This is the 4:2:0 pixel format.
// Sequence of bytes in the destination image is( YV12 ):
// the order of the pointers to destination images si Y V U.This is the 4:2:0 pixel format.
//
// f. ippiSplit420_Filter_8u_P2P3R serves for processing the image on slice( height of slice
// should be multiple 16).
*/
IPPAPI(IppStatus, ippiSplit420_8u_P2P3R,(const Ipp8u* pSrcY, int srcYStep,const Ipp8u* pSrcUV,
int srcUVStep, Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize))
IPPAPI(IppStatus, ippiSplit420_Filter_8u_P2P3R,(const Ipp8u* pSrcY, int srcYStep,const Ipp8u* pSrcUV,
int srcUVStep, Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize,int layout))
Regards,
Vladimir

Hello -

Thanks for your response. I believe that I tried that function and received a stride error result. I will try again and get back to you.

Thanks,
Peter Doege

Unfortunately, ippiJoin420_8u_p2c2R wants interleaved UV data and my data is not interleaved. I actually do have 3 planes. Y,U,V. The 422 functions allow 3 planes, but the 420 functions assume 2 planes. Weird, but that is how it is.

I would like to have 420 functions that allow me to pass in 3 planes.

Thanks,
Peter Doege

Hi,

thanks, now I understand. So, please submit your request through technical support channel and we will revise it when planning the next version.

Regards,
Vladimir

Login to leave a comment.