Defines types and functions to handle pixel types. More...
Go to the source code of this file.
#define | VPI_MAKE_PIXEL_TYPE_ABBREV(memLayout, dataType, packing) |
Creates a user-defined pixel type constant using abbreviated parameters. More... | |
#define | VPI_MAKE_PIXEL_TYPE(memLayout, dataType, packing) |
Creates a user-defined pixel type constant. More... | |
enum | VPIPixelType |
Pre-defined pixel types. More... | |
VPIPixelType | vpiMakePixelType (VPIMemLayout memLayout, VPIDataType dataType, VPIPacking packing) |
Creates a user-defined pixel type. More... | |
VPIPacking | vpiPixelTypeGetPacking (VPIPixelType type) |
Get the packing of a pixel type. More... | |
int | vpiPixelTypeGetBitsPerPixel (VPIPixelType type) |
Get the number of bits per pixel of a pixel type. More... | |
void | vpiPixelTypeGetBitsPerChannel (VPIPixelType type, int32_t *bits) |
Get the number of bits per channel of a pixel type. More... | |
VPIDataType | vpiPixelTypeGetDataType (VPIPixelType type) |
Get the data type of a pixel type. More... | |
VPIMemLayout | vpiPixelTypeGetMemLayout (VPIPixelType type) |
Get the memory layout of a pixel type. More... | |
int | vpiPixelTypeGetChannelCount (VPIPixelType type) |
Get the number of channels of a pixel type. More... | |
const char * | vpiPixelTypeGetName (VPIPixelType type) |
Returns a string representation of the pixel type. More... | |
Defines types and functions to handle pixel types.
Definition in file PixelType.h.
#define VPI_MAKE_PIXEL_TYPE | ( | memLayout, | |
dataType, | |||
packing | |||
) |
Creates a user-defined pixel type constant.
Example to create a block-linear format two interleaved 32-bit floating point channels:
[in] | memLayout | VPIMemLayout to be used. |
[in] | dataType | VPIDataType to be used. |
[in] | packing | Format packing used, which also defines the number of channels. |
Definition at line 221 of file PixelType.h.
#define VPI_MAKE_PIXEL_TYPE_ABBREV | ( | memLayout, | |
dataType, | |||
packing | |||
) |
Creates a user-defined pixel type constant using abbreviated parameters.
This macro allows passing abbreviated format parameters (without the parameter type prefix). Example to create a block-linear format two interleaved 32-bit floating point channels:
[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] | packing | Format packing used, which also defines the number of channels, without the VPI_PACKING_ prefix. |
Definition at line 203 of file PixelType.h.
VPIPixelType vpiMakePixelType | ( | VPIMemLayout | memLayout, |
VPIDataType | dataType, | ||
VPIPacking | packing | ||
) |
Creates a user-defined pixel type.
When the pre-defined pixel types aren't enough, user-defined formats can be created.
[in] | memLayout | VPIMemLayout to be used. |
[in] | dataType | VPIDataType to be used. |
[in] | packing | Format packing used, which also defines the number of channels. |
void vpiPixelTypeGetBitsPerChannel | ( | VPIPixelType | type, |
int32_t * | bits | ||
) |
Get the number of bits per channel of a pixel type.
[in] | type | Pixel type 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 vpiPixelTypeGetBitsPerPixel | ( | VPIPixelType | type | ) |
Get the number of bits per pixel of a pixel type.
[in] | type | Pixel type to be queried. |
int vpiPixelTypeGetChannelCount | ( | VPIPixelType | type | ) |
Get the number of channels of a pixel type.
[in] | type | Pixel type to be queried. |
VPIDataType vpiPixelTypeGetDataType | ( | VPIPixelType | type | ) |
Get the data type of a pixel type.
[in] | type | Pixel type to be queried. |
VPIMemLayout vpiPixelTypeGetMemLayout | ( | VPIPixelType | type | ) |
Get the memory layout of a pixel type.
[in] | type | Pixel type to be queried. |
const char* vpiPixelTypeGetName | ( | VPIPixelType | type | ) |
Returns a string representation of the pixel type.
[in] | type | Pixel type to be returned. |
VPIPacking vpiPixelTypeGetPacking | ( | VPIPixelType | type | ) |
Get the packing of a pixel type.
[in] | type | Pixel type to be queried. |