Defines types and functions to handle image formats. More...
Go to the source code of this file.
#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... | |
enum | VPIImageFormat |
Pre-defined image formats. More... | |
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... | |
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... | |
Defines types and functions to handle image formats.
Definition in 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.
Fourth plane (packing3) must have at most 64bpp.
[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 405 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.
Fourth plane (packing3) must have at most 64bpp.
[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 374 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
Fourth plane (packing3) must have at most 64bpp.
[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 454 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
Fourth plane (packing3) must have at most 64bpp.
[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 430 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:
Fourth plane (packing3) must have at most 64bpp.
[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 503 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:
Fourth plane (packing3) must have at most 64bpp.
[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 479 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 344 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 315 of file ImageFormat.h.
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. If it's NULL, the function is a no-op. |
int vpiImageFormatGetChannelCount | ( | VPIImageFormat | fmt | ) |
Get the total number of channels of an image format.
[in] | fmt | Image format to be queried. |
VPIChromaSubsampling vpiImageFormatGetChromaSubsampling | ( | VPIImageFormat | fmt | ) |
Get the image format's chroma subsampling type.
[in] | fmt | Image format to be queried. |
VPIColorModel vpiImageFormatGetColorModel | ( | VPIImageFormat | fmt | ) |
Get the image format's color model.
[in] | fmt | Image format to be queried. |
VPIColorSpec vpiImageFormatGetColorSpec | ( | VPIImageFormat | fmt | ) |
Get the image format's color standard.
[in] | fmt | Image format to be queried. |
VPIDataType vpiImageFormatGetDataType | ( | VPIImageFormat | fmt | ) |
Get the image format's data type.
[in] | fmt | Image format to be queried. |
uint32_t vpiImageFormatGetFourCC | ( | VPIImageFormat | fmt | ) |
Returns the FourCC code corresponding to an image format.
[in] | fmt | Image format to be queried. |
VPIMemLayout vpiImageFormatGetMemLayout | ( | VPIImageFormat | fmt | ) |
Get the image format's memory layout.
[in] | fmt | Image format to be queried. |
const char* vpiImageFormatGetName | ( | VPIImageFormat | fmt | ) |
Returns a string representation of the image format.
[in] | fmt | Image format whose name is to be returned. |
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. Valid values range from 0 (first plane) to 3 (fourth plane). |
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. |
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. Valid values range from 0 (first) to 3 (fourth and last) plane. |
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. Valid values range from 0 (first plane) to 3 (fourth plane). |
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. Valid values range from 0 (first) to 3 (fourth and last) plane. |
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. Valid values range from 0 (first) to 3 (fourth and last) plane. |
VPIRawPattern vpiImageFormatGetRawPattern | ( | VPIImageFormat | fmt | ) |
Returns the raw color pattern of the image format.
[in] | fmt | Image format to be queried. |
VPISwizzle vpiImageFormatGetSwizzle | ( | VPIImageFormat | fmt | ) |
Get the image format's channel swizzle operation.
[in] | fmt | Image format to be queried. |
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 | If both image formats compares equal with respect to how pixels are laid out in memory. |
0 | If both image formats compares differently. |
VPIImageFormat vpiImageFormatSetChromaSubsampling | ( | VPIImageFormat | fmt, |
VPIChromaSubsampling | css | ||
) |
Set the image format's chroma subsampling type.
It's only applicable with YCbCr color model.
[in] | fmt | Image format have its chroma subsampling type replaced. |
[in] | css | The new chroma subsampling type. |
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. |
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. |
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. |
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. |
VPIImageFormat vpiImageFormatSetSwizzleAndPacking | ( | VPIImageFormat | fmt, |
VPISwizzle | swizzle, | ||
VPIPacking | packing0, | ||
VPIPacking | packing1, | ||
VPIPacking | packing2, | ||
VPIPacking | packing3 | ||
) |
Replaces the swizzle and packing of an existing image format.
If replacing the fourth (plane==3) packing, the packing's bits per pixel must be at most 64.
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. Pass VPI_SWIZZLE_INVALID if swizzle must not be updated. |
[in] | packing0,packing1,packing2,packing3 | New packing. Pass VPI_PACKING_INVALID if the packing for a particular plane must not be updated. |
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.
Fourth plane (packing3) must have at most 64bpp.
[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. When remaining planes aren't needed, pass VPI_PACKING_0 for them. |
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. |
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. When plane doesn't exist, pass VPI_IMAGE_FORMAT_INVALID. |
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.
Fourth plane (packing3) must have at most 64bpp.
[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. When remaining planes aren't needed, pass VPI_PACKING_0 for them. |
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.
Fourth plane (packing3) must have at most 64bpp.
[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. When remaining planes aren't needed, pass VPI_PACKING_0 for them. |
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. When remaining planes aren't needed, pass VPI_PACKING_0 for them. |