DriveWorks SDK Reference

| 0.6.67 Release

Image Converter

Detailed Description

Defines the image conversion functions in the SDK, such as for converting YUV to RGBA.

Modules

 Vibrante Image Converter
 Defines the Vibrante image converter function.
 

Typedefs

typedef struct dwImageFormatConverterObject * dwImageFormatConverterHandle_t
 Specifies the handle for the image format converter. More...
 

Functions

DW_API_PUBLIC dwStatus dwImageFormatConverter_copyConvertCUDA (dwImageCUDA *output, const dwImageCUDA *input, dwImageFormatConverterHandle_t formatConverter, cudaStream_t stream)
 Converts images by copying using the CUDA engine. More...
 
DW_API_PUBLIC dwStatus dwImageFormatConverter_initialize (dwImageFormatConverterHandle_t *formatConverter, dwImageType type, dwContextHandle_t ctx)
 Creates and initializes a FormatConverter. More...
 
DW_API_PUBLIC dwStatus dwImageFormatConverter_release (dwImageFormatConverterHandle_t *formatConverter)
 Releases the FormatConverter. More...
 

Typedef Documentation

◆ dwImageFormatConverterHandle_t

typedef struct dwImageFormatConverterObject* dwImageFormatConverterHandle_t

Specifies the handle for the image format converter.

Definition at line 63 of file FormatConverter.h.

Function Documentation

◆ dwImageFormatConverter_copyConvertCUDA()

DW_API_PUBLIC dwStatus dwImageFormatConverter_copyConvertCUDA ( dwImageCUDA output,
const dwImageCUDA input,
dwImageFormatConverterHandle_t  formatConverter,
cudaStream_t  stream 
)

Converts images by copying using the CUDA engine.

The image will be copied following the properties in the output image.

Parameters
[out]outputA pointer to the output image.
[in]inputA pointer to the input image.
[in]formatConverterThe formatConverter handle.
[in]streamThe CUDA stream for executing the conversion kernel.
Returns
DW_INVALID_ARGUMENT if the provided pointers are null,
DW_INVALID_HANDLE if the provided FormatConverter handle is invalid,
or DW_SUCCESS otherwise.

◆ dwImageFormatConverter_initialize()

DW_API_PUBLIC dwStatus dwImageFormatConverter_initialize ( dwImageFormatConverterHandle_t formatConverter,
dwImageType  type,
dwContextHandle_t  ctx 
)

Creates and initializes a FormatConverter.

The FormatConverter can copy-convert NvMediaImages using the Tegra 2D hardware engine. For example, it can convert images from YUV to RGBA format.

Note
The ownership of the logger remains by the callee.
Parameters
[out]formatConverterA pointer to the FormatConverter handle.
[in]typeType of the image that the converter will receive (either DW_IMAGE_CUDA or DW_IMAGE_NVMEDIA).
[in]ctxThe DriveWorks SDK context.
Returns
DW_INVALID_ARGUMENT if the provided context pointer or NvMediaDevice is NULL,
DW_INVALID_HANDLE if the provided context is invalid,
or DW_SUCCESS otherwise.

◆ dwImageFormatConverter_release()

DW_API_PUBLIC dwStatus dwImageFormatConverter_release ( dwImageFormatConverterHandle_t formatConverter)

Releases the FormatConverter.

Note
This method renders the handle unusable.
Parameters
[in]formatConverterThe handle of the FormatConverter to be released.
Returns
DW_INVALID_HANDLE if the provided FormatConverter handle is invalid,
or DW_SUCCESS otherwise.