VPI - Vision Programming Interface

3.0 Release

Mix Channels

Mix channels from one or more input image channels to one or more output image channels. More...

Macros

#define VPI_MIX_CHANNELS_MAX_IMAGES   4
 Maximum number of images that can be passed to Mix Channels as either input or output.
 

Functions

VPIStatus vpiSubmitMixChannels (VPIStream stream, uint64_t backend, VPIImage *inputs, int numInputs, VPIImage *outputs, int numOutputs, const int *inMapping, const int *outMapping, int numMapping)
 Submits a Mix Channels operation to the stream. More...
 

Detailed Description

Mix channels from one or more input image channels to one or more output image channels.

The operation is a copy operation without increasing or decreasing resolution, the input and output sizes must match, and without any color conversion. Refer to Mix Channels for more details and usage examples.

Function Documentation

◆ vpiSubmitMixChannels()

VPIStatus vpiSubmitMixChannels ( VPIStream  stream,
uint64_t  backend,
VPIImage inputs,
int  numInputs,
VPIImage outputs,
int  numOutputs,
const int *  inMapping,
const int *  outMapping,
int  numMapping 
)

#include </opt/nvidia/vpi3/include/vpi/algo/MixChannels.h>

Submits a Mix Channels operation to the stream.

Parameters
[in]streamThe stream where the operation will be queued in.
  • Must not be NULL.
  • Stream must have enabled the backends that will execute the algorithm.
[in]backendBackend that will execute the algorithm.
[in]inputsOne or more input images from where to draw channels from.
[in]numInputsNumber of inputs in the array of inputs pointer argument.
[out]outputsOne or more output images from where to insert channels to.
  • Must not be NULL.
  • All output images must be already allocated.
  • Each output image plane size must match the mapped input image plane size.
  • Images must have enabled the backends that will execute the algorithm.
  • The accepted image formats are the same as in inputs.
[in]numOutputsNumber of outputs in the array of outputs pointer argument.
[in]inMappingArray with indices to channels of input images The channels are considered linearized throughout images, that is each input is viewed as a sequence of channels and all inputs are concatenated in its array order. The index of an input channel gives the position on the whole inputs channels concatenated sequence.
  • Must contain existing input channel indices.
  • Array size must be equal to numMapping.
[in]outMappingArray with indices to channels of output images The channels are considered linearized throughout images, that is each output is viewed as a sequence of channels and all outputs are concatenated in its array order. The index of an output channel gives the position on the whole outputs channels concatenated sequence.
  • Must contain existing output channel indices.
  • Array size must be equal to numMapping.
[in]numMappingNumber of mappings in the mapping array pointer argument.
Return values
VPI_ERROR_INVALID_ARGUMENTstream or inputs or outputs or mappings are NULL.
VPI_ERROR_INVALID_ARGUMENTnumInputs or numOutputs or numMapping are outside valid range.
VPI_ERROR_INVALID_IMAGE_FORMATUnsupported input or output format.
VPI_ERROR_INVALID_OPERATIONThe needed backends aren't enabled in stream, inputs or outputs.
VPI_SUCCESSOperation executed successfully.