VPI - Vision Programming Interface

0.4.4 Release

Format.h
Go to the documentation of this file.
1 /*
2  * Copyright 2020 NVIDIA Corporation. All rights reserved.
3  *
4  * NOTICE TO LICENSEE:
5  *
6  * This source code and/or documentation ("Licensed Deliverables") are
7  * subject to NVIDIA intellectual property rights under U.S. and
8  * international Copyright laws.
9  *
10  * These Licensed Deliverables contained herein is PROPRIETARY and
11  * CONFIDENTIAL to NVIDIA and is being provided under the terms and
12  * conditions of a form of NVIDIA software license agreement by and
13  * between NVIDIA and Licensee ("License Agreement") or electronically
14  * accepted by Licensee. Notwithstanding any terms or conditions to
15  * the contrary in the License Agreement, reproduction or disclosure
16  * of the Licensed Deliverables to any third party without the express
17  * written consent of NVIDIA is prohibited.
18  *
19  * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
20  * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
21  * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
22  * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
23  * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
24  * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
25  * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
26  * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
27  * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
28  * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
29  * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
30  * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
31  * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
32  * OF THESE LICENSED DELIVERABLES.
33  *
34  * U.S. Government End Users. These Licensed Deliverables are a
35  * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
36  * 1995), consisting of "commercial computer software" and "commercial
37  * computer software documentation" as such terms are used in 48
38  * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
39  * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
40  * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
41  * U.S. Government End Users acquire the Licensed Deliverables with
42  * only those rights set forth herein.
43  *
44  * Any use of the Licensed Deliverables in individual and commercial
45  * software must include, in the user documentation and internal
46  * comments to the code, the above Disclaimer and U.S. Government End
47  * Users Notice.
48  */
49 
56 #ifndef NV_VPI_FORMAT_H
57 #define NV_VPI_FORMAT_H
58 
59 #include "Export.h"
60 #include "detail/FormatUtils.h"
61 
62 #ifdef __cplusplus
63 extern "C" {
64 #endif
65 
131 typedef enum
132 {
136  VPI_FORMAT_PACKING_X1 = VPI_DETAIL_FORMAT_SET_BPP_CHCOUNT(1, 1),
138  VPI_FORMAT_PACKING_X2 = VPI_DETAIL_FORMAT_SET_BPP_CHCOUNT(2, 1),
140  VPI_FORMAT_PACKING_X4 = VPI_DETAIL_FORMAT_SET_BPP_CHCOUNT(4, 1),
142  VPI_FORMAT_PACKING_X8 = VPI_DETAIL_FORMAT_SET_BPP_CHCOUNT(8, 1),
143  VPI_FORMAT_PACKING_X4Y4 = VPI_DETAIL_FORMAT_SET_BPP_CHCOUNT(8, 2),
145  VPI_DETAIL_FORMAT_SET_BPP_CHCOUNT(8, 3),
147  VPI_FORMAT_PACKING_X16 = VPI_DETAIL_FORMAT_SET_BPP_CHCOUNT(16, 1),
148  VPI_FORMAT_PACKING_X8_Y8 = VPI_DETAIL_FORMAT_SET_BPP_CHCOUNT(16, 2),
158  VPI_DETAIL_FORMAT_SET_BPP_CHCOUNT(16, 3),
162  VPI_DETAIL_FORMAT_SET_BPP_CHCOUNT(16, 4),
168  VPI_FORMAT_PACKING_X24 = VPI_DETAIL_FORMAT_SET_BPP_CHCOUNT(24, 1),
170  VPI_DETAIL_FORMAT_SET_BPP_CHCOUNT(24, 3),
172  VPI_FORMAT_PACKING_X32 = VPI_DETAIL_FORMAT_SET_BPP_CHCOUNT(32, 1),
174  VPI_DETAIL_FORMAT_SET_BPP_CHCOUNT(32, 2),
178  VPI_DETAIL_FORMAT_SET_BPP_CHCOUNT(32, 3),
181  VPI_DETAIL_FORMAT_SET_BPP_CHCOUNT(32, 4),
188  VPI_FORMAT_PACKING_X48 = VPI_DETAIL_FORMAT_SET_BPP_CHCOUNT(48, 1),
190  VPI_DETAIL_FORMAT_SET_BPP_CHCOUNT(48, 3),
192  VPI_FORMAT_PACKING_X64 = VPI_DETAIL_FORMAT_SET_BPP_CHCOUNT(64, 1),
194  VPI_DETAIL_FORMAT_SET_BPP_CHCOUNT(64, 2),
196  VPI_DETAIL_FORMAT_SET_BPP_CHCOUNT(64, 4),
199  VPI_FORMAT_PACKING_X96 = VPI_DETAIL_FORMAT_SET_BPP_CHCOUNT(96, 1),
201  VPI_DETAIL_FORMAT_SET_BPP_CHCOUNT(96, 3),
203  VPI_FORMAT_PACKING_X128 = VPI_DETAIL_FORMAT_SET_BPP_CHCOUNT(128, 1),
205  VPI_DETAIL_FORMAT_SET_BPP_CHCOUNT(128, 4),
208 
210 typedef enum
211 {
216 
223 typedef enum
224 {
227 
230 
233 
236 
239 
242 
245 
249 
255 
258 typedef enum
259 {
267 
275 typedef enum
276 {
278  VPI_DETAIL_DEF_SWIZZLE_ENUM(0, 0, 0, 0),
279  VPI_DETAIL_DEF_SWIZZLE_ENUM(1, 0, 0, 0),
280  VPI_DETAIL_DEF_SWIZZLE_ENUM(0, 0, 0, 1),
281  VPI_DETAIL_DEF_SWIZZLE_ENUM(X, Y, Z, W),
282  VPI_DETAIL_DEF_SWIZZLE_ENUM(Z, Y, X, W),
283  VPI_DETAIL_DEF_SWIZZLE_ENUM(W, X, Y, Z),
284  VPI_DETAIL_DEF_SWIZZLE_ENUM(W, Z, Y, X),
285  VPI_DETAIL_DEF_SWIZZLE_ENUM(Y, Z, W, X),
286  VPI_DETAIL_DEF_SWIZZLE_ENUM(X, Y, Z, 1),
287  VPI_DETAIL_DEF_SWIZZLE_ENUM(X, Y, Z, 0),
288  VPI_DETAIL_DEF_SWIZZLE_ENUM(Y, Z, W, 1),
289  VPI_DETAIL_DEF_SWIZZLE_ENUM(X, X, X, 1),
290  VPI_DETAIL_DEF_SWIZZLE_ENUM(X, Z, Y, 1),
291  VPI_DETAIL_DEF_SWIZZLE_ENUM(Z, Y, X, 1),
292  VPI_DETAIL_DEF_SWIZZLE_ENUM(Z, Y, X, 0),
293  VPI_DETAIL_DEF_SWIZZLE_ENUM(W, Z, Y, 1),
294  VPI_DETAIL_DEF_SWIZZLE_ENUM(X, 0, 0, 0),
295  VPI_DETAIL_DEF_SWIZZLE_ENUM(0, X, 0, 0),
296  VPI_DETAIL_DEF_SWIZZLE_ENUM(0, 0, X, 0),
297  VPI_DETAIL_DEF_SWIZZLE_ENUM(0, 0, 0, X),
298  VPI_DETAIL_DEF_SWIZZLE_ENUM(Y, 0, 0, 0),
299  VPI_DETAIL_DEF_SWIZZLE_ENUM(0, Y, 0, 0),
300  VPI_DETAIL_DEF_SWIZZLE_ENUM(0, 0, Y, 0),
301  VPI_DETAIL_DEF_SWIZZLE_ENUM(0, 0, 0, Y),
302  VPI_DETAIL_DEF_SWIZZLE_ENUM(0, X, Y, 0),
303  VPI_DETAIL_DEF_SWIZZLE_ENUM(X, X, X, Y),
304  VPI_DETAIL_DEF_SWIZZLE_ENUM(Y, Y, Y, X),
305  VPI_DETAIL_DEF_SWIZZLE_ENUM(0, Y, X, 0),
306  VPI_DETAIL_DEF_SWIZZLE_ENUM(X, 0, 0, Y),
307  VPI_DETAIL_DEF_SWIZZLE_ENUM(Y, 0, 0, X),
308  VPI_DETAIL_DEF_SWIZZLE_ENUM(X, 0, 0, 1),
309  VPI_DETAIL_DEF_SWIZZLE_ENUM(X, Y, 0, 1),
310  VPI_DETAIL_DEF_SWIZZLE_ENUM(X, Y, 0, 0),
311  VPI_DETAIL_DEF_SWIZZLE_ENUM(0, X, Z, 0),
312  VPI_DETAIL_DEF_SWIZZLE_ENUM(0, Z, X, 0),
313  VPI_DETAIL_DEF_SWIZZLE_ENUM(X, Z, Y, 0),
314  VPI_DETAIL_DEF_SWIZZLE_ENUM(Y, Z, X, 1),
315  VPI_DETAIL_DEF_SWIZZLE_ENUM(Z, Y, W, 1)
318 
334 #define VPI_MAKE_SWIZZLE(x, y, z, w) ((VPISwizzle)VPI_DETAIL_MAKE_SWIZZLE(x, y, z, w))
335 
340 typedef enum
341 {
345 
350 
355 typedef enum
356 {
358  VPI_DETAIL_FORMAT_SET_COLOR_MODEL(OTHER),
368  VPI_COLOR_SPACE_RGB = VPI_DETAIL_FORMAT_SET_COLOR_MODEL(RGBA),
369 
375 
386  VPI_DETAIL_FORMAT_SET_COLOR_MODEL(YUV),
400 
412  VPI_COLOR_SPACE_BayerRGGB = VPI_DETAIL_FORMAT_SET_COLOR_MODEL(RAW),
413 
420 
427 
434 
441 
449 
459 typedef enum
460 {
462  VPI_CHROMA_SUBSAMPLING_444 = VPI_DETAIL_MAKE_CHROMA_SUBSAMPLING(1, 1, 0, 0),
463 
465  VPI_CHROMA_SUBSAMPLING_422_BT601 = VPI_DETAIL_MAKE_CHROMA_SUBSAMPLING(2, 1, 0, 0),
466 
469 
471  VPI_CHROMA_SUBSAMPLING_420_COSITED = VPI_DETAIL_MAKE_CHROMA_SUBSAMPLING(2, 2, 0, 0),
472 
474  VPI_CHROMA_SUBSAMPLING_420_MPEG1 = VPI_DETAIL_MAKE_CHROMA_SUBSAMPLING(2, 2, 1, 1),
475 
477  VPI_CHROMA_SUBSAMPLING_420_MPEG2 = VPI_DETAIL_MAKE_CHROMA_SUBSAMPLING(2, 2, 0, 1),
478 
482 
484 #define vpiMakeSwizzle VPI_APINAME(vpiMakeSwizzle, 004)
485 #define vpiMakeChromaSubsampling VPI_APINAME(vpiMakeChromaSubsampling, 004)
486 #define vpiMakeFormatPacking VPI_APINAME(vpiMakeFormatPacking, 004)
487 #define vpiFormatPackingGetParams VPI_APINAME(vpiFormatPackingGetParams, 004)
488 #define vpiFormatPackingGetChannelCount VPI_APINAME(vpiFormatPackingGetChannelCount, 004)
489 #define vpiFormatPackingGetBitsPerPixel VPI_APINAME(vpiFormatPackingGetBitsPerPixel, 004)
490 
514 VPI_PUBLIC VPIChromaSubsampling vpiMakeChromaSubsampling(int divHoriz, int divVert, int centerSampleHoriz,
515  int centerSampleVert);
516 
528 VPI_PUBLIC VPIFormatPacking vpiMakeFormatPacking(int fixed, int bitsX, int bitsY, int bitsZ, int bitsW);
529 
539 VPI_PUBLIC void vpiFormatPackingGetParams(VPIFormatPacking packing, int *fixed, int *bitsX, int *bitsY, int *bitsZ,
540  int *bitsW);
548 
557 
560 #ifdef __cplusplus
561 }
562 #endif
563 
564 #endif // NV_VPI_FORMAT_H
VPI_FORMAT_PACKING_X128
@ VPI_FORMAT_PACKING_X128
One 128-bit channel.
Definition: Format.h:203
VPI_FORMAT_PACKING_X8Y8
@ VPI_FORMAT_PACKING_X8Y8
Two 8-bit channels in one 16-bit word.
Definition: Format.h:149
VPI_COLOR_SPACE_YCbCr601_ER
@ VPI_COLOR_SPACE_YCbCr601_ER
YCbCr ITU-R BT.601 color space with extended range luma (0-255)
Definition: Format.h:387
VPI_COLOR_SPACE_LAB
@ VPI_COLOR_SPACE_LAB
CIE L*a*b* color space.
Definition: Format.h:362
VPI_FORMAT_PACKING_X16_Y16_Z16_W16
@ VPI_FORMAT_PACKING_X16_Y16_Z16_W16
Four 16-bit channels in four 16-bit words.
Definition: Format.h:195
VPI_FORMAT_DATA_TYPE_SIGNED
@ VPI_FORMAT_DATA_TYPE_SIGNED
Channels are signed integer values.
Definition: Format.h:213
VPI_COLOR_SPACE_RGB2020_LINEAR
@ VPI_COLOR_SPACE_RGB2020_LINEAR
Linear RGBA color space with ITU-R BT.2020 gamut.
Definition: Format.h:382
VPI_COLOR_SPACE_DISPLAYP3_NONLINEAR
@ VPI_COLOR_SPACE_DISPLAYP3_NONLINEAR
Display-P3 color space (DCI-P3 primaries, sRGB encoding).
Definition: Format.h:380
VPI_SWIZZLE_CHANNEL_Z
@ VPI_SWIZZLE_CHANNEL_Z
Selects the third channel of the color model.
Definition: Format.h:263
VPI_MEM_LAYOUT_BLOCK2_LINEAR
@ VPI_MEM_LAYOUT_BLOCK2_LINEAR
Pixels are laid out in block-linear format with height = 2.
Definition: Format.h:232
VPI_CHROMA_SUBSAMPLING_420_MPEG2
@ VPI_CHROMA_SUBSAMPLING_420_MPEG2
4:2:0 MPEG2 sub-sampling.
Definition: Format.h:477
VPI_FORMAT_PACKING_X8_Y8
@ VPI_FORMAT_PACKING_X8_Y8
Two 8-bit channels in two 8-bit words.
Definition: Format.h:148
VPI_FORMAT_PACKING_X8_Y8__X8_Z8
@ VPI_FORMAT_PACKING_X8_Y8__X8_Z8
2 pixels of 2 8-bit channels each, totalling 4 8-bit words.
Definition: Format.h:155
VPIChromaSubsampling
VPIChromaSubsampling
Defines how chroma-subsampling is done.
Definition: Format.h:460
VPI_FORMAT_PACKING_X2Y10Z10W10
@ VPI_FORMAT_PACKING_X2Y10Z10W10
Four 2-, 10-, 10- and 10-bit channels in one 32-bit word.
Definition: Format.h:180
VPI_COLOR_MODEL_RAW
@ VPI_COLOR_MODEL_RAW
RAW color model, used for Bayer image formats.
Definition: Format.h:348
VPI_MEM_LAYOUT_BLOCK8_LINEAR
@ VPI_MEM_LAYOUT_BLOCK8_LINEAR
Pixels are laid out in block-linear format with height = 8.
Definition: Format.h:238
VPI_FORMAT_PACKING_X64
@ VPI_FORMAT_PACKING_X64
One 64-bit channel.
Definition: Format.h:192
VPI_FORMAT_PACKING_X4Y12
@ VPI_FORMAT_PACKING_X4Y12
Two 4- and 12-bit channels in one 16-bit word.
Definition: Format.h:154
VPI_FORMAT_PACKING_X5Y5Z6
@ VPI_FORMAT_PACKING_X5Y5Z6
Three 5-, 5- and 6-bit channels in one 16-bit word.
Definition: Format.h:157
VPI_COLOR_SPACE_YCbCr601_VC1
@ VPI_COLOR_SPACE_YCbCr601_VC1
YCbCr ITU-R BT.601 color space with range reduced YCbCr for VC1 decoded planes.
Definition: Format.h:399
VPI_MEM_LAYOUT_BLOCK16_LINEAR
@ VPI_MEM_LAYOUT_BLOCK16_LINEAR
Pixels are laid out in block-linear format with height = 16.
Definition: Format.h:241
VPISwizzle
VPISwizzle
Defines the supported channel swizzle operations.
Definition: Format.h:276
VPI_FORMAT_PACKING_X16_Y16_Z16
@ VPI_FORMAT_PACKING_X16_Y16_Z16
Three 16-bit channels in three 16-bit words.
Definition: Format.h:189
vpiFormatPackingGetParams
void vpiFormatPackingGetParams(VPIFormatPacking packing, int *fixed, int *bitsX, int *bitsY, int *bitsZ, int *bitsW)
Returns channels' information from a format packing.
vpiFormatPackingGetChannelCount
int vpiFormatPackingGetChannelCount(VPIFormatPacking packing)
Returns the number of channels defined by the given packing.
VPI_FORMAT_PACKING_X4
@ VPI_FORMAT_PACKING_X4
One 4-bit channel.
Definition: Format.h:140
VPI_FORMAT_PACKING_X5Y5Z1W5
@ VPI_FORMAT_PACKING_X5Y5Z1W5
Four 5-, 5-, 1- and 5-bit channels in one 16-bit word.
Definition: Format.h:165
VPI_FORMAT_PACKING_X10Y6
@ VPI_FORMAT_PACKING_X10Y6
Two 10- and 6-bit channels in one 16-bit word.
Definition: Format.h:151
VPI_FORMAT_PACKING_X16Y16
@ VPI_FORMAT_PACKING_X16Y16
Two 16-bit channels in one 32-bit word.
Definition: Format.h:175
VPI_FORMAT_PACKING_0
@ VPI_FORMAT_PACKING_0
No channels.
Definition: Format.h:133
VPI_MEM_LAYOUT_PL
@ VPI_MEM_LAYOUT_PL
Definition: Format.h:251
VPI_CHROMA_SUBSAMPLING_422_BT601
@ VPI_CHROMA_SUBSAMPLING_422_BT601
4:2:2 BT.601 sub-sampling.
Definition: Format.h:465
VPI_COLOR_SPACE_BayerGRBG
@ VPI_COLOR_SPACE_BayerGRBG
Bayer format with X channel mapped to samples as follows:
Definition: Format.h:426
VPI_COLOR_SPACE_NONCOLOR
@ VPI_COLOR_SPACE_NONCOLOR
Used in image formats that don't represent a color.
Definition: Format.h:357
VPIColorSpace
VPIColorSpace
Defines color spaces.
Definition: Format.h:356
VPI_FORMAT_PACKING_X12Y20
@ VPI_FORMAT_PACKING_X12Y20
Two 12- and 20-bit channels in one 32-bit word.
Definition: Format.h:176
VPI_SWIZZLE_CHANNEL_W
@ VPI_SWIZZLE_CHANNEL_W
Selects the fourth channel of the color model.
Definition: Format.h:264
VPI_SWIZZLE_CHANNEL_Y
@ VPI_SWIZZLE_CHANNEL_Y
Selects the second channel of the color model.
Definition: Format.h:262
VPI_FORMAT_PACKING_INVALID
@ VPI_FORMAT_PACKING_INVALID
Denotes an invalid packing.
Definition: Format.h:134
VPI_FORMAT_PACKING_Y8_X8__Z8_X8
@ VPI_FORMAT_PACKING_Y8_X8__Z8_X8
2 pixels of 2 swapped 8-bit channels each, totalling 4 8-bit words.
Definition: Format.h:156
VPI_COLOR_SPACE_SensorRGB_LINEAR
@ VPI_COLOR_SPACE_SensorRGB_LINEAR
This color space is used to represent camera sensor data after debayering.
Definition: Format.h:374
VPI_COLOR_SPACE_RGB2020_PQ
@ VPI_COLOR_SPACE_RGB2020_PQ
Non-linear RGB color space encoded with SMPTE ST 2084 Perceptual Quantizer transfer function.
Definition: Format.h:383
VPIFormatDataType
VPIFormatDataType
Defines the channel data type.
Definition: Format.h:211
VPI_SWIZZLE_CHANNEL_1
@ VPI_SWIZZLE_CHANNEL_1
Sets the corresponding channel to have its maximum value.
Definition: Format.h:265
VPI_FORMAT_PACKING_X8_Y8_Z8
@ VPI_FORMAT_PACKING_X8_Y8_Z8
Three 8-bit channels in three 8-bit words.
Definition: Format.h:169
VPI_COLOR_MODEL_OTHER
@ VPI_COLOR_MODEL_OTHER
Other non-specified color model.
Definition: Format.h:344
VPI_COLOR_SPACE_RGB709_LINEAR
@ VPI_COLOR_SPACE_RGB709_LINEAR
Linear RGBA color space with ITU-R BT.709/sRGB gamut.
Definition: Format.h:378
VPI_COLOR_SPACE_BayerCRBC
@ VPI_COLOR_SPACE_BayerCRBC
Bayer format with X channel mapped to samples as follows:
Definition: Format.h:447
VPI_FORMAT_PACKING_X2
@ VPI_FORMAT_PACKING_X2
One 2-bit channel.
Definition: Format.h:138
VPI_FORMAT_DATA_TYPE_UNSIGNED
@ VPI_FORMAT_DATA_TYPE_UNSIGNED
Channels are unsigned integer values.
Definition: Format.h:212
VPI_FORMAT_PACKING_X1Y5Z5W5
@ VPI_FORMAT_PACKING_X1Y5Z5W5
Four 1-, 5-, 5- and 5-bit channels in one 16-bit word.
Definition: Format.h:161
VPI_FORMAT_PACKING_X32
@ VPI_FORMAT_PACKING_X32
One 32-bit channel.
Definition: Format.h:172
VPI_COLOR_SPACE_LUV
@ VPI_COLOR_SPACE_LUV
CIE L*u*b* color space.
Definition: Format.h:363
VPI_COLOR_SPACE_BayerBGGR
@ VPI_COLOR_SPACE_BayerBGGR
Bayer format with X channel mapped to samples as follows:
Definition: Format.h:419
VPI_COLOR_SPACE_YCbCr709_ER
@ VPI_COLOR_SPACE_YCbCr709_ER
YCbCr ITU-R BT.709 color space with extended range luma (0-255).
Definition: Format.h:402
VPI_FORMAT_PACKING_X2Y14
@ VPI_FORMAT_PACKING_X2Y14
Two 2- and 14-bit channels in one 16-bit word.
Definition: Format.h:152
VPIFormatPacking
VPIFormatPacking
Defines how channels are packed into an image plane element.
Definition: Format.h:132
VPI_FORMAT_PACKING_X12Y4Z12W4
@ VPI_FORMAT_PACKING_X12Y4Z12W4
Four 12-, 4-, 12- and 4-bit channels in one 32-bit word.
Definition: Format.h:186
VPI_FORMAT_PACKING_X4Y4Z4W4
@ VPI_FORMAT_PACKING_X4Y4Z4W4
Four 4-bit channels in one 16-bit word.
Definition: Format.h:163
VPI_FORMAT_PACKING_X24
@ VPI_FORMAT_PACKING_X24
One 24-bit channel.
Definition: Format.h:168
VPI_SWIZZLE_CHANNEL_0
@ VPI_SWIZZLE_CHANNEL_0
Don't select a channel.
Definition: Format.h:260
vpiMakeChromaSubsampling
VPIChromaSubsampling vpiMakeChromaSubsampling(int divHoriz, int divVert, int centerSampleHoriz, int centerSampleVert)
Creates an user-defined VPIChromaSubsampling definition.
VPI_FORMAT_PACKING_X3Y3Z2
@ VPI_FORMAT_PACKING_X3Y3Z2
Three 3-, 3- and 2-bit channels in one 8-bit word.
Definition: Format.h:144
VPI_FORMAT_PACKING_X32_Y32_Z32
@ VPI_FORMAT_PACKING_X32_Y32_Z32
Three 32-bit channels in three 32-bit words.
Definition: Format.h:200
VPI_FORMAT_DATA_TYPE_FLOAT
@ VPI_FORMAT_DATA_TYPE_FLOAT
Channel are floating point values.
Definition: Format.h:214
VPI_FORMAT_PACKING_X6Y5Z5
@ VPI_FORMAT_PACKING_X6Y5Z5
Three 6-, 5- and 5-bit channels in one 16-bit word.
Definition: Format.h:160
VPI_FORMAT_PACKING_X16
@ VPI_FORMAT_PACKING_X16
One 16-bit channel.
Definition: Format.h:147
VPI_COLOR_SPACE_RGB
@ VPI_COLOR_SPACE_RGB
RGBA color space.
Definition: Format.h:368
VPI_COLOR_SPACE_YCbCr709
@ VPI_COLOR_SPACE_YCbCr709
YCbCr ITU-R BT.709 color space with standard range luma (16-235).
Definition: Format.h:401
VPI_FORMAT_PACKING_X32Y32Z32W32
@ VPI_FORMAT_PACKING_X32Y32Z32W32
Four 32-bit channels in one 128-bit word.
Definition: Format.h:206
VPI_FORMAT_PACKING_X16Y16Z16W16
@ VPI_FORMAT_PACKING_X16Y16Z16W16
Four 16-bit channels in one 64-bit word.
Definition: Format.h:197
VPI_COLOR_SPACE_DISPLAYP3_LINEAR
@ VPI_COLOR_SPACE_DISPLAYP3_LINEAR
Display-P3 color space (DCI-P3 primaries, linear encoding).
Definition: Format.h:379
VPI_CHROMA_SUBSAMPLING_422_COSITED
@ VPI_CHROMA_SUBSAMPLING_422_COSITED
Alias to VPI_CHROMA_SUBSAMPLING_422_BT601.
Definition: Format.h:468
VPI_SWIZZLE_CHANNEL_X
@ VPI_SWIZZLE_CHANNEL_X
Selects the first channel of the color model.
Definition: Format.h:261
VPI_CHROMA_SUBSAMPLING_420_MPEG1
@ VPI_CHROMA_SUBSAMPLING_420_MPEG1
4:2:0 MPEG1 sub-sampling.
Definition: Format.h:474
VPI_FORMAT_PACKING_X5Y5Z5W1
@ VPI_FORMAT_PACKING_X5Y5Z5W1
Four 5-, 5-, 5- and 1-bit channels in one 16-bit word.
Definition: Format.h:166
VPIMemLayout
VPIMemLayout
Defines how the 2D plane pixels are laid out in memory.
Definition: Format.h:224
VPI_FORMAT_PACKING_X8Y8Z8W8
@ VPI_FORMAT_PACKING_X8Y8Z8W8
Four 8-bit channels in one 32-bit word.
Definition: Format.h:182
VPI_FORMAT_PACKING_X96
@ VPI_FORMAT_PACKING_X96
One 96-bit channel.
Definition: Format.h:199
VPI_FORMAT_PACKING_X8
@ VPI_FORMAT_PACKING_X8
One 8-bit channel.
Definition: Format.h:142
VPI_FORMAT_PACKING_X6Y10
@ VPI_FORMAT_PACKING_X6Y10
Two 6- and 10-bit channels in one 16-bit word.
Definition: Format.h:150
VPI_FORMAT_PACKING_X12Y4
@ VPI_FORMAT_PACKING_X12Y4
Two 12- and 4-bit channels in one 16-bit word.
Definition: Format.h:153
VPI_FORMAT_PACKING_X10Y10Z10W2
@ VPI_FORMAT_PACKING_X10Y10Z10W2
Four 10-, 10-, 10- and 2-bit channels in one 32-bit word.
Definition: Format.h:185
VPI_FORMAT_PACKING_X8_Y8_Z8_W8
@ VPI_FORMAT_PACKING_X8_Y8_Z8_W8
Four 8-bit channels in four 8-bit words.
Definition: Format.h:183
VPI_FORMAT_PACKING_X10Y11Z11
@ VPI_FORMAT_PACKING_X10Y11Z11
Three 10-, 11- and 11-bit channels in one 32-bit word.
Definition: Format.h:177
VPI_COLOR_MODEL_YUV
@ VPI_COLOR_MODEL_YUV
YUV color model.
Definition: Format.h:347
VPI_FORMAT_PACKING_X32_Y32_Z32_W32
@ VPI_FORMAT_PACKING_X32_Y32_Z32_W32
Four 32-bit channels in four 32-bit words.
Definition: Format.h:204
VPI_COLOR_SPACE_RGB709
@ VPI_COLOR_SPACE_RGB709
Non-linear RGB ITU-R BT.709 color space with linear alpha.
Definition: Format.h:377
VPI_MEM_LAYOUT_PITCH_LINEAR
@ VPI_MEM_LAYOUT_PITCH_LINEAR
Pixels are laid out in row-major order, i.e., .
Definition: Format.h:226
VPI_FORMAT_PACKING_X32_Y32
@ VPI_FORMAT_PACKING_X32_Y32
Two 32-bit channels in two 32-bit words.
Definition: Format.h:193
vpiFormatPackingGetBitsPerPixel
int vpiFormatPackingGetBitsPerPixel(VPIFormatPacking packing)
Returns the number of bits per pixel of the given packing.
VPIColorModel
VPIColorModel
Defines color models.
Definition: Format.h:341
VPI_MEM_LAYOUT_BLOCK4_LINEAR
@ VPI_MEM_LAYOUT_BLOCK4_LINEAR
Pixels are laid out in block-linear format with height = 4.
Definition: Format.h:235
VPI_MEM_LAYOUT_BLOCK1_LINEAR
@ VPI_MEM_LAYOUT_BLOCK1_LINEAR
Pixels are laid out in block-linear format with height = 1.
Definition: Format.h:229
VPI_COLOR_SPACE_YCbCr2020_PQ_ER
@ VPI_COLOR_SPACE_YCbCr2020_PQ_ER
YCbCr ITU-R BT.2020 color space encoded with SMPTE ST 2084 Perceptual Quantizer transfer function wit...
Definition: Format.h:404
VPI_CHROMA_SUBSAMPLING_420_COSITED
@ VPI_CHROMA_SUBSAMPLING_420_COSITED
4:2:0 sub-sampling.
Definition: Format.h:471
VPI_COLOR_SPACE_BayerRGGB
@ VPI_COLOR_SPACE_BayerRGGB
Bayer format with X channel mapped to samples as follows:
Definition: Format.h:412
VPI_COLOR_SPACE_YCbCr2020
@ VPI_COLOR_SPACE_YCbCr2020
YCbCr ITU-R BT.2020 color space with standard range luma (16-235).
Definition: Format.h:403
VPI_FORMAT_PACKING_X4Y4
@ VPI_FORMAT_PACKING_X4Y4
Two 4-bit channels in one word.
Definition: Format.h:143
VPISwizzleChannel
VPISwizzleChannel
Defines the format channel names.
Definition: Format.h:259
VPI_COLOR_SPACE_HSV
@ VPI_COLOR_SPACE_HSV
Hue, saturation, value color space.
Definition: Format.h:359
VPI_CHROMA_SUBSAMPLING_444
@ VPI_CHROMA_SUBSAMPLING_444
4:4:4 sub-sampling.
Definition: Format.h:462
VPI_COLOR_SPACE_BayerCCCC
@ VPI_COLOR_SPACE_BayerCCCC
Bayer format with X channel mapped to samples as follows:
Definition: Format.h:440
vpiMakeFormatPacking
VPIFormatPacking vpiMakeFormatPacking(int fixed, int bitsX, int bitsY, int bitsZ, int bitsW)
Returns a pre-defined VPIFormatPacking given the number of bits in each channel.
VPI_COLOR_SPACE_BayerGBRG
@ VPI_COLOR_SPACE_BayerGBRG
Bayer format with X channel mapped to samples as follows:
Definition: Format.h:433
VPI_FORMAT_PACKING_X1
@ VPI_FORMAT_PACKING_X1
One 1-bit channel.
Definition: Format.h:136
vpiMakeSwizzle
VPISwizzle vpiMakeSwizzle(VPISwizzleChannel x, VPISwizzleChannel y, VPISwizzleChannel z, VPISwizzleChannel w)
Creates an user-defined VPISwizzle operation.
VPI_MEM_LAYOUT_BLOCK32_LINEAR
@ VPI_MEM_LAYOUT_BLOCK32_LINEAR
Pixels are laid out in block-linear format with height = 32.
Definition: Format.h:244
VPI_COLOR_SPACE_YCbCr601
@ VPI_COLOR_SPACE_YCbCr601
YCbCr ITU-R BT.601 color space with standard range luma (16-235)
Definition: Format.h:385
VPI_FORMAT_PACKING_X11Y11Z10
@ VPI_FORMAT_PACKING_X11Y11Z10
Three 11-, 11- and 10-bit channels in one 32-bit word.
Definition: Format.h:179
VPI_COLOR_SPACE_YIQ
@ VPI_COLOR_SPACE_YIQ
Luma and I/Q chrominance color space.
Definition: Format.h:361
VPI_FORMAT_PACKING_X10Y6Z10W6
@ VPI_FORMAT_PACKING_X10Y6Z10W6
Four 10-, 6-, 10- and 6-bit channels in one 32-bit word.
Definition: Format.h:184
VPI_FORMAT_PACKING_X48
@ VPI_FORMAT_PACKING_X48
One 48-bit channel.
Definition: Format.h:188
VPI_COLOR_SPACE_HSL
@ VPI_COLOR_SPACE_HSL
Hue, saturation, lightness color space.
Definition: Format.h:360
VPI_CHROMA_SUBSAMPLING_NONE
@ VPI_CHROMA_SUBSAMPLING_NONE
Used when no chroma subsampling takes place, specially for color spaces without chroma components.
Definition: Format.h:480
VPI_FORMAT_PACKING_X5Y6Z5
@ VPI_FORMAT_PACKING_X5Y6Z5
Three 5-, 6- and 5-bit channels in one 16-bit word.
Definition: Format.h:159
VPI_FORMAT_PACKING_X5Y1Z5W5
@ VPI_FORMAT_PACKING_X5Y1Z5W5
Four 5-, 1-, 5- and 5-bit channels in one 16-bit word.
Definition: Format.h:164
VPI_COLOR_SPACE_sRGB
@ VPI_COLOR_SPACE_sRGB
sRGB color space with linear alpha.
Definition: Format.h:376
VPI_COLOR_MODEL_RGBA
@ VPI_COLOR_MODEL_RGBA
RGB + alpha color model.
Definition: Format.h:346
VPI_COLOR_SPACE_RGB2020
@ VPI_COLOR_SPACE_RGB2020
Non-linear RGB ITU-R BT.2020 color space with linear alpha.
Definition: Format.h:381
VPI_FORMAT_PACKING_X16_Y16
@ VPI_FORMAT_PACKING_X16_Y16
Two 16-bit channels in one 16-bit words.
Definition: Format.h:173
VPI_MEM_LAYOUT_BL
@ VPI_MEM_LAYOUT_BL
Definition: Format.h:252
VPI_COLOR_SPACE_XYZ
@ VPI_COLOR_SPACE_XYZ
CIE XYZ tristimulus color space.
Definition: Format.h:364
VPI_MEM_LAYOUT_BLOCK_LINEAR
@ VPI_MEM_LAYOUT_BLOCK_LINEAR
Default block-linear format.
Definition: Format.h:248