codekingpro/portable-devtools
114k
1/*
2 * This copyright notice applies to this header file only:
3 *
4 * Copyright (c) 2010-2024 NVIDIA Corporation
5 *
6 * Permission is hereby granted, free of charge, to any person
7 * obtaining a copy of this software and associated documentation
8 * files (the "Software"), to deal in the Software without
9 * restriction, including without limitation the rights to use,
10 * copy, modify, merge, publish, distribute, sublicense, and/or sell
11 * copies of the software, and to permit persons to whom the
12 * software is furnished to do so, subject to the following
13 * conditions:
14 *
15 * The above copyright notice and this permission notice shall be
16 * included in all copies or substantial portions of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
20 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
22 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
23 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25 * OTHER DEALINGS IN THE SOFTWARE.
26 */
27
28#pragma once
29#include <stdint.h>
30#include <cuda_runtime.h>
31
32typedef enum ColorSpaceStandard {
33 ColorSpaceStandard_BT709 = 1,
34 ColorSpaceStandard_Unspecified = 2,
35 ColorSpaceStandard_Reserved = 3,
36 ColorSpaceStandard_FCC = 4,
37 ColorSpaceStandard_BT470 = 5,
38 ColorSpaceStandard_BT601 = 6,
39 ColorSpaceStandard_SMPTE240M = 7,
40 ColorSpaceStandard_YCgCo = 8,
41 ColorSpaceStandard_BT2020 = 9,
42 ColorSpaceStandard_BT2020C = 10
43} ColorSpaceStandard;
44
45typedef struct uchar6_
46{
47 uchar3 c1;
48 uchar3 c2;
49}uchar6;
50
51union BGR24 {
52 uchar3 d;
53 struct {
54 uint8_t b, g, r;
55 } c;
56};
57
58union BGRA32 {
59 uint32_t d;
60 uchar4 v;
61 struct {
62 uint8_t b, g, r, a;
63 } c;
64};
65
66union RGB24 {
67 uchar3 d;
68 struct {
69 uint8_t r, g, b;
70 } c;
71};
72
73union RGBA32 {
74 uint32_t d;
75 uchar4 v;
76 struct {
77 uint8_t r, g, b, a;
78 } c;
79};
80
81union BGRA64 {
82 uint64_t d;
83 ushort4 v;
84 struct {
85 uint16_t b, g, r, a;
86 } c;
87};
88
89union RGBA64 {
90 uint64_t d;
91 ushort4 v;
92 struct {
93 uint16_t r, g, b, a;
94 } c;
95};
96 