Defines types and functions to handle image formats. More...
Go to the source code of this file.
Macros | |
#define | VPI_IMAGE_FORMAT_S8 VPI_DETAIL_MAKE_NONCOLOR_FMT1(PL, SIGNED, X000, X8) |
Single plane with one 8-bit signed integer channel. | |
#define | VPI_IMAGE_FORMAT_U16 VPI_DETAIL_MAKE_NONCOLOR_FMT1(PL, UNSIGNED, X000, X16) |
Single plane with one 16-bit unsigned integer channel. | |
#define | VPI_IMAGE_FORMAT_U32 VPI_DETAIL_MAKE_NONCOLOR_FMT1(PL, UNSIGNED, X000, X32) |
Single plane with one 32-bit unsigned integer channel. | |
#define | VPI_IMAGE_FORMAT_S32 VPI_DETAIL_MAKE_NONCOLOR_FMT1(PL, SIGNED, X000, X32) |
Single plane with one 32-bit signed integer channel. | |
#define | VPI_IMAGE_FORMAT_S16 VPI_DETAIL_MAKE_NONCOLOR_FMT1(PL, SIGNED, X000, X16) |
Single plane with one 16-bit signed integer channel. | |
#define | VPI_IMAGE_FORMAT_2S16 VPI_DETAIL_MAKE_NONCOLOR_FMT1(PL, SIGNED, XY00, X16_Y16) |
Single plane with two interleaved 16-bit signed integer channel. | |
#define | VPI_IMAGE_FORMAT_F32 VPI_DETAIL_MAKE_NONCOLOR_FMT1(PL, FLOAT, X000, X32) |
Single plane with one 32-bit floating point channel. | |
#define | VPI_IMAGE_FORMAT_F64 VPI_DETAIL_MAKE_NONCOLOR_FMT1(PL, FLOAT, X000, X64) |
Single plane with one 64-bit floating point channel. | |
#define | VPI_IMAGE_FORMAT_2F32 VPI_DETAIL_MAKE_NONCOLOR_FMT1(PL, FLOAT, XY00, X32_Y32) |
Single plane with two interleaved 32-bit floating point channels. | |
#define | VPI_IMAGE_FORMAT_Y8 VPI_DETAIL_MAKE_YCbCr_FMT1(BT601, NONE, PL, UNSIGNED, X000, X8) |
Single plane with one pitch-linear 8-bit unsigned integer channel with limited-range luma (grayscale) information. More... | |
#define | VPI_IMAGE_FORMAT_Y8_ER VPI_DETAIL_MAKE_YCbCr_FMT1(BT601_ER, NONE, PL, UNSIGNED, X000, X8) |
Single plane with one pitch-linear 8-bit unsigned integer channel with full-range luma (grayscale) information. More... | |
#define | VPI_IMAGE_FORMAT_Y16 VPI_DETAIL_MAKE_YCbCr_FMT1(BT601, NONE, PL, UNSIGNED, X000, X16) |
Single plane with one pitch-linear 16-bit unsigned integer channel with limited-range luma (grayscale) information. More... | |
#define | VPI_IMAGE_FORMAT_Y16_ER VPI_DETAIL_MAKE_YCbCr_FMT1(BT601_ER, NONE, PL, UNSIGNED, X000, X16) |
Single plane with one pitch-linear 16-bit unsigned integer channel with full-range luma (grayscale) information. More... | |
#define | VPI_IMAGE_FORMAT_NV12 VPI_DETAIL_MAKE_YCbCr_FMT2(BT601, 420, PL, UNSIGNED, XYZ0, X8, X8_Y8) |
YUV420sp 8-bit pitch-linear format with limited range. More... | |
#define | VPI_IMAGE_FORMAT_NV12_ER VPI_DETAIL_MAKE_YCbCr_FMT2(BT601_ER, 420, PL, UNSIGNED, XYZ0, X8, X8_Y8) |
YUV420sp 8-bit pitch-linear format with full range. More... | |
#define | VPI_IMAGE_FORMAT_NV24 VPI_DETAIL_MAKE_YCbCr_FMT2(BT601, 444, PL, UNSIGNED, XYZ0, X8, X8_Y8) |
YUV444sp 8-bit pitch-linear format with limited range. More... | |
#define | VPI_IMAGE_FORMAT_NV24_ER VPI_DETAIL_MAKE_YCbCr_FMT2(BT601_ER, 444, PL, UNSIGNED, XYZ0, X8, X8_Y8) |
YUV444sp 8-bit pitch-linear format with full range. More... | |
#define | VPI_IMAGE_FORMAT_UYVY VPI_DETAIL_MAKE_YCbCr_FMT1(BT601, 422, PL, UNSIGNED, XYZ1, Y8_X8__Z8_X8) |
YUV422 8-bit pitch-linear format in one plane with UYVY ordering and limited range. | |
#define | VPI_IMAGE_FORMAT_UYVY_ER VPI_DETAIL_MAKE_YCbCr_FMT1(BT601_ER, 422, PL, UNSIGNED, XYZ1, Y8_X8__Z8_X8) |
YUV422 8-bit pitch-linear format in one plane with UYVY ordering and full range. | |
#define | VPI_IMAGE_FORMAT_YUYV VPI_DETAIL_MAKE_YCbCr_FMT1(BT601, 422, PL, UNSIGNED, XYZ1, X8_Y8__X8_Z8) |
YUV422 8-bit pitch-linear format in one plane with YUYV ordering and limited range. More... | |
#define | VPI_IMAGE_FORMAT_YUYV_ER VPI_DETAIL_MAKE_YCbCr_FMT1(BT601_ER, 422, PL, UNSIGNED, XYZ1, X8_Y8__X8_Z8) |
YUV422 8-bit pitch-linear format in one plane with YUYV ordering and full range. More... | |
#define | VPI_IMAGE_FORMAT_RGB8 VPI_DETAIL_MAKE_COLOR_FMT1(RGB, UNDEFINED, PL, UNSIGNED, XYZ1, X8_Y8_Z8) |
Single plane with interleaved RGB 8-bit channel. | |
#define | VPI_IMAGE_FORMAT_BGR8 VPI_DETAIL_MAKE_COLOR_FMT1(RGB, UNDEFINED, PL, UNSIGNED, ZYX1, X8_Y8_Z8) |
Single plane with interleaved BGR 8-bit channel. | |
#define | VPI_IMAGE_FORMAT_RGBA8 VPI_DETAIL_MAKE_COLOR_FMT1(RGB, UNDEFINED, PL, UNSIGNED, XYZW, X8_Y8_Z8_W8) |
Single plane with interleaved RGBA 8-bit channel. | |
#define | VPI_IMAGE_FORMAT_BGRA8 VPI_DETAIL_MAKE_COLOR_FMT1(RGB, UNDEFINED, PL, UNSIGNED, ZYXW, X8_Y8_Z8_W8) |
Single plane with interleaved BGRA 8-bit channel. | |
#define | VPI_IMAGE_FORMAT_RGB8p VPI_DETAIL_MAKE_COLOR_FMT3(RGB, UNDEFINED, PL, UNSIGNED, XYZ1, X8, X8, X8) |
Planar RGB with unsigned 8-bit channels. | |
#define | VPI_IMAGE_FORMAT_BGR8p VPI_DETAIL_MAKE_COLOR_FMT3(RGB, UNDEFINED, PL, UNSIGNED, ZYX1, X8, X8, X8) |
Planar BGR with unsigned 8-bit channels. | |
#define | VPI_IMAGE_FORMAT_RGBA8p VPI_DETAIL_MAKE_COLOR_FMT4(RGB, UNDEFINED, PL, UNSIGNED, XYZW, X8, X8, X8, X8) |
Planar RGBA with unsigned 8-bit channels. | |
#define | VPI_IMAGE_FORMAT_BGRA8p VPI_DETAIL_MAKE_COLOR_FMT4(RGB, UNDEFINED, PL, UNSIGNED, ZYXW, X8, X8, X8, X8) |
Planar BGRA with unsigned 8-bit channels. | |
#define | VPI_MAKE_YCbCr_IMAGE_FORMAT_ABBREV(colorSpec, chromaSubsamp, memLayout, dataType, swizzle, numPlanes, packing0, packing1, ...) |
Creates a user-defined YCbCr color image format constant using abbreviated parameters. More... | |
#define | VPI_MAKE_YCbCr_IMAGE_FORMAT(colorModel, colorSpec, chromaSubsamp, memLayout, dataType, swizzle, numPlanes, packing0, packing1, ...) |
Creates a user-defined YCbCr color image format constant. More... | |
#define | VPI_MAKE_COLOR_IMAGE_FORMAT_ABBREV(colorModel, colorSpec, memLayout, dataType, swizzle, numPlanes, packing0, packing1, ...) |
Creates a user-defined color image format constant using abbreviated parameters. More... | |
#define | VPI_MAKE_COLOR_IMAGE_FORMAT(colorModel, colorSpec, memLayout, dataType, swizzle, numPlanes, packing0, packing1, ...) |
Creates a user-defined color image format constant. More... | |
#define | VPI_MAKE_NONCOLOR_IMAGE_FORMAT_ABBREV(memLayout, dataType, swizzle, numPlanes, packing0, packing1, ...) |
Creates a user-defined non-color image format constant using abbreviated parameters. More... | |
#define | VPI_MAKE_NONCOLOR_IMAGE_FORMAT(memLayout, dataType, swizzle, numPlanes, packing0, packing1, ...) |
Creates a user-defined non-color image format constant. More... | |
#define | VPI_MAKE_RAW_IMAGE_FORMAT_ABBREV(rawPattern, memLayout, dataType, numPlanes, swizzle, packing) |
Creates a user-defined raw (Bayer pattern) image format constant using abbreviated parameters. More... | |
#define | VPI_MAKE_RAW_IMAGE_FORMAT(rawPattern, memLayout, dataType, numPlanes, swizzle, packing) |
Creates a user-defined raw (Bayer pattern) image format constant. More... | |
#define | VPI_IMAGE_FORMAT_S16_BL VPI_DETAIL_MAKE_NONCOLOR_FMT1(BL, SIGNED, X000, X16) |
Single plane with one block-linear 16-bit signed integer channel. | |
#define | VPI_IMAGE_FORMAT_S16_BL16 VPI_DETAIL_MAKE_NONCOLOR_FMT1(BLOCK16_LINEAR, SIGNED, X000, X16) |
Single plane with one block-linear 16-bit signed integer channel. | |
#define | VPI_IMAGE_FORMAT_2S16_BL VPI_DETAIL_MAKE_NONCOLOR_FMT1(BL, SIGNED, XY00, X16_Y16) |
Single plane with two interleaved block-linear 16-bit signed integer channel. | |
#define | VPI_IMAGE_FORMAT_2S16_BL16 VPI_DETAIL_MAKE_NONCOLOR_FMT1(BLOCK16_LINEAR, SIGNED, XY00, X16_Y16) |
Single plane with two interleaved block-linear 16-bit signed integer channel. | |
#define | VPI_IMAGE_FORMAT_Y8_BL VPI_DETAIL_MAKE_YCbCr_FMT1(BT601, NONE, BL, UNSIGNED, X000, X8) |
Single plane with one block-linear 8-bit unsigned integer channel with limited-range luma (grayscale) information. More... | |
#define | VPI_IMAGE_FORMAT_Y8_BL16 VPI_DETAIL_MAKE_YCbCr_FMT1(BT601, NONE, BLOCK16_LINEAR, UNSIGNED, X000, X8) |
Single plane with one block-linear 8-bit unsigned integer channel with limited-range luma (grayscale) information. More... | |
#define | VPI_IMAGE_FORMAT_Y8_ER_BL VPI_DETAIL_MAKE_YCbCr_FMT1(BT601_ER, NONE, BL, UNSIGNED, X000, X8) |
Single plane with one block-linear 8-bit unsigned integer channel with full-range luma (grayscale) information. More... | |
#define | VPI_IMAGE_FORMAT_Y8_ER_BL16 VPI_DETAIL_MAKE_YCbCr_FMT1(BT601_ER, NONE, BLOCK16_LINEAR, UNSIGNED, X000, X8) |
Single plane with one block-linear 8-bit unsigned integer channel with full-range luma (grayscale) information. More... | |
#define | VPI_IMAGE_FORMAT_Y16_BL VPI_DETAIL_MAKE_YCbCr_FMT1(BT601, NONE, BL, UNSIGNED, X000, X16) |
Single plane with one block-linear 16-bit unsigned integer channel with limited-range luma (grayscale) information. More... | |
#define | VPI_IMAGE_FORMAT_Y16_BL16 VPI_DETAIL_MAKE_YCbCr_FMT1(BT601, NONE, BLOCK16_LINEAR, UNSIGNED, X000, X16) |
Single plane with one block-linear 16-bit unsigned integer channel with limited-range luma (grayscale) information. More... | |
#define | VPI_IMAGE_FORMAT_Y16_ER_BL VPI_DETAIL_MAKE_YCbCr_FMT1(BT601_ER, NONE, BL, UNSIGNED, X000, X16) |
Single plane with one block-linear 16-bit unsigned integer channel with full-range luma (grayscale) information. More... | |
#define | VPI_IMAGE_FORMAT_Y16_ER_BL16 VPI_DETAIL_MAKE_YCbCr_FMT1(BT601_ER, NONE, BLOCK16_LINEAR, UNSIGNED, X000, X16) |
Single plane with one block-linear 16-bit unsigned integer channel with full-range luma (grayscale) information. More... | |
#define | VPI_IMAGE_FORMAT_NV12_BL VPI_DETAIL_MAKE_YCbCr_FMT2(BT601, 420, BL, UNSIGNED, XYZ0, X8, X8_Y8) |
YUV420sp 8-bit block-linear format with limited range. More... | |
#define | VPI_IMAGE_FORMAT_NV12_BL16 VPI_DETAIL_MAKE_YCbCr_FMT2(BT601, 420, BLOCK16_LINEAR, UNSIGNED, XYZ0, X8, X8_Y8) |
YUV420sp 8-bit block-linear format with limited range. More... | |
#define | VPI_IMAGE_FORMAT_NV12_ER_BL VPI_DETAIL_MAKE_YCbCr_FMT2(BT601_ER, 420, BL, UNSIGNED, XYZ0, X8, X8_Y8) |
YUV420sp 8-bit block-linear format with full range. More... | |
#define | VPI_IMAGE_FORMAT_NV12_ER_BL16 VPI_DETAIL_MAKE_YCbCr_FMT2(BT601_ER, 420, BLOCK16_LINEAR, UNSIGNED, XYZ0, X8, X8_Y8) |
YUV420sp 8-bit block-linear format with full range. More... | |
#define | VPI_IMAGE_FORMAT_NV24_BL VPI_DETAIL_MAKE_YCbCr_FMT2(BT601, 444, BL, UNSIGNED, XYZ0, X8, X8_Y8) |
YUV444sp 8-bit block-linear format with limited range. More... | |
#define | VPI_IMAGE_FORMAT_NV24_BL16 VPI_DETAIL_MAKE_YCbCr_FMT2(BT601, 444, BLOCK16_LINEAR, UNSIGNED, XYZ0, X8, X8_Y8) |
YUV444sp 8-bit block-linear format with limited range. More... | |
#define | VPI_IMAGE_FORMAT_NV24_ER_BL VPI_DETAIL_MAKE_YCbCr_FMT2(BT601_ER, 444, BL, UNSIGNED, XYZ0, X8, X8_Y8) |
YUV444sp 8-bit block-linear format with full range. More... | |
#define | VPI_IMAGE_FORMAT_NV24_ER_BL16 VPI_DETAIL_MAKE_YCbCr_FMT2(BT601_ER, 444, BLOCK16_LINEAR, UNSIGNED, XYZ0, X8, X8_Y8) |
YUV444sp 8-bit block-linear format with full range. More... | |
#define | VPI_IMAGE_FORMAT_UYVY_BL VPI_DETAIL_MAKE_YCbCr_FMT1(BT601, 422, BL, UNSIGNED, XYZ1, Y8_X8__Z8_X8) |
YUV422 8-bit block-linear format in one plane with UYVY ordering and limited range. | |
#define | VPI_IMAGE_FORMAT_UYVY_BL16 VPI_DETAIL_MAKE_YCbCr_FMT1(BT601, 422, BLOCK16_LINEAR, UNSIGNED, XYZ1, Y8_X8__Z8_X8) |
YUV422 8-bit block-linear format in one plane with UYVY ordering and limited range. | |
#define | VPI_IMAGE_FORMAT_UYVY_ER_BL VPI_DETAIL_MAKE_YCbCr_FMT1(BT601_ER, 422, BL, UNSIGNED, XYZ1, Y8_X8__Z8_X8) |
YUV422 8-bit block-linear format in one plane with UYVY ordering and full range. | |
#define | VPI_IMAGE_FORMAT_UYVY_ER_BL16 VPI_DETAIL_MAKE_YCbCr_FMT1(BT601_ER, 422, BLOCK16_LINEAR, UNSIGNED, XYZ1, Y8_X8__Z8_X8) |
YUV422 8-bit block-linear format in one plane with UYVY ordering and full range. | |
#define | VPI_IMAGE_FORMAT_YUYV_BL VPI_DETAIL_MAKE_YCbCr_FMT1(BT601, 422, BL, UNSIGNED, XYZ1, X8_Y8__X8_Z8) |
YUV422 8-bit block-linear format in one plane with YUYV ordering and limited range. More... | |
#define | VPI_IMAGE_FORMAT_YUYV_BL16 VPI_DETAIL_MAKE_YCbCr_FMT1(BT601, 422, BLOCK16_LINEAR, UNSIGNED, XYZ1, X8_Y8__X8_Z8) |
YUV422 8-bit block-linear format in one plane with YUYV ordering and limited range. More... | |
#define | VPI_IMAGE_FORMAT_YUYV_ER_BL VPI_DETAIL_MAKE_YCbCr_FMT1(BT601_ER, 422, BL, UNSIGNED, XYZ1, X8_Y8__X8_Z8) |
YUV422 8-bit block-linear format in one plane with YUYV ordering and full range. More... | |
#define | VPI_IMAGE_FORMAT_YUYV_ER_BL16 VPI_DETAIL_MAKE_YCbCr_FMT1(BT601_ER, 422, BLOCK16_LINEAR, UNSIGNED, XYZ1, X8_Y8__X8_Z8) |
YUV422 8-bit block-linear format in one plane with YUYV ordering and full range. More... | |
Functions | |
VPIImageFormat | vpiMakeYCbCrImageFormat (VPIColorSpec colorSpec, VPIChromaSubsampling chromaSub, VPIMemLayout memLayout, VPIDataType dataType, VPISwizzle swizzle, VPIPacking packing0, VPIPacking packing1, VPIPacking packing2, VPIPacking packing3) |
Creates a user-defined YCbCr color image format. More... | |
VPIImageFormat | vpiMakeColorImageFormat (VPIColorModel colorModel, VPIColorSpec colorSpec, VPIMemLayout memLayout, VPIDataType dataType, VPISwizzle swizzle, VPIPacking packing0, VPIPacking packing1, VPIPacking packing2, VPIPacking packing3) |
Creates a user-defined color image format. More... | |
VPIImageFormat | vpiMakeNonColorImageFormat (VPIMemLayout memLayout, VPIDataType dataType, VPISwizzle swizzle, VPIPacking packing0, VPIPacking packing1, VPIPacking packing2, VPIPacking packing3) |
Creates a user-defined non-color image format. More... | |
VPIImageFormat | vpiMakeRawImageFormat (VPIRawPattern rawPattern, VPIMemLayout memLayout, VPIDataType dataType, VPISwizzle swizzle, VPIPacking packing0, VPIPacking packing1, VPIPacking packing2, VPIPacking packing3) |
Creates a user-defined raw image format. More... | |
VPIImageFormat | vpiMakeImageFormatFromFourCC (uint32_t fourcc, VPIColorSpec colorSpec, VPIMemLayout memLayout) |
Creates a image format from a FourCC code. More... | |
uint32_t | vpiImageFormatGetFourCC (VPIImageFormat fmt) |
Returns the FourCC code corresponding to an image format. More... | |
VPIPacking | vpiImageFormatGetPlanePacking (VPIImageFormat fmt, int plane) |
Get the packing for a given plane of an image format. More... | |
int32_t | vpiImageFormatGetPlaneWidth (VPIImageFormat fmt, int32_t imgWidth, int plane) |
Get the plane width of an image with the given image format and width. More... | |
int32_t | vpiImageFormatGetPlaneHeight (VPIImageFormat fmt, int32_t imgHeight, int plane) |
Get the plane height of an image with the given image format and height. More... | |
VPIImageFormat | vpiImageFormatSetSwizzleAndPacking (VPIImageFormat fmt, VPISwizzle swizzle, VPIPacking packing0, VPIPacking packing1, VPIPacking packing2, VPIPacking packing3) |
Replaces the swizzle and packing of an existing image format. More... | |
int | vpiImageFormatGetPlaneBitsPerPixel (VPIImageFormat fmt, int plane) |
Get the image format's plane bits per pixel count. More... | |
VPIImageFormat | vpiImageFormatSetDataType (VPIImageFormat fmt, VPIDataType dataType) |
Set the image format's data type. More... | |
VPIDataType | vpiImageFormatGetDataType (VPIImageFormat fmt) |
Get the image format's data type. More... | |
VPISwizzle | vpiImageFormatGetSwizzle (VPIImageFormat fmt) |
Get the image format's channel swizzle operation. More... | |
VPISwizzle | vpiImageFormatGetPlaneSwizzle (VPIImageFormat fmt, int plane) |
Get the swizzle operation of the given image format's plane. More... | |
VPIImageFormat | vpiImageFormatSetMemLayout (VPIImageFormat fmt, VPIMemLayout memLayout) |
Set the image format's memory layout. More... | |
VPIMemLayout | vpiImageFormatGetMemLayout (VPIImageFormat fmt) |
Get the image format's memory layout. More... | |
VPIImageFormat | vpiImageFormatSetColorSpec (VPIImageFormat fmt, VPIColorSpec colorSpec) |
Set the image format's color standard. More... | |
VPIColorSpec | vpiImageFormatGetColorSpec (VPIImageFormat fmt) |
Get the image format's color standard. More... | |
VPIColorModel | vpiImageFormatGetColorModel (VPIImageFormat fmt) |
Get the image format's color model. More... | |
VPIImageFormat | vpiImageFormatSetChromaSubsampling (VPIImageFormat fmt, VPIChromaSubsampling css) |
Set the image format's chroma subsampling type. More... | |
VPIChromaSubsampling | vpiImageFormatGetChromaSubsampling (VPIImageFormat fmt) |
Get the image format's chroma subsampling type. More... | |
int | vpiImageFormatGetPlaneChannelCount (VPIImageFormat fmt, int plane) |
Get the number of channels in a plane of an image format. More... | |
int | vpiImageFormatGetPlaneCount (VPIImageFormat fmt) |
Get the number of planes of an image format. More... | |
int | vpiImageFormatGetChannelCount (VPIImageFormat fmt) |
Get the total number of channels of an image format. More... | |
void | vpiImageFormatGetBitsPerChannel (VPIImageFormat fmt, int32_t *bits) |
Get the image format's bit size for each channel. More... | |
VPIPixelType | vpiImageFormatGetPlanePixelType (VPIImageFormat fmt, int plane) |
Get the pixel type of image format's plane. More... | |
VPIImageFormat | vpiImageFormatGetPlaneFormat (VPIImageFormat fmt, int plane) |
Get the plane format of an image format. More... | |
VPIImageFormat | vpiMakeImageFormatFromPlanes (VPIImageFormat plane0, VPIImageFormat plane1, VPIImageFormat plane2, VPIImageFormat plane3) |
Constructs an image format given the format of each plane. More... | |
const char * | vpiImageFormatGetName (VPIImageFormat fmt) |
Returns a string representation of the image format. More... | |
VPIRawPattern | vpiImageFormatGetRawPattern (VPIImageFormat fmt) |
Returns the raw color pattern of the image format. More... | |
VPIImageFormat | vpiImageFormatSetRawPattern (VPIImageFormat fmt, VPIRawPattern rawPattern) |
Sets the raw color pattern of the image format. More... | |
int | vpiImageFormatHasSameDataLayout (VPIImageFormat a, VPIImageFormat b) |
Returns whether the image formats have the same data layout. More... | |
#define | VPI_IMAGE_FORMAT_INVALID ((VPIImageFormat)0) |
Denotes an invalid image format. | |
#define | VPI_IMAGE_FORMAT_U8 VPI_DETAIL_MAKE_NONCOLOR_FMT1(PL, UNSIGNED, X000, X8) |
Single plane with one 8-bit unsigned integer channel. | |
#define | VPI_IMAGE_FORMAT_U8_BL VPI_DETAIL_MAKE_NONCOLOR_FMT1(BL, UNSIGNED, X000, X8) |
Single plane with one block-linear 8-bit unsigned integer channel. | |
#define | VPI_IMAGE_FORMAT_U8_BL16 VPI_DETAIL_MAKE_NONCOLOR_FMT1(BLOCK16_LINEAR, UNSIGNED, X000, X8) |
Denotes an invalid image format. | |
typedef uint64_t | VPIImageFormat |
Pre-defined image formats. More... | |
Defines types and functions to handle image formats.
Definition in file ImageFormat.h.
#define VPI_IMAGE_FORMAT_Y8 VPI_DETAIL_MAKE_YCbCr_FMT1(BT601, NONE, PL, UNSIGNED, X000, X8) |
Single plane with one pitch-linear 8-bit unsigned integer channel with limited-range luma (grayscale) information.
Values range from 16 to 235. Below this range is considered black, above is considered white.
Definition at line 147 of file ImageFormat.h.
#define VPI_IMAGE_FORMAT_Y8_BL VPI_DETAIL_MAKE_YCbCr_FMT1(BT601, NONE, BL, UNSIGNED, X000, X8) |
Single plane with one block-linear 8-bit unsigned integer channel with limited-range luma (grayscale) information.
Values range from 16 to 235. Below this range is considered black, above is considered white.
Definition at line 152 of file ImageFormat.h.
#define VPI_IMAGE_FORMAT_Y8_BL16 VPI_DETAIL_MAKE_YCbCr_FMT1(BT601, NONE, BLOCK16_LINEAR, UNSIGNED, X000, X8) |
Single plane with one block-linear 8-bit unsigned integer channel with limited-range luma (grayscale) information.
Values range from 16 to 235. Below this range is considered black, above is considered white.
Definition at line 153 of file ImageFormat.h.
#define VPI_IMAGE_FORMAT_Y8_ER VPI_DETAIL_MAKE_YCbCr_FMT1(BT601_ER, NONE, PL, UNSIGNED, X000, X8) |
Single plane with one pitch-linear 8-bit unsigned integer channel with full-range luma (grayscale) information.
Values range from 0 to 255.
Definition at line 159 of file ImageFormat.h.
#define VPI_IMAGE_FORMAT_Y8_ER_BL VPI_DETAIL_MAKE_YCbCr_FMT1(BT601_ER, NONE, BL, UNSIGNED, X000, X8) |
Single plane with one block-linear 8-bit unsigned integer channel with full-range luma (grayscale) information.
Values range from 0 to 255.
Definition at line 164 of file ImageFormat.h.
#define VPI_IMAGE_FORMAT_Y8_ER_BL16 VPI_DETAIL_MAKE_YCbCr_FMT1(BT601_ER, NONE, BLOCK16_LINEAR, UNSIGNED, X000, X8) |
Single plane with one block-linear 8-bit unsigned integer channel with full-range luma (grayscale) information.
Values range from 0 to 255.
Definition at line 165 of file ImageFormat.h.
#define VPI_IMAGE_FORMAT_Y16 VPI_DETAIL_MAKE_YCbCr_FMT1(BT601, NONE, PL, UNSIGNED, X000, X16) |
Single plane with one pitch-linear 16-bit unsigned integer channel with limited-range luma (grayscale) information.
Values range from 4096 to 60160. Below this range is considered black, above is considered white.
Definition at line 171 of file ImageFormat.h.
#define VPI_IMAGE_FORMAT_Y16_BL VPI_DETAIL_MAKE_YCbCr_FMT1(BT601, NONE, BL, UNSIGNED, X000, X16) |
Single plane with one block-linear 16-bit unsigned integer channel with limited-range luma (grayscale) information.
Values range from 4096 to 60160. Below this range is considered black, above is considered white.
Definition at line 176 of file ImageFormat.h.
#define VPI_IMAGE_FORMAT_Y16_BL16 VPI_DETAIL_MAKE_YCbCr_FMT1(BT601, NONE, BLOCK16_LINEAR, UNSIGNED, X000, X16) |
Single plane with one block-linear 16-bit unsigned integer channel with limited-range luma (grayscale) information.
Values range from 4096 to 60160. Below this range is considered black, above is considered white.
Definition at line 177 of file ImageFormat.h.
#define VPI_IMAGE_FORMAT_Y16_ER VPI_DETAIL_MAKE_YCbCr_FMT1(BT601_ER, NONE, PL, UNSIGNED, X000, X16) |
Single plane with one pitch-linear 16-bit unsigned integer channel with full-range luma (grayscale) information.
Values range from 0 to 65535.
Definition at line 183 of file ImageFormat.h.
#define VPI_IMAGE_FORMAT_Y16_ER_BL VPI_DETAIL_MAKE_YCbCr_FMT1(BT601_ER, NONE, BL, UNSIGNED, X000, X16) |
Single plane with one block-linear 16-bit unsigned integer channel with full-range luma (grayscale) information.
Values range from 0 to 65535.
Definition at line 188 of file ImageFormat.h.
#define VPI_IMAGE_FORMAT_Y16_ER_BL16 VPI_DETAIL_MAKE_YCbCr_FMT1(BT601_ER, NONE, BLOCK16_LINEAR, UNSIGNED, X000, X16) |
Single plane with one block-linear 16-bit unsigned integer channel with full-range luma (grayscale) information.
Values range from 0 to 65535.
Definition at line 189 of file ImageFormat.h.
#define VPI_IMAGE_FORMAT_NV12 VPI_DETAIL_MAKE_YCbCr_FMT2(BT601, 420, PL, UNSIGNED, XYZ0, X8, X8_Y8) |
YUV420sp 8-bit pitch-linear format with limited range.
Format is composed of two planes:
Definition at line 200 of file ImageFormat.h.
#define VPI_IMAGE_FORMAT_NV12_BL VPI_DETAIL_MAKE_YCbCr_FMT2(BT601, 420, BL, UNSIGNED, XYZ0, X8, X8_Y8) |
YUV420sp 8-bit block-linear format with limited range.
Format is composed of two planes:
Definition at line 210 of file ImageFormat.h.
#define VPI_IMAGE_FORMAT_NV12_BL16 VPI_DETAIL_MAKE_YCbCr_FMT2(BT601, 420, BLOCK16_LINEAR, UNSIGNED, XYZ0, X8, X8_Y8) |
YUV420sp 8-bit block-linear format with limited range.
Format is composed of two planes:
Definition at line 211 of file ImageFormat.h.
#define VPI_IMAGE_FORMAT_NV12_ER VPI_DETAIL_MAKE_YCbCr_FMT2(BT601_ER, 420, PL, UNSIGNED, XYZ0, X8, X8_Y8) |
YUV420sp 8-bit pitch-linear format with full range.
Format is composed of two planes:
Definition at line 222 of file ImageFormat.h.
#define VPI_IMAGE_FORMAT_NV12_ER_BL VPI_DETAIL_MAKE_YCbCr_FMT2(BT601_ER, 420, BL, UNSIGNED, XYZ0, X8, X8_Y8) |
YUV420sp 8-bit block-linear format with full range.
Format is composed of two planes:
Definition at line 232 of file ImageFormat.h.
#define VPI_IMAGE_FORMAT_NV12_ER_BL16 VPI_DETAIL_MAKE_YCbCr_FMT2(BT601_ER, 420, BLOCK16_LINEAR, UNSIGNED, XYZ0, X8, X8_Y8) |
YUV420sp 8-bit block-linear format with full range.
Format is composed of two planes:
Definition at line 233 of file ImageFormat.h.
#define VPI_IMAGE_FORMAT_NV24 VPI_DETAIL_MAKE_YCbCr_FMT2(BT601, 444, PL, UNSIGNED, XYZ0, X8, X8_Y8) |
YUV444sp 8-bit pitch-linear format with limited range.
Format is composed of two planes:
Definition at line 244 of file ImageFormat.h.
#define VPI_IMAGE_FORMAT_NV24_BL VPI_DETAIL_MAKE_YCbCr_FMT2(BT601, 444, BL, UNSIGNED, XYZ0, X8, X8_Y8) |
YUV444sp 8-bit block-linear format with limited range.
Format is composed of two planes:
Definition at line 253 of file ImageFormat.h.
#define VPI_IMAGE_FORMAT_NV24_BL16 VPI_DETAIL_MAKE_YCbCr_FMT2(BT601, 444, BLOCK16_LINEAR, UNSIGNED, XYZ0, X8, X8_Y8) |
YUV444sp 8-bit block-linear format with limited range.
Format is composed of two planes:
Definition at line 254 of file ImageFormat.h.
#define VPI_IMAGE_FORMAT_NV24_ER VPI_DETAIL_MAKE_YCbCr_FMT2(BT601_ER, 444, PL, UNSIGNED, XYZ0, X8, X8_Y8) |
YUV444sp 8-bit pitch-linear format with full range.
Format is composed of two planes:
Definition at line 264 of file ImageFormat.h.
#define VPI_IMAGE_FORMAT_NV24_ER_BL VPI_DETAIL_MAKE_YCbCr_FMT2(BT601_ER, 444, BL, UNSIGNED, XYZ0, X8, X8_Y8) |
YUV444sp 8-bit block-linear format with full range.
Format is composed of two planes:
Definition at line 273 of file ImageFormat.h.
#define VPI_IMAGE_FORMAT_NV24_ER_BL16 VPI_DETAIL_MAKE_YCbCr_FMT2(BT601_ER, 444, BLOCK16_LINEAR, UNSIGNED, XYZ0, X8, X8_Y8) |
YUV444sp 8-bit block-linear format with full range.
Format is composed of two planes:
Definition at line 274 of file ImageFormat.h.
#define VPI_IMAGE_FORMAT_YUYV VPI_DETAIL_MAKE_YCbCr_FMT1(BT601, 422, PL, UNSIGNED, XYZ1, X8_Y8__X8_Z8) |
YUV422 8-bit pitch-linear format in one plane with YUYV ordering and limited range.
Also known as YUY2 format.
Definition at line 298 of file ImageFormat.h.
#define VPI_IMAGE_FORMAT_YUYV_BL VPI_DETAIL_MAKE_YCbCr_FMT1(BT601, 422, BL, UNSIGNED, XYZ1, X8_Y8__X8_Z8) |
YUV422 8-bit block-linear format in one plane with YUYV ordering and limited range.
Also known as YUY2 format.
Definition at line 303 of file ImageFormat.h.
#define VPI_IMAGE_FORMAT_YUYV_BL16 VPI_DETAIL_MAKE_YCbCr_FMT1(BT601, 422, BLOCK16_LINEAR, UNSIGNED, XYZ1, X8_Y8__X8_Z8) |
YUV422 8-bit block-linear format in one plane with YUYV ordering and limited range.
Also known as YUY2 format.
Definition at line 304 of file ImageFormat.h.
#define VPI_IMAGE_FORMAT_YUYV_ER VPI_DETAIL_MAKE_YCbCr_FMT1(BT601_ER, 422, PL, UNSIGNED, XYZ1, X8_Y8__X8_Z8) |
YUV422 8-bit pitch-linear format in one plane with YUYV ordering and full range.
Also known as YUY2 format.
Definition at line 310 of file ImageFormat.h.
#define VPI_IMAGE_FORMAT_YUYV_ER_BL VPI_DETAIL_MAKE_YCbCr_FMT1(BT601_ER, 422, BL, UNSIGNED, XYZ1, X8_Y8__X8_Z8) |
YUV422 8-bit block-linear format in one plane with YUYV ordering and full range.
Also known as YUY2 format.
Definition at line 315 of file ImageFormat.h.
#define VPI_IMAGE_FORMAT_YUYV_ER_BL16 VPI_DETAIL_MAKE_YCbCr_FMT1(BT601_ER, 422, BLOCK16_LINEAR, UNSIGNED, XYZ1, X8_Y8__X8_Z8) |
YUV422 8-bit block-linear format in one plane with YUYV ordering and full range.
Also known as YUY2 format.
Definition at line 316 of file ImageFormat.h.
#define VPI_MAKE_YCbCr_IMAGE_FORMAT_ABBREV | ( | colorSpec, | |
chromaSubsamp, | |||
memLayout, | |||
dataType, | |||
swizzle, | |||
numPlanes, | |||
packing0, | |||
packing1, | |||
... | |||
) |
Creates a user-defined YCbCr color image format constant using abbreviated parameters.
This macro allows passing abbreviated format parameters (without the parameter type prefix). Example to create a YUV422 ITU-R BT.709 studio-range block-linear format.
Fourth plane, packing3, must have at most 64bpp.
[in] | colorSpec | VPIColorSpec to be used, without the VPI_COLOR_SPEC_ prefix. |
[in] | chromaSubsamp | VPIChromaSubsampling to be used, without the VPI_CSS_ prefix. |
[in] | memLayout | VPIMemLayout to be used, without the VPI_MEM_LAYOUT_ prefix. |
[in] | dataType | VPIDataType to be used, without the VPI_DATA_TYPE_ prefix. |
[in] | swizzle | VPISwizzle operation to be performed on the channels, without the VPI_SWIZZLE_ prefix. |
[in] | numPlanes | Number of planes this format has. |
[in] | packing0,packing1,... | Format packing of each plane, without the VPI_PACKING_ prefix. |
Definition at line 365 of file ImageFormat.h.
#define VPI_MAKE_YCbCr_IMAGE_FORMAT | ( | colorModel, | |
colorSpec, | |||
chromaSubsamp, | |||
memLayout, | |||
dataType, | |||
swizzle, | |||
numPlanes, | |||
packing0, | |||
packing1, | |||
... | |||
) |
Creates a user-defined YCbCr color image format constant.
Example to create a YUV422R ITU-R BT.709 full-range with SMPTE240M transfer function, block-linear format.
Fourth plane (packing3) must have at most 64bpp.
[in] | colorModel | VPIColorModel to be used. |
[in] | colorSpec | VPIColorSpec to be used. |
[in] | chromaSubsamp | VPIChromaSubsampling to be used. |
[in] | memLayout | VPIMemLayout to be used. |
[in] | dataType | VPIDataType to be used. |
[in] | swizzle | VPISwizzle operation to be performed on the channels. |
[in] | numPlanes | Number of planes this format has. |
[in] | packing0,packing1,... | Format packing of each plane. |
Definition at line 394 of file ImageFormat.h.
#define VPI_MAKE_COLOR_IMAGE_FORMAT_ABBREV | ( | colorModel, | |
colorSpec, | |||
memLayout, | |||
dataType, | |||
swizzle, | |||
numPlanes, | |||
packing0, | |||
packing1, | |||
... | |||
) |
Creates a user-defined color image format constant using abbreviated parameters.
This macro allows passing abbreviated format parameters (without the parameter type prefix). Example to create a RGB planar ITU-R BT.709 studio-range block-linear format.
If the color model is VPI_COLOR_MODEL_YCbCr, it's assumed that the chroma subsampling is 4:4:4, i.e, VPI_CSS_444.
[in] | colorModel | VPIColorModel to be used, without the VPI_COLOR_MODEL_ prefix. |
[in] | colorSpec | VPIColorSpec to be used, without the VPI_COLOR_SPEC_ prefix. |
[in] | memLayout | VPIMemLayout to be used, without the VPI_MEM_LAYOUT_ prefix. |
[in] | dataType | VPIDataType to be used, without the VPI_DATA_TYPE_ prefix. |
[in] | swizzle | VPISwizzle operation to be performed on the channels, without the VPI_SWIZZLE_ prefix. |
[in] | numPlanes | Number of planes this format has. |
[in] | packing0,packing1,... | Format packing of each plane, without the VPI_PACKING_ prefix.
|
Definition at line 423 of file ImageFormat.h.
#define VPI_MAKE_COLOR_IMAGE_FORMAT | ( | colorModel, | |
colorSpec, | |||
memLayout, | |||
dataType, | |||
swizzle, | |||
numPlanes, | |||
packing0, | |||
packing1, | |||
... | |||
) |
Creates a user-defined color image format constant.
Example to create a RGB planar ITU-R BT.709 full-range with SMPTE240M encoding, block-linear format.
If the color model is VPI_COLOR_MODEL_YCbCr, it's assumed that the chroma subsampling is 4:4:4, i.e, VPI_CSS_444.
[in] | colorModel | VPIColorModel to be used. |
[in] | colorSpec | VPIColorSpec to be used. |
[in] | memLayout | VPIMemLayout to be used. |
[in] | dataType | VPIDataType to be used. |
[in] | swizzle | VPISwizzle operation to be performed on the channels. |
[in] | numPlanes | Number of planes this format has. |
[in] | packing0,packing1,... | Format packing of each plane.
|
Definition at line 453 of file ImageFormat.h.
#define VPI_MAKE_NONCOLOR_IMAGE_FORMAT_ABBREV | ( | memLayout, | |
dataType, | |||
swizzle, | |||
numPlanes, | |||
packing0, | |||
packing1, | |||
... | |||
) |
Creates a user-defined non-color image format constant using abbreviated parameters.
This macro allows passing abbreviated format parameters (without the parameter type prefix).
Example to create 3-plane float block-linear image, 1st: 8-bit, 2nd: 16-bit, 3rd: 32-bit
[in] | memLayout | VPIMemLayout to be used, without the VPI_MEM_LAYOUT_ prefix. |
[in] | dataType | VPIDataType to be used, without the VPI_DATA_TYPE_ prefix. |
[in] | swizzle | VPISwizzle operation to be performed on the channels. |
[in] | numPlanes | Number of planes this format has. |
[in] | packing0,packing1,... | Format packing of each plane, without the VPI_PACKING_ prefix.
|
Definition at line 478 of file ImageFormat.h.
#define VPI_MAKE_NONCOLOR_IMAGE_FORMAT | ( | memLayout, | |
dataType, | |||
swizzle, | |||
numPlanes, | |||
packing0, | |||
packing1, | |||
... | |||
) |
Creates a user-defined non-color image format constant.
Example to create 3-plane float block-linear image, 1st: 8-bit, 2nd: 16-bit, 3rd: 32-bit
[in] | memLayout | VPIMemLayout to be used. |
[in] | dataType | VPIDataType to be used. |
[in] | swizzle | VPISwizzle operation to be performed on the channels. |
[in] | numPlanes | Number of planes this format has. |
[in] | packing0,packing1,... | Format packing of each plane.
|
Definition at line 501 of file ImageFormat.h.
#define VPI_MAKE_RAW_IMAGE_FORMAT_ABBREV | ( | rawPattern, | |
memLayout, | |||
dataType, | |||
numPlanes, | |||
swizzle, | |||
packing | |||
) |
Creates a user-defined raw (Bayer pattern) image format constant using abbreviated parameters.
This macro allows passing abbreviated format parameters (without the parameter type prefix).
Example to create a RGGB Bayer pattern format:
[in] | rawPattern | VPIRawPattern to be used, without the VPI_RAW_ prefix. |
[in] | memLayout | VPIMemLayout to be used, without the VPI_MEM_LAYOUT_ prefix. |
[in] | dataType | VPIDataType to be used, without the VPI_DATA_TYPE_ prefix. |
[in] | swizzle | VPISwizzle operation to be performed on the channels, without the VPI_SWIZZLE_ prefix. |
[in] | numPlanes | Number of planes this format has. |
[in] | packing | Format packing of image plane plane, without the VPI_PACKING_ prefix. |
Definition at line 525 of file ImageFormat.h.
#define VPI_MAKE_RAW_IMAGE_FORMAT | ( | rawPattern, | |
memLayout, | |||
dataType, | |||
numPlanes, | |||
swizzle, | |||
packing | |||
) |
Creates a user-defined raw (Bayer pattern) image format constant.
Example to create a RGGB Bayer pattern format:
[in] | rawPattern | VPIRawPattern to be used. |
[in] | memLayout | VPIMemLayout to be used. |
[in] | dataType | VPIDataType to be used. |
[in] | swizzle | VPISwizzle operation to be performed on the channels. |
[in] | numPlanes | Number of planes this format has. |
[in] | packing | Format packing of image plane. |
Definition at line 549 of file ImageFormat.h.
VPIImageFormat vpiMakeYCbCrImageFormat | ( | VPIColorSpec | colorSpec, |
VPIChromaSubsampling | chromaSub, | ||
VPIMemLayout | memLayout, | ||
VPIDataType | dataType, | ||
VPISwizzle | swizzle, | ||
VPIPacking | packing0, | ||
VPIPacking | packing1, | ||
VPIPacking | packing2, | ||
VPIPacking | packing3 | ||
) |
Creates a user-defined YCbCr color image format.
When the pre-defined image formats aren't enough, user-defined image formats can be created.
Fourth plane (packing3) must have at most 64bpp.
[in] | colorSpec | VPIColorSpec to be used. |
[in] | chromaSub | VPIChromaSubsampling to be used. |
[in] | memLayout | VPIMemLayout to be used. |
[in] | dataType | VPIDataType to be used. |
[in] | swizzle | VPISwizzle operation to be performed on the channels. |
[in] | packing0,packing1,packing2,packing3 | Format packing of each plane.
|
VPI_IMAGE_FORMAT_INVALID | Swizzle packing is invalid. |
VPI_IMAGE_FORMAT_INVALID | colorSpec and chromaSub are undefined. |
VPIImageFormat vpiMakeColorImageFormat | ( | VPIColorModel | colorModel, |
VPIColorSpec | colorSpec, | ||
VPIMemLayout | memLayout, | ||
VPIDataType | dataType, | ||
VPISwizzle | swizzle, | ||
VPIPacking | packing0, | ||
VPIPacking | packing1, | ||
VPIPacking | packing2, | ||
VPIPacking | packing3 | ||
) |
Creates a user-defined color image format.
When the pre-defined image formats aren't enough, user-defined image formats can be created.
If the color model is VPI_COLOR_MODEL_YCbCr, it's assumed that the chroma subsampling is 4:4:4, i.e, VPI_CSS_444.
[in] | colorModel | VPIColorModel to be used. |
[in] | colorSpec | VPIColorSpec to be used. |
[in] | memLayout | VPIMemLayout to be used. |
[in] | dataType | VPIDataType to be used. |
[in] | swizzle | VPISwizzle operation to be performed on the channels. |
[in] | packing0,packing1,packing2,packing3 | Format packing of each plane.
|
VPI_IMAGE_FORMAT_INVALID | colorModel is VPI_COLOR_MODEL_UNDEFINED . |
VPI_IMAGE_FORMAT_INVALID | colorModel is VPI_COLOR_MODEL_RAW . |
VPI_IMAGE_FORMAT_INVALID | colorSpec is VPI_COLOR_SPEC_UNDEFINED . |
VPI_IMAGE_FORMAT_INVALID | Swizzle packing is invalid. |
VPI_IMAGE_FORMAT_INVALID | colorModel , colorSpec and chromaSub are undefined. |
VPI_IMAGE_FORMAT_INVALID | Image format invalid; 4th plane cannot have a 128 bit channel. |
VPIImageFormat vpiMakeNonColorImageFormat | ( | VPIMemLayout | memLayout, |
VPIDataType | dataType, | ||
VPISwizzle | swizzle, | ||
VPIPacking | packing0, | ||
VPIPacking | packing1, | ||
VPIPacking | packing2, | ||
VPIPacking | packing3 | ||
) |
Creates a user-defined non-color image format.
When the pre-defined non-color image formats aren't enough, it is possible to define new ones.
[in] | memLayout | VPIMemLayout to be used. |
[in] | dataType | VPIDataType to be used. |
[in] | swizzle | VPISwizzle operation to be performed on the channels. |
[in] | packing0,packing1,packing2,packing3 | Format packing of each plane.
|
VPI_IMAGE_FORMAT_INVALID | Image format to be queried is invalid. |
VPI_IMAGE_FORMAT_INVALID | Swizzle packing is invalid. |
VPIImageFormat vpiMakeRawImageFormat | ( | VPIRawPattern | rawPattern, |
VPIMemLayout | memLayout, | ||
VPIDataType | dataType, | ||
VPISwizzle | swizzle, | ||
VPIPacking | packing0, | ||
VPIPacking | packing1, | ||
VPIPacking | packing2, | ||
VPIPacking | packing3 | ||
) |
Creates a user-defined raw image format.
When the pre-defined raw image formats aren't enough, it is possible to define new ones.
[in] | rawPattern | VPIRawPattern to be used. |
[in] | memLayout | VPIMemLayout to be used. |
[in] | dataType | VPIDataType to be used. |
[in] | swizzle | VPISwizzle operation to be performed on the channels. |
[in] | packing0,packing1,packing2,packing3 | Format packing of each plane.
|
VPI_IMAGE_FORMAT_INVALID | Image format to be queried is invalid. |
VPI_IMAGE_FORMAT_INVALID | rawPattern is invalid. |
VPI_IMAGE_FORMAT_INVALID | Swizzle packing is invalid. |
VPIImageFormat vpiMakeImageFormatFromFourCC | ( | uint32_t | fourcc, |
VPIColorSpec | colorSpec, | ||
VPIMemLayout | memLayout | ||
) |
Creates a image format from a FourCC code.
See https://www.fourcc.org for more information about FourCC.
[in] | fourcc | FourCC code. |
[in] | colorSpec | VPIColorSpec to be used. |
[in] | memLayout | VPIMemLayout to be used. |
VPI_IMAGE_FORMAT_INVALID | Invalid fourcc . |
uint32_t vpiImageFormatGetFourCC | ( | VPIImageFormat | fmt | ) |
Returns the FourCC code corresponding to an image format.
[in] | fmt | Image format to be queried. |
0 | No FourCC associated with fmt , e.g. VPI_IMAGE_FORMAT_2F32. |
VPIPacking vpiImageFormatGetPlanePacking | ( | VPIImageFormat | fmt, |
int | plane | ||
) |
Get the packing for a given plane of an image format.
[in] | fmt | Image format to be queried. |
[in] | plane | Which plane whose packing must be returned.
|
VPI_PACKING_0 | fmt to be queried is invalid. |
VPI_PACKING_0 | plane outside valid range. |
int32_t vpiImageFormatGetPlaneWidth | ( | VPIImageFormat | fmt, |
int32_t | imgWidth, | ||
int | plane | ||
) |
Get the plane width of an image with the given image format and width.
[in] | fmt | Image format to be queried. |
[in] | imgWidth | Width of the image.
|
[in] | plane | Image plane to be queried.
|
0 | fmt is invalid. |
0 | imgWidth is outside valid range. |
0 | plane is outside valid range. |
int32_t vpiImageFormatGetPlaneHeight | ( | VPIImageFormat | fmt, |
int32_t | imgHeight, | ||
int | plane | ||
) |
Get the plane height of an image with the given image format and height.
[in] | fmt | Image format to be queried. |
[in] | imgHeight | Height of the image.
|
[in] | plane | Image plane to be queried.
|
0 | fmt is invalid. |
0 | imgHeight is outside valid range. |
0 | plane is outside valid range. |
VPIImageFormat vpiImageFormatSetSwizzleAndPacking | ( | VPIImageFormat | fmt, |
VPISwizzle | swizzle, | ||
VPIPacking | packing0, | ||
VPIPacking | packing1, | ||
VPIPacking | packing2, | ||
VPIPacking | packing3 | ||
) |
Replaces the swizzle and packing of an existing image format.
The number of channels represented by the swizzle must be equal to the sum of the number of channels represented by the packings. For instance, XYZ1,X8,X8Y8 is a valid combination with 3 channels. XYZW,X8,X8Y8 isn't as swizzle has 4 channels, and X8,X8Y8 represents in total 3 channels.
[in] | fmt | Image format to have its packing replaced. |
[in] | swizzle | The new swizzle.
|
[in] | packing0,packing1,packing2,packing3 | New packing.
|
VPI_IMAGE_FORMAT_INVALID | fmt to be queried is invalid. |
int vpiImageFormatGetPlaneBitsPerPixel | ( | VPIImageFormat | fmt, |
int | plane | ||
) |
Get the image format's plane bits per pixel count.
[in] | fmt | Image format to be queried. |
[in] | plane | Which plane is to be queried.
|
0 | fmt is invalid. |
0 | plane outside valid range. |
VPIImageFormat vpiImageFormatSetDataType | ( | VPIImageFormat | fmt, |
VPIDataType | dataType | ||
) |
Set the image format's data type.
[in] | fmt | Image format have its data type replaced. |
[in] | dataType | The new data type. |
VPI_IMAGE_FORMAT_INVALID | fmt to be queried is invalid. |
VPI_IMAGE_FORMAT_INVALID | dataType is invalid. |
VPIDataType vpiImageFormatGetDataType | ( | VPIImageFormat | fmt | ) |
Get the image format's data type.
[in] | fmt | Image format to be queried. |
VPI_DATA_TYPE_INVALID | fmt to be queried is invalid. |
VPISwizzle vpiImageFormatGetSwizzle | ( | VPIImageFormat | fmt | ) |
Get the image format's channel swizzle operation.
[in] | fmt | Image format to be queried. |
VPI_SWIZZLE_0000 | fmt to be queried is invalid. |
VPISwizzle vpiImageFormatGetPlaneSwizzle | ( | VPIImageFormat | fmt, |
int | plane | ||
) |
Get the swizzle operation of the given image format's plane.
[in] | fmt | Image format to be queried.
|
[in] | plane | Plane to be queried.
|
VPI_SWIZZLE_0000 | fmt to be queried is invalid. |
VPI_SWIZZLE_INVALID | More packing channels than Swizzle channels. |
VPIImageFormat vpiImageFormatSetMemLayout | ( | VPIImageFormat | fmt, |
VPIMemLayout | memLayout | ||
) |
Set the image format's memory layout.
[in] | fmt | Image format have its memory layout replaced. |
[in] | memLayout | The new memory layout. |
VPI_IMAGE_FORMAT_INVALID | fmt to be queried is invalid. |
VPI_IMAGE_FORMAT_INVALID | memLayout is invalid. |
VPIMemLayout vpiImageFormatGetMemLayout | ( | VPIImageFormat | fmt | ) |
Get the image format's memory layout.
[in] | fmt | Image format to be queried. |
VPI_MEM_LAYOUT_INVALID | fmt to be queried is invalid. |
VPIImageFormat vpiImageFormatSetColorSpec | ( | VPIImageFormat | fmt, |
VPIColorSpec | colorSpec | ||
) |
Set the image format's color standard.
Only valid for color models that represent image coding systems, such as RGB, Y'CrCb, HSV, etc. For other color models, it'll return VPI_IMAGE_FORMAT_INVALID.
[in] | fmt | Image format have its color spec replaced. |
[in] | colorSpec | The new color standard. |
VPI_IMAGE_FORMAT_INVALID | fmt to be queried is invalid. |
VPI_IMAGE_FORMAT_INVALID | colorSpec is invalid. |
VPI_IMAGE_FORMAT_INVALID | Color standard isn't applicable to format's color model.. |
VPIColorSpec vpiImageFormatGetColorSpec | ( | VPIImageFormat | fmt | ) |
Get the image format's color standard.
[in] | fmt | Image format to be queried. |
VPI_COLOR_SPEC_INVALID | fmt to be queried is invalid. |
VPI_COLOR_SPEC_UNDEFINED | It's not applicable, i.e., format model isn't RGB, YCbCr, HSV or HSL. |
VPIColorModel vpiImageFormatGetColorModel | ( | VPIImageFormat | fmt | ) |
Get the image format's color model.
[in] | fmt | Image format to be queried. |
VPI_COLOR_MODEL_UNDEFINED | fmt to be queried is invalid. |
VPIImageFormat vpiImageFormatSetChromaSubsampling | ( | VPIImageFormat | fmt, |
VPIChromaSubsampling | css | ||
) |
Set the image format's chroma subsampling type.
[in] | fmt | Image format have its chroma subsampling type replaced.
|
[in] | css | The new chroma subsampling type. |
VPI_IMAGE_FORMAT_INVALID | fmt to be queried is invalid. |
VPI_IMAGE_FORMAT_INVALID | css is invalid. |
VPI_CSS_NONE | Format's color model is NOT VPI_COLOR_MODEL_YCbCr. |
VPIChromaSubsampling vpiImageFormatGetChromaSubsampling | ( | VPIImageFormat | fmt | ) |
Get the image format's chroma subsampling type.
[in] | fmt | Image format to be queried. |
VPI_CSS_INVALID | fmt is not supported. |
VPI_CSS_NONE | fmt color model is NOT VPI_COLOR_MODEL_YCbCr. |
int vpiImageFormatGetPlaneChannelCount | ( | VPIImageFormat | fmt, |
int | plane | ||
) |
Get the number of channels in a plane of an image format.
[in] | fmt | Image format to be queried. |
[in] | plane | Plane to be queried. Valid values range from 0 (first) to 3 (fourth and last) plane. |
int vpiImageFormatGetPlaneCount | ( | VPIImageFormat | fmt | ) |
Get the number of planes of an image format.
[in] | fmt | Image format to be queried. |
int vpiImageFormatGetChannelCount | ( | VPIImageFormat | fmt | ) |
Get the total number of channels of an image format.
[in] | fmt | Image format to be queried. |
void vpiImageFormatGetBitsPerChannel | ( | VPIImageFormat | fmt, |
int32_t * | bits | ||
) |
Get the image format's bit size for each channel.
[in] | fmt | Image format to be queried. |
[out] | bits | Pointer to an int32_t array with 4 elements where output will be stored.
|
VPIPixelType vpiImageFormatGetPlanePixelType | ( | VPIImageFormat | fmt, |
int | plane | ||
) |
Get the pixel type of image format's plane.
[in] | fmt | Image format to be queried. |
[in] | plane | Plane to be queried.
|
VPI_PIXEL_TYPE_INVALID | fmt to be queried is invalid. |
VPI_PIXEL_TYPE_INVALID | plane is outside range. |
VPIImageFormat vpiImageFormatGetPlaneFormat | ( | VPIImageFormat | fmt, |
int | plane | ||
) |
Get the plane format of an image format.
[in] | fmt | Image format to be queried. |
[in] | plane | Plane to be queried.
|
VPI_IMAGE_FORMAT_INVALID | fmt packing is invalid. |
VPI_IMAGE_FORMAT_INVALID | plane is outside range. |
VPIImageFormat vpiMakeImageFormatFromPlanes | ( | VPIImageFormat | plane0, |
VPIImageFormat | plane1, | ||
VPIImageFormat | plane2, | ||
VPIImageFormat | plane3 | ||
) |
Constructs an image format given the format of each plane.
[in] | plane0,plane1,plane2,plane3 | Image format of each plane.
|
VPI_IMAGE_FORMAT_INVALID | Image format to be queried is invalid. |
VPI_IMAGE_FORMAT_INVALID | All plane types must have only 1 plane. |
VPI_IMAGE_FORMAT_INVALID | First plane must have a valid packing. |
VPI_IMAGE_FORMAT_INVALID | Total number of channels must be atmost 4. |
VPI_IMAGE_FORMAT_INVALID | Color spec, mem layout and data type of all planes must be the same. |
VPI_IMAGE_FORMAT_INVALID | Only one kind of chroma subsampling is allowed. |
VPI_IMAGE_FORMAT_INVALID | At least one channel is allowed. |
VPI_IMAGE_FORMAT_INVALID | All planes after the first invalid one must be invalid. |
const char* vpiImageFormatGetName | ( | VPIImageFormat | fmt | ) |
Returns a string representation of the image format.
[in] | fmt | Image format whose name is to be returned. |
VPIRawPattern vpiImageFormatGetRawPattern | ( | VPIImageFormat | fmt | ) |
Returns the raw color pattern of the image format.
[in] | fmt | Image format to be queried.
|
VPI_RAW_INVALID | Color model of fmt is not VPI_COLOR_MODEL_RAW. |
VPIImageFormat vpiImageFormatSetRawPattern | ( | VPIImageFormat | fmt, |
VPIRawPattern | rawPattern | ||
) |
Sets the raw color pattern of the image format.
[in] | fmt | Image format to be updated.
|
[in] | rawPattern | The new raw pattern. |
VPI_IMAGE_FORMAT_INVALID | fmt to be queried is invalid or its color model isn't VPI_COLOR_MODEL_RAW. |
VPI_IMAGE_FORMAT_INVALID | rawPattern is invalid. |
int vpiImageFormatHasSameDataLayout | ( | VPIImageFormat | a, |
VPIImageFormat | b | ||
) |
Returns whether the image formats have the same data layout.
Data layout referts to how pixels are laid out in memory. It doesn't take into account the format's color information.
The following characteristics are taken into account:
[in] | a,b | Image formats to be compared. |
1 | Both image formats compares equal with respect to how pixels are laid out in memory. |
0 | Both image formats compares differently. |