AJA NTV2 SDK
17.1.3.1410
NTV2 SDK 17.1.3.1410
ntv2videodefines.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: MIT */
7
#ifndef VIDEODEFINES_H
8
#define VIDEODEFINES_H
9
#include "
ajatypes.h
"
10
11
#define PI_FLOAT (3.141592654)
12
13
#define CCIR601_8BIT_BLACK 16
14
#define CCIR601_8BIT_WHITE 235
15
#define CCIR601_8BIT_CHROMAOFFSET 128
16
17
#define CCIR601_10BIT_BLACK 64
18
#define CCIR601_10BIT_WHITE 940
19
#define CCIR601_10BIT_CHROMAOFFSET 512
20
21
#define MIN_RGB_8BIT 0
22
#define MAX_RGB_8BIT 255
23
#define MIN_RGB_10BIT 0
24
#define MAX_RGB_10BIT 1023
25
#define MIN_RGB_16BIT 0 // KAM
26
#define MAX_RGB_16BIT 65535 // KAM
27
28
// NOTE: Changed the "(__x__) < MIN_RGB_nBIT" comparisons to "(__x__) <= MIN_RGB_nBIT"
29
// in the following three macros to eliminate gcc "comparison always true" warnings
30
// when __x__ is an unsigned value.
31
#define ClipRGB_8BIT(__x__) ((__x__) > MAX_RGB_8BIT ? (MAX_RGB_8BIT) \
32
: ((__x__) <= MIN_RGB_8BIT ? (MIN_RGB_8BIT) \
33
: (__x__)))
34
#define ClipRGB_10BIT(__x__) ((__x__) > MAX_RGB_10BIT ? (MAX_RGB_10BIT) \
35
: ((__x__) <= MIN_RGB_10BIT ? (MIN_RGB_10BIT) \
36
: (__x__)))
37
#define ClipRGB_16BIT(__x__) ((__x__) > MAX_RGB_16BIT ? (MAX_RGB_16BIT) \
38
: ((__x__) <= MIN_RGB_16BIT ? (MIN_RGB_16BIT) \
39
: (__x__)))
40
41
#define NUMACTIVELINES_525 486
42
#define NUMACTIVELINES_625 576
43
44
#define MAXSQUAREPIXELS_525 648
45
#define MAXSQUAREPIXELS_625 768
46
47
#define NUMCOMPONENTPIXELS 720
48
#define YCBCRLINEPITCH_SD 480 // in 32 bit words for packed 10 bit
49
#define RGBALPHALINEPITCH_625 720 // in 32 bit words no matter what framegeometry
50
#define RGBALPHALINEPITCH_525 720 // in 32 bit words no matter what framegeometry
51
#define RGB24LINEPITCH_525 (540)
52
#define RGB24LINEPITCH_625 (540)
53
54
55
// HD Defines
56
#define HD_NUMACTIVELINES_720 720 //duh?
57
#define HD_NUMACTIVELINES_1080 1080 // double duh?
58
#define HD_NUMACTIVELINES_2K 1556
59
#define HD_NUMLINES_2K 1588 // In actual FrameBuffer
60
#define HD_FIRSTACTIVELINE_2K (HD_NUMLINES_2K-HD_NUMACTIVELINES_2K)
61
#define HD_NUMLINES_4K 2160
62
#define FD_NUMLINES_8K 4320
63
64
#define HD_NUMACTIVELINES_720_QREZ (HD_NUMACTIVELINES_720/2)
65
#define HD_NUMACTIVELINES_1080_QREZ (HD_NUMACTIVELINES_1080/2)
66
67
#define HD_NUMCOMPONENTPIXELS_720 1280 // in a line
68
#define HD_NUMCOMPONENTPIXELS_1080 1920 // in a line
69
#define HD_NUMCOMPONENTPIXELS_1080_2K 2048 // in a line
70
#define HD_NUMCOMPONENTPIXELS_2K 2048 // in a line
71
#define HD_NUMCOMPONENTPIXELS_QUADHD 3840 // in a line
72
#define HD_NUMCOMPONENTPIXELS_4K 4096 // in a line
73
#define FD_NUMCOMPONENTPIXELS_UHD2 7680 // in a line
74
#define FD_NUMCOMPONENTPIXELS_8K 8192 // in a line
75
76
#define HD_NUMCOMPONENTPIXELS_720_DVCPRO 960 // in a line
77
#define HD_NUMCOMPONENTPIXELS_1080_DVCPRO 1280 // in a line
78
79
#define HD_NUMCOMPONENTPIXELS_720_QREZ (HD_NUMCOMPONENTPIXELS_720/2) // in a line
80
#define HD_NUMCOMPONENTPIXELS_1080_QREZ (HD_NUMCOMPONENTPIXELS_1080/2) // in a line
81
82
#define HD_NUMCOMPONENTPIXELS_720_HDV 960 // in a line
83
#define HD_NUMCOMPONENTPIXELS_1080_HDV 1440 // in a line
84
85
// Linepitch always in 32 bit words.
86
#define HD_YCBCRLINEPITCH_720 864 // dx*8/3/4 32 bit words for packed 10 bit
87
#define HD_YCBCRLINEPITCH_1080 1280 // ""
88
#define HD_YCBCRLINEPITCH_2K 1376 // ""
89
#define HD_YCBCRLINEPITCH_3840 2560 // ""
90
#define HD_YCBCRLINEPITCH_4K 2752 // ""
91
#define FD_YCBCRLINEPITCH_UHD2 5120 // ""
92
#define FD_YCBCRLINEPITCH_8K 5472 // ""
93
94
#define HD_YCBCRLINEPITCH_720_DVCPRO (960*2/4) // dvcpro always 8 bit
95
#define HD_YCBCRLINEPITCH_1080_DVCPRO (1280*2/4) // dvcpro always 8 bit
96
97
#define HD_YCBCRLINEPITCH_720_QREZ (1280/4) // in 32 bit words for packed 10 bit
98
#define HD_YCBCRLINEPITCH_1080_QREZ (1920/4) // ""
99
100
#define HD_YCBCRLINEPITCH_720_HDV (960*2/4) // hdv always 8 bit
101
#define HD_YCBCRLINEPITCH_1080_HDV (1440*2/4) // hdv always 8 bit
102
103
#define RGB24LINEPITCH_720 (960)
104
#define RGB24LINEPITCH_1080 (1440)
105
#define RGB24LINEPITCH_2048 (1536)
106
#define RGB24LINEPITCH_3840 (2880)
107
#define RGB24LINEPITCH_4096 (3072)
108
#define RGB24LINEPITCH_7680 (5760)
109
#define RGB24LINEPITCH_8192 (6144)
110
111
#define RGB48LINEPITCH_525 (RGB24LINEPITCH_525*2)
112
#define RGB48LINEPITCH_625 (RGB24LINEPITCH_625*2)
113
#define RGB48LINEPITCH_720 (RGB24LINEPITCH_720*2)
114
#define RGB48LINEPITCH_1080 (RGB24LINEPITCH_1080*2)
115
#define RGB48LINEPITCH_2048 (RGB24LINEPITCH_2048*2)
116
#define RGB48LINEPITCH_3840 (RGB24LINEPITCH_3840*2)
117
#define RGB48LINEPITCH_4096 (RGB24LINEPITCH_4096*2)
118
#define RGB48LINEPITCH_7680 (RGB24LINEPITCH_7680*2)
119
#define RGB48LINEPITCH_8192 (RGB24LINEPITCH_8192*2)
120
121
#define RGB12PLINEPITCH_525 (MAXSQUAREPIXELS_525*36/8)/4
122
#define RGB12PLINEPITCH_625 (MAXSQUAREPIXELS_625*36/8)/4
123
#define RGB12PLINEPITCH_720 (HD_NUMCOMPONENTPIXELS_720*36/8)/4
124
#define RGB12PLINEPITCH_1080 (HD_NUMCOMPONENTPIXELS_1080*36/8)/4
125
#define RGB12PLINEPITCH_2048 (HD_NUMCOMPONENTPIXELS_1080_2K*36/8)/4
126
#define RGB12PLINEPITCH_3840 (HD_NUMCOMPONENTPIXELS_QUADHD*36/8)/4
127
#define RGB12PLINEPITCH_4096 (HD_NUMCOMPONENTPIXELS_4K*36/8)/4
128
#define RGB12PLINEPITCH_7680 (FD_NUMCOMPONENTPIXELS_UHD2*36/8)/4
129
#define RGB12PLINEPITCH_8192 (FD_NUMCOMPONENTPIXELS_8K*36/8)/4
130
131
#define PRORES_MAXBUFFERSIZE (1105920) // bytes - PAL 10bit
132
133
// Roll Defines
134
#define HD_ROLLNUMLINES 4096
135
#define HD_ROLLNUMPIXELS 4096
136
137
typedef
struct
{
138
unsigned
char
Blue
;
139
unsigned
char
Green
;
140
unsigned
char
Red
;
141
unsigned
char
Alpha
;
142
}
RGBAlphaPixel
;
143
144
145
typedef
struct
{
146
UWord
Blue
;
147
UWord
Green
;
148
UWord
Red
;
149
UWord
Alpha
;
150
}
RGBAlpha10BitPixel
;
151
152
typedef
struct
{
153
UWord
Blue
;
154
UWord
Green
;
155
UWord
Red
;
156
UWord
Alpha
;
157
}
RGBAlpha16BitPixel
;
158
159
typedef
struct
{
160
unsigned
char
Red
;
161
unsigned
char
Green
;
162
unsigned
char
Blue
;
163
unsigned
char
Alpha
;
164
}
AERGBAlphaPixel
;
165
166
typedef
struct
{
167
Fixed_
Blue
;
168
Fixed_
Green
;
169
Fixed_
Red
;
170
Fixed_
Alpha
;
171
}
RGBAlphaFixedPixel
;
172
173
typedef
struct
{
174
unsigned
char
Red
;
175
unsigned
char
Green
;
176
unsigned
char
Blue
;
177
}
RGBPixel
;
178
179
typedef
struct
{
180
unsigned
char
Blue
;
181
unsigned
char
Green
;
182
unsigned
char
Red
;
183
}
BGRPixel
;
184
185
typedef
struct
186
{
187
unsigned
char
Alpha
;
188
unsigned
char
cr
;
189
unsigned
char
y
;
190
unsigned
char
cb
;
191
}
YCbCrAlphaPixel
;
192
193
typedef
struct
194
{
195
unsigned
char
cb
;
196
unsigned
char
y
;
197
unsigned
char
cr
;
198
}
YCbCrPixel
;
199
200
typedef
struct
201
{
202
UWord
cb
;
203
UWord
y
;
204
UWord
cr
;
205
}
YCbCr10BitPixel
;
206
207
typedef
struct
208
{
209
UWord
Alpha
;
210
UWord
cb
;
211
UWord
y
;
212
UWord
cr
;
213
}
YCbCr10BitAlphaPixel
;
214
215
typedef
struct
{
216
char
SigName[40];
217
short
Y[
NUMCOMPONENTPIXELS
];
218
short
ColorDiff[
NUMCOMPONENTPIXELS
];
219
}
TestLineDataStr
;
220
221
#endif // VIDEODEFINES_H
RGBPixel::Green
unsigned char Green
Definition:
ntv2videodefines.h:175
RGBAlpha10BitPixel::Alpha
UWord Alpha
Definition:
ntv2videodefines.h:149
AERGBAlphaPixel::Alpha
unsigned char Alpha
Definition:
ntv2videodefines.h:163
YCbCrPixel::cb
unsigned char cb
Definition:
ntv2videodefines.h:195
RGBAlphaPixel::Alpha
unsigned char Alpha
Definition:
ntv2videodefines.h:141
RGBAlphaPixel::Red
unsigned char Red
Definition:
ntv2videodefines.h:140
YCbCrAlphaPixel::Alpha
unsigned char Alpha
Definition:
ntv2videodefines.h:187
YCbCr10BitPixel::cb
UWord cb
Definition:
ntv2videodefines.h:202
BGRPixel::Blue
unsigned char Blue
Definition:
ntv2videodefines.h:180
YCbCrPixel::y
unsigned char y
Definition:
ntv2videodefines.h:196
YCbCr10BitAlphaPixel::cb
UWord cb
Definition:
ntv2videodefines.h:210
YCbCr10BitPixel::cr
UWord cr
Definition:
ntv2videodefines.h:204
YCbCr10BitAlphaPixel::y
UWord y
Definition:
ntv2videodefines.h:211
YCbCr10BitAlphaPixel::Alpha
UWord Alpha
Definition:
ntv2videodefines.h:209
RGBAlphaPixel::Green
unsigned char Green
Definition:
ntv2videodefines.h:139
AERGBAlphaPixel::Green
unsigned char Green
Definition:
ntv2videodefines.h:161
YCbCr10BitAlphaPixel
Definition:
ntv2videodefines.h:207
ajatypes.h
Declares the most fundamental data types used by NTV2. Since Windows NT was the first principal devel...
YCbCrPixel
Definition:
ntv2videodefines.h:193
RGBAlpha16BitPixel::Alpha
UWord Alpha
Definition:
ntv2videodefines.h:156
BGRPixel
Definition:
ntv2videodefines.h:179
YCbCrAlphaPixel::cb
unsigned char cb
Definition:
ntv2videodefines.h:190
YCbCr10BitPixel
Definition:
ntv2videodefines.h:200
TestLineDataStr
Definition:
ntv2videodefines.h:215
RGBAlphaFixedPixel::Red
Fixed_ Red
Definition:
ntv2videodefines.h:169
BGRPixel::Green
unsigned char Green
Definition:
ntv2videodefines.h:181
RGBAlphaFixedPixel::Blue
Fixed_ Blue
Definition:
ntv2videodefines.h:167
YCbCrAlphaPixel
Definition:
ntv2videodefines.h:185
UWord
uint16_t UWord
Definition:
ajatypes.h:251
RGBAlpha10BitPixel::Green
UWord Green
Definition:
ntv2videodefines.h:147
RGBAlpha16BitPixel::Red
UWord Red
Definition:
ntv2videodefines.h:155
RGBPixel
Definition:
ntv2videodefines.h:173
RGBAlpha16BitPixel::Blue
UWord Blue
Definition:
ntv2videodefines.h:153
AERGBAlphaPixel::Red
unsigned char Red
Definition:
ntv2videodefines.h:160
RGBPixel::Red
unsigned char Red
Definition:
ntv2videodefines.h:174
RGBAlpha16BitPixel
Definition:
ntv2videodefines.h:152
AERGBAlphaPixel
Definition:
ntv2videodefines.h:159
RGBAlphaPixel::Blue
unsigned char Blue
Definition:
ntv2videodefines.h:138
RGBAlphaFixedPixel::Green
Fixed_ Green
Definition:
ntv2videodefines.h:168
YCbCr10BitAlphaPixel::cr
UWord cr
Definition:
ntv2videodefines.h:212
YCbCrAlphaPixel::y
unsigned char y
Definition:
ntv2videodefines.h:189
AERGBAlphaPixel::Blue
unsigned char Blue
Definition:
ntv2videodefines.h:162
YCbCrPixel::cr
unsigned char cr
Definition:
ntv2videodefines.h:197
RGBPixel::Blue
unsigned char Blue
Definition:
ntv2videodefines.h:176
RGBAlpha10BitPixel::Red
UWord Red
Definition:
ntv2videodefines.h:148
RGBAlphaFixedPixel::Alpha
Fixed_ Alpha
Definition:
ntv2videodefines.h:170
RGBAlpha16BitPixel::Green
UWord Green
Definition:
ntv2videodefines.h:154
RGBAlpha10BitPixel::Blue
UWord Blue
Definition:
ntv2videodefines.h:146
YCbCrAlphaPixel::cr
unsigned char cr
Definition:
ntv2videodefines.h:188
RGBAlphaFixedPixel
Definition:
ntv2videodefines.h:166
RGBAlpha10BitPixel
Definition:
ntv2videodefines.h:145
YCbCr10BitPixel::y
UWord y
Definition:
ntv2videodefines.h:203
BGRPixel::Red
unsigned char Red
Definition:
ntv2videodefines.h:182
NUMCOMPONENTPIXELS
#define NUMCOMPONENTPIXELS
Definition:
ntv2videodefines.h:47
RGBAlphaPixel
Definition:
ntv2videodefines.h:137
Fixed_
int Fixed_
Definition:
ajatypes.h:319
libajantv2
ajantv2
includes
ntv2videodefines.h
Generated on Tue Dec 3 2024 10:26:00 for AJA NTV2 SDK by
1.8.17