NVIDIA 2D Image And Signal Performance Primitives (NPP)  Version 11.4.0.*
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Signal-Processing Specific API Conventions

Signal Data

Signal data is passed to and from NPPS primitives via a pointer to the signal's data type.

The general idea behind this fairly low-level way of passing signal data is ease-of-adoption into existing software projects:

Parameter Names for Signal Data

There are three general cases of image-data passing throughout NPP detailed in the following sections.

Those are signals consumed by the algorithm.

Source Signal Pointer

The source signal data is generally passed via a pointer named

pSrc

The source signal pointer is generally defined constant, enforcing that the primitive does not change any image data pointed to by that pointer. E.g.

nppsPrimitive_32s(const Npp32s * pSrc, ...)

In case the primitive consumes multiple signals as inputs the source pointers are numbered like this:

pSrc1, pScr2, ...

Destination Signal Pointer

The destination signal data is generally passed via a pointer named

pDst

In case the primitive consumes multiple signals as inputs the source pointers are numbered like this:

pDst1, pDst2, ...

In-Place Signal Pointer

In the case of in-place processing, source and destination are served by the same pointer and thus pointers to in-place signal data are called:

pSrcDst

Signal Data Alignment Requirements

NPP requires signal sample data to be naturally aligned, i.e. any pointer

NppType * p;

to a sample in a signal needs to fulfill:

assert(p % sizeof(p) == 0);

Signal Data Related Error Codes

All NPPI primitives operating on signal data validate the signal-data pointer for proper alignment and test that the point is not null.

Failed validation results in one of the following error codes being returned and the primitive not being executed:

Signal Length

The vast majority of NPPS functions take a

nLength

parameter that tells the primitive how many of the signal's samples starting from the given data pointer are to be processed.

Length Related Error Codes

All NPPS primitives taking a length parameter validate this input.

Failed validation results in the following error code being returned and the primitive not being executed: