NvDsBufSurfTransform API¶
-
group
ds_bbb
Defines types and functions of the NvBufSurfTransform application programming interface.
Typedefs
-
typedef struct _NvBufSurfTransformConfigParams
NvBufSurfTransformConfigParams
Holds configuration parameters for a transform/composite session.
-
typedef struct _NvBufSurfaceTransformParams
NvBufSurfTransformParams
Holds transform parameters for a transform call.
-
typedef struct _NvBufSurfTransformCompositeParams
NvBufSurfTransformCompositeParams
Holds composite parameters for a composite call.
-
typedef struct _NvBufSurfTransform_ColorParams
NvBufSurfTransform_ColorParams
-
typedef struct _NvBufSurfTransformCompositeBlendParams
NvBufSurfTransformCompositeBlendParams
Holds composite blend parameters for a composite blender call.
Enums
-
enum
NvBufSurfTransform_Compute
Specifies compute devices used by NvBufSurfTransform.
Values:
-
enumerator
NvBufSurfTransformCompute_Default
Specifies VIC as a compute device for Jetson or dGPU for an x86_64 system.
-
enumerator
NvBufSurfTransformCompute_GPU
Specifies that the GPU is the compute device.
-
enumerator
NvBufSurfTransformCompute_VIC
Specifies that the VIC as a compute device.
Supported only for Jetson.
-
enumerator
-
enum
NvBufSurfTransform_Flip
Specifies video flip methods.
Supported only for Jetson.
Values:
-
enumerator
NvBufSurfTransform_None
Specifies no video flip.
-
enumerator
NvBufSurfTransform_Rotate90
Specifies rotating 90 degrees clockwise.
-
enumerator
NvBufSurfTransform_Rotate180
Specifies rotating 180 degree clockwise.
-
enumerator
NvBufSurfTransform_Rotate270
Specifies rotating 270 degree clockwise.
-
enumerator
NvBufSurfTransform_FlipX
Specifies video flip with respect to the X-axis.
-
enumerator
NvBufSurfTransform_FlipY
Specifies video flip with respect to the Y-axis.
-
enumerator
NvBufSurfTransform_Transpose
Specifies video flip transpose.
-
enumerator
NvBufSurfTransform_InvTranspose
Specifies video flip inverse transpose.
-
enumerator
-
enum
NvBufSurfTransform_Inter
Specifies video interpolation methods.
Values:
-
enumerator
NvBufSurfTransformInter_Nearest
Specifies Nearest Interpolation Method interpolation.
-
enumerator
NvBufSurfTransformInter_Bilinear
Specifies Bilinear Interpolation Method interpolation.
-
enumerator
NvBufSurfTransformInter_Algo1
Specifies GPU-Cubic, VIC-5 Tap interpolation.
-
enumerator
NvBufSurfTransformInter_Algo2
Specifies GPU-Super, VIC-10 Tap interpolation.
-
enumerator
NvBufSurfTransformInter_Algo3
Specifies GPU-Lanzos, VIC-Smart interpolation.
-
enumerator
NvBufSurfTransformInter_Algo4
Specifies GPU-Ignored, VIC-Nicest interpolation.
-
enumerator
NvBufSurfTransformInter_Default
Specifies GPU-Nearest, VIC-Nearest interpolation.
-
enumerator
-
enum
NvBufSurfTransform_Error
Specifies error codes returned by NvBufSurfTransform functions.
Values:
-
enumerator
NvBufSurfTransformError_ROI_Error
Specifies an error in source or destination ROI.
-
enumerator
NvBufSurfTransformError_Invalid_Params
Specifies invalid input parameters.
-
enumerator
NvBufSurfTransformError_Execution_Error
Specifies a runtime execution error.
-
enumerator
NvBufSurfTransformError_Unsupported
Specifies an unsupported feature or format.
-
enumerator
NvBufSurfTransformError_Success
Specifies a successful operation.
-
enumerator
-
enum
NvBufSurfTransform_Transform_Flag
Specifies transform types.
Values:
-
enumerator
NVBUFSURF_TRANSFORM_CROP_SRC
Specifies a transform to crop the source rectangle.
-
enumerator
NVBUFSURF_TRANSFORM_CROP_DST
Specifies a transform to crop the destination rectangle.
-
enumerator
NVBUFSURF_TRANSFORM_FILTER
Specifies a transform to set the filter type.
-
enumerator
NVBUFSURF_TRANSFORM_FLIP
Specifies a transform to set the flip method.
-
enumerator
NVBUFSURF_TRANSFORM_NORMALIZE
Specifies a transform to normalize output.
-
enumerator
-
enum
NvBufSurfTransform_Composite_Flag
Specifies types of composition operations.
Values:
-
enumerator
NVBUFSURF_TRANSFORM_COMPOSITE
Specifies a flag to describe the requested compositing operation.
-
enumerator
Functions
-
NvBufSurfTransform_Error
NvBufSurfTransformSetSessionParams
(NvBufSurfTransformConfigParams *config_params) Sets user-defined session parameters.
If user-defined session parameters are set, they override the NvBufSurfTransform() function’s default session.
- Return
An NvBufSurfTransform_Error value indicating success or failure.
- Parameters
[in] config_params
: A pointer to a structure that is populated with the session parameters to be used.
-
NvBufSurfTransform_Error
NvBufSurfTransformGetSessionParams
(NvBufSurfTransformConfigParams *config_params) Gets the session parameters used by NvBufSurfTransform().
- Return
An NvBufSurfTransform_Error value indicating success or failure.
- Parameters
[out] config_params
: A pointer to a caller-allocated structure to be populated with the session parameters used.
-
NvBufSurfTransform_Error
NvBufSurfTransform
(NvBufSurface *src, NvBufSurface *dst, NvBufSurfTransformParams *transform_params) Performs a transformation on batched input images.
If user-defined session parameters are to be used, call NvBufSurfTransformSetSessionParams() before calling this function.
- 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.
- Return
An NvBufSurfTransform_Error value indicating success or failure.
- 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.
- 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.
-
NvBufSurfTransform_Error
NvBufSurfTransformComposite
(NvBufSurface *src, NvBufSurface *dst, NvBufSurfTransformCompositeParams *composite_params) 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.
- Return
An NvBufSurfTransform_Error value indicating success or failure.
- 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.
-
NvBufSurfTransform_Error
NvBufSurfTransformCompositeBlend
(NvBufSurface *src0, NvBufSurface *src1, NvBufSurface *alpha, NvBufSurface *dst, NvBufSurfTransformCompositeBlendParams *blend_params) Composites/Blends batched input images.
The compositer scales and blends batched buffers indicated by src0 with src1 into a batched destination buffer dst using alpha as the blending weights. A Linear interpolation operation is performed to get the final pix value each of src0, src1, alpha and dst have one to one mapping If user-defined session parameters are to be used, call NvBufSurfTransformSetSessionParams() before calling this function.
- Return
An NvBufSurfTransform_Error value indicating success or failure.
- Parameters
[in] src0
: A pointer to input batched buffers to be blend.[in] src1
: A pointer to input batched buffers to be blend with.[in] alpha
: A pointer to input batched buffers which has blending weights.[out] dst
: A pointer to output batched buffers where blended composite output is stored[in] blend_params
: A pointer to an NvBufSurfTransformCompositeBlendParams structure which specifies the compositing operation to be performed
-
struct
NvBufSurfTransformRect
- #include <nvbufsurftransform.h>
Holds the coordinates of a rectangle.
-
struct
_NvBufSurfTransformConfigParams
- #include <nvbufsurftransform.h>
Holds configuration parameters for a transform/composite session.
-
struct
_NvBufSurfaceTransformParams
- #include <nvbufsurftransform.h>
Holds transform parameters for a transform call.
-
struct
_NvBufSurfTransformCompositeParams
- #include <nvbufsurftransform.h>
Holds composite parameters for a composite call.
-
struct
_NvBufSurfTransform_ColorParams
- #include <nvbufsurftransform.h>
-
struct
_NvBufSurfTransformCompositeBlendParams
- #include <nvbufsurftransform.h>
Holds composite blend parameters for a composite blender call.
-
typedef struct _NvBufSurfTransformConfigParams