24 #ifndef _NVBUF_UTILS_H_
25 #define _NVBUF_UTILS_H_
33 #include <EGL/eglext.h>
36 #define MAX_NUM_PLANES 3
uint32_t layout[MAX_NUM_PLANES]
uint32_t psize[MAX_NUM_PLANES]
int NvBufferMemUnMap(int dmabuf_fd, unsigned int plane, void **pVirtAddr)
This method must be used to Unmap the mapped virtual Address of the plane.
int NvBufferMemSyncForCpu(int dmabuf_fd, unsigned int plane, void **pVirtAddr)
This method must be used for hw memory cache sync for the CPU.
int NvBufferMemMap(int dmabuf_fd, unsigned int plane, NvBufferMemFlags memflag, void **pVirtAddr)
This method must be used for getting mem mapped virtual Address of the plane.
uint32_t height[MAX_NUM_PLANES]
struct _NvBufferParams NvBufferParams
int NvBufferMemSyncForDevice(int dmabuf_fd, unsigned int plane, void **pVirtAddr)
This method must be used for hw memory cache sync for device.
uint32_t width[MAX_NUM_PLANES]
uint32_t pitch[MAX_NUM_PLANES]
int NvBufferCreate(int *dmabuf_fd, int width, int height, NvBufferLayout layout, NvBufferColorFormat colorFormat)
Use this method to allocate HW buffer.
EGLImageKHR NvEGLImageFromFd(EGLDisplay display, int dmabuf_fd)
This method must be used for getting EGLImage from dmabuf-fd.
uint32_t offset[MAX_NUM_PLANES]
int NvBufferGetParams(int dmabuf_fd, NvBufferParams *params)
Use this method to get buffer parameters.
int NvBufferDestroy(int dmabuf_fd)
This method must be used for destroying hw_buffer.
int NvDestroyEGLImage(EGLDisplay display, EGLImageKHR eglImage)
This method must be used for destroying EGLImage object.