How to decide the line step for YUV420 image

Hi , I am using the NPP library to convert YUV420(I420) to BGR format
the function I am using is :

NppStatus nppiYUV420ToBGR_8u_P3C3R(const Npp8u * const pSrc[3], int rSrcStep[3], Npp8u * pDst, int nDstStep, NppiSize oSizeROI);

but I can’t decided the rSrcStep ,my original image size is 1920x1080 (w*h) , I am trying
rSrcStep ={1920,1920/2,1920/2} ,but it return error code :NPP_STEP_ERROR

help will be appreciated ,thanks!

No idea for now, got to do the discussion with interal team if any suggestions to share.

Hi,

It is line step values, you can find the document below:

NVIDIA 2D Image And Signal Performance Primitives (NPP): Image-Processing Specific API Conventions

Line Step

The line step (also called “line stride” or “row step”) allows lines of oddly sized images to start on well-aligned addresses by adding a number of unused bytes at the ends of the lines. This type of line padding has been common practice in digital image processing for a long time and is not particular to GPU image processing

Thanks.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.