NVIDIA DRIVE OS Linux API Reference

5.1.3.0 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Image Creation

Detailed Description

Defines and manages image objects.

NvMediaImages are video RAM surfaces storing YUV, RGBA or RAW data. They can store one or more images depending on the class. NvMediaImages are created with NvMediaImageCreateNew() and destroyed with NvMediaImageDestroy().

Data Structures

struct  NvMediaImage
 A handle representing image objects. More...
 
struct  NvMediaImageGroup
 A handle representing an image group. More...
 

Macros

#define NVMEDIA_MAX_AGGREGATE_IMAGES
 Maximum number of images in an aggregate image. More...
 
#define NVMEDIA_MAX_IMAGE_GROUP_SIZE
 Maximum number of images in an image group. More...
 
#define NVMEDIA_IMAGE_TIMEOUT_INFINITE
 Infinite time-out for NvMediaImageGetStatus. More...
 

Enumerations

enum  NvMediaBitsPerPixel {
  NVMEDIA_BITS_PER_PIXEL_8 = 0,
  NVMEDIA_BITS_PER_PIXEL_10,
  NVMEDIA_BITS_PER_PIXEL_12,
  NVMEDIA_BITS_PER_PIXEL_14,
  NVMEDIA_BITS_PER_PIXEL_16,
  NVMEDIA_BITS_PER_PIXEL_20
}
 Bits per pixel. More...
 
enum  NvMediaRawPixelOrder {
  NVMEDIA_RAW_PIXEL_ORDER_RGGB = 0,
  NVMEDIA_RAW_PIXEL_ORDER_BGGR,
  NVMEDIA_RAW_PIXEL_ORDER_GRBG,
  NVMEDIA_RAW_PIXEL_ORDER_GBRG
}
 Pixel order in a raw image. More...
 

Functions

NvMediaStatus NvMediaImageGetVersion (NvMediaVersion *version)
 Gets the version for the NvMedia Image library. More...
 
NvMediaImageNvMediaImageCreateNew (NvMediaDevice *device, NvMediaSurfaceType type, NvMediaSurfAllocAttr *attrs, uint32_t numAttrs, uint32_t flags)
 Allocates an image object. More...
 
void NvMediaImageDestroy (NvMediaImage *image)
 Destroys an image object that was created by NvMediaImageCreateNew. More...
 

Macro Definition Documentation

#define NVMEDIA_IMAGE_TIMEOUT_INFINITE

Infinite time-out for NvMediaImageGetStatus.

Definition at line 70 of file nvmedia_image.h.

#define NVMEDIA_MAX_AGGREGATE_IMAGES

Maximum number of images in an aggregate image.

Definition at line 58 of file nvmedia_image.h.

#define NVMEDIA_MAX_IMAGE_GROUP_SIZE

Maximum number of images in an image group.

Definition at line 64 of file nvmedia_image.h.

Enumeration Type Documentation

Bits per pixel.

Enumerator
NVMEDIA_BITS_PER_PIXEL_8 

8 bits per pixel.

NVMEDIA_BITS_PER_PIXEL_10 

10 bits per pixel.

NVMEDIA_BITS_PER_PIXEL_12 

12 bits per pixel.

NVMEDIA_BITS_PER_PIXEL_14 

14 bits per pixel.

NVMEDIA_BITS_PER_PIXEL_16 

16 bits per pixel.

NVMEDIA_BITS_PER_PIXEL_20 

20 bits per pixel.

Definition at line 117 of file nvmedia_image.h.

Pixel order in a raw image.

Enumerator
NVMEDIA_RAW_PIXEL_ORDER_RGGB 

RGGB order.

NVMEDIA_RAW_PIXEL_ORDER_BGGR 

BGGR order.

NVMEDIA_RAW_PIXEL_ORDER_GRBG 

GRBG order.

NVMEDIA_RAW_PIXEL_ORDER_GBRG 

GBRG order.

Definition at line 135 of file nvmedia_image.h.

Function Documentation

NvMediaImage* NvMediaImageCreateNew ( NvMediaDevice device,
NvMediaSurfaceType  type,
NvMediaSurfAllocAttr attrs,
uint32_t  numAttrs,
uint32_t  flags 
)

Allocates an image object.

Upon creation, the contents are in an undefined state.

Parameters
[in]deviceThe NvMediaDevice.
[in]typeSurface format type obtained from NvMediaSurfaceFormatGetType API.
[in]attrsAn array of surface alloc attributes for surface creation.
[in]numAttrsNumber of attributes in the array.
[in]flagsFlags for module hint (used in future).
Returns
NvMediaImage The new image's handle or NULL if unsuccessful.
void NvMediaImageDestroy ( NvMediaImage image)

Destroys an image object that was created by NvMediaImageCreateNew.

Parameters
[in]imageThe image to destroy.
Returns
void
NvMediaStatus NvMediaImageGetVersion ( NvMediaVersion version)

Gets the version for the NvMedia Image library.

Parameters
[in]versionA pointer to a NvMediaVersion structure of the client.
Returns
NvMediaStatus The status of the operation. Possible values are:
NVMEDIA_STATUS_OK
NVMEDIA_STATUS_BAD_PARAMETER if the pointer is invalid.