The meaning of NPP function name

Hello.

I’m working related NPP image processing with HEIF and JPEG transcoding.
I usually used colorspace conversion function on NPP, I have confused that kind of below.

For example)
nppiYUV420ToRGB_8u_P3C3R

What is meaning of P3, C3, R in that function?

Thank you a lot :)

https://docs.nvidia.com/cuda/npp/general_conventions_lb.html

https://docs.nvidia.com/cuda/npp/nppi_conventions_lb.html

Image processing related functions use a number of suffixes to indicate various different flavors of a primitive beyond just different data types. The flavor suffix uses the following abbreviations:

“A” if the image is a 4 channel image this indicates the result alpha channel is not affected by the primitive.
“Cn” the image consists of n channel packed pixels, where n can be 1, 2, 3 or 4.
“Pn” the image consists of n separate image planes, where n can be 1, 2, 3 or 4.
“C” (following the channel information) indicates that the primitive only operates on one of the color channels, the “channel-of-interest”. All other output channels are not affected by the primitive.
“I” indicates that the primitive works “in-place”. In this case the image-data pointer is usually named “pSrcDst” to indicate that the image data serves as source and destination at the same time.
“M” indicates “masked operation”. These types of primitives have an additional “mask image” as as input. Each pixel in the destination image corresponds to a pixel in the mask image. Only pixels with a corresponding non-zero mask pixel are being processed.
“R” indicates the primitive operates only on a rectangular “region-of-interest” or “ROI”. All ROI primitives take an additional input parameter of type NppiSize, which specifies the width and height of the rectangular region that the primitive should process. For details on how primitives operate on ROIs see: Region-of-Interest (ROI).
“Sfs” indicates the result values are processed by fixed scaling and saturation before they’re written out.

I see many references to R" indicates the primitive operates only on a rectangular “region-of-interest” or “ROI”. All ROI primitives take an additional input parameter of type NppiSize, which specifies the width and height of the rectangular region that the primitive should process. For details on how primitives operate on ROIs see: Region-of-Interest (ROI).

I can’t seem to find a simple API that extracts an ROI from a linear pitch image though.

Any help would be appreciated.

The fact that an allocation is a pitched allocation shouldn’t matter for ROI definition.

In most cases, you should not need an API to define an ROI.

If you want to process an entire image, the ROI is the same as the image dimensions. The image dimensions aren’t affected by whether the underlying allocation is pitched, or not. If your overall image is a 640x480 image, and you are processing the whole image, then your ROI is 640x480.

If you want to process a rectangular region within an image, the ROI is the dimensions of that rectangular region. Again, not a function of whether the underlying allocation is pitched, or not.

There are various CUDA sample codes that use NPP and ROIs, you can study any of those.