MixChannels#

Functions#

NVCVStatus pvaMixChannelsCreate(NVCVOperatorHandle *handle, NVCVTensorRequirements **inTensorReqPtrs, NVCVTensorRequirements **outTensorReqPtrs, int inTensorCount, int outTensorCount, PVAMixChannelsCode code)

Constructs an instance of the MixChannels operator.

NVCVStatus pvaMixChannelsSubmit(NVCVOperatorHandle handle, cupvaStream_t stream, NVCVTensorHandle *inHandles, NVCVTensorHandle *outHandles, int inTensorCount, int outTensorCount)

Executes the mix channels operation on image.

Functions#

NVCVStatus pvaMixChannelsCreate(
NVCVOperatorHandle *handle,
NVCVTensorRequirements **inTensorReqPtrs,
NVCVTensorRequirements **outTensorReqPtrs,
int inTensorCount,
int outTensorCount,
PVAMixChannelsCode code,
)#

Constructs an instance of the MixChannels operator.

Limitations: height >= 64, width >= 64

Input: for each case, all input tensors must have the same height and width.

PVAMixChannelsCode

inTensorCount

dtype

rank

layout

shape

SPLIT_RGBA8_TO_U8

1

NVCV_DATA_TYPE_U8

3

HWC

[h, w, 4]

MERGE_U8_TO_RGBA8

4

NVCV_DATA_TYPE_U8

3

HWC

[h, w, 1]

Output: for each case, all output tensors must have the same height and width.

PVAMixChannelsCode

outTensorCount

dtype

rank

layout

shape

SPLIT_RGBA8_TO_U8

4

NVCV_DATA_TYPE_U8

3

HWC

[h, w, 1]

MERGE_U8_TO_RGBA8

1

NVCV_DATA_TYPE_U8

3

HWC

[h, w, 4]

Parameters:
  • handle[out] Where the operator instance handle will be written to.

    • Must not be NULL.

  • inTensorReqPtrs[in] Pointer to array of input NVCVTensorRequirements pointers.

  • outTensorReqPtrs[in] Pointer to array of output NVCVTensorRequirements pointers.

  • inTensorCount[in] Number of input tensors.

  • outTensorCount[in] Number of output tensors.

  • code[in] Mix channels case code.

Return values:
  • NVCV_ERROR_INVALID_ARGUMENT – Handle is null.

  • NVCV_ERROR_OUT_OF_MEMORY – Not enough memory to create the operator.

  • NVCV_SUCCESS – Operation executed successfully.

NVCVStatus pvaMixChannelsSubmit(
NVCVOperatorHandle handle,
cupvaStream_t stream,
NVCVTensorHandle *inHandles,
NVCVTensorHandle *outHandles,
int inTensorCount,
int outTensorCount,
)#

Executes the mix channels operation on image.

Parameters:
  • handle[in] Handle to the operator.

    • Must not be NULL.

  • stream[in] Handle to a valid CUPVA stream.

  • inHandles[in] Pointer to array of input NVCVTensorHandle.

  • outHandles[out] Pointer to array of output NVCVTensorHandle.

  • inTensorCount[in] Number of input tensors.

  • outTensorCount[in] Number of output tensors.

Return values:
  • NVCV_ERROR_INVALID_ARGUMENT – Some parameter is outside valid range.

  • NVCV_ERROR_INTERNAL – Internal error in the operator, invalid types passed in.

  • NVCV_SUCCESS – Operation executed successfully.