Defines the NvBufSurfTransform image transformation API, which sets and sets session parameters and transforms and composites images.
|
This section describes types and functions of the NvBufSurfTransform application programming interface.
|
enum | NvBufSurfTransform_Compute {
NvBufSurfTransformCompute_Default,
NvBufSurfTransformCompute_GPU,
NvBufSurfTransformCompute_VIC
} |
| Specifies compute devices used by NvBufSurfTransform. More...
|
|
enum | NvBufSurfTransform_Flip {
NvBufSurfTransform_None,
NvBufSurfTransform_Rotate90,
NvBufSurfTransform_Rotate180,
NvBufSurfTransform_Rotate270,
NvBufSurfTransform_FlipX,
NvBufSurfTransform_FlipY,
NvBufSurfTransform_Transpose,
NvBufSurfTransform_InvTranspose
} |
| Specifies video flip methods. More...
|
|
enum | NvBufSurfTransform_Inter {
NvBufSurfTransformInter_Nearest = 0,
NvBufSurfTransformInter_Bilinear,
NvBufSurfTransformInter_Algo1,
NvBufSurfTransformInter_Algo2,
NvBufSurfTransformInter_Algo3,
NvBufSurfTransformInter_Algo4,
NvBufSurfTransformInter_Default
} |
| Specifies video interpolation methods. More...
|
|
enum | NvBufSurfTransform_Error {
NvBufSurfTransformError_ROI_Error = -4,
NvBufSurfTransformError_Invalid_Params = -3,
NvBufSurfTransformError_Execution_Error = -2,
NvBufSurfTransformError_Unsupported = -1,
NvBufSurfTransformError_Success = 0
} |
| Specifies error codes returned by NvBufSurfTransform functions. More...
|
|
enum | NvBufSurfTransform_Transform_Flag {
NVBUFSURF_TRANSFORM_CROP_SRC = 1,
NVBUFSURF_TRANSFORM_CROP_DST = 1 << 1,
NVBUFSURF_TRANSFORM_FILTER = 1 << 2,
NVBUFSURF_TRANSFORM_FLIP = 1 << 3
} |
| Specifies transform types. More...
|
|
enum | NvBufSurfTransform_Composite_Flag { NVBUFSURF_TRANSFORM_COMPOSITE = 1
} |
| Specifies types of composition operations. More...
|
|
typedef struct
_NvBufSurfTransformConfigParams | NvBufSurfTransformConfigParams |
| Holds configuration parameters for a transform/composite session. More...
|
|
typedef struct
_NvBufSurfaceTransformParams | NvBufSurfTransformParams |
| Holds transform parameters for a transform call. More...
|
|
typedef struct
_NvBufSurfTransformCompositeParams | NvBufSurfTransformCompositeParams |
| Holds composite parameters for a composite call. More...
|
|
NvBufSurfTransform_Error | NvBufSurfTransformSetSessionParams (NvBufSurfTransformConfigParams *config_params) |
| Sets user-defined session parameters. More...
|
|
NvBufSurfTransform_Error | NvBufSurfTransformGetSessionParams (NvBufSurfTransformConfigParams *config_params) |
| Gets the session parameters used by NvBufSurfTransform(). More...
|
|
NvBufSurfTransform_Error | NvBufSurfTransform (NvBufSurface *src, NvBufSurface *dst, NvBufSurfTransformParams *transform_params) |
| Performs a transformation on batched input images. More...
|
|
NvBufSurfTransform_Error | NvBufSurfTransformComposite (NvBufSurface *src, NvBufSurface *dst, NvBufSurfTransformCompositeParams *composite_params) |
| Composites batched input images. More...
|
|
Holds composite parameters for a composite call.
Holds configuration parameters for a transform/composite session.
Holds transform parameters for a transform call.
Specifies types of composition operations.
Enumerator |
---|
NVBUFSURF_TRANSFORM_COMPOSITE |
Specifies a flag to describe the requested compositing operation.
|
Definition at line 145 of file nvbufsurftransform.h.
Specifies compute devices used by NvBufSurfTransform.
Enumerator |
---|
NvBufSurfTransformCompute_Default |
Specifies VIC as a compute device for Jetson or dGPU for an x86_64 system.
|
NvBufSurfTransformCompute_GPU |
Specifies that the GPU is the compute device.
|
NvBufSurfTransformCompute_VIC |
Specifies that the VIC as a compute device.
Supported only for Jetson.
|
Definition at line 54 of file nvbufsurftransform.h.
Specifies error codes returned by NvBufSurfTransform functions.
Enumerator |
---|
NvBufSurfTransformError_ROI_Error |
Specifies an error in source or destination ROI.
|
NvBufSurfTransformError_Invalid_Params |
Specifies invalid input parameters.
|
NvBufSurfTransformError_Execution_Error |
Specifies a runtime execution error.
|
NvBufSurfTransformError_Unsupported |
Specifies an unsupported feature or format.
|
NvBufSurfTransformError_Success |
Specifies a successful operation.
|
Definition at line 114 of file nvbufsurftransform.h.
Specifies video flip methods.
Supported only for Jetson.
Enumerator |
---|
NvBufSurfTransform_None |
Specifies no video flip.
|
NvBufSurfTransform_Rotate90 |
Specifies rotating 90 degrees clockwise.
|
NvBufSurfTransform_Rotate180 |
Specifies rotating 180 degree clockwise.
|
NvBufSurfTransform_Rotate270 |
Specifies rotating 270 degree clockwise.
|
NvBufSurfTransform_FlipX |
Specifies video flip with respect to the X-axis.
|
NvBufSurfTransform_FlipY |
Specifies video flip with respect to the Y-axis.
|
NvBufSurfTransform_Transpose |
Specifies video flip transpose.
|
NvBufSurfTransform_InvTranspose |
Specifies video flip inverse transpose.
|
Definition at line 69 of file nvbufsurftransform.h.
Specifies video interpolation methods.
Enumerator |
---|
NvBufSurfTransformInter_Nearest |
Specifies Nearest Interpolation Method interpolation.
|
NvBufSurfTransformInter_Bilinear |
Specifies Bilinear Interpolation Method interpolation.
|
NvBufSurfTransformInter_Algo1 |
Specifies GPU-Cubic, VIC-5 Tap interpolation.
|
NvBufSurfTransformInter_Algo2 |
Specifies GPU-Super, VIC-10 Tap interpolation.
|
NvBufSurfTransformInter_Algo3 |
Specifies GPU-Lanzos, VIC-Smart interpolation.
|
NvBufSurfTransformInter_Algo4 |
Specifies GPU-Ignored, VIC-Nicest interpolation.
|
NvBufSurfTransformInter_Default |
Specifies GPU-Nearest, VIC-Nearest interpolation.
|
Definition at line 93 of file nvbufsurftransform.h.
Specifies transform types.
Enumerator |
---|
NVBUFSURF_TRANSFORM_CROP_SRC |
Specifies a transform to crop the source rectangle.
|
NVBUFSURF_TRANSFORM_CROP_DST |
Specifies a transform to crop the destination rectangle.
|
NVBUFSURF_TRANSFORM_FILTER |
Specifies a transform to set the filter type.
|
NVBUFSURF_TRANSFORM_FLIP |
Specifies a transform to set the flip method.
|
Definition at line 131 of file nvbufsurftransform.h.
Performs a transformation on batched input images.
If user-defined session parameters are to be used, call NvBufSurfTransformSetSessionParams() before calling this function.
- Parameters
-
[in] | src | A pointer to input batched buffers to be transformed. |
[out] | dst | A pointer to a caller-allocated location where transformed output is to be stored. |
- When destination cropping is performed, memory outside
- the crop location is not touched, and may contain stale information. The caller must perform a memset before calling this function if stale information must be eliminated.
- Parameters
-
[in] | transform_params | A pointer to an NvBufSurfTransformParams structure which specifies the type of transform to be performed. They may include any combination of scaling, format conversion, and cropping for both source and destination. Flipping and rotation are supported on VIC. |
- Returns
- An NvBufSurfTransform_Error value indicating success or failure.
Composites batched input images.
The compositer scales and stitches batched buffers indicated by src into a single destination buffer, dst.
If user-defined session parameters are to be used, call NvBufSurfTransformSetSessionParams() before calling this function.
- Parameters
-
[in] | src | A pointer to input batched buffers to be transformed. |
[out] | dst | A pointer a caller-allocated location (a single buffer) where composited output is to be stored. |
[in] | composite_params | A pointer to an NvBufSurfTransformCompositeParams structure which specifies the compositing operation to be performed, e.g., the source and destination rectangles in src and dst. |
- Returns
- An NvBufSurfTransform_Error value indicating success or failure.
Gets the session parameters used by NvBufSurfTransform().
- Parameters
-
[out] | config_params | A pointer to a caller-allocated structure to be populated with the session parameters used. |
- Returns
- An NvBufSurfTransform_Error value indicating success or failure.
Sets user-defined session parameters.
If user-defined session parameters are set, they override the NvBufSurfTransform() function's default session.
- Parameters
-
[in] | config_params | A pointer to a structure that is populated with the session parameters to be used. |
- Returns
- An NvBufSurfTransform_Error value indicating success or failure.