NPP nppiNV12ToRGB_8u_P2C3R parameter mismatch

I started using NPP 10.1 and got confused about the rSrcStep parameter of all nppiNV12To* functions.

Example:
/**

  • 2 channel 8-bit unsigned planar NV12 to 3 channel 8-bit
  • unsigned packed RGB color conversion.
  • \param pSrc \ref source_planar_image_pointer_array (one for Y
  •    plane, one for UV plane).
    
  • \param rSrcStep \ref source_planar_image_line_step_array.
  • \param pDst \ref destination_image_pointer.
  • \param nDstStep \ref destination_image_line_step.
  • \param oSizeROI \ref roi_specification.
  • \param nppStreamCtx \ref application_managed_stream_context.
  • \return \ref image_data_error_codes, \ref roi_error_codes
    */
    NppStatus nppiNV12ToRGB_8u_P2C3R_Ctx(const Npp8u * const pSrc[2], int rSrcStep, Npp8u * pDst, int nDstStep, NppiSize oSizeROI, NppStreamContext nppStreamCtx);

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

While the parameter description declares rSrcStep as an array, the funtions expect an int only.
Is this a bug or am I missing something?

When I try to use nppiNV12ToRGB_8u_P2C3R with rSrcStep set to the pitch value cuvidMapVideoFrame returned I get NPP_STEP_ERROR.

Solved

I made a mistake with the DstStep. That was the reason for NPP_STEP_ERROR. It is ok to pass a single int for rSrcStep.

However, the parameter description is wrong in my view :-)