Structures#

The structures in the Video Effects SDK are defined in the following header files:

  • nvVideoEffects.h

  • nvCVImage.h

NvVFX_Handle#

typedef struct NvVFX_Object NvVFX_Object, *NvVFX_Handle;

This structure represents the opaque handle that is associated with each instance of a video effect filter. It is a pointer to an opaque object of type NvVFX_Object. Most video effect function calls include this handle as the first parameter.

Defined in: nvVideoEffects.h.

NvVFX_Object#

struct NvVFX_Object;

This is an opaque data structure that is allocated by the application and needs to be disposed of by the application after the effect is destroyed. It is always referenced by its pointer, which is an NvVFX_Handle.

Defined in: nvVideoEffects.h.

NvVFX_StateObjectHandle#

typedef struct NvVFX_StateObjectHandleBase *NvVFX_StateObjectHandle;

This pointer represents the opaque handle that is associated with each instance of a state variable that is used by the SDK effects. The NvVFX_AllocateState, NvVFX_DeallocateState, NvVFX_ResetState, and NvVFX_SetStateObjectHandleArray function calls include this handle as a parameter.

Defined in: nvVideoEffects.h.

NvVFX_StateObjectHandleBase#

struct NvVFX_StateObjectHandleBase;

This structure represents a state variable that is used by the SDK.

Defined in: nvVideoEffects.h.

NvCVImage#

For more information, refer to the NvCVImage API Guide.

typedef struct NvCVImage {
  unsigned int            width;
  unsigned int            height;
  unsigned int            pitch;
  NvCVImage_PixelFormat   pixelFormat;
  NvCVImage_ComponentType componentType;
  unsigned char           pixelBytes;
  unsigned char           componentBytes;
  unsigned char           numComponents;
  unsigned char           planar;
  unsigned char           gpuMem;
  unsigned char           colorspace;
  unsigned char           reserved[2];
  void                    *pixels;
  void                    *deletePtr;
  void                    (*deleteProc)(void *p);
  unsigned long long      bufferBytes;
} NvCVImage;

Members#

width

Type: unsigned int

The width, in pixels, of the image.

height

Type: unsigned int

The height, in pixels, of the image.

pitch

Type: unsigned int

The vertical byte stride between pixels.

pixelFormat

Type: NvCVImage_PixelFormat

The format of the pixels in the image.

componentType

Type: NvCVImage_ComponentType

The data type used to represent each component of the image.

pixelBytes

Type: unsigned char

The number of bytes in a chunky pixel.

componentBytes

Type: unsigned char

The number of bytes in each pixel component.

numComponents

Type: unsigned char

The number of components in each pixel.

planar

Type: unsigned char

Specifies the organization of the pixels in the image.

  • 0: Chunky

  • 1: Planar

gpuMem

Type: unsigned char

Specifies the type of memory in which the image data buffer is stored. The different types of memory have different address spaces.

  • 0: CPU memory

  • 1: CUDA memory

  • 2: pinned CPU memory

colorspace

Type: unsigned char

Specifies a logical OR group of YUV color space types; for example:

my422.colorspace = NVCV_709 | NVCV_VIDEO_RANGE | NVCV_CHROMA_COSITED;

For more information about the type definitions, refer to YUV Color Spaces.

Always set the colorspace for 420, 422, or 444 YUV images. The default colorspace is NVCV_601 | NVCV_VIDEO_RANGE | NVCV_CHROMA_COSITED.

reserved

Type: unsigned char[2]

Reserved for padding and future capabilities. Set this parameter to 0.

pixels

Type: void

Pointer to pixel (0,0) in the image.

deletePtr

Type: void

Buffer memory to be deleted (can be NULL).

deleteProc

Type: void

The function to call instead of free() to delete the pixel buffer. To call free(), set this parameter to NULL. The image allocators use free() for CPU buffers and cudaFree() for GPU buffers.

bufferBytes

Type: unsigned long long

The maximum amount of memory in bytes that is available through pixels.

Remarks#

This structure defines the properties of an image in an image buffer that is provided as input to an effect filter. The members can be set by using the setter functions as described in the NvCVImage API Guide.

Defined in: nvCVImage.h.