56 #ifndef NV_VPI_PIXEL_TYPE_H
57 #define NV_VPI_PIXEL_TYPE_H
60 #include "detail/FormatUtils.h"
83 #define VPI_PIXEL_TYPE_DEFAULT ((VPIPixelType)0)
85 #define VPI_PIXEL_TYPE_INVALID VPI_PIXEL_TYPE_DEFAULT
88 #define VPI_PIXEL_TYPE_U8 VPI_DETAIL_MAKE_PIX_TYPE(PL, UNSIGNED, X8)
90 #define VPI_PIXEL_TYPE_2U8 VPI_DETAIL_MAKE_PIX_TYPE(PL, UNSIGNED, X8_Y8)
92 #define VPI_PIXEL_TYPE_3U8 VPI_DETAIL_MAKE_PIX_TYPE(PL, UNSIGNED, X8_Y8_Z8)
94 #define VPI_PIXEL_TYPE_4U8 VPI_DETAIL_MAKE_PIX_TYPE(PL, UNSIGNED, X8_Y8_Z8_W8)
97 #define VPI_PIXEL_TYPE_S8 VPI_DETAIL_MAKE_PIX_TYPE(PL, SIGNED, X8)
99 #define VPI_PIXEL_TYPE_2S8 VPI_DETAIL_MAKE_PIX_TYPE(PL, SIGNED, X8_Y8)
101 #define VPI_PIXEL_TYPE_3S8 VPI_DETAIL_MAKE_PIX_TYPE(PL, SIGNED, X8_Y8_Z8)
103 #define VPI_PIXEL_TYPE_4S8 VPI_DETAIL_MAKE_PIX_TYPE(PL, SIGNED, X8_Y8_Z8_W8)
106 #define VPI_PIXEL_TYPE_U16 VPI_DETAIL_MAKE_PIX_TYPE(PL, UNSIGNED, X16)
108 #define VPI_PIXEL_TYPE_2U16 VPI_DETAIL_MAKE_PIX_TYPE(PL, UNSIGNED, X16_Y16)
110 #define VPI_PIXEL_TYPE_3U16 VPI_DETAIL_MAKE_PIX_TYPE(PL, UNSIGNED, X16_Y16_Z16)
112 #define VPI_PIXEL_TYPE_4U16 VPI_DETAIL_MAKE_PIX_TYPE(PL, UNSIGNED, X16_Y16_Z16_W16)
115 #define VPI_PIXEL_TYPE_S16 VPI_DETAIL_MAKE_PIX_TYPE(PL, SIGNED, X16)
117 #define VPI_PIXEL_TYPE_2S16 VPI_DETAIL_MAKE_PIX_TYPE(PL, SIGNED, X16_Y16)
119 #define VPI_PIXEL_TYPE_3S16 VPI_DETAIL_MAKE_PIX_TYPE(PL, SIGNED, X16_Y16_Z16)
121 #define VPI_PIXEL_TYPE_4S16 VPI_DETAIL_MAKE_PIX_TYPE(PL, SIGNED, X16_Y16_Z16_W16)
124 #define VPI_PIXEL_TYPE_U32 VPI_DETAIL_MAKE_PIX_TYPE(PL, UNSIGNED, X32)
126 #define VPI_PIXEL_TYPE_2U32 VPI_DETAIL_MAKE_PIX_TYPE(PL, UNSIGNED, X32_Y32)
128 #define VPI_PIXEL_TYPE_3U32 VPI_DETAIL_MAKE_PIX_TYPE(PL, UNSIGNED, X32_Y32_Z32)
130 #define VPI_PIXEL_TYPE_4U32 VPI_DETAIL_MAKE_PIX_TYPE(PL, UNSIGNED, X32_Y32_Z32_W32)
133 #define VPI_PIXEL_TYPE_S32 VPI_DETAIL_MAKE_PIX_TYPE(PL, SIGNED, X32)
135 #define VPI_PIXEL_TYPE_2S32 VPI_DETAIL_MAKE_PIX_TYPE(PL, SIGNED, X32_Y32)
137 #define VPI_PIXEL_TYPE_3S32 VPI_DETAIL_MAKE_PIX_TYPE(PL, SIGNED, X32_Y32_Z32)
139 #define VPI_PIXEL_TYPE_4S32 VPI_DETAIL_MAKE_PIX_TYPE(PL, SIGNED, X32_Y32_Z32_W32)
142 #define VPI_PIXEL_TYPE_F32 VPI_DETAIL_MAKE_PIX_TYPE(PL, FLOAT, X32)
144 #define VPI_PIXEL_TYPE_2F32 VPI_DETAIL_MAKE_PIX_TYPE(PL, FLOAT, X32_Y32)
146 #define VPI_PIXEL_TYPE_3F32 VPI_DETAIL_MAKE_PIX_TYPE(PL, FLOAT, X32_Y32_Z32)
148 #define VPI_PIXEL_TYPE_4F32 VPI_DETAIL_MAKE_PIX_TYPE(PL, FLOAT, X32_Y32_Z32_W32)
151 #define VPI_PIXEL_TYPE_U64 VPI_DETAIL_MAKE_PIX_TYPE(PL, UNSIGNED, X64)
153 #define VPI_PIXEL_TYPE_2U64 VPI_DETAIL_MAKE_PIX_TYPE(PL, UNSIGNED, X64_Y64)
155 #define VPI_PIXEL_TYPE_3U64 VPI_DETAIL_MAKE_PIX_TYPE(PL, UNSIGNED, X64_Y64_Z64)
157 #define VPI_PIXEL_TYPE_4U64 VPI_DETAIL_MAKE_PIX_TYPE(PL, UNSIGNED, X64_Y64_Z64_W64)
160 #define VPI_PIXEL_TYPE_S64 VPI_DETAIL_MAKE_PIX_TYPE(PL, SIGNED, X64)
162 #define VPI_PIXEL_TYPE_2S64 VPI_DETAIL_MAKE_PIX_TYPE(PL, SIGNED, X64_Y64)
164 #define VPI_PIXEL_TYPE_3S64 VPI_DETAIL_MAKE_PIX_TYPE(PL, SIGNED, X64_Y64_Z64)
166 #define VPI_PIXEL_TYPE_4S64 VPI_DETAIL_MAKE_PIX_TYPE(PL, SIGNED, X64_Y64_Z64_W64)
169 #define VPI_PIXEL_TYPE_F64 VPI_DETAIL_MAKE_PIX_TYPE(PL, FLOAT, X64)
171 #define VPI_PIXEL_TYPE_2F64 VPI_DETAIL_MAKE_PIX_TYPE(PL, FLOAT, X64_Y64)
173 #define VPI_PIXEL_TYPE_3F64 VPI_DETAIL_MAKE_PIX_TYPE(PL, FLOAT, X64_Y64_Z64)
175 #define VPI_PIXEL_TYPE_4F64 VPI_DETAIL_MAKE_PIX_TYPE(PL, FLOAT, X64_Y64_Z64_W64)
194 # define VPI_MAKE_PIXEL_TYPE_ABBREV(memLayout, dataType, packing)
196 # define VPI_MAKE_PIXEL_TYPE_ABBREV (VPIPixelType) VPI_DETAIL_MAKE_PIX_TYPE
213 # define VPI_MAKE_PIXEL_TYPE(memLayout, dataType, packing)
215 # define VPI_MAKE_PIXEL_TYPE (VPIPixelType) VPI_DETAIL_MAKE_PIXEL_TYPE
Defines types and functions to handle data layouts.
VPIMemLayout vpiPixelTypeGetMemLayout(VPIPixelType type)
Get the memory layout of a pixel type.
VPIPixelType vpiMakePixelType(VPIMemLayout memLayout, VPIDataType dataType, VPIPacking packing)
Creates a user-defined pixel type.
VPIPixelType vpiPixelTypeSetMemLayout(VPIPixelType type, VPIMemLayout layout)
Set the memory layout of a pixel type.
VPIPacking vpiPixelTypeGetPacking(VPIPixelType type)
Get the packing of a pixel type.
int vpiPixelTypeGetChannelCount(VPIPixelType type)
Get the number of channels of a pixel type.
VPIDataType vpiPixelTypeGetDataType(VPIPixelType type)
Get the data type of a pixel type.
int vpiPixelTypeGetBitsPerPixel(VPIPixelType type)
Get the number of bits per pixel of a pixel type.
void vpiPixelTypeGetBitsPerChannel(VPIPixelType type, int32_t *bits)
Get the number of bits per channel of a pixel type.
const char * vpiPixelTypeGetName(VPIPixelType type)
Returns a string representation of the pixel type.
VPIPixelType vpiPixelTypeGetChannelType(VPIPixelType type, int channel)
Get the pixel type for a given channel index.
VPIPacking
Defines how channels are packed into an image plane element.
VPIMemLayout
Defines how the 2D plane pixels are laid out in memory.
VPIDataType
Defines the channel data type.