Defines the image conversion functions in the SDK, such as for converting YUV to RGBA.
◆ dwImageFormatConverterHandle_t
Specifies the handle for the image format converter.
Definition at line 63 of file FormatConverter.h.
◆ dwImageFormatConverter_copyConvertCUDA()
Converts images by copying using the CUDA engine.
The image will be copied following the properties in the output image.
- Parameters
-
[out] | output | A pointer to the output image. |
[in] | input | A pointer to the input image. |
[in] | formatConverter | The formatConverter handle. |
[in] | stream | The 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()
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] | formatConverter | A pointer to the FormatConverter handle. |
[in] | type | Type of the image that the converter will receive (either DW_IMAGE_CUDA or DW_IMAGE_NVMEDIA). |
[in] | ctx | The 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()
Releases the FormatConverter
.
- Note
- This method renders the handle unusable.
- Parameters
-
[in] | formatConverter | The handle of the FormatConverter to be released. |
- Returns
- DW_INVALID_HANDLE if the provided
FormatConverter
handle is invalid,
or DW_SUCCESS otherwise.