Remaps the input image, effectively warping it using a user-provided mapping. More...
Functions | |
VPIStatus | vpiCreateRemap (uint64_t backends, const VPIWarpMap *warpMap, VPIPayload *payload) |
Create a payload for Remap algorithm. More... | |
VPIStatus | vpiSubmitRemap (VPIStream stream, uint64_t backend, VPIPayload payload, VPIImage input, VPIImage output, VPIInterpolationType interp, VPIBorderExtension border, uint64_t flags) |
Submits a Remap operation to the stream. More... | |
Remaps the input image, effectively warping it using a user-provided mapping.
Refer to Remap for more details and usage examples.
VPIStatus vpiCreateRemap | ( | uint64_t | backends, |
const VPIWarpMap * | warpMap, | ||
VPIPayload * | payload | ||
) |
#include <vpi/algo/Remap.h>
Create a payload for Remap algorithm.
This function allocates all resources needed by the Remap algorithm and ties the returned payload to the given stream.
[in] | backends | VPI backends that are eligible to execute the algorithm.
|
[in] | warpMap | Mapping of output back into input.
|
[out] | payload | Pointer to the payload variable that receives the created handle. |
VPI_ERROR_INVALID_ARGUMENT | payload is NULL. |
VPI_ERROR_INVALID_ARGUMENT | warpMap is NULL. |
VPI_ERROR_INVALID_ARGUMENT | backends refers to an invalid backend. |
VPI_ERROR_NOT_IMPLEMENTED | Remap algorithm is not supported by given backends. |
VPI_ERROR_NOT_IMPLEMENTED | VIC hardware with Remap support is not available. |
VPI_ERROR_INVALID_CONTEXT | Current context is destroyed. |
VPI_ERROR_OUT_OF_MEMORY | Cannot allocate required resources. |
VPI_ERROR_INVALID_OPERATION | Backend isn't enabled in current context. |
VPI_SUCCESS | Operation executed successfully. |
VPIStatus vpiSubmitRemap | ( | VPIStream | stream, |
uint64_t | backend, | ||
VPIPayload | payload, | ||
VPIImage | input, | ||
VPIImage | output, | ||
VPIInterpolationType | interp, | ||
VPIBorderExtension | border, | ||
uint64_t | flags | ||
) |
#include <vpi/algo/Remap.h>
Submits a Remap operation to the stream.
[in] | stream | The stream where the operation will be queued in.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[in] | backend | Backend that will execute the algorithm.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[in] | payload | Payload created by vpiCreateRemap. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[in] | input | Image to be remapped. In a lens distortion correction context, this would correspond to the distorted image.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[out] | output | Stores the remapped image. In a lens distortion correction context, this would correspond to the corrected (distortion-free).
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[in] | interp | Interpolation method to be used. Valid values: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[in] | border | What value to pick if remapped coordinated falls outside input image.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[in] | flags | Control flags.
|
VPI_ERROR_INVALID_ARGUMENT | stream is NULL. |
VPI_ERROR_INVALID_ARGUMENT | input or output are NULL. |
VPI_ERROR_INVALID_ARGUMENT | payload is not generated using vpiCreateRemap. |
VPI_ERROR_INVALID_ARGUMENT | Invalid flags . |
VPI_ERROR_INVALID_ARGUMENT | input and output must have the same format. |
VPI_ERROR_INVALID_ARGUMENT | output must have same size corresponding to the warp map passed during payload creation. |
VPI_ERROR_INVALID_ARGUMENT | border not supported. |
VPI_ERROR_INVALID_PAYLOAD_TYPE | payload is invalid. |
VPI_ERROR_INVALID_OPERATION | The needed backends aren't enabled in stream , input or output . |
VPI_SUCCESS | Operation executed successfully. |