NVIDIA buffering utility library for use by applications. The utility also transforms, composits, and blends.
Data Structures | |
struct | _NvBufferSyncObjParams |
Holds parameters for buffer sync point object. More... | |
struct | _NvBufferSyncObjRec |
buffer sync point object. More... | |
struct | NvBufferCompositeBackground |
Holds composition background r,g,b colors. More... | |
struct | NvBufferRect |
Holds coordinates for a rectangle. More... | |
struct | _NvBufferChromaSubSamplingParams |
Holds Chroma Subsampling parameters. More... | |
struct | _NvBufferCDEParams |
Holds CDE parameters. More... | |
struct | _NvBufferCreateParams |
Holds the input parameters for hardware buffer creation. More... | |
struct | _NvBufferParams |
Holds parameters for a hardware buffer. More... | |
struct | _NvBufferParamsEx |
Holds extended parameters for a hardware buffer. More... | |
struct | _NvBufferCompositeParams |
Holds parameters related to compositing/blending. More... | |
struct | _NvBufferTransformParams |
Holds parameters for buffer transform functions. More... | |
Macros | |
#define | MAX_NUM_PLANES 4 |
Defines the maximum number of planes for a video frame. More... | |
#define | MAX_COMPOSITE_FRAME 16 |
Defines the maximum number of input video frames that can be used for composition. More... | |
#define | NVBUF_CHROMA_SUBSAMPLING_HORIZ_DEFAULT 0 |
Defines the default values for chroma subsampling. More... | |
#define | NVBUF_CHROMA_SUBSAMPLING_VERT_DEFAULT 1 |
#define | NVBUF_MAX_SYNCOBJ_PARAMS 5 |
Defines the maximum number of sync object parameters. More... | |
#define | NVBUFFER_SYNCPOINT_WAIT_INFINITE 0xFFFFFFFF |
Use this value to represent an infinite wait interval. More... | |
#define | NVBUF_CHROMA_SUBSAMPLING_PARAMS_DEFAULT |
Typedefs | |
typedef struct _NvBufferSyncObjParams | NvBufferSyncObjParams |
Holds parameters for buffer sync point object. More... | |
typedef struct _NvBufferSyncObjRec | NvBufferSyncObj |
buffer sync point object. More... | |
typedef struct _NvBufferSession * | NvBufferSession |
Holds an opaque NvBuffer session type required for parallel buffer tranformations and compositions. More... | |
typedef struct _NvBufferChromaSubSamplingParams | NvBufferChromaSubsamplingParams |
Holds Chroma Subsampling parameters. More... | |
typedef struct _NvBufferCDEParams | NvBufferCDEParams |
Holds CDE parameters. More... | |
typedef struct _NvBufferCreateParams | NvBufferCreateParams |
Holds the input parameters for hardware buffer creation. More... | |
typedef struct _NvBufferParams | NvBufferParams |
Holds parameters for a hardware buffer. More... | |
typedef struct _NvBufferParamsEx | NvBufferParamsEx |
Holds extended parameters for a hardware buffer. More... | |
typedef struct _NvBufferCompositeParams | NvBufferCompositeParams |
Holds parameters related to compositing/blending. More... | |
typedef struct _NvBufferTransformParams | NvBufferTransformParams |
Holds parameters for buffer transform functions. More... | |
Functions | |
int | NvBufferSyncObjWait (NvBufferSyncObjParams *syncobj_params, unsigned int timeout) |
This method can be used to wait on sync point ID. More... | |
int | NvBufferSyncObjParamsFromFile (int file, NvBufferSyncObjParams *syncobjparams, unsigned int *nparams) |
This method can be used to get sync point object parameters from sync point FD. More... | |
int | NvBufferGetSize (void) |
This method can be used to get hardware Buffer struct size. More... | |
EGLImageKHR | NvEGLImageFromFd (EGLDisplay display, int dmabuf_fd) |
Creates an instance of EGLImage from a DMABUF FD. More... | |
int | NvDestroyEGLImage (EGLDisplay display, EGLImageKHR eglImage) |
Destroys an EGLImage object. More... | |
int | NvBufferCreate (int *dmabuf_fd, int width, int height, NvBufferLayout layout, NvBufferColorFormat colorFormat) |
Allocates a hardware buffer (deprecated). More... | |
int | NvBufferCreateEx (int *dmabuf_fd, NvBufferCreateParams *input_params) |
Allocates a hardware buffer. More... | |
int | NvBufferCreateInterlace (int *dmabuf_fd, NvBufferCreateParams *input_params) |
Allocates a hardware buffer for interlace scan format. More... | |
int | NvBufferCreateWithChromaLoc (int *dmabuf_fd, NvBufferCreateParams *input_params, NvBufferChromaSubsamplingParams *chromaSubsampling) |
Allocates a hardware buffer with a given chroma subsampling location. More... | |
int | NvBufferCreateCompressed (int *dmabuf_fd, NvBufferCreateParams *input_params) |
Allocates a hardware buffer with compression enabled. More... | |
int | NvBufferGetParams (int dmabuf_fd, NvBufferParams *params) |
Gets buffer parameters. More... | |
int | NvBufferGetParamsEx (int dmabuf_fd, NvBufferParamsEx *exparams) |
Gets buffer extended parameters. More... | |
int | NvBufferDestroy (int dmabuf_fd) |
Destroys a hardware buffer. More... | |
int | ExtractFdFromNvBuffer (void *nvbuf, int *dmabuf_fd) |
Extracts the dmabuf_fd from the hardware buffer. More... | |
int | NvReleaseFd (int dmabuf_fd) |
Releases the dmabuf_fd buffer. More... | |
int | NvBufferMemSyncForCpu (int dmabuf_fd, unsigned int plane, void **pVirtAddr) |
Syncs the hardware memory cache for the CPU. More... | |
int | NvBufferMemSyncForCpuEx (int dmabuf_fd, NvBufferParamsEx *exparams, unsigned int plane, void **pVirtAddr) |
Syncs the hardware memory cache for the CPU, API to be used for another process. More... | |
int | NvBufferMemSyncForDevice (int dmabuf_fd, unsigned int plane, void **pVirtAddr) |
Syncs the hardware memory cache for the device. More... | |
int | NvBufferMemSyncForDeviceEx (int dmabuf_fd, NvBufferParamsEx *exparams, unsigned int plane, void **pVirtAddr) |
Syncs the hardware memory cache for the device, API to be used for another process. More... | |
int | NvBufferMemMap (int dmabuf_fd, unsigned int plane, NvBufferMemFlags memflag, void **pVirtAddr) |
Gets the memory-mapped virtual address of the plane. More... | |
int | NvBufferMemMapEx (int dmabuf_fd, NvBufferParamsEx *exparams, unsigned int plane, NvBufferMemFlags memflag, void **pVirtAddr) |
Gets the memory-mapped virtual address of the plane, API to be used for another process. More... | |
int | NvBufferMemUnMap (int dmabuf_fd, unsigned int plane, void **pVirtAddr) |
Unmaps the mapped virtual address of the plane. More... | |
int | NvBufferMemUnMapEx (int dmabuf_fd, NvBufferParamsEx *exparams, unsigned int plane, void **pVirtAddr) |
Unmaps the mapped virtual address of the plane, API to be used for another process. More... | |
int | NvBuffer2Raw (int dmabuf_fd, unsigned int plane, unsigned int out_width, unsigned int out_height, unsigned char *ptr) |
Copies the NvBuffer plane contents to a raw buffer plane. More... | |
int | Raw2NvBuffer (unsigned char *ptr, unsigned int plane, unsigned int in_width, unsigned int in_height, int dmabuf_fd) |
Copies raw buffer plane contents to an NvBuffer plane. More... | |
NvBufferSession | NvBufferSessionCreate (void) |
Creates a new NvBufferSession for parallel scheduling of buffer transformations and compositions. More... | |
void | NvBufferSessionDestroy (NvBufferSession session) |
Destroys an existing NvBufferSession. More... | |
int | NvBufferTransform (int src_dmabuf_fd, int dst_dmabuf_fd, NvBufferTransformParams *transform_params) |
Transforms one DMA buffer to another DMA buffer. More... | |
int | NvBufferTransformEx (int src_dmabuf_fd, NvBufferParamsEx *input_params, int dst_dmabuf_fd, NvBufferParamsEx *output_params, NvBufferTransformParams *transform_params) |
Transforms one DMA buffer to another DMA buffer, API to be used for another process. More... | |
int | NvBufferTransformAsync (int src_dmabuf_fd, int dst_dmabuf_fd, NvBufferTransformParams *transform_params, NvBufferSyncObj *syncobj) |
Transforms one DMA buffer to another DMA buffer asyncroniously (non-blocking). More... | |
int | NvBufferComposite (int *src_dmabuf_fds, int dst_dmabuf_fd, NvBufferCompositeParams *composite_params) |
Composites multiple input DMA buffers to one output DMA buffer. More... | |
int | NvBufferImportFd (int in_dmabuf_fd, int *out_dmabuf_fd, NvBufferParamsEx *in_params) |
Imports DMA buffer FD received from another process and create hardware buffer using the input params to be used by calling process. More... | |
#define MAX_COMPOSITE_FRAME 16 |
Defines the maximum number of input video frames that can be used for composition.
Definition at line 49 of file nvbuf_utils.h.
#define MAX_NUM_PLANES 4 |
Defines the maximum number of planes for a video frame.
Definition at line 44 of file nvbuf_utils.h.
#define NVBUF_CHROMA_SUBSAMPLING_HORIZ_DEFAULT 0 |
Defines the default values for chroma subsampling.
The default value matches JPEG/MPEG use cases.
Definition at line 55 of file nvbuf_utils.h.
#define NVBUF_CHROMA_SUBSAMPLING_PARAMS_DEFAULT |
Definition at line 424 of file nvbuf_utils.h.
#define NVBUF_CHROMA_SUBSAMPLING_VERT_DEFAULT 1 |
Definition at line 56 of file nvbuf_utils.h.
#define NVBUF_MAX_SYNCOBJ_PARAMS 5 |
Defines the maximum number of sync object parameters.
Definition at line 61 of file nvbuf_utils.h.
#define NVBUFFER_SYNCPOINT_WAIT_INFINITE 0xFFFFFFFF |
Use this value to represent an infinite wait interval.
A value of zero should not be interpreted as infinite, it should be interpreted as "time out immediately" and simply check whether the event has already happened.
Definition at line 69 of file nvbuf_utils.h.
typedef struct _NvBufferCDEParams NvBufferCDEParams |
Holds CDE parameters.
typedef struct _NvBufferChromaSubSamplingParams NvBufferChromaSubsamplingParams |
Holds Chroma Subsampling parameters.
typedef struct _NvBufferCompositeParams NvBufferCompositeParams |
Holds parameters related to compositing/blending.
typedef struct _NvBufferCreateParams NvBufferCreateParams |
Holds the input parameters for hardware buffer creation.
typedef struct _NvBufferParams NvBufferParams |
Holds parameters for a hardware buffer.
typedef struct _NvBufferParamsEx NvBufferParamsEx |
Holds extended parameters for a hardware buffer.
typedef struct _NvBufferSession* NvBufferSession |
Holds an opaque NvBuffer session type required for parallel buffer tranformations and compositions.
Operations using a single session are scheduled sequentially, after the previous operation finishes. Operations for multiple sessions are scheduled in parallel.
Definition at line 397 of file nvbuf_utils.h.
typedef struct _NvBufferSyncObjRec NvBufferSyncObj |
buffer sync point object.
typedef struct _NvBufferSyncObjParams NvBufferSyncObjParams |
Holds parameters for buffer sync point object.
sync object params is simply a data structure containing [sync point ID,value] pair. This can be used by clients to describe an event that might want to wait for.
typedef struct _NvBufferTransformParams NvBufferTransformParams |
Holds parameters for buffer transform functions.
enum NvBufferColorFormat |
Defines color formats for NvBuffer.
Definition at line 155 of file nvbuf_utils.h.
Defines flags that specify valid composition/blending operations.
Enumerator | |
---|---|
NVBUFFER_COMPOSITE | flag to set for composition. |
NVBUFFER_BLEND | flag to set for blending. |
NVBUFFER_COMPOSITE_FILTER | composition flag to set filter type. |
Definition at line 332 of file nvbuf_utils.h.
enum NvBufferCompression |
Defines Compression flag for NvBuffer.
NOTE: NvBufferLayout must be BlockLinear for Compression.
Enumerator | |
---|---|
NvBufferCompression_Disabled | Compression disabled. |
NvBufferCompression_Enabled | GPU compression enabled. |
Definition at line 97 of file nvbuf_utils.h.
Defines display scan formats for NvBuffer video planes.
Enumerator | |
---|---|
NvBufferDisplayScanFormat_Progressive | Progessive scan formats. |
NvBufferDisplayScanFormat_Interlaced | Interlaced scan formats. |
Definition at line 85 of file nvbuf_utils.h.
enum NvBufferLayout |
Defines Layout formats for NvBuffer video planes.
Enumerator | |
---|---|
NvBufferLayout_Pitch | Pitch Layout. |
NvBufferLayout_BlockLinear | BlockLinear Layout. |
Definition at line 108 of file nvbuf_utils.h.
enum NvBufferMemFlags |
Defines memory access flags for NvBuffer.
Enumerator | |
---|---|
NvBufferMem_Read | Memory read. |
NvBufferMem_Write | Memory write. |
NvBufferMem_Read_Write | Memory read & write. |
Definition at line 119 of file nvbuf_utils.h.
enum NvBufferPayloadType |
Defines Payload types for NvBuffer.
Enumerator | |
---|---|
NvBufferPayload_SurfArray | buffer payload with hardware memory handle for set of planes. |
NvBufferPayload_MemHandle | buffer payload with hardware memory handle for specific memory size. |
Definition at line 74 of file nvbuf_utils.h.
enum NvBufferTag |
Defines tags that identify the components requesting a memory allocation.
The tags can be used later to identify the total memory allocated to particular types of components.
Definition at line 134 of file nvbuf_utils.h.
Defines transform video filter types.
Definition at line 299 of file nvbuf_utils.h.
Defines flags to indicate for valid transform.
Definition at line 318 of file nvbuf_utils.h.
Defines video flip methods.
Definition at line 276 of file nvbuf_utils.h.
int ExtractFdFromNvBuffer | ( | void * | nvbuf, |
int * | dmabuf_fd | ||
) |
Extracts the dmabuf_fd
from the hardware buffer.
[in] | nvbuf | Specifies the hw_buffer . |
[out] | dmabuf_fd | Returns DMABUF FD of hw_buffer . |
int NvBuffer2Raw | ( | int | dmabuf_fd, |
unsigned int | plane, | ||
unsigned int | out_width, | ||
unsigned int | out_height, | ||
unsigned char * | ptr | ||
) |
Copies the NvBuffer plane contents to a raw buffer plane.
[in] | dmabuf_fd | DMABUF FD of NvBuffer. |
[in] | plane | video frame plane. |
[in] | out_width | aligned width of the raw data plane. |
[in] | out_height | aligned height of the raw data plane. |
[in] | ptr | pointer to the output raw plane data. |
int NvBufferComposite | ( | int * | src_dmabuf_fds, |
int | dst_dmabuf_fd, | ||
NvBufferCompositeParams * | composite_params | ||
) |
Composites multiple input DMA buffers to one output DMA buffer.
This function can composite multiple input frames to one output.
[in] | src_dmabuf_fds | An array of DMABUF FDs of source buffers. These buffers are composited together. Output is copied to the output buffer referenced by dst_dmabuf_fd. |
[in] | dst_dmabuf_fd | DMABUF FD of the compositing destination buffer. |
[in] | composite_params | Compositing parameters. |
int NvBufferCreate | ( | int * | dmabuf_fd, |
int | width, | ||
int | height, | ||
NvBufferLayout | layout, | ||
NvBufferColorFormat | colorFormat | ||
) |
Allocates a hardware buffer (deprecated).
[out] | dmabuf_fd | Returns the DMABUF FD of the hardware buffer. |
[in] | width | Buffer width, in bytes. |
[in] | height | Buffer height, in bytes. |
[in] | layout | Layout of the buffer. |
[in] | colorFormat | Color format of the buffer. |
int NvBufferCreateCompressed | ( | int * | dmabuf_fd, |
NvBufferCreateParams * | input_params | ||
) |
Allocates a hardware buffer with compression enabled.
[out] | dmabuf_fd | Returns the DMABUF FD of the hardware buffer. |
[in] | input_params | Input parameters for comprssed hardware buffer creation. |
int NvBufferCreateEx | ( | int * | dmabuf_fd, |
NvBufferCreateParams * | input_params | ||
) |
Allocates a hardware buffer.
[out] | dmabuf_fd | Returns the DMABUF FD of the hardware buffer. |
[in] | input_params | Input parameters for hardware buffer creation. |
int NvBufferCreateInterlace | ( | int * | dmabuf_fd, |
NvBufferCreateParams * | input_params | ||
) |
Allocates a hardware buffer for interlace scan format.
[out] | dmabuf_fd | Returns the DMABUF FD of the hardware buffer. |
[in] | input_params | Input parameters for hardware buffer creation. |
int NvBufferCreateWithChromaLoc | ( | int * | dmabuf_fd, |
NvBufferCreateParams * | input_params, | ||
NvBufferChromaSubsamplingParams * | chromaSubsampling | ||
) |
Allocates a hardware buffer with a given chroma subsampling location.
[in] | dmabuf_fd | DMABUF FD of the buffer. |
[in] | input_params | Input parameters for hardware buffer creation. |
[in] | chromaSubsampling | Chroma location parameters. |
int NvBufferDestroy | ( | int | dmabuf_fd | ) |
Destroys a hardware buffer.
[in] | dmabuf_fd | Specifies the dmabuf_fd hw_buffer to destroy. |
int NvBufferGetParams | ( | int | dmabuf_fd, |
NvBufferParams * | params | ||
) |
Gets buffer parameters.
[in] | dmabuf_fd | DMABUF FD of buffer. |
[out] | params | A pointer to the structure to fill with parameters. |
int NvBufferGetParamsEx | ( | int | dmabuf_fd, |
NvBufferParamsEx * | exparams | ||
) |
Gets buffer extended parameters.
[in] | dmabuf_fd | DMABUF FD of buffer. |
[out] | exparams | A pointer to the structure to fill with extended parameters. |
int NvBufferGetSize | ( | void | ) |
This method can be used to get hardware Buffer struct size.
int NvBufferImportFd | ( | int | in_dmabuf_fd, |
int * | out_dmabuf_fd, | ||
NvBufferParamsEx * | in_params | ||
) |
Imports DMA buffer FD received from another process and create hardware buffer using the input params to be used by calling process.
As of now physicaladdress, payloadmetaInfo, syncobj, nv_buffer, nv_buffer_size fields of NvBufferParamsEx are not required for this API so it can be zeroed. Rest all fields of NvBufferParamsEx needs to be filled properly for this API.
Calling process need to use Output DMA buffer FD for supported operations. After the intended use of the imported DMA buffer FD, Calling process must need to call NvBufferDestroy() to remove reference count for hardware buffer handle of the imported DMA buffer FD. Also input hardware DMABUF FD received from another process needs to be closed.
[in] | in_dmabuf_fd | Input hardware DMABUF FD received from another process. |
[out] | out_dmabuf_fd | Returns the Output hardware DMABUF FD to be used with calling process. |
[in] | in_params | Extended input parameters for a hardware buffer. |
int NvBufferMemMap | ( | int | dmabuf_fd, |
unsigned int | plane, | ||
NvBufferMemFlags | memflag, | ||
void ** | pVirtAddr | ||
) |
Gets the memory-mapped virtual address of the plane.
The client must call NvBufferMemSyncForCpu() with the virtual address returned by this function before accessing the mapped memory in CPU.
After memory mapping is complete, mapped memory modification must be coordinated between the CPU and hardware device as follows:
[in] | dmabuf_fd | DMABUF FD of buffer. |
[in] | plane | video frame plane.(Applies to NvBufferPayload_SurfArray.) |
[in] | memflag | NvBuffer memory flag. |
[out] | pVirtAddr | Virtual Address pointer of the memory-mapped plane. |
int NvBufferMemMapEx | ( | int | dmabuf_fd, |
NvBufferParamsEx * | exparams, | ||
unsigned int | plane, | ||
NvBufferMemFlags | memflag, | ||
void ** | pVirtAddr | ||
) |
Gets the memory-mapped virtual address of the plane, API to be used for another process.
The client must call NvBufferMemSyncForCpuEx() with the virtual address returned by this function before accessing the mapped memory in CPU in another process.
After memory mapping is complete, mapped memory modification must be coordinated between the CPU and hardware device as follows:
[in] | dmabuf_fd | DMABUF FD of buffer. |
[in] | exparams | extended parameters for a hardware buffer. |
[in] | plane | video frame plane.(Applies to NvBufferPayload_SurfArray.) |
[in] | memflag | NvBuffer memory flag. |
[out] | pVirtAddr | Virtual Address pointer of the memory-mapped plane. |
int NvBufferMemSyncForCpu | ( | int | dmabuf_fd, |
unsigned int | plane, | ||
void ** | pVirtAddr | ||
) |
Syncs the hardware memory cache for the CPU.
[in] | dmabuf_fd | DMABUF FD of buffer. |
[in] | plane | video frame plane. |
[in] | pVirtAddr | Virtual Address pointer of the memory-mapped plane. |
int NvBufferMemSyncForCpuEx | ( | int | dmabuf_fd, |
NvBufferParamsEx * | exparams, | ||
unsigned int | plane, | ||
void ** | pVirtAddr | ||
) |
Syncs the hardware memory cache for the CPU, API to be used for another process.
[in] | dmabuf_fd | DMABUF FD of buffer. |
[in] | exparams | extended parameters for a hardware buffer. |
[in] | plane | video frame plane. |
[in] | pVirtAddr | Virtual Address pointer of the memory-mapped plane. |
int NvBufferMemSyncForDevice | ( | int | dmabuf_fd, |
unsigned int | plane, | ||
void ** | pVirtAddr | ||
) |
Syncs the hardware memory cache for the device.
[in] | dmabuf_fd | DMABUF FD of buffer. |
[in] | plane | video frame plane. |
[in] | pVirtAddr | Virtual Address pointer of the memory-mapped plane. |
int NvBufferMemSyncForDeviceEx | ( | int | dmabuf_fd, |
NvBufferParamsEx * | exparams, | ||
unsigned int | plane, | ||
void ** | pVirtAddr | ||
) |
Syncs the hardware memory cache for the device, API to be used for another process.
[in] | dmabuf_fd | DMABUF FD of buffer. |
[in] | exparams | extended parameters for a hardware buffer. |
[in] | plane | video frame plane. |
[in] | pVirtAddr | Virtual Address pointer of the memory-mapped plane. |
int NvBufferMemUnMap | ( | int | dmabuf_fd, |
unsigned int | plane, | ||
void ** | pVirtAddr | ||
) |
Unmaps the mapped virtual address of the plane.
If the following conditions are both true, the client must call NvBufferMemSyncForDevice() before unmapping the memory:
[in] | dmabuf_fd | DMABUF FD of the buffer. |
[in] | plane | Video frame plane. Applies to NvBufferPayload_SurfArray. |
[in] | pVirtAddr | Virtual address pointer to the memory-mapped plane. |
int NvBufferMemUnMapEx | ( | int | dmabuf_fd, |
NvBufferParamsEx * | exparams, | ||
unsigned int | plane, | ||
void ** | pVirtAddr | ||
) |
Unmaps the mapped virtual address of the plane, API to be used for another process.
If the following conditions are both true, the client must call NvBufferMemSyncForDeviceEx() before unmapping the memory in another process:
[in] | dmabuf_fd | DMABUF FD of the buffer. |
[in] | exparams | extended parameters for a hardware buffer. |
[in] | plane | Video frame plane. Applies to NvBufferPayload_SurfArray. |
[in] | pVirtAddr | Virtual address pointer to the memory-mapped plane. |
NvBufferSession NvBufferSessionCreate | ( | void | ) |
Creates a new NvBufferSession for parallel scheduling of buffer transformations and compositions.
void NvBufferSessionDestroy | ( | NvBufferSession | session | ) |
Destroys an existing NvBufferSession.
[in] | session | An existing NvBufferSession. |
int NvBufferSyncObjParamsFromFile | ( | int | file, |
NvBufferSyncObjParams * | syncobjparams, | ||
unsigned int * | nparams | ||
) |
This method can be used to get sync point object parameters from sync point FD.
[in] | file | sync point file descriptor. |
[out] | syncobjparams | sync object parameters having size NVBUF_MAX_SYNCOBJ_PARAMS * sizeof(NvBufferSyncObjParams). |
[out] | nparams | number of sync object parameters. |
int NvBufferSyncObjWait | ( | NvBufferSyncObjParams * | syncobj_params, |
unsigned int | timeout | ||
) |
This method can be used to wait on sync point ID.
[in] | syncobj_params | sync point object parameters. |
[in] | timeout | sync point wait timeout value. |
int NvBufferTransform | ( | int | src_dmabuf_fd, |
int | dst_dmabuf_fd, | ||
NvBufferTransformParams * | transform_params | ||
) |
Transforms one DMA buffer to another DMA buffer.
This function can support transforms for copying, scaling, fliping, rotating, and cropping.
[in] | src_dmabuf_fd | DMABUF FD of source buffer |
[in] | dst_dmabuf_fd | DMABUF FD of destination buffer |
[in] | transform_params | transform parameters |
int NvBufferTransformAsync | ( | int | src_dmabuf_fd, |
int | dst_dmabuf_fd, | ||
NvBufferTransformParams * | transform_params, | ||
NvBufferSyncObj * | syncobj | ||
) |
Transforms one DMA buffer to another DMA buffer asyncroniously (non-blocking).
This function can support transforms for copying, scaling, fliping, rotating, and cropping.
[in] | src_dmabuf_fd | DMABUF FD of source buffer |
[in] | dst_dmabuf_fd | DMABUF FD of destination buffer |
[in] | transform_params | transform parameters |
[in] | syncobj | nvbuffer sync point object |
int NvBufferTransformEx | ( | int | src_dmabuf_fd, |
NvBufferParamsEx * | input_params, | ||
int | dst_dmabuf_fd, | ||
NvBufferParamsEx * | output_params, | ||
NvBufferTransformParams * | transform_params | ||
) |
Transforms one DMA buffer to another DMA buffer, API to be used for another process.
This function can support transforms for copying, scaling, fliping, rotating, and cropping.
[in] | src_dmabuf_fd | DMABUF FD of source buffer |
[in] | input_params | extended input parameters for a hardware buffer. |
[in] | dst_dmabuf_fd | DMABUF FD of destination buffer |
[in] | output_params | extended output parameters for a hardware buffer. |
[in] | transform_params | transform parameters |
int NvDestroyEGLImage | ( | EGLDisplay | display, |
EGLImageKHR | eglImage | ||
) |
Destroys an EGLImage object.
[in] | display | An EGLDisplay object used to destroy the EGLImage. If NULL, nvbuf_utils() uses its own instance of EGLDisplay. |
[in] | eglImage | The EGLImageKHR object to be destroyed. |
EGLImageKHR NvEGLImageFromFd | ( | EGLDisplay | display, |
int | dmabuf_fd | ||
) |
Creates an instance of EGLImage from a DMABUF FD.
[in] | display | An EGLDisplay object used during the creation of the EGLImage. If NULL, nvbuf_utils() uses its own instance of EGLDisplay. |
[in] | dmabuf_fd | DMABUF FD of the buffer from which the EGLImage is to be created. |
EGLImageKHR
for success, NULL
for failure int NvReleaseFd | ( | int | dmabuf_fd | ) |
Releases the dmabuf_fd
buffer.
[in] | dmabuf_fd | Specifies the dmabuf_fd to release. |
int Raw2NvBuffer | ( | unsigned char * | ptr, |
unsigned int | plane, | ||
unsigned int | in_width, | ||
unsigned int | in_height, | ||
int | dmabuf_fd | ||
) |
Copies raw buffer plane contents to an NvBuffer plane.
[in] | ptr | pointer to the input raw plane data. |
[in] | plane | video frame plane. |
[in] | in_width | aligned width of the raw data plane. |
[in] | in_height | aligned height of the raw data plane. |
[in] | dmabuf_fd | DMABUF FD of NvBuffer. |