Defines the image transformation module.
|
DW_API_PUBLIC dwStatus | dwImageTransformation_addPrefenceWait (const NvSciSyncFence *syncFence, dwImageTransformationHandle_t handle) |
| Add prefence for NvMedia2D to wait. More...
|
|
DW_API_PUBLIC dwStatus | dwImageTransformation_appendAllocationAttributes (dwImageProperties *const imgProps, dwImageTransformationHandle_t handle) |
| Append the allocation attribute such that the images created of type DW_IMAGE_NVMEDIA can be fed to dwImageTransformation_copy,. More...
|
|
DW_API_PUBLIC dwStatus | dwImageTransformation_copy (dwImageHandle_t outputImage, const dwImageHandle_t inputImage, const dwRect *outputROI, const dwRect *inputROI, dwImageTransformationHandle_t handle) |
| Resizes the input image subregion and copies the result into the previously allocated output image, in a specified subregion, of the same type (CUDA or NvMedia) and format (any) More...
|
|
DW_API_PUBLIC dwStatus | dwImageTransformation_fillNvSciSyncAttrs (NvSciSyncAttrList syncAttrList, dwSyncType syncType, dwImageTransformationHandle_t handle) |
| Fill the sync attributes for the imagetransformation to signal EOF fences. More...
|
|
DW_API_PUBLIC dwStatus | dwImageTransformation_getCUDAStream (cudaStream_t *stream, dwImageTransformationHandle_t handle) |
| Gets the cuda stream used by the APIs of Image Transformation. More...
|
|
DW_API_PUBLIC dwStatus | dwImageTransformation_getEOFFence (NvSciSyncFence *syncFence, dwImageTransformationHandle_t handle) |
| Get EOF fence of the current operation. More...
|
|
DW_API_PUBLIC dwStatus | dwImageTransformation_initialize (dwImageTransformationHandle_t *handle, dwImageTransformationParameters params, dwContextHandle_t context) |
| Initializes an Image Transformation Engine with the given parameters. More...
|
|
DW_API_PUBLIC dwStatus | dwImageTransformation_registerImages (dwImagePool imagePool, dwImageTransformationHandle_t handle) |
| All (both input and output) images that the transformation engine has to work with (NvMedia2D VIC mode only) must be placed in a dwImagePool and registered during initialization phase Note that all the images must have been created with properties with allocation attributes set. More...
|
|
DW_API_PUBLIC dwStatus | dwImageTransformation_release (dwImageTransformationHandle_t handle) |
| Releases the passed Transformation Engine, deallocating all the resources used. More...
|
|
DW_API_PUBLIC dwStatus | dwImageTransformation_reset (dwImageTransformationHandle_t handle) |
| Resets an Image Transformation Engine. More...
|
|
DW_API_PUBLIC dwStatus | dwImageTransformation_setCUDAStream (cudaStream_t stream, dwImageTransformationHandle_t handle) |
| Sets the cuda stream used by the APIs of Image Transformation. More...
|
|
DW_API_PUBLIC dwStatus | dwImageTransformation_setNvSciSyncObj (NvSciSyncObj syncObj, dwSyncType syncType, dwImageTransformationHandle_t handle) |
| Set the sync obj to which the imagetransformation will signal EOF fences. More...
|
|
◆ dwImageTransformationParameters
struct dwImageTransformationParameters |
Data Fields |
uint8_t |
ignoreAspectRatio |
Boolean indicating whether the aspect ratio of the input image should be kept (0) or the image should be stretched to the roi specified (>0>). Default is 0.
|
uint8_t |
useNvMedia |
Boolean indicating whether to use NvMedia (>0) or not (0). Default is 1. |
◆ dwImageTransformationHandle_t
◆ dwImageTransformation_addPrefenceWait()
Add prefence for NvMedia2D to wait.
- Parameters
-
[out] | syncFence | The sync fence of the frame |
[in] | handle | Handle to imagetransformation |
- Returns
- DW_INVALID_ARGUMENT if syncFence or handle are null
DW_INVALID_HANDLE if the image transformation handle is not valid
DW_NVMEDIA_ERROR if the underlying NvMedia operation failed
DW_SUCCESS if the operation is successful
- API Group
- Init: Yes
- Runtime: Yes
- De-Init: Yes
◆ dwImageTransformation_appendAllocationAttributes()
Append the allocation attribute such that the images created of type DW_IMAGE_NVMEDIA can be fed to dwImageTransformation_copy,.
- Parameters
-
[in,out] | imgProps | Image properties |
[in] | handle | dwImageTransformation handle |
- Note
- The imgProps are read and used to generate the allocation attributes needed by the driver. The allocation attributes are stored back into imgProps.meta.allocAttrs. Applications do not need to free or alter the imgProps.meta.allocAttrs in any way. The imgProps.meta.allocAttrs are only used by DriveWorks as needed when the given imgProps are used to allocate dwImages. If the application alters the imgProps after calling this API, the imgProps.meta.allocAttrs may no longer be applicable to the imgProps and calls related to allocating images will fail.
-
if imgProps.meta.allocAttrs does not have allocated Memory, this would be allocated by DW and will be owned by DW context until context is destroyed and should be used wisely as it the space is limited.
- Returns
- DW_INVALID_ARGUMENT if imgProps or handle are null
DW_INTERNAL_ERROR if the underlying NvMedia operation failed
DW_INVALID_HANDLE if the image transformation handle is not valid
DW_SUCCESS if the operation is successful
- API Group
- Init: Yes
- Runtime: No
- De-Init: No
◆ dwImageTransformation_copy()
Resizes the input image subregion and copies the result into the previously allocated output image, in a specified subregion, of the same type (CUDA or NvMedia) and format (any)
- Parameters
-
[out] | outputImage | Pointer to the output image. |
[in] | inputImage | Pointer to the input image. |
[in] | outputROI | Pointer to a ROI on the output image where to copy the result. If null, defaults to the full image |
[in] | inputROI | Pointer to a ROI on the input image, where the source pixels are located. If null, defaults to the full image |
[in] | handle | Handle to the Image Transformation engine |
- Returns
- DW_INVALID_ARGUMENT if the outputImage or inputImage are null
DW_INVALID_HANDLE if image handles or image transformation handle are not valid
DW_CUDA_ERROR if the underlying cuda operation failed
DW_NVMEDIA_ERROR if the underlying NvMedia operation failed
DW_SUCCESS if the operation is successful
- API Group
- Init: Yes
- Runtime: Yes
- De-Init: Yes
◆ dwImageTransformation_fillNvSciSyncAttrs()
Fill the sync attributes for the imagetransformation to signal EOF fences.
Note that multiple calls on the same syncAttrList will append the same attributes.
- Parameters
-
[out] | syncAttrList | The sync attributes list to be filled |
[in] | syncType | The sync type |
[in] | handle | The imagetransformation handle |
- Returns
- DW_INVALID_ARGUMENT if syncAttrList or handle are null
DW_INVALID_HANDLE if the image transformation handle is not valid
DW_NVMEDIA_ERROR if the underlying NvMedia operation failed
DW_SUCCESS if the operation is successful
- API Group
- Init: Yes
- Runtime: No
- De-Init: No
◆ dwImageTransformation_getCUDAStream()
Gets the cuda stream used by the APIs of Image Transformation.
- Parameters
-
[out] | stream | CUDA stream |
[in] | handle | Handle to the Image Transformation engine |
- Returns
- DW_INVALID_ARGUMENT if the handle or stream are null
DW_INVALID_HANDLE if the image transformation handle is not valid
DW_CUDA_ERROR if the underlying cuda operation failed
DW_SUCCESS if the operation is successful
- API Group
- Init: Yes
- Runtime: Yes
- De-Init: Yes
◆ dwImageTransformation_getEOFFence()
Get EOF fence of the current operation.
- Parameters
-
[out] | syncFence | The sync fence of the frame |
[in] | handle | Handle to imagetransformation |
- Returns
- DW_INVALID_ARGUMENT if syncFence or handle are null
DW_INVALID_HANDLE if the image transformation handle is not valid
DW_NVMEDIA_ERROR if the underlying NvMedia operation failed
DW_SUCCESS if the operation is successful
- API Group
- Init: Yes
- Runtime: Yes
- De-Init: Yes
◆ dwImageTransformation_initialize()
Initializes an Image Transformation Engine with the given parameters.
- Parameters
-
[out] | handle | Pointer to the Image Transformation Engine |
[in] | params | parameters of image transformation. |
[in] | context | Handle to Driveworks |
- Returns
- DW_INVALID_ARGUMENT if the handle or context are null
DW_INVALID_HANDLE if the image transformation handle is not valid
DW_SUCCESS if the operation is successful
- API Group
- Init: Yes
- Runtime: No
- De-Init: No
◆ dwImageTransformation_registerImages()
All (both input and output) images that the transformation engine has to work with (NvMedia2D VIC mode only) must be placed in a dwImagePool and registered during initialization phase Note that all the images must have been created with properties with allocation attributes set.
- Parameters
-
[in] | imagePool | Handle to the dwImagePool, ownership remains of the creator of the pool |
[in] | handle | dwImageTransformation handle |
- Returns
- DW_NVMEDIA_ERROR - if underlying VIC engine had an NvMedia error.
DW_INVALID_HANDLE - if given handle is not valid.
DW_SUCCESS - if call is successful.
- API Group
- Init: Yes
- Runtime: No
- De-Init: No
◆ dwImageTransformation_release()
Releases the passed Transformation Engine, deallocating all the resources used.
- Parameters
-
[in] | handle | Pointer to the Image Transformation Engine. |
- Returns
- DW_INVALID_ARGUMENT if the handle is null
DW_INVALID_HANDLE if the image transformation handle is not valid
DW_SUCCESS if the operation is successful
- API Group
- Init: Yes
- Runtime: No
- De-Init: Yes
◆ dwImageTransformation_reset()
Resets an Image Transformation Engine.
- Parameters
-
[in] | handle | Pointer to the Image Transformation Engine. |
- Returns
- DW_INVALID_ARGUMENT if the handle is null
DW_INVALID_HANDLE if the image transformation handle is not valid
DW_SUCCESS if the operation is successful
- API Group
- Init: Yes
- Runtime: Yes
- De-Init: Yes
◆ dwImageTransformation_setCUDAStream()
Sets the cuda stream used by the APIs of Image Transformation.
- Parameters
-
[in] | stream | CUDA stream |
[in] | handle | Handle to the Image Transformation engine |
- Returns
- DW_INVALID_ARGUMENT if the handle or stream are null
DW_INVALID_HANDLE if the image transformation handle is not valid
DW_CUDA_ERROR if the underlying cuda operation failed
DW_SUCCESS if the operation is successful
- API Group
- Init: Yes
- Runtime: Yes
- De-Init: Yes
◆ dwImageTransformation_setNvSciSyncObj()
Set the sync obj to which the imagetransformation will signal EOF fences.
The sync object is not reference counted.
- Parameters
-
[in] | syncObj | The sync object |
[in] | syncType | The sync type |
[in] | handle | The imagetransformation handle |
- Returns
- DW_INVALID_ARGUMENT if syncObj or handle are null
DW_INVALID_HANDLE if the image transformation handle is not valid
DW_NVMEDIA_ERROR if the underlying NvMedia operation failed
DW_SUCCESS if the operation is successful
- API Group
- Init: Yes
- Runtime: No
- De-Init: No