Defines types and functions of the NvBufSurfTransform application programming interface.
Data Structures | |
struct | NvBufSurfTransformRect |
Holds the coordinates of a rectangle. More... | |
struct | _NvBufSurfTransformConfigParams |
Holds configuration parameters for a transform/composite session. More... | |
struct | _NvBufSurfaceTransformParams |
Holds transform parameters for a transform call. More... | |
struct | _NvBufSurfTransformCompositeParams |
Holds composite parameters for a composite call. More... | |
struct | _NvBufSurfTransform_ColorParams |
struct | _NvBufSurfTransformCompositeBlendParams |
Holds composite blend parameters for a composite blender call. More... | |
struct | _NvBufSurfTransformCompositeBlendParamsEx |
Holds extended composite blend parameters for NvBufSurfTransformMultiInputBufCompositeBlend and NvBufSurfTransformMultiInputBufCompositeBlendAsync API. More... | |
Typedefs | |
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... | |
typedef struct _NvBufSurfTransform_ColorParams | NvBufSurfTransform_ColorParams |
typedef struct _NvBufSurfTransformCompositeBlendParams | NvBufSurfTransformCompositeBlendParams |
Holds composite blend parameters for a composite blender call. More... | |
typedef struct _NvBufSurfTransformCompositeBlendParamsEx | NvBufSurfTransformCompositeBlendParamsEx |
Holds extended composite blend parameters for NvBufSurfTransformMultiInputBufCompositeBlend and NvBufSurfTransformMultiInputBufCompositeBlendAsync API. More... | |
typedef struct NvBufSurfTransformSyncObj * | NvBufSurfTransformSyncObj_t |
Holds the information about synchronization objects for asynchronous transform/composite APIs. More... | |
typedef struct _NvBufSurfTransform_ColorParams NvBufSurfTransform_ColorParams |
Holds composite blend parameters for a composite blender call.
Holds extended composite blend parameters for NvBufSurfTransformMultiInputBufCompositeBlend and NvBufSurfTransformMultiInputBufCompositeBlendAsync API.
Holds composite parameters for a composite call.
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 NvBufSurfTransformSyncObj* NvBufSurfTransformSyncObj_t |
Holds the information about synchronization objects for asynchronous transform/composite APIs.
Definition at line 280 of file nvbufsurftransform.h.
Specifies types of composition operations.
Definition at line 134 of file nvbufsurftransform.h.
Specifies compute devices used by NvBufSurfTransform.
Definition at line 40 of file nvbufsurftransform.h.
Specifies error codes returned by NvBufSurfTransform functions.
Definition at line 100 of file nvbufsurftransform.h.
Specifies video flip methods.
Definition at line 55 of file nvbufsurftransform.h.
Specifies video interpolation methods.
Definition at line 79 of file nvbufsurftransform.h.
Specifies transform types.
Definition at line 117 of file nvbufsurftransform.h.
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.
[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. |
[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 NvBufSurfTransformAsync | ( | NvBufSurface * | src, |
NvBufSurface * | dst, | ||
NvBufSurfTransformParams * | transform_params, | ||
NvBufSurfTransformSyncObj_t * | sync_obj | ||
) |
An asynchronous (non-blocking) transformation on batched input images.
If user-defined session parameters are to be used, call NvBufSurfTransformSetSessionParams() before calling this function.
[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. |
[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/GPU. |
[out] | sync_obj | A pointer to an NvBufSurfTransformSyncObj structure which holds synchronization information of the current transform call. NvBufSurfTransfromSyncObjWait() API to be called on this object to wait for transformation to complete. NvBufSurfTransformSyncObjDestroy API should be called after NvBufSurfTransformSyncObjWait API to release the objects If the parameter is NULL, the call would return only after the transform is complete. |
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.
[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 NvBufSurfTransformCompositeAsync | ( | NvBufSurface * | src, |
NvBufSurface * | dst, | ||
NvBufSurfTransformCompositeParams * | composite_params, | ||
NvBufSurfTransformSyncObj_t * | sync_obj | ||
) |
Composites batched input images Asynchronously (non-blocking).
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.
[in] | src | A pointer to input batched buffers to be composited. |
[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. |
[out] | sync_obj | A pointer to an NvBufSurfTransformSyncObj structure which holds synchronization information of the current composite call. ref\ NvBufSurfTransfromSyncObjWait() API to be called on this object to wait for composition to complete. NvBufSurfTransformSyncObjDestroy API should be called after NvBufSurfTransformSyncObjWait API to release the objects If the parameter is NULL, the call would return only after the composite is complete. |
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 For each pixel the following linear interpolation is performed. dst = ( src0* alpha + src1* (255.0 - alpha))/255.0 If user-defined session parameters are to be used, call NvBufSurfTransformSetSessionParams() before calling this function.
[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 |
NvBufSurfTransform_Error NvBufSurfTransformGetSessionParams | ( | NvBufSurfTransformConfigParams * | config_params | ) |
Gets the session parameters used by NvBufSurfTransform().
[out] | config_params | A pointer to a caller-allocated structure to be populated with the session parameters used. |
NvBufSurfTransform_Error NvBufSurfTransformMultiInputBufCompositeBlend | ( | NvBufSurface ** | src, |
NvBufSurface * | dst, | ||
NvBufSurfTransformCompositeBlendParamsEx * | composite_blend_params | ||
) |
Performs Composition and Blending on multiple input images(batch size=1) and provide single output image(batch size=1)
Composites and blends batched(batch size=1) input buffers pointed by src pointer. Compositer scales, stitches and blends batched buffers pointed by src into single dst buffer (batch size=1), the parameters for composition and blending is provided by composite_blend_params. Use NvBufSurfTransformSetSessionParams before each call, if user defined session parameters are to be used. It is different than the NvBufSurfTransformCompositeBlend API and It is currently supported on Jetson only.
[in] | src | pointer (multiple buffer) to input batched(batch size=1) buffers to be transformed. |
[out] | dst | pointer (single buffer) where composited output would be stored. |
[in] | composite_blend_params | pointer to NvBufSurfTransformCompositeBlendParamsEx structure. |
NvBufSurfTransform_Error NvBufSurfTransformMultiInputBufCompositeBlendAsync | ( | NvBufSurface ** | src, |
NvBufSurface * | dst, | ||
NvBufSurfTransformCompositeBlendParamsEx * | composite_blend_params, | ||
NvBufSurfTransformSyncObj_t * | sync_obj | ||
) |
Performs Composition and Blending on multiple input images(batch size=1) and provide single output image(batch size=1) Asynchronously (non-blocking).
Composites and blends batched(batch size=1) input buffers pointed by src pointer. Compositer scales, stitches and blends batched buffers pointed by src into single dst buffer (batch size=1), the parameters for composition and blending is provided by composite_blend_params. Use NvBufSurfTransformSetSessionParams before each call, if user defined session parameters are to be used. It is different than the NvBufSurfTransformCompositeBlend API and It is currently supported on Jetson only.
[in] | src | pointer (multiple buffer) to input batched(batch size=1) buffers to be transformed. |
[out] | dst | pointer (single buffer) where composited output would be stored. |
[in] | composite_blend_params | pointer to NvBufSurfTransformCompositeParams structure. |
[out] | sync_obj | A pointer to an NvBufSurfTransformSyncObj structure which holds synchronization information of the current composite call. ref\ NvBufSurfTransfromSyncObjWait() API to be called on this object to wait for composition to complete. NvBufSurfTransformSyncObjDestroy API should be called after NvBufSurfTransformSyncObjWait API to release the objects If the parameter is NULL, the call would return only after the composite is complete. |
NvBufSurfTransform_Error NvBufSurfTransformSetDefaultSession | ( | void | ) |
Sets the default transform session as the current session for all upcoming transforms.
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.
[in] | config_params | A pointer to a structure that is populated with the session parameters to be used. |
NvBufSurfTransform_Error NvBufSurfTransformSyncObjDestroy | ( | NvBufSurfTransformSyncObj_t * | sync_obj | ) |
Destroy the synchronization object.
The API deletes the sync_obj which was used for previous transform/composite Asynchronous calls
[in] | sync_obj | A pointer sync_obj, which the API will delete |
NvBufSurfTransform_Error NvBufSurfTransformSyncObjWait | ( | NvBufSurfTransformSyncObj_t | sync_obj, |
uint32_t | time_out | ||
) |
Wait on the synchronization object.
The API waits on the synchronization object to finish the corresponding processing of transform/composite calls or returns on time_out
[in] | sync_obj | A pointer to sync object on which the API should wait |
[in] | time_out | Maximum time in ms API should wait before returning, only Only applicable for VIC as of now. |