AJA NTV2 SDK  17.5.0.1492
NTV2 SDK 17.5.0.1492
ntv2formatdescriptor.cpp
Go to the documentation of this file.
1 /* SPDX-License-Identifier: MIT */
7 #include "ntv2formatdescriptor.h"
8 #include "ntv2utils.h"
9 #if defined(AJALinux)
10  #include <string.h> // For memset
11  #include <stdint.h>
12 #endif
13 #include <sstream>
14 #include <iomanip>
15 
16 
17 using namespace std;
18 
19 #define AJA_FD_BEGIN NTV2FormatDescriptor (
20 #define AJA_FD_END 0)
21 #define AJA_FD_NOTSUPPORTED NTV2FormatDescriptor ()
22 #define AJA_FD_TBD NTV2FormatDescriptor ()
23 
24 #define AsConstUBytePtr(_x_) reinterpret_cast<const UByte*>(_x_)
25 #define AsUBytePtr(_x_) reinterpret_cast<UByte*>(_x_)
26 
27 
29 {
30  /* NTV2_FBF_10BIT_YCBCR */ {"YCbCr", "", "", ""},
31  /* NTV2_FBF_8BIT_YCBCR */ {"YCbCr", "", "", ""},
32  /* NTV2_FBF_ARGB */ {"ARGB", "", "", ""},
33  /* NTV2_FBF_RGBA */ {"RGBA", "", "", ""},
34  /* NTV2_FBF_10BIT_RGB */ {"RGB", "", "", ""},
35  /* NTV2_FBF_8BIT_YCBCR_YUY2 */ {"YCbCr", "", "", ""},
36  /* NTV2_FBF_ABGR */ {"ABGR", "", "", ""},
37  /* NTV2_FBF_10BIT_DPX */ {"", "", "", ""},
38  /* NTV2_FBF_10BIT_YCBCR_DPX */ {"YCbCr", "", "", ""},
39  /* NTV2_FBF_8BIT_DVCPRO */ {"", "", "", ""},
40  /* NTV2_FBF_8BIT_YCBCR_420PL3 */ {"Y", "Cb", "Cr", ""},
41  /* NTV2_FBF_8BIT_HDV */ {"", "", "", ""},
42  /* NTV2_FBF_24BIT_RGB */ {"RGB", "", "", ""},
43  /* NTV2_FBF_24BIT_BGR */ {"BGR", "", "", ""},
44  /* NTV2_FBF_10BIT_YCBCRA */ {"YCbCrA", "", "", ""},
45  /* NTV2_FBF_10BIT_DPX_LE */ {"", "", "", ""},
46  /* NTV2_FBF_48BIT_RGB */ {"RGB", "", "", ""},
47  /* NTV2_FBF_12BIT_RGB_PACKED */ {"RGB", "", "", ""},
48  /* NTV2_FBF_PRORES_DVCPRO */ {"", "", "", ""},
49  /* NTV2_FBF_PRORES_HDV */ {"", "", "", ""},
50  /* NTV2_FBF_10BIT_RGB_PACKED */ {"RGB", "", "", ""},
51  /* NTV2_FBF_10BIT_ARGB */ {"ARGB", "", "", ""},
52  /* NTV2_FBF_16BIT_ARGB */ {"ARGB", "", "", ""},
53  /* NTV2_FBF_8BIT_YCBCR_422PL3 */ {"Y", "Cb", "Cr", ""},
54  /* NTV2_FBF_10BIT_RAW_RGB */ {"RGB", "", "", ""},
55  /* NTV2_FBF_10BIT_RAW_YCBCR */ {"YCbCr", "", "", ""},
56  /* NTV2_FBF_10BIT_YCBCR_420PL3_LE */ {"Y", "Cb", "Cr", ""},
57  /* NTV2_FBF_10BIT_YCBCR_422PL3_LE */ {"Y", "Cb", "Cr", ""},
58  /* NTV2_FBF_10BIT_YCBCR_420PL2 */ {"Y", "CbCr", "", ""},
59  /* NTV2_FBF_10BIT_YCBCR_422PL2 */ {"Y", "CbCr", "", ""},
60  /* NTV2_FBF_8BIT_YCBCR_420PL2 */ {"Y", "CbCr", "", ""},
61  /* NTV2_FBF_8BIT_YCBCR_422PL2 */ {"Y", "CbCr", "", ""}
62 };
63 
64 
66 { // Luma Chroma Alpha
67  /* NTV2_FBF_10BIT_YCBCR */ {10, 10, 0},
68  /* NTV2_FBF_8BIT_YCBCR */ {8, 8, 0},
69  /* NTV2_FBF_ARGB */ {0, 8, 8},
70  /* NTV2_FBF_RGBA */ {0, 8, 8},
71  /* NTV2_FBF_10BIT_RGB */ {0, 10, 2},
72  /* NTV2_FBF_8BIT_YCBCR_YUY2 */ {8, 8, 0},
73  /* NTV2_FBF_ABGR */ {0, 8, 8},
74  /* NTV2_FBF_10BIT_DPX */ {0, 10, 0},
75  /* NTV2_FBF_10BIT_YCBCR_DPX */ {10, 10, 0},
76  /* NTV2_FBF_8BIT_DVCPRO */ {0, 0, 0}, // Lossy
77  /* NTV2_FBF_8BIT_YCBCR_420PL3 */ {8, 8, 0},
78  /* NTV2_FBF_8BIT_HDV */ {0, 0, 0}, // Lossy
79  /* NTV2_FBF_24BIT_RGB */ {0, 8, 0},
80  /* NTV2_FBF_24BIT_BGR */ {0, 8, 0},
81  /* NTV2_FBF_10BIT_YCBCRA */ {0, 0, 0}, // Unused
82  /* NTV2_FBF_10BIT_DPX_LE */ {0, 10, 0},
83  /* NTV2_FBF_48BIT_RGB */ {0, 16, 0},
84  /* NTV2_FBF_12BIT_RGB_PACKED */ {0, 12, 0},
85  /* NTV2_FBF_PRORES_DVCPRO */ {0, 0, 0}, // Unused
86  /* NTV2_FBF_PRORES_HDV */ {0, 0, 0}, // Unused
87  /* NTV2_FBF_10BIT_RGB_PACKED */ {0, 0, 0}, // Unused
88  /* NTV2_FBF_10BIT_ARGB */ {0, 0, 0}, // Unused
89  /* NTV2_FBF_16BIT_ARGB */ {0, 0, 0}, // Unused
90  /* NTV2_FBF_8BIT_YCBCR_422PL3 */ {8, 8, 0},
91  /* NTV2_FBF_10BIT_RAW_RGB */ {0, 10, 0},
92  /* NTV2_FBF_10BIT_RAW_YCBCR */ {10, 10, 0},
93  /* NTV2_FBF_10BIT_YCBCR_420PL3_LE */ {10, 10, 0},
94  /* NTV2_FBF_10BIT_YCBCR_422PL3_LE */ {10, 10, 0},
95  /* NTV2_FBF_10BIT_YCBCR_420PL2 */ {10, 10, 0},
96  /* NTV2_FBF_10BIT_YCBCR_422PL2 */ {10, 10, 0},
97  /* NTV2_FBF_8BIT_YCBCR_420PL2 */ {8, 8, 0},
98  /* NTV2_FBF_8BIT_YCBCR_422PL2 */ {8, 8, 0}
99 };
100 
101 
103 {
104  {
123  /* NTV2_FBF_PRORES_DVCPRO */ AJA_FD_NOTSUPPORTED,
124  /* NTV2_FBF_PRORES_HDV */ AJA_FD_NOTSUPPORTED,
129  /* NTV2_FBF_10BIT_RAW_RGB */ AJA_FD_NOTSUPPORTED,
130  /* NTV2_FBF_10BIT_RAW_YCBCR */ AJA_FD_NOTSUPPORTED,
133  /* NTV2_FBF_10BIT_YCBCR_420PL2 */ AJA_FD_BEGIN HD_NUMACTIVELINES_1080, HD_NUMCOMPONENTPIXELS_1080, HD_NUMCOMPONENTPIXELS_1080*5/16, AJA_FD_END, // Supported in SDK 16.0
134  /* NTV2_FBF_10BIT_YCBCR_422PL2 */ AJA_FD_BEGIN HD_NUMACTIVELINES_1080, HD_NUMCOMPONENTPIXELS_1080, HD_NUMCOMPONENTPIXELS_1080*5/16, AJA_FD_END, // Supported in SDK 16.0
137  },
138  {
157  /* NTV2_FBF_PRORES_DVCPRO */ AJA_FD_NOTSUPPORTED,
158  /* NTV2_FBF_PRORES_HDV */ AJA_FD_NOTSUPPORTED,
163  /* NTV2_FBF_10BIT_RAW_RGB */ AJA_FD_NOTSUPPORTED,
164  /* NTV2_FBF_10BIT_RAW_YCBCR */ AJA_FD_NOTSUPPORTED,
167  /* NTV2_FBF_10BIT_YCBCR_420PL2 */ AJA_FD_BEGIN HD_NUMACTIVELINES_720, HD_NUMCOMPONENTPIXELS_720, HD_NUMCOMPONENTPIXELS_720*5/16, AJA_FD_END, // Supported in SDK 16.0
168  /* NTV2_FBF_10BIT_YCBCR_422PL2 */ AJA_FD_BEGIN HD_NUMACTIVELINES_720, HD_NUMCOMPONENTPIXELS_720, HD_NUMCOMPONENTPIXELS_720*5/16, AJA_FD_END, // Supported in SDK 16.0
171  },
172  {
182  /* NTV2_FBF_8BIT_DVCPRO */ AJA_FD_NOTSUPPORTED,
183  /* NTV2_FBF_8BIT_YCBCR_420PL3 */ AJA_FD_BEGIN 480, NUMCOMPONENTPIXELS, NUMCOMPONENTPIXELS/4, AJA_FD_END,
184  /* NTV2_FBF_8BIT_HDV */ AJA_FD_NOTSUPPORTED,
191  /* NTV2_FBF_PRORES_DVCPRO */ AJA_FD_NOTSUPPORTED,
192  /* NTV2_FBF_PRORES_HDV */ AJA_FD_NOTSUPPORTED,
196  /* NTV2_FBF_8BIT_YCBCR_422PL3 */ AJA_FD_BEGIN 480, NUMCOMPONENTPIXELS, NUMCOMPONENTPIXELS/4, AJA_FD_END,
197  /* NTV2_FBF_10BIT_RAW_RGB */ AJA_FD_NOTSUPPORTED,
198  /* NTV2_FBF_10BIT_RAW_YCBCR */ AJA_FD_NOTSUPPORTED,
199  /* NTV2_FBF_10BIT_YCBCR_420PL3_LE */ AJA_FD_BEGIN 480, NUMCOMPONENTPIXELS, NUMCOMPONENTPIXELS/2, AJA_FD_END,
200  /* NTV2_FBF_10BIT_YCBCR_422PL3_LE */ AJA_FD_BEGIN 480, NUMCOMPONENTPIXELS, NUMCOMPONENTPIXELS/2, AJA_FD_END,
201  /* NTV2_FBF_10BIT_YCBCR_420PL2 */ AJA_FD_BEGIN 480, NUMCOMPONENTPIXELS, NUMCOMPONENTPIXELS*5/16, AJA_FD_END, // Supported in SDK 16.0
202  /* NTV2_FBF_10BIT_YCBCR_422PL2 */ AJA_FD_BEGIN 480, NUMCOMPONENTPIXELS, NUMCOMPONENTPIXELS*5/16, AJA_FD_END, // Supported in SDK 16.0
203  /* NTV2_FBF_8BIT_YCBCR_420PL2 */ AJA_FD_BEGIN 480, NUMCOMPONENTPIXELS, NUMCOMPONENTPIXELS/4, AJA_FD_END,
204  /* NTV2_FBF_8BIT_YCBCR_422PL2 */ AJA_FD_BEGIN 480, NUMCOMPONENTPIXELS, NUMCOMPONENTPIXELS/4, AJA_FD_END
205  },
206  {
216  /* NTV2_FBF_8BIT_DVCPRO */ AJA_FD_NOTSUPPORTED,
218  /* NTV2_FBF_8BIT_HDV */ AJA_FD_NOTSUPPORTED,
225  /* NTV2_FBF_PRORES_DVCPRO */ AJA_FD_NOTSUPPORTED,
226  /* NTV2_FBF_PRORES_HDV */ AJA_FD_NOTSUPPORTED,
231  /* NTV2_FBF_10BIT_RAW_RGB */ AJA_FD_NOTSUPPORTED,
232  /* NTV2_FBF_10BIT_RAW_YCBCR */ AJA_FD_NOTSUPPORTED,
233  /* NTV2_FBF_10BIT_YCBCR_420PL3_LE */ AJA_FD_BEGIN NUMACTIVELINES_625, NUMCOMPONENTPIXELS, NUMCOMPONENTPIXELS/2, AJA_FD_END,
234  /* NTV2_FBF_10BIT_YCBCR_422PL3_LE */ AJA_FD_BEGIN NUMACTIVELINES_625, NUMCOMPONENTPIXELS, NUMCOMPONENTPIXELS/2, AJA_FD_END,
235  /* NTV2_FBF_10BIT_YCBCR_420PL2 */ AJA_FD_BEGIN NUMACTIVELINES_625, NUMCOMPONENTPIXELS, NUMCOMPONENTPIXELS*5/16, AJA_FD_END, // Supported in SDK 16.0
236  /* NTV2_FBF_10BIT_YCBCR_422PL2 */ AJA_FD_BEGIN NUMACTIVELINES_625, NUMCOMPONENTPIXELS, NUMCOMPONENTPIXELS*5/16, AJA_FD_END, // Supported in SDK 16.0
239  },
240  {
259  /* NTV2_FBF_PRORES_DVCPRO */ AJA_FD_NOTSUPPORTED,
260  /* NTV2_FBF_PRORES_HDV */ AJA_FD_NOTSUPPORTED,
269  /* NTV2_FBF_10BIT_YCBCR_420PL2 */ AJA_FD_BEGIN HD_NUMACTIVELINES_1080, HD_NUMCOMPONENTPIXELS_1080, HD_NUMCOMPONENTPIXELS_1080*5/16, AJA_FD_END, // Supported in SDK 16.0
270  /* NTV2_FBF_10BIT_YCBCR_422PL2 */ AJA_FD_BEGIN HD_NUMACTIVELINES_1080, HD_NUMCOMPONENTPIXELS_1080, HD_NUMCOMPONENTPIXELS_1080*5/16, AJA_FD_END, // Supported in SDK 16.0
273  },
274  {
284  /* NTV2_FBF_8BIT_DVCPRO */ AJA_FD_NOTSUPPORTED,
286  /* NTV2_FBF_8BIT_HDV */ AJA_FD_NOTSUPPORTED,
293  /* NTV2_FBF_PRORES_DVCPRO */ AJA_FD_NOTSUPPORTED,
294  /* NTV2_FBF_PRORES_HDV */ AJA_FD_NOTSUPPORTED,
303  /* NTV2_FBF_10BIT_YCBCR_420PL2 */ AJA_FD_BEGIN HD_NUMACTIVELINES_2K, HD_NUMCOMPONENTPIXELS_2K, HD_NUMCOMPONENTPIXELS_2K*5/16, AJA_FD_END, // Supported in SDK 16.0
304  /* NTV2_FBF_10BIT_YCBCR_422PL2 */ AJA_FD_BEGIN HD_NUMACTIVELINES_2K, HD_NUMCOMPONENTPIXELS_2K, HD_NUMCOMPONENTPIXELS_2K*5/16, AJA_FD_END, // Supported in SDK 16.0
307  },
308  {
318  /* NTV2_FBF_8BIT_DVCPRO */ AJA_FD_NOTSUPPORTED,
320  /* NTV2_FBF_8BIT_HDV */ AJA_FD_NOTSUPPORTED,
327  /* NTV2_FBF_PRORES_DVCPRO */ AJA_FD_NOTSUPPORTED,
328  /* NTV2_FBF_PRORES_HDV */ AJA_FD_NOTSUPPORTED,
333  /* NTV2_FBF_10BIT_RAW_RGB */ AJA_FD_NOTSUPPORTED,
334  /* NTV2_FBF_10BIT_RAW_YCBCR */ AJA_FD_NOTSUPPORTED,
337  /* NTV2_FBF_10BIT_YCBCR_420PL2 */ AJA_FD_BEGIN HD_NUMACTIVELINES_1080, HD_NUMCOMPONENTPIXELS_2K, HD_NUMCOMPONENTPIXELS_2K*5/16, AJA_FD_END, // Supported in SDK 16.0
338  /* NTV2_FBF_10BIT_YCBCR_422PL2 */ AJA_FD_BEGIN HD_NUMACTIVELINES_1080, HD_NUMCOMPONENTPIXELS_2K, HD_NUMCOMPONENTPIXELS_2K*5/16, AJA_FD_END, // Supported in SDK 16.0
341  },
342  {
352  /* NTV2_FBF_8BIT_DVCPRO */ AJA_FD_NOTSUPPORTED,
354  /* NTV2_FBF_8BIT_HDV */ AJA_FD_NOTSUPPORTED,
361  /* NTV2_FBF_PRORES_DVCPRO */ AJA_FD_NOTSUPPORTED,
362  /* NTV2_FBF_PRORES_HDV */ AJA_FD_NOTSUPPORTED,
367  /* NTV2_FBF_10BIT_RAW_RGB */ AJA_FD_NOTSUPPORTED,
368  /* NTV2_FBF_10BIT_RAW_YCBCR */ AJA_FD_NOTSUPPORTED,
371  /* NTV2_FBF_10BIT_YCBCR_420PL2 */ AJA_FD_BEGIN HD_NUMACTIVELINES_1080, HD_NUMCOMPONENTPIXELS_2K, HD_NUMCOMPONENTPIXELS_2K*5/16, AJA_FD_END, // Supported in SDK 16.0
372  /* NTV2_FBF_10BIT_YCBCR_422PL2 */ AJA_FD_BEGIN HD_NUMACTIVELINES_1080, HD_NUMCOMPONENTPIXELS_2K, HD_NUMCOMPONENTPIXELS_2K*5/16, AJA_FD_END, // Supported in SDK 16.0
375  },
376  {
386  /* NTV2_FBF_8BIT_DVCPRO */ AJA_FD_NOTSUPPORTED,
388  /* NTV2_FBF_8BIT_HDV */ AJA_FD_NOTSUPPORTED,
395  /* NTV2_FBF_PRORES_DVCPRO */ AJA_FD_NOTSUPPORTED,
396  /* NTV2_FBF_PRORES_HDV */ AJA_FD_NOTSUPPORTED,
401  /* NTV2_FBF_10BIT_RAW_RGB */ AJA_FD_TBD,
402  /* NTV2_FBF_10BIT_RAW_YCBCR */ AJA_FD_TBD,
405  /* NTV2_FBF_10BIT_YCBCR_420PL2 */ AJA_FD_BEGIN HD_NUMLINES_4K, HD_NUMCOMPONENTPIXELS_QUADHD, HD_NUMCOMPONENTPIXELS_QUADHD*5/16, AJA_FD_END, // Supported in SDK 16.0
406  /* NTV2_FBF_10BIT_YCBCR_422PL2 */ AJA_FD_BEGIN HD_NUMLINES_4K, HD_NUMCOMPONENTPIXELS_QUADHD, HD_NUMCOMPONENTPIXELS_QUADHD*5/16, AJA_FD_END, // Supported in SDK 16.0
409  },
410  {
420  /* NTV2_FBF_8BIT_DVCPRO */ AJA_FD_NOTSUPPORTED,
422  /* NTV2_FBF_8BIT_HDV */ AJA_FD_NOTSUPPORTED,
429  /* NTV2_FBF_PRORES_DVCPRO */ AJA_FD_NOTSUPPORTED,
430  /* NTV2_FBF_PRORES_HDV */ AJA_FD_NOTSUPPORTED,
435  /* NTV2_FBF_10BIT_RAW_RGB */ AJA_FD_TBD,
436  /* NTV2_FBF_10BIT_RAW_YCBCR */ AJA_FD_TBD,
439  /* NTV2_FBF_10BIT_YCBCR_420PL2 */ AJA_FD_BEGIN HD_NUMLINES_4K, HD_NUMCOMPONENTPIXELS_4K, HD_NUMCOMPONENTPIXELS_4K*5/16, AJA_FD_END, // Supported in SDK 16.0
440  /* NTV2_FBF_10BIT_YCBCR_422PL2 */ AJA_FD_BEGIN HD_NUMLINES_4K, HD_NUMCOMPONENTPIXELS_4K, HD_NUMCOMPONENTPIXELS_4K*5/16, AJA_FD_END, // Supported in SDK 16.0
443  },
444  {
454  /* NTV2_FBF_8BIT_DVCPRO */ AJA_FD_NOTSUPPORTED,
456  /* NTV2_FBF_8BIT_HDV */ AJA_FD_NOTSUPPORTED,
463  /* NTV2_FBF_PRORES_DVCPRO */ AJA_FD_NOTSUPPORTED,
464  /* NTV2_FBF_PRORES_HDV */ AJA_FD_NOTSUPPORTED,
469  /* NTV2_FBF_10BIT_RAW_RGB */ AJA_FD_TBD,
470  /* NTV2_FBF_10BIT_RAW_YCBCR */ AJA_FD_TBD,
473  /* NTV2_FBF_10BIT_YCBCR_420PL2 */ AJA_FD_BEGIN HD_NUMLINES_4K, HD_NUMCOMPONENTPIXELS_QUADHD, HD_NUMCOMPONENTPIXELS_QUADHD*5/16, AJA_FD_END, // Supported in SDK 16.0
474  /* NTV2_FBF_10BIT_YCBCR_422PL2 */ AJA_FD_BEGIN HD_NUMLINES_4K, HD_NUMCOMPONENTPIXELS_QUADHD, HD_NUMCOMPONENTPIXELS_QUADHD*5/16, AJA_FD_END, // Supported in SDK 16.0
477  },
478  {
488  /* NTV2_FBF_8BIT_DVCPRO */ AJA_FD_NOTSUPPORTED,
490  /* NTV2_FBF_8BIT_HDV */ AJA_FD_NOTSUPPORTED,
497  /* NTV2_FBF_PRORES_DVCPRO */ AJA_FD_NOTSUPPORTED,
498  /* NTV2_FBF_PRORES_HDV */ AJA_FD_NOTSUPPORTED,
503  /* NTV2_FBF_10BIT_RAW_RGB */ AJA_FD_TBD,
504  /* NTV2_FBF_10BIT_RAW_YCBCR */ AJA_FD_TBD,
507  /* NTV2_FBF_10BIT_YCBCR_420PL2 */ AJA_FD_BEGIN HD_NUMLINES_4K, HD_NUMCOMPONENTPIXELS_4K, HD_NUMCOMPONENTPIXELS_4K*5/16, AJA_FD_END, // Supported in SDK 16.0
508  /* NTV2_FBF_10BIT_YCBCR_422PL2 */ AJA_FD_BEGIN HD_NUMLINES_4K, HD_NUMCOMPONENTPIXELS_4K, HD_NUMCOMPONENTPIXELS_4K*5/16, AJA_FD_END, // Supported in SDK 16.0
511  },
512  {
522  /* NTV2_FBF_8BIT_DVCPRO */ AJA_FD_NOTSUPPORTED,
524  /* NTV2_FBF_8BIT_HDV */ AJA_FD_NOTSUPPORTED,
531  /* NTV2_FBF_PRORES_DVCPRO */ AJA_FD_NOTSUPPORTED,
532  /* NTV2_FBF_PRORES_HDV */ AJA_FD_NOTSUPPORTED,
537  /* NTV2_FBF_10BIT_RAW_RGB */ AJA_FD_TBD,
538  /* NTV2_FBF_10BIT_RAW_YCBCR */ AJA_FD_TBD,
541  /* NTV2_FBF_10BIT_YCBCR_420PL2 */ AJA_FD_BEGIN FD_NUMLINES_8K, FD_NUMCOMPONENTPIXELS_UHD2, FD_NUMCOMPONENTPIXELS_UHD2*5/16, AJA_FD_END, // Supported in SDK 16.0
542  /* NTV2_FBF_10BIT_YCBCR_422PL2 */ AJA_FD_BEGIN FD_NUMLINES_8K, FD_NUMCOMPONENTPIXELS_UHD2, FD_NUMCOMPONENTPIXELS_UHD2*5/16, AJA_FD_END, // Supported in SDK 16.0
545  },
546  {
556  /* NTV2_FBF_8BIT_DVCPRO */ AJA_FD_NOTSUPPORTED,
558  /* NTV2_FBF_8BIT_HDV */ AJA_FD_NOTSUPPORTED,
565  /* NTV2_FBF_PRORES_DVCPRO */ AJA_FD_NOTSUPPORTED,
566  /* NTV2_FBF_PRORES_HDV */ AJA_FD_NOTSUPPORTED,
571  /* NTV2_FBF_10BIT_RAW_RGB */ AJA_FD_TBD,
572  /* NTV2_FBF_10BIT_RAW_YCBCR */ AJA_FD_TBD,
575  /* NTV2_FBF_10BIT_YCBCR_420PL2 */ AJA_FD_BEGIN FD_NUMLINES_8K, FD_NUMCOMPONENTPIXELS_8K, FD_NUMCOMPONENTPIXELS_8K*5/16, AJA_FD_END, // Supported in SDK 16.0
576  /* NTV2_FBF_10BIT_YCBCR_422PL2 */ AJA_FD_BEGIN FD_NUMLINES_8K, FD_NUMCOMPONENTPIXELS_8K, FD_NUMCOMPONENTPIXELS_8K*5/16, AJA_FD_END, // Supported in SDK 16.0
579  },
580  {
590  /* NTV2_FBF_8BIT_DVCPRO */ AJA_FD_NOTSUPPORTED,
592  /* NTV2_FBF_8BIT_HDV */ AJA_FD_NOTSUPPORTED,
599  /* NTV2_FBF_PRORES_DVCPRO */ AJA_FD_NOTSUPPORTED,
600  /* NTV2_FBF_PRORES_HDV */ AJA_FD_NOTSUPPORTED,
605  /* NTV2_FBF_10BIT_RAW_RGB */ AJA_FD_TBD,
606  /* NTV2_FBF_10BIT_RAW_YCBCR */ AJA_FD_TBD,
609  /* NTV2_FBF_10BIT_YCBCR_420PL2 */ AJA_FD_BEGIN HD_NUMLINES_4K, HD_NUMCOMPONENTPIXELS_QUADHD, HD_NUMCOMPONENTPIXELS_QUADHD*5/16, AJA_FD_END, // Supported in SDK 16.0
610  /* NTV2_FBF_10BIT_YCBCR_422PL2 */ AJA_FD_BEGIN HD_NUMLINES_4K, HD_NUMCOMPONENTPIXELS_QUADHD, HD_NUMCOMPONENTPIXELS_QUADHD*5/16, AJA_FD_END, // Supported in SDK 16.0
613  },
614  {
624  /* NTV2_FBF_8BIT_DVCPRO */ AJA_FD_NOTSUPPORTED,
626  /* NTV2_FBF_8BIT_HDV */ AJA_FD_NOTSUPPORTED,
633  /* NTV2_FBF_PRORES_DVCPRO */ AJA_FD_NOTSUPPORTED,
634  /* NTV2_FBF_PRORES_HDV */ AJA_FD_NOTSUPPORTED,
639  /* NTV2_FBF_10BIT_RAW_RGB */ AJA_FD_TBD,
640  /* NTV2_FBF_10BIT_RAW_YCBCR */ AJA_FD_TBD,
643  /* NTV2_FBF_10BIT_YCBCR_420PL2 */ AJA_FD_BEGIN HD_NUMLINES_4K, HD_NUMCOMPONENTPIXELS_4K, HD_NUMCOMPONENTPIXELS_4K*5/16, AJA_FD_END, // Supported in SDK 16.0
644  /* NTV2_FBF_10BIT_YCBCR_422PL2 */ AJA_FD_BEGIN HD_NUMLINES_4K, HD_NUMCOMPONENTPIXELS_4K, HD_NUMCOMPONENTPIXELS_4K*5/16, AJA_FD_END, // Supported in SDK 16.0
647  }
648 }; // formatDescriptorTable
649 
650 
652  const NTV2FrameBufferFormat inFrameBufferFormat,
653  const NTV2VANCMode inVancMode)
654 {
655  MakeInvalid ();
656  if (!NTV2_IS_VALID_STANDARD(inStandard))
657  return; // bad standard
658  if (!NTV2_IS_VALID_FRAME_BUFFER_FORMAT(inFrameBufferFormat))
659  return; // bad FBF
660  if (!NTV2_IS_VALID_VANCMODE(inVancMode))
661  return; // bad Vanc mode
662  if (NTV2_IS_FBF_PLANAR(inFrameBufferFormat) && NTV2_IS_VANCMODE_ON(inVancMode))
663  return; // can't do VANC mode for planar formats
664 
665  // The 'formatDescriptorTable' handles everything but VANC...
666  const NTV2FormatDescriptor & result (formatDescriptorTable[inStandard][inFrameBufferFormat]);
667  *this = result;
668 
669  mStandard = inStandard;
670  mPixelFormat = inFrameBufferFormat;
671  mVancMode = inVancMode;
672  mFrameGeometry = ::GetVANCFrameGeometry(::GetGeometryFromStandard(mStandard), mVancMode);
673  mNumBitsLuma = gBitsPerComponent[mPixelFormat][0];
674  mNumBitsChroma = gBitsPerComponent[mPixelFormat][1];
675  mNumBitsAlpha = gBitsPerComponent[mPixelFormat][2];
676 
677  // Account for VANC...
678  if (NTV2_IS_VANCMODE_ON(inVancMode))
679  {
680  const ULWord numActiveLines (numLines);
681  switch (inStandard)
682  {
685  case NTV2_STANDARD_1080:
686  case NTV2_STANDARD_1080p: numLines = NTV2_IS_VANCMODE_TALLER(inVancMode) ? 1114 : 1112; break;
687 
688  case NTV2_STANDARD_720: numLines = 740; break;
689 
690  case NTV2_STANDARD_525: numLines = NTV2_IS_VANCMODE_TALLER(inVancMode) ? 514 : 508; break;
691 
692  case NTV2_STANDARD_625: numLines = NTV2_IS_VANCMODE_TALLER(inVancMode) ? 612 : 598; break;
693 
694  case NTV2_STANDARD_2K: numLines = 1588; break;
695 
696  default: numLines = numActiveLines; break;
697  }
698  firstActiveLine = numLines - numActiveLines;
699  }
700 
701  if (numLines && NTV2_IS_FBF_PLANAR(inFrameBufferFormat))
702  FinalizePlanar();
703 
704 } // construct from NTV2Standard & NTV2VANCMode
705 
706 
707 void NTV2FormatDescriptor::FinalizePlanar (void)
708 {
709  NTV2_ASSERT(NTV2_IS_FBF_PLANAR(mPixelFormat));
710  NTV2_ASSERT(numLines);
711  switch (mPixelFormat)
712  {
717  {
718  mNumPlanes = 2;
719  mLinePitch[0] = linePitch * 4;
720  mLinePitch[1] = linePitch * 4;
721  break;
722  }
723 
726  {
727  mNumPlanes = 3;
728  mLinePitch[0] = numPixels;
729  const ULWord lumaRasterBytes (numLines * numPixels);
730  ULWord chromaRasterBytes (lumaRasterBytes / 2);
731  if (lumaRasterBytes % 4)
732  {MakeInvalid(); break;}
733  mLinePitch[1] = mLinePitch[2] = chromaRasterBytes / numLines; // For HD1080p: 1920 px/line ==> 1920/4 ==> 480 bytes/line
734  if (chromaRasterBytes % numLines)
735  MakeInvalid();
736  break;
737  }
738 
741  {
742  mNumPlanes = 3;
743  mLinePitch[0] = numPixels * sizeof(uint16_t); // Y is 2-bytes per pixel // 1080p: 1920 x 2 ==> 3840 bytes per line)
744  const ULWord lumaRasterBytes (numLines * mLinePitch[0]); // 1080p: 1080 * 3840 ==> 4,147,200 bytes (0x003F4800)
745  ULWord chromaRasterBytes (lumaRasterBytes / 2); // 422 1080p: 2,073,600 bytes (0x001FA400)
746  mLinePitch[1] = mLinePitch[2] = chromaRasterBytes / numLines; // 422 1080p: 1920 bytes/line (0x780)
747  if (chromaRasterBytes % numLines) // 420 1080p: 960 bytes/line (0x3C0)
748  MakeInvalid();
749  break;
750  }
751 
752  default: MakeInvalid(); break;
753  }
754 }
755 
757  const NTV2FrameBufferFormat inFrameBufferFormat,
758  const NTV2VANCMode inVancMode)
759 {
760  MakeInvalid ();
761  const NTV2Standard inStandard (::GetNTV2StandardFromVideoFormat (inVideoFormat));
762  if (!NTV2_IS_VALID_STANDARD(inStandard))
763  return; // bad standard
764  if (!NTV2_IS_VALID_FRAME_BUFFER_FORMAT(inFrameBufferFormat))
765  return; // bad FBF
766  if (!NTV2_IS_VALID_VANCMODE(inVancMode))
767  return; // bad Vanc mode
768 // In SDK 16.0, some experimental Corvid88 firmware can do this now:
769 // if (NTV2_IS_FBF_PLANAR(inFrameBufferFormat) && NTV2_IS_VANCMODE_ON(inVancMode))
770 // return; // can't do VANC mode for planar formats
771 
772  *this = formatDescriptorTable[inStandard][inFrameBufferFormat]; // The 'formatDescriptorTable' handles everything but VANC
773 
774  mVideoFormat = inVideoFormat;
775  mStandard = inStandard;
776  mPixelFormat = inFrameBufferFormat;
777  mVancMode = inVancMode;
778  mFrameGeometry = ::GetVANCFrameGeometry(::GetNTV2FrameGeometryFromVideoFormat(mVideoFormat), mVancMode);
779  mNumBitsLuma = gBitsPerComponent[mPixelFormat][0];
780  mNumBitsChroma = gBitsPerComponent[mPixelFormat][1];
781  mNumBitsAlpha = gBitsPerComponent[mPixelFormat][2];
782 
783  // Account for VANC...
784  if (NTV2_IS_VANCMODE_ON(inVancMode))
785  {
786  const ULWord numActiveLines (numLines);
787  switch (inStandard)
788  {
791  case NTV2_STANDARD_1080:
792  case NTV2_STANDARD_1080p: numLines = NTV2_IS_VANCMODE_TALLER(inVancMode) ? 1114 : 1112; break;
793 
794  case NTV2_STANDARD_720: numLines = 740; break;
795 
796  case NTV2_STANDARD_525: numLines = NTV2_IS_VANCMODE_TALLER(inVancMode) ? 514 : 508; break;
797 
798  case NTV2_STANDARD_625: numLines = NTV2_IS_VANCMODE_TALLER(inVancMode) ? 612 : 598; break;
799 
800  case NTV2_STANDARD_2K: numLines = 1588; break;
801 
802  default: numLines = numActiveLines; break;
803  }
804  firstActiveLine = numLines - numActiveLines;
805  }
806  if (NTV2_IS_FBF_PLANAR (inFrameBufferFormat))
807  FinalizePlanar();
808 
809 } // construct from NTV2VideoFormat & NTV2VANCMode
810 
812  const NTV2PixelFormat inPixelFormat,
813  const NTV2VANCMode inVancMode)
814 {
815  MakeInvalid();
816  if (!inFrameSize)
817  return; // bad frame size
818  if (!NTV2_IS_VALID_FRAME_BUFFER_FORMAT(inPixelFormat))
819  return; // bad FBF
820  if (!NTV2_IS_VALID_VANCMODE(inVancMode))
821  return; // bad Vanc mode
822 
823  NTV2FrameSize frameSize(inFrameSize);
824  mFrameGeometry = frameSize;
825  if (NTV2_IS_TALL_VANC_GEOMETRY(mFrameGeometry))
826  {
827  if (inVancMode != NTV2_VANCMODE_TALL)
828  return; // vanc mode mismatched
829  NTV2FrameGeometry tmp(::GetNormalizedFrameGeometry(mFrameGeometry));
830  const NTV2FrameSize tall(mFrameGeometry), normal(tmp);
831  firstActiveLine = tall.height() - normal.height(); // 1st active line
832  mVancMode = inVancMode;
833  }
834  else if (NTV2_IS_TALLER_VANC_GEOMETRY(mFrameGeometry))
835  {
836  if (inVancMode != NTV2_VANCMODE_TALLER)
837  return; // vanc mode mismatched
838  NTV2FrameGeometry tmp(::GetNormalizedFrameGeometry(mFrameGeometry));
839  const NTV2FrameSize taller(mFrameGeometry), normal(tmp);
840  firstActiveLine = taller.height() - normal.height(); // 1st active line
841  mVancMode = inVancMode;
842  }
843  else if (NTV2_IS_VALID_NTV2FrameGeometry(mFrameGeometry))
844  {
845  NTV2FrameGeometry tallTaller(::GetVANCFrameGeometry(mFrameGeometry, inVancMode));
846  if (!NTV2_IS_VALID_NTV2FrameGeometry(tallTaller))
847  return; // bad geometry
848  if (tallTaller != mFrameGeometry)
849  {
850  mFrameGeometry = tallTaller;
851  frameSize = tallTaller;
852  firstActiveLine = frameSize.height() - inFrameSize.height(); // 1st active line
853  }
854  }
855  else if (NTV2_IS_VANCMODE_ON(inVancMode))
856  return; // vanc enabled but non-standard geometry
857  numLines = frameSize.height();
858  numPixels = frameSize.width();
859  // mLinePitch[0]: # bytes per line
860  // linePitch: # 32-bit words per line -- shadows mLinePitch[0] / sizeof(ULWord)
861  mPixelFormat = inPixelFormat;
862  switch (mPixelFormat)
863  {
864  case NTV2_FBF_8BIT_YCBCR:
865  case NTV2_FBF_8BIT_YCBCR_YUY2: mLinePitch[0] = 2*numPixels; linePitch = mLinePitch[0]/4; break;
866 
868  case NTV2_FBF_10BIT_YCBCR_DPX: mLinePitch[0] = 16*numPixels/6; linePitch = mLinePitch[0]/4; break;
869 
870  case NTV2_FBF_ARGB:
871  case NTV2_FBF_RGBA:
872  case NTV2_FBF_ABGR:
873  case NTV2_FBF_10BIT_RGB:
874  case NTV2_FBF_10BIT_DPX:
875  case NTV2_FBF_10BIT_DPX_LE: mLinePitch[0] = 4*numPixels; linePitch = mLinePitch[0]/4; break;
876 
877  case NTV2_FBF_24BIT_RGB:
878  case NTV2_FBF_24BIT_BGR: mLinePitch[0] = 3*numPixels; linePitch = mLinePitch[0]/4; break;
879 
880  case NTV2_FBF_48BIT_RGB: mLinePitch[0] = 6*numPixels; linePitch = mLinePitch[0]/4; break;
881 
882  case NTV2_FBF_12BIT_RGB_PACKED: mLinePitch[0] = 36*numPixels/8; linePitch = mLinePitch[0]/4; break;
883 
885  case NTV2_FBF_8BIT_YCBCR_422PL3: linePitch = numPixels/4; break;
886 
888  case NTV2_FBF_10BIT_YCBCR_422PL3_LE: linePitch = numPixels/2; break;
889 
891  case NTV2_FBF_10BIT_YCBCR_422PL2: linePitch = 5*numPixels/16; break;
892 
893  default: mLinePitch[0] = 0; linePitch = 0; break; // unsupported
894  }
895  mNumBitsLuma = gBitsPerComponent[mPixelFormat][0];
896  mNumBitsChroma = gBitsPerComponent[mPixelFormat][1];
897  mNumBitsAlpha = gBitsPerComponent[mPixelFormat][2];
898  if (NTV2_IS_FBF_PLANAR(inPixelFormat))
899  FinalizePlanar();
900 } // Construct from NTV2FrameSize & NTV2VANCMode
901 
902 
904 {
905  MakeInvalid();
906 }
907 
908 
909 NTV2FormatDescriptor::NTV2FormatDescriptor (const ULWord inNumLines, const ULWord inNumPixels, const ULWord inLinePitch, const ULWord in1stActiveLine,
910  const UByte inNumLumaBits, const UByte inNumChromaBits, const UByte inNumAlphaBits)
911  : numLines (inNumLines),
912  numPixels (inNumPixels),
913  linePitch (inLinePitch),
914  firstActiveLine (in1stActiveLine),
915  mStandard (NTV2_STANDARD_INVALID),
916  mVideoFormat (NTV2_FORMAT_UNKNOWN),
917  mPixelFormat (NTV2_FBF_INVALID),
918  mVancMode (NTV2_VANCMODE_INVALID),
919  mNumPlanes (1),
920  mFrameGeometry (NTV2_FG_INVALID),
921  mNumBitsLuma (inNumLumaBits),
922  mNumBitsChroma (inNumChromaBits),
923  mNumBitsAlpha (inNumAlphaBits)
924 {
925  mLinePitch[0] = inLinePitch * 4; // mLinePitch is in bytes, inLinePitch is in 32-bit longwords
926  mLinePitch[1] = mLinePitch[2] = mLinePitch[3] = 0;
927 }
928 
929 
931 {
932  numLines = 0;
933  numPixels = 0;
934  linePitch = 0;
935  firstActiveLine = 0;
936  mStandard = NTV2_STANDARD_INVALID;
937  mVideoFormat = NTV2_FORMAT_UNKNOWN;
938  mPixelFormat = NTV2_FBF_INVALID;
939  mVancMode = NTV2_VANCMODE_INVALID;
940  mLinePitch[0] = mLinePitch[1] = mLinePitch[2] = mLinePitch[3] = 0;
941  mNumPlanes = 0;
942  mFrameGeometry = NTV2_FG_INVALID;
943  mNumBitsLuma = mNumBitsChroma = mNumBitsAlpha = 0;
944 }
945 
947 {
948  ULWord bytes(0);
949  UWord plane(0);
950  do
951  {
952  bytes += GetTotalRasterBytes(plane);
953  } while (++plane < GetNumPlanes());
954  return bytes;
955 }
956 
958 {
959  static const ULWord s4K(0x00001000), s64K(0x00010000);
960  ULWord result(GetTotalBytes()), pageSizeBytes(inPageSizeBytes);
961  if (inPageSizeBytes != s4K)
962  { // Ensure power-of-2...
963  pageSizeBytes = s64K; // start at 64K
964  do
965  {
966  if (pageSizeBytes & inPageSizeBytes)
967  break; // exit at MSB
968  pageSizeBytes >>= 1;
969  } while (pageSizeBytes > s4K); // 4K minimum
970  }
971  if (result % pageSizeBytes)
972  result = ((result / pageSizeBytes) + 1) * pageSizeBytes;
973  return result;
974 }
975 
977 {
978  if (inPlaneIndex0 >= mNumPlanes)
979  return 0; // no such plane!
980  switch (mPixelFormat)
981  {
986  return inPlaneIndex0 ? 2 : 1;
987  default:
988  break;
989  }
990  return 1; // Defaults to 1
991 }
992 
994 {
995  if (NTV2_IS_VALID_VIDEO_FORMAT(mVideoFormat))
996  return NTV2_IS_2K_1080_VIDEO_FORMAT(mVideoFormat);
997  else if (NTV2_IS_VALID_STANDARD(mStandard))
998  return NTV2_IS_2K1080_STANDARD(mStandard);
999  return false;
1000 }
1001 
1002 
1004 {
1005  return numLines == inRHS.numLines && numPixels == inRHS.numPixels
1006  && mNumPlanes == inRHS.mNumPlanes && firstActiveLine == inRHS.firstActiveLine
1007  && mLinePitch[0] == inRHS.mLinePitch[0];
1008 }
1009 
1010 
1011 string NTV2FormatDescriptor::PlaneToString (const UWord inPlaneIndex0) const
1012 {
1013  static string emptyString;
1014  if (NTV2_IS_VALID_FRAME_BUFFER_FORMAT(mPixelFormat) && inPlaneIndex0 < GetNumPlanes())
1015  return gPlaneLabels[mPixelFormat][inPlaneIndex0];
1016  return emptyString;
1017 }
1018 
1019 
1021 {
1022  if (!IsPlanar())
1023  return inByteOffset < GetTotalRasterBytes() ? 0 : 0xFFFF;
1024 
1025  ULWord byteOffset (0);
1026  UWord plane (0);
1027  do
1028  {
1029  byteOffset += GetTotalRasterBytes(plane);
1030  if (inByteOffset < byteOffset)
1031  return plane;
1032  } while (++plane < GetNumPlanes());
1033  return 0xFFFF;
1034 }
1035 
1036 
1038 {
1039  const UWord origPlane (ByteOffsetToPlane(inByteOffset));
1040  if (origPlane == 0xFFFF)
1041  return 0xFFFF;
1042  ULWord byteOffsetToStartOfPlane (0);
1043  UWord plane (origPlane);
1044  while (plane)
1045  byteOffsetToStartOfPlane += GetTotalRasterBytes(--plane);
1046  NTV2_ASSERT(inByteOffset >= byteOffsetToStartOfPlane);
1047  const ULWord lineOffset ((inByteOffset - byteOffsetToStartOfPlane) / GetBytesPerRow(origPlane));
1048  return UWord(lineOffset);
1049 }
1050 
1051 
1053 {
1054  if (!IsValid())
1055  return false;
1056  UWord plane (ByteOffsetToPlane(inByteOffset));
1057  if (plane >= GetNumPlanes())
1058  return false;
1059  if (plane > 0)
1060  inByteOffset -= GetTotalRasterBytes(0);
1061  if (plane > 1)
1062  inByteOffset -= GetTotalRasterBytes(1);
1063  return (inByteOffset % GetBytesPerRow(plane)) == 0;
1064 }
1065 
1066 bool NTV2FormatDescriptor::GetRowBuffer (const NTV2Buffer & inFrameBuffer, NTV2Buffer & inOutRowBuffer, const ULWord inRowIndex0, const UWord inPlaneIndex0) const
1067 {
1068  inOutRowBuffer.Deallocate();
1069  if (inRowIndex0 >= numLines)
1070  return false; // Bad row index
1071  if (inPlaneIndex0 >= mNumPlanes)
1072  return false; // Bad plane index
1073  if (inFrameBuffer.IsNULL())
1074  return false; // NULL/empty frame buffer
1075 
1076  ULWord byteOffset(0); // Set byteOffset to start of desired plane
1077  if (inPlaneIndex0 > 0)
1078  byteOffset += GetTotalRasterBytes(0);
1079  if (inPlaneIndex0 > 1)
1080  byteOffset += GetTotalRasterBytes(1);
1081  if (inPlaneIndex0 > 2)
1082  byteOffset += GetTotalRasterBytes(2);
1083 
1084  ULWord bytesPerRow(GetBytesPerRow(inPlaneIndex0));
1085  byteOffset += inRowIndex0 * bytesPerRow; // Add offset to start of requested line
1086  if (byteOffset+bytesPerRow > inFrameBuffer.GetByteCount())
1087  return false; // Past end of frame buffer
1088 
1089  return inOutRowBuffer.Set(inFrameBuffer.GetHostAddress(byteOffset), bytesPerRow);
1090 }
1091 
1092 const void * NTV2FormatDescriptor::GetRowAddress (const void * pInStartAddress, const ULWord inRowIndex0, const UWord inPlaneIndex0) const
1093 {
1094  if (inRowIndex0 >= numLines)
1095  return AJA_NULL;
1096  if (inPlaneIndex0 >= mNumPlanes)
1097  return AJA_NULL;
1098  if (!pInStartAddress)
1099  return AJA_NULL;
1100 
1101  const UByte * pStart (AsConstUBytePtr(pInStartAddress));
1102  NTV2_ASSERT(pStart);
1103  if (inPlaneIndex0 > 0)
1104  pStart += GetTotalRasterBytes(0);
1105  if (inPlaneIndex0 > 1)
1106  pStart += GetTotalRasterBytes(1);
1107  if (inPlaneIndex0 > 2)
1108  pStart += GetTotalRasterBytes(2);
1109  return pStart + inRowIndex0 * GetBytesPerRow(inPlaneIndex0);
1110 }
1111 
1112 
1113 void * NTV2FormatDescriptor::GetWriteableRowAddress (void * pInStartAddress, const ULWord inRowIndex0, const UWord inPlaneIndex0) const
1114 {
1115  if (inRowIndex0 >= numLines)
1116  return AJA_NULL;
1117  if (inPlaneIndex0 >= mNumPlanes)
1118  return AJA_NULL;
1119 
1120  UByte * pStart (AsUBytePtr(pInStartAddress));
1121  if (inPlaneIndex0 > 0)
1122  pStart += GetTotalRasterBytes(0);
1123  if (inPlaneIndex0 > 1)
1124  pStart += GetTotalRasterBytes(1);
1125  if (inPlaneIndex0 > 2)
1126  pStart += GetTotalRasterBytes(2);
1127  return pStart + inRowIndex0 * GetBytesPerRow(inPlaneIndex0);
1128 }
1129 
1130 
1131 ULWord NTV2FormatDescriptor::RasterLineToByteOffset (const ULWord inRowIndex0, const UWord inPlaneIndex0) const
1132 {
1133  if (inRowIndex0 >= numLines)
1134  return 0xFFFFFFFF;
1135  if (inPlaneIndex0 >= mNumPlanes)
1136  return 0xFFFFFFFF;
1137 
1138  ULWord offset (0);
1139  if (inPlaneIndex0 > 0)
1140  offset += GetTotalRasterBytes(0);
1141  if (inPlaneIndex0 > 1)
1142  offset += GetTotalRasterBytes(1);
1143  if (inPlaneIndex0 > 2)
1144  offset += GetTotalRasterBytes(2);
1145  return offset + inRowIndex0 * GetBytesPerRow(inPlaneIndex0);
1146 }
1147 
1148 
1149 bool NTV2FormatDescriptor::GetFirstChangedRow (const void * pInStartAddress1, const void * pInStartAddress2, ULWord & outFirstChangedRowNum) const
1150 {
1151  outFirstChangedRowNum = 0xFFFFFFFF;
1152  if (!pInStartAddress1)
1153  return false; // NULL start address 1
1154  if (!pInStartAddress2)
1155  return false; // NULL start address 2
1156  if (pInStartAddress1 == pInStartAddress2)
1157  return false; // same start addresses
1158  if (!IsValid())
1159  return false; // invalid
1160 
1161  UWord plane (0);
1162  do
1163  {
1164  for (outFirstChangedRowNum = 0; outFirstChangedRowNum < GetFullRasterHeight(); outFirstChangedRowNum++)
1165  if (::memcmp(GetRowAddress(AsConstUBytePtr(pInStartAddress1), outFirstChangedRowNum, plane), GetRowAddress(pInStartAddress2, outFirstChangedRowNum, plane), GetBytesPerRow(plane)))
1166  return true; // CHANGE FOUND -- Success!
1167  } while (++plane < GetNumPlanes());
1168  outFirstChangedRowNum = 0xFFFFFFFF; // NO CHANGES FOUND
1169  return true; // Success
1170 }
1171 
1172 
1173 bool NTV2FormatDescriptor::GetChangedLines (NTV2RasterLineOffsets & outDiffs, const void * pInBuffer1, const void * pInBuffer2, const ULWord inMaxLines) const
1174 {
1175  outDiffs.clear ();
1176  if (!IsValid())
1177  return false; // Invalid format descriptor
1178  if (!pInBuffer1 || !pInBuffer2)
1179  return false; // NULL or empty buffers
1180 
1181  const UByte * pStartAddress1 (AsConstUBytePtr(pInBuffer1));
1182  const UByte * pStartAddress2 (AsConstUBytePtr(pInBuffer2));
1183 
1184  if (!GetRowAddress (pStartAddress1, GetFullRasterHeight() - 1))
1185  return false; // buffer too small to fetch given rowOffset
1186  if (pInBuffer1 == pInBuffer2)
1187  return true; // Same buffer -- no diffs (success!)
1188  ULWord maxLines (inMaxLines ? inMaxLines : GetFullRasterHeight());
1189  if (maxLines > GetFullRasterHeight())
1190  maxLines = GetFullRasterHeight(); // Clamp maxLines to full raster height
1191 
1192  UWord plane (0);
1193  do
1194  {
1195  for (ULWord rowOffset(0); rowOffset < maxLines; rowOffset++)
1196  if (::memcmp(GetRowAddress(pStartAddress1, rowOffset, plane), GetRowAddress(pStartAddress2, rowOffset, plane), GetBytesPerRow(plane)))
1197  outDiffs.push_back(rowOffset);
1198  } while (++plane < GetNumPlanes());
1199  return true;
1200 }
1201 
1202 
1203 ostream & NTV2FormatDescriptor::Print (ostream & oss, const bool inDetailed) const
1204 {
1205  UWord plane (0);
1206  if (!IsValid ())
1207  oss << "INVALID: ";
1208  oss << "lines=" << DEC(GetFullRasterHeight())
1209  << " px/line=" << DEC(GetRasterWidth());
1210  do
1211  {
1212  if (IsPlanar())
1213  oss << " PL" << plane << ":";
1214  oss << " bytes/line=" << DEC(GetBytesPerRow(plane));
1215  } while (++plane < GetNumPlanes());
1216  if (firstActiveLine)
1217  oss << " 1stAct=" << DEC(firstActiveLine);
1218  if (inDetailed)
1219  {
1220  plane = 0;
1221  if (IsPlanar())
1222  do
1223  {
1224  oss << " PL" << plane << " bytes=" << xHEX0N(GetTotalRasterBytes(plane),8);
1225  } while (++plane < GetNumPlanes());
1226  else
1227  oss << " bytes=" << xHEX0N(GetTotalRasterBytes(),8);
1228  if (NTV2_IS_VALID_VIDEO_FORMAT(mVideoFormat))
1229  oss << " " << ::NTV2VideoFormatToString(mVideoFormat);
1230  else
1231  oss << " " << ::NTV2StandardToString(mStandard) << (Is2KFormat() ? " 2K" : "");
1232  if (NTV2_IS_VANCMODE_ON(mVancMode))
1233  oss << (NTV2_IS_VANCMODE_TALLER(mVancMode) ? " TallerVANC" : " TallVANC");
1234  if (NTV2_IS_VALID_FRAME_BUFFER_FORMAT(mPixelFormat))
1235  oss << " " << ::NTV2FrameBufferFormatToString(mPixelFormat);
1236  if (IsRGB())
1237  oss << " bitsC" << DEC(UWord(GetNumBitsChroma()));
1238  else
1239  oss << " bitsY" << DEC(UWord(GetNumBitsLuma()));
1240  if (HasAlpha())
1241  oss << "A" << DEC(UWord(GetNumBitsAlpha()));
1242  }
1243  return oss;
1244 }
1245 
1246 
1247 // SMPTE LINE NUMBERS:
1248 
1249 // NTV2_VANCMODE_OFF 1080i 720p 525i 625i 1080p 2K 2K1080p 2K1080i 3840x2160p 4096x2160p 3840HFR 4096HFR 7680x4320 8192x4320
1250 static const ULWord LineNumbersF1 [] = { 21, 26, 21, 23, 42, 211, 42, 21, 42, 42, 42, 42, 42, 42, 0 };
1251 static const ULWord LineNumbersF2 [] = { 584, 27, 283, 336, 43, 1201, 43, 584, 43, 43, 43, 43, 43, 43, 0 };
1252 // NTV2_VANCMODE_TALL
1253 static const ULWord LineNumbersF1t [] = { 5, 6, 10, 12, 10, 211, 10, 5, 10, 10, 10, 10, 10, 10, 0 };
1254 static const ULWord LineNumbersF2t [] = { 568, 7, 272, 325, 11, 1201, 11, 568, 11, 11, 11, 11, 11, 11, 0 };
1255 // NTV2_VANCMODE_TALLER
1256 static const ULWord LineNumbersF1tt [] = { 4, 6, 7, 5, 8, 211, 8, 4, 8, 8, 8, 8, 8, 8, 0 };
1257 static const ULWord LineNumbersF2tt [] = { 567, 7, 269, 318, 9, 1201, 9, 567, 9, 9, 9, 9, 9, 9, 0 };
1258 
1259 static const ULWord LineNumbersF1Last[] = { 560, 745, 263, 310, 1121, 0, 1121, 0, 2201, 2201, 2201, 2201, 4361, 4361, 0 };
1260 static const ULWord LineNumbersF2Last[] = { 1123, 745, 525, 623, 1121, 0, 1121, 0, 0, 0, 0, 0, 0, 0, 0 };
1261 
1262 
1263 bool NTV2FormatDescriptor::GetSMPTELineNumber (const ULWord inLineOffset, ULWord & outSMPTELine, bool & outIsField2) const
1264 {
1265  outIsField2 = false;
1266  outSMPTELine = 0;
1267  if (!IsValid())
1268  return false;
1269  if (!NTV2_IS_VALID_STANDARD(mStandard))
1270  return false;
1271  if (!NTV2_IS_VALID_VANCMODE(mVancMode))
1272  return false;
1273  if (inLineOffset >= GetFullRasterHeight())
1274  return false;
1275 
1276  const bool is525i (mStandard == NTV2_STANDARD_525);
1277  if (!NTV2_IS_PROGRESSIVE_STANDARD(mStandard))
1278  outIsField2 = (inLineOffset & 1) ? !is525i : is525i;
1279 
1280  const ULWord divisor (NTV2_IS_PROGRESSIVE_STANDARD(mStandard) ? 1 : 2);
1281  ULWord smpteLine (0);
1282 
1283  switch (mVancMode)
1284  {
1285  case NTV2_VANCMODE_OFF: smpteLine = outIsField2 ? LineNumbersF2[mStandard] : LineNumbersF1[mStandard]; break;
1286  case NTV2_VANCMODE_TALL: smpteLine = outIsField2 ? LineNumbersF2t[mStandard] : LineNumbersF1t[mStandard]; break;
1287  case NTV2_VANCMODE_TALLER: smpteLine = outIsField2 ? LineNumbersF2tt[mStandard] : LineNumbersF1tt[mStandard]; break;
1288  default: break;
1289  }
1290  outSMPTELine = inLineOffset/divisor + smpteLine;
1291  return true;
1292 }
1293 
1294 
1295 bool NTV2FormatDescriptor::GetLineOffsetFromSMPTELine (const ULWord inSMPTELine, ULWord & outLineOffset) const
1296 {
1297  outLineOffset = 0xFFFFFFFF;
1298  if (!IsValid())
1299  return false;
1300  if (!NTV2_IS_VALID_STANDARD(mStandard))
1301  return false;
1302  if (!NTV2_IS_VALID_VANCMODE(mVancMode))
1303  return false;
1304 
1305  ULWord firstF1Line(0), firstF2Line(0);
1306  const ULWord lastF1Line (LineNumbersF1Last[mStandard]);
1307  const ULWord lastF2Line (LineNumbersF2Last[mStandard]);
1308  const ULWord is525i (mStandard == NTV2_STANDARD_525 ? 1 : 0);
1309  const ULWord not525i (mStandard != NTV2_STANDARD_525 ? 1 : 0);
1310 
1311  switch (mVancMode)
1312  {
1313  case NTV2_VANCMODE_OFF: firstF1Line = LineNumbersF1[mStandard]; firstF2Line = LineNumbersF2[mStandard]; break;
1314  case NTV2_VANCMODE_TALL: firstF1Line = LineNumbersF1t[mStandard]; firstF2Line = LineNumbersF2t[mStandard]; break;
1315  case NTV2_VANCMODE_TALLER: firstF1Line = LineNumbersF1tt[mStandard]; firstF2Line = LineNumbersF2tt[mStandard]; break;
1316  case NTV2_VANCMODE_INVALID: return false;
1317  }
1318  if (inSMPTELine < firstF1Line)
1319  return false; // Above first line in FB raster
1320  if (NTV2_IS_PROGRESSIVE_STANDARD(mStandard) && lastF1Line && inSMPTELine > lastF1Line)
1321  return false; // Past last line
1322  if (!NTV2_IS_PROGRESSIVE_STANDARD(mStandard) && lastF1Line && inSMPTELine < firstF2Line && inSMPTELine > lastF1Line)
1323  return false; // In the void past end of F1 and above F2 first line
1324  if (!NTV2_IS_PROGRESSIVE_STANDARD(mStandard) && lastF2Line && inSMPTELine > lastF2Line)
1325  return false; // Past last line
1326 
1327  if (NTV2_IS_PROGRESSIVE_STANDARD(mStandard))
1328  outLineOffset = inSMPTELine - firstF1Line;
1329  else if (inSMPTELine >= firstF2Line)
1330  outLineOffset = (inSMPTELine - firstF2Line) * 2 + not525i;
1331  else
1332  outLineOffset = (inSMPTELine - firstF1Line) * 2 + is525i;
1333  return outLineOffset < GetFullRasterHeight();
1334 }
1335 
1336 
1337 ostream & NTV2FormatDescriptor::PrintSMPTELineNumber (ostream & inOutStream, const ULWord inLineOffset, const bool inForTextMode) const
1338 {
1339  ULWord smpteLine (0);
1340  bool isF2 (false);
1341  if (GetSMPTELineNumber (inLineOffset, smpteLine, isF2))
1342  {
1343  if (!NTV2_IS_PROGRESSIVE_STANDARD (mStandard))
1344  inOutStream << "F" << (isF2 ? "2" : "1") << (inForTextMode ? "" : " ");
1345  if (inForTextMode)
1346  inOutStream << "L" << DEC0N(smpteLine,4);
1347  else
1348  inOutStream << "L" << DEC(smpteLine); // (inLineOffset/divisor + smpteLine);
1349  }
1350  return inOutStream;
1351 }
1352 
1354 {
1355  return NTV2FrameDimensions (GetRasterWidth(), GetRasterHeight(false));
1356 }
1357 
1359 {
1360  return NTV2FrameDimensions (GetRasterWidth(), GetRasterHeight(true));
1361 }
1362 
1363 
1365 {
1366  if (IsValid())
1367  { // Full visible raster
1369  if (inIsSource)
1370  return inSegmentInfo.setSourceOffset(GetBytesPerRow() * GetFirstActiveLine())
1372  else
1373  return inSegmentInfo.setDestOffset(GetBytesPerRow() * GetFirstActiveLine())
1375  }
1376  inSegmentInfo = NTV2SegmentedXferInfo();
1377  return inSegmentInfo;
1378 }
1379 
1380 
1381 // Q: WHY IS NTV2SmpteLineNumber's CONSTRUCTOR & GetLastLine IMPLEMENTATION HERE?
1382 // A: TO USE THE SAME LineNumbersF1/LineNumbersF2 TABLES (above)
1383 
1385 {
1386  NTV2_ASSERT (inStandard < sizeof(LineNumbersF1) / sizeof(ULWord));
1387  *this = NTV2SmpteLineNumber (LineNumbersF1[inStandard], LineNumbersF2[inStandard], inStandard != NTV2_STANDARD_525, inStandard);
1388 }
1389 
1390 
1392 {
1393  if (!NTV2_IS_VALID_FIELD(inRasterFieldID))
1394  return 0;
1395 
1396  if (inRasterFieldID == NTV2_FIELD0)
1397  return firstFieldTop ? LineNumbersF1Last[mStandard] : LineNumbersF2Last[mStandard];
1398  else
1399  return firstFieldTop ? LineNumbersF2Last[mStandard] : LineNumbersF1Last[mStandard];
1400 }
1401 
1402 
1403 ostream & NTV2PrintRasterLineOffsets(const NTV2RasterLineOffsets & inObj, ostream & inOutStream)
1404 {
1405  NTV2StringList pieces;
1406  NTV2RasterLineOffsetsConstIter iter (inObj.begin());
1407  ULWord current (0xFFFFFFFF);
1408  ULWord previous (0xFFFFFFFF);
1409  ULWord first (0xFFFFFFFF);
1410  ULWord last (0xFFFFFFFF);
1411 
1412  #if 0
1413  // Verify sorted ascending...
1414  current = 0;
1415  while (iter != inObj.end())
1416  {
1417  NTV2_ASSERT (current < previous);
1418  previous = current;
1419  }
1420  iter = inObj.begin();
1421  #endif // _DEBUG
1422 
1423  while (iter != inObj.end())
1424  {
1425  current = *iter;
1426  if (previous == 0xFFFFFFFF)
1427  previous = first = last = current; // First time -- always start new sequence
1428  else if (current == (previous + 1))
1429  last = previous = current; // Continue sequence
1430  else if (current == previous)
1431  ;
1432  else
1433  {
1434  ostringstream oss;
1435  if (first == last)
1436  oss << first;
1437  else
1438  oss << first << "-" << last;
1439  pieces.push_back (oss.str ());
1440 
1441  first = last = previous = current; // Start new sequence...
1442  } // else sequence break
1443  ++iter;
1444  }
1445 
1446  if (first != 0xFFFFFFFF && last != 0xFFFFFFFF)
1447  {
1448  ostringstream oss;
1449  if (first == last)
1450  oss << first;
1451  else
1452  oss << first << "-" << last;
1453  pieces.push_back (oss.str ());
1454  }
1455 
1456  for (NTV2StringListConstIter it (pieces.begin()); ; )
1457  {
1458  inOutStream << *it;
1459  if (++it != pieces.end())
1460  inOutStream << ",";
1461  else
1462  break;
1463  }
1464  return inOutStream;
1465 }
LineNumbersF1Last
static const ULWord LineNumbersF1Last[]
Definition: ntv2formatdescriptor.cpp:1259
NTV2_IS_TALLER_VANC_GEOMETRY
#define NTV2_IS_TALLER_VANC_GEOMETRY(__g__)
Definition: ntv2enums.h:391
NTV2_FBF_10BIT_YCBCR_420PL3_LE
@ NTV2_FBF_10BIT_YCBCR_420PL3_LE
See 3-Plane 10-Bit YCbCr 4:2:0 ('I420_10LE' a.k.a. 'YUV-P420-L10').
Definition: ntv2enums.h:240
HD_NUMCOMPONENTPIXELS_1080_DVCPRO
#define HD_NUMCOMPONENTPIXELS_1080_DVCPRO
Definition: ntv2videodefines.h:77
NTV2SegmentedXferInfo::setDestOffset
NTV2SegmentedXferInfo & setDestOffset(const ULWord inOffset)
Sets my destination offset.
Definition: ntv2publicinterface.h:5980
NTV2FormatDescriptor::GetBytesPerRow
ULWord GetBytesPerRow(const UWord inPlaneIndex0=0) const
Definition: ntv2formatdescriptor.h:158
HD_NUMCOMPONENTPIXELS_2K
#define HD_NUMCOMPONENTPIXELS_2K
Definition: videoutilities.h:15
NTV2_FBF_NUMFRAMEBUFFERFORMATS
@ NTV2_FBF_NUMFRAMEBUFFERFORMATS
Definition: ntv2enums.h:247
NTV2_IS_VANCMODE_TALLER
#define NTV2_IS_VANCMODE_TALLER(__v__)
Definition: ntv2enums.h:3777
NTV2_FBF_ARGB
@ NTV2_FBF_ARGB
See 8-Bit ARGB, RGBA, ABGR Formats.
Definition: ntv2enums.h:215
NTV2_NUM_STANDARDS
@ NTV2_NUM_STANDARDS
Definition: ntv2enums.h:174
NTV2_FBF_10BIT_YCBCR_420PL2
@ NTV2_FBF_10BIT_YCBCR_420PL2
10-Bit 4:2:0 2-Plane YCbCr
Definition: ntv2enums.h:242
NTV2SegmentedXferInfo::setSegmentCount
NTV2SegmentedXferInfo & setSegmentCount(const ULWord inNumSegments)
Sets my segment count.
Definition: ntv2publicinterface.h:5910
NTV2FormatDescriptor::GetVideoWriteSize
ULWord GetVideoWriteSize(ULWord inPageSize=4096UL) const
Definition: ntv2formatdescriptor.cpp:957
HD_NUMCOMPONENTPIXELS_720_DVCPRO
#define HD_NUMCOMPONENTPIXELS_720_DVCPRO
Definition: ntv2videodefines.h:76
RGB12PLINEPITCH_3840
#define RGB12PLINEPITCH_3840
Definition: ntv2videodefines.h:126
RGB48LINEPITCH_7680
#define RGB48LINEPITCH_7680
Definition: ntv2videodefines.h:118
NTV2_IS_VALID_NTV2FrameGeometry
#define NTV2_IS_VALID_NTV2FrameGeometry(__s__)
Definition: ntv2enums.h:371
FD_NUMLINES_8K
#define FD_NUMLINES_8K
Definition: ntv2videodefines.h:62
NTV2_STANDARD_2Kx1080p
@ NTV2_STANDARD_2Kx1080p
Identifies SMPTE HD 2K1080p.
Definition: ntv2enums.h:164
RGB12PLINEPITCH_525
#define RGB12PLINEPITCH_525
Definition: ntv2videodefines.h:121
HD_YCBCRLINEPITCH_1080
#define HD_YCBCRLINEPITCH_1080
Definition: ntv2videodefines.h:87
NTV2_FBF_12BIT_RGB_PACKED
@ NTV2_FBF_12BIT_RGB_PACKED
See 12-Bit Packed RGB.
Definition: ntv2enums.h:231
NTV2SegmentedXferInfo::setSourceOffset
NTV2SegmentedXferInfo & setSourceOffset(const ULWord inOffset)
Sets my source offset.
Definition: ntv2publicinterface.h:5935
AJA_FD_TBD
#define AJA_FD_TBD
Definition: ntv2formatdescriptor.cpp:22
NTV2FormatDescriptor
Describes a video frame for a given video standard or format and pixel format, including the total nu...
Definition: ntv2formatdescriptor.h:41
NTV2_IS_FBF_PLANAR
#define NTV2_IS_FBF_PLANAR(__s__)
Definition: ntv2enums.h:258
HD_YCBCRLINEPITCH_1080_DVCPRO
#define HD_YCBCRLINEPITCH_1080_DVCPRO
Definition: ntv2videodefines.h:95
NTV2FormatDescriptor::GetRowAddress
const void * GetRowAddress(const void *pInStartAddress, const ULWord inRowIndex0, const UWord inPlaneIndex0=0) const
Definition: ntv2formatdescriptor.cpp:1092
RGB12PLINEPITCH_4096
#define RGB12PLINEPITCH_4096
Definition: ntv2videodefines.h:127
GetNTV2FrameGeometryFromVideoFormat
NTV2FrameGeometry GetNTV2FrameGeometryFromVideoFormat(const NTV2VideoFormat inVideoFormat)
Definition: ntv2utils.cpp:2548
NTV2FormatDescriptor::GetSegmentedXferInfo
NTV2SegmentedXferInfo & GetSegmentedXferInfo(NTV2SegmentedXferInfo &inSegmentInfo, const bool inIsSource=true) const
Sets the given NTV2SegmentedXferInfo to match my raster, as a source or destination.
Definition: ntv2formatdescriptor.cpp:1364
NTV2SegmentedXferInfo::setSourcePitch
NTV2SegmentedXferInfo & setSourcePitch(const ULWord inPitch)
Sets my source pitch.
Definition: ntv2publicinterface.h:5943
NTV2Buffer
Describes a user-space buffer on the host computer. I have an address and a length,...
Definition: ntv2publicinterface.h:6094
NTV2SmpteLineNumber::GetLastLine
ULWord GetLastLine(const NTV2FieldID inRasterFieldID=NTV2_FIELD0) const
Definition: ntv2formatdescriptor.cpp:1391
NTV2_IS_2K1080_STANDARD
#define NTV2_IS_2K1080_STANDARD(__s__)
Definition: ntv2enums.h:200
NTV2_FBF_10BIT_DPX_LE
@ NTV2_FBF_10BIT_DPX_LE
10-Bit DPX Little-Endian
Definition: ntv2enums.h:229
NTV2Buffer::GetByteCount
ULWord GetByteCount(void) const
Definition: ntv2publicinterface.h:6168
NTV2_STANDARD_INVALID
@ NTV2_STANDARD_INVALID
Definition: ntv2enums.h:176
NTV2_ASSERT
#define NTV2_ASSERT(_expr_)
Definition: ajatypes.h:508
NTV2FormatDescriptor::IsAtLineStart
bool IsAtLineStart(ULWord inByteOffset) const
Definition: ntv2formatdescriptor.cpp:1052
NTV2_STANDARD_1080
@ NTV2_STANDARD_1080
Identifies SMPTE HD 1080i or 1080psf.
Definition: ntv2enums.h:158
NTV2_FBF_RGBA
@ NTV2_FBF_RGBA
See 8-Bit ARGB, RGBA, ABGR Formats.
Definition: ntv2enums.h:216
NTV2_STANDARD_625
@ NTV2_STANDARD_625
Identifies SMPTE SD 625i.
Definition: ntv2enums.h:161
FD_YCBCRLINEPITCH_UHD2
#define FD_YCBCRLINEPITCH_UHD2
Definition: ntv2videodefines.h:91
NTV2SegmentedXferInfo::setSegmentLength
NTV2SegmentedXferInfo & setSegmentLength(const ULWord inNumElements)
Sets my segment length.
Definition: ntv2publicinterface.h:5918
RGB24LINEPITCH_625
#define RGB24LINEPITCH_625
Definition: ntv2videodefines.h:52
HD_NUMACTIVELINES_2K
#define HD_NUMACTIVELINES_2K
Definition: ntv2videodefines.h:58
RGB12PLINEPITCH_8192
#define RGB12PLINEPITCH_8192
Definition: ntv2videodefines.h:129
NTV2_FG_INVALID
@ NTV2_FG_INVALID
Definition: ntv2enums.h:368
RGB12PLINEPITCH_7680
#define RGB12PLINEPITCH_7680
Definition: ntv2videodefines.h:128
NTV2_FBF_48BIT_RGB
@ NTV2_FBF_48BIT_RGB
See 48-Bit RGB.
Definition: ntv2enums.h:230
NTV2Buffer::Deallocate
bool Deallocate(void)
Deallocates my user-space storage (if I own it – i.e. from a prior call to Allocate).
Definition: ntv2publicinterface.cpp:1803
NTV2FormatDescriptor::linePitch
ULWord linePitch
Number of 32-bit words per line – shadows mLinePitch[0] / sizeof(ULWord)
Definition: ntv2formatdescriptor.h:368
NTV2FormatDescriptor::Is2KFormat
bool Is2KFormat(void) const
Definition: ntv2formatdescriptor.cpp:993
DEC0N
#define DEC0N(__x__, __n__)
Definition: ntv2publicinterface.h:5649
NTV2FormatDescriptor::GetRasterHeight
ULWord GetRasterHeight(const bool inVisibleOnly=false) const
Definition: ntv2formatdescriptor.h:188
NTV2FieldID
NTV2FieldID
These values are used to identify fields for interlaced video. See Field/Frame Interrupts and CNTV2Ca...
Definition: ntv2enums.h:1826
NTV2_FBF_INVALID
@ NTV2_FBF_INVALID
Definition: ntv2enums.h:248
NTV2FrameBufferFormat
NTV2FrameBufferFormat
Identifies a particular video frame buffer format. See Device Frame Buffer Formats for details.
Definition: ntv2enums.h:210
NTV2FormatDescriptor::GetRowBuffer
bool GetRowBuffer(const NTV2Buffer &inFrameBuffer, NTV2Buffer &inOutRowBuffer, const ULWord inRowIndex0, const UWord inPlaneIndex0=0) const
Answers with an NTV2Buffer that describes the given row (and plane) given the NTV2Buffer that describ...
Definition: ntv2formatdescriptor.cpp:1066
GetVANCFrameGeometry
NTV2FrameGeometry GetVANCFrameGeometry(const NTV2FrameGeometry inFrameGeometry, const NTV2VANCMode inVancMode)
Definition: ntv2utils.cpp:3808
NTV2_IS_2K_1080_VIDEO_FORMAT
#define NTV2_IS_2K_1080_VIDEO_FORMAT(__f__)
Definition: ntv2enums.h:754
NTV2_FBF_10BIT_DPX
@ NTV2_FBF_10BIT_DPX
See 10-Bit RGB - DPX Format.
Definition: ntv2enums.h:221
NTV2SmpteLineNumber::NTV2SmpteLineNumber
NTV2SmpteLineNumber(const NTV2Standard inStandard=NTV2_STANDARD_INVALID)
Constructs me from a given NTV2Standard.
Definition: ntv2formatdescriptor.cpp:1384
NTV2_FBF_24BIT_RGB
@ NTV2_FBF_24BIT_RGB
See 24-Bit RGB.
Definition: ntv2enums.h:226
NTV2FrameSize
Describes the horizontal and vertical size dimensions of a raster, bitmap, frame or image.
Definition: ntv2publicinterface.h:5694
NTV2FormatDescriptor::GetLineOffsetFromSMPTELine
bool GetLineOffsetFromSMPTELine(const ULWord inSMPTELine, ULWord &outLineOffset) const
Answers with the equivalent line offset into the raster I describe for the given SMPTE line number.
Definition: ntv2formatdescriptor.cpp:1295
NTV2_FIELD0
@ NTV2_FIELD0
Identifies the first field in time for an interlaced video frame, or the first and only field in a pr...
Definition: ntv2enums.h:1828
LineNumbersF1
static const ULWord LineNumbersF1[]
Definition: ntv2formatdescriptor.cpp:1250
NTV2_IS_TALL_VANC_GEOMETRY
#define NTV2_IS_TALL_VANC_GEOMETRY(__g__)
Definition: ntv2enums.h:384
LineNumbersF2Last
static const ULWord LineNumbersF2Last[]
Definition: ntv2formatdescriptor.cpp:1260
HD_YCBCRLINEPITCH_2K
#define HD_YCBCRLINEPITCH_2K
Definition: ntv2videodefines.h:88
RGB24LINEPITCH_720
#define RGB24LINEPITCH_720
Definition: ntv2videodefines.h:103
NTV2SegmentedXferInfo
Describes a segmented data transfer (copy or move) from a source memory location to a destination loc...
Definition: ntv2publicinterface.h:5802
NTV2_FBF_8BIT_YCBCR_420PL2
@ NTV2_FBF_8BIT_YCBCR_420PL2
8-Bit 4:2:0 2-Plane YCbCr
Definition: ntv2enums.h:244
GetNormalizedFrameGeometry
NTV2FrameGeometry GetNormalizedFrameGeometry(const NTV2FrameGeometry inFrameGeometry)
Definition: ntv2utils.cpp:3760
RGB48LINEPITCH_8192
#define RGB48LINEPITCH_8192
Definition: ntv2videodefines.h:119
HD_YCBCRLINEPITCH_720
#define HD_YCBCRLINEPITCH_720
Definition: ntv2videodefines.h:86
NTV2FormatDescriptor::operator==
bool operator==(const NTV2FormatDescriptor &inRHS) const
Definition: ntv2formatdescriptor.cpp:1003
NTV2FormatDescriptor::numPixels
ULWord numPixels
Width – total number of pixels per line.
Definition: ntv2formatdescriptor.h:367
HD_NUMLINES_4K
#define HD_NUMLINES_4K
Definition: ntv2videodefines.h:61
NTV2_VANCMODE_TALL
@ NTV2_VANCMODE_TALL
This identifies the "tall" mode in which there are some VANC lines in the frame buffer.
Definition: ntv2enums.h:3770
NTV2FrameDimensions
NTV2FrameSize NTV2FrameDimensions
Definition: ntv2publicinterface.h:5782
NTV2Standard
NTV2Standard
Identifies a particular video standard.
Definition: ntv2enums.h:156
NTV2_VANCMODE_OFF
@ NTV2_VANCMODE_OFF
This identifies the mode in which there are no VANC lines in the frame buffer.
Definition: ntv2enums.h:3769
NTV2Buffer::IsNULL
bool IsNULL(void) const
Definition: ntv2publicinterface.h:6190
RGB48LINEPITCH_3840
#define RGB48LINEPITCH_3840
Definition: ntv2videodefines.h:116
ULWord
uint32_t ULWord
Definition: ajatypes.h:255
NUMACTIVELINES_525
#define NUMACTIVELINES_525
Definition: ntv2videodefines.h:41
NTV2FormatDescriptor::numLines
ULWord numLines
Height – total number of lines.
Definition: ntv2formatdescriptor.h:366
HD_NUMACTIVELINES_720
#define HD_NUMACTIVELINES_720
Definition: ntv2videodefines.h:56
NTV2FormatDescriptor::GetTotalBytes
ULWord GetTotalBytes(void) const
Definition: ntv2formatdescriptor.cpp:946
AJA_FD_NOTSUPPORTED
#define AJA_FD_NOTSUPPORTED
Definition: ntv2formatdescriptor.cpp:21
NTV2_IS_VALID_STANDARD
#define NTV2_IS_VALID_STANDARD(__s__)
Definition: ntv2enums.h:179
AsUBytePtr
#define AsUBytePtr(_x_)
Definition: ntv2formatdescriptor.cpp:25
NUMACTIVELINES_625
#define NUMACTIVELINES_625
Definition: ntv2videodefines.h:42
FD_NUMCOMPONENTPIXELS_UHD2
#define FD_NUMCOMPONENTPIXELS_UHD2
Definition: ntv2videodefines.h:73
NTV2FormatDescriptor::GetVerticalSampleRatio
ULWord GetVerticalSampleRatio(const UWord inPlaneIndex0=0) const
Definition: ntv2formatdescriptor.cpp:976
RGB48LINEPITCH_2048
#define RGB48LINEPITCH_2048
Definition: ntv2videodefines.h:115
RGB24LINEPITCH_3840
#define RGB24LINEPITCH_3840
Definition: ntv2videodefines.h:106
LineNumbersF1tt
static const ULWord LineNumbersF1tt[]
Definition: ntv2formatdescriptor.cpp:1256
RGB12PLINEPITCH_1080
#define RGB12PLINEPITCH_1080
Definition: ntv2videodefines.h:124
NTV2_FBF_24BIT_BGR
@ NTV2_FBF_24BIT_BGR
See 24-Bit BGR.
Definition: ntv2enums.h:227
NTV2StandardToString
std::string NTV2StandardToString(const NTV2Standard inValue, const bool inForRetailDisplay=false)
Definition: ntv2utils.cpp:6962
HD_NUMCOMPONENTPIXELS_QUADHD
#define HD_NUMCOMPONENTPIXELS_QUADHD
Definition: ntv2videodefines.h:71
RGB24LINEPITCH_8192
#define RGB24LINEPITCH_8192
Definition: ntv2videodefines.h:109
NTV2FormatDescriptor::GetFirstChangedRow
bool GetFirstChangedRow(const void *pInStartAddress1, const void *pInStartAddress2, ULWord &outFirstChangedRowNum) const
Compares two buffers line-by-line (using my description of the buffer contents).
Definition: ntv2formatdescriptor.cpp:1149
NTV2FormatDescriptor::GetFirstActiveLine
ULWord GetFirstActiveLine(void) const
Definition: ntv2formatdescriptor.h:198
NTV2_STANDARD_1080p
@ NTV2_STANDARD_1080p
Identifies SMPTE HD 1080p.
Definition: ntv2enums.h:162
UWord
uint16_t UWord
Definition: ajatypes.h:253
NTV2FormatDescriptor::PrintSMPTELineNumber
std::ostream & PrintSMPTELineNumber(std::ostream &inOutStream, const ULWord inLineOffset, const bool inForTextMode=false) const
Writes the given frame buffer line offset as a formatted SMPTE line number into the given output stre...
Definition: ntv2formatdescriptor.cpp:1337
NTV2SegmentedXferInfo::setDestPitch
NTV2SegmentedXferInfo & setDestPitch(const ULWord inPitch)
Sets my destination pitch.
Definition: ntv2publicinterface.h:5987
NTV2_IS_VANCMODE_ON
#define NTV2_IS_VANCMODE_ON(__v__)
Definition: ntv2enums.h:3778
NTV2_FBF_8BIT_YCBCR
@ NTV2_FBF_8BIT_YCBCR
See 8-Bit YCbCr Format.
Definition: ntv2enums.h:214
AJA_FD_END
#define AJA_FD_END
Definition: ntv2formatdescriptor.cpp:20
AJA_FD_BEGIN
#define AJA_FD_BEGIN
Definition: ntv2formatdescriptor.cpp:19
ntv2utils.h
Declares numerous NTV2 utility functions.
NTV2VideoFormatToString
std::string NTV2VideoFormatToString(const NTV2VideoFormat inValue, const bool inUseFrameRate=false)
Definition: ntv2utils.cpp:6798
NTV2FormatDescriptor::GetFullRasterDimensions
NTV2FrameDimensions GetFullRasterDimensions(void) const
Definition: ntv2formatdescriptor.cpp:1353
FD_NUMCOMPONENTPIXELS_8K
#define FD_NUMCOMPONENTPIXELS_8K
Definition: ntv2videodefines.h:74
NTV2_FBF_10BIT_YCBCR_422PL2
@ NTV2_FBF_10BIT_YCBCR_422PL2
10-Bit 4:2:2 2-Plane YCbCr
Definition: ntv2enums.h:243
HD_YCBCRLINEPITCH_720_HDV
#define HD_YCBCRLINEPITCH_720_HDV
Definition: ntv2videodefines.h:100
RGB48LINEPITCH_525
#define RGB48LINEPITCH_525
Definition: ntv2videodefines.h:111
NTV2StringList
std::vector< std::string > NTV2StringList
Definition: ntv2utils.h:1143
AsConstUBytePtr
#define AsConstUBytePtr(_x_)
Definition: ntv2formatdescriptor.cpp:24
NTV2VANCMode
NTV2VANCMode
These enum values identify the available VANC modes.
Definition: ntv2enums.h:3767
NTV2FormatDescriptor::GetTotalRasterBytes
ULWord GetTotalRasterBytes(const UWord inPlaneIndex0=0) const
Definition: ntv2formatdescriptor.h:132
LineNumbersF2
static const ULWord LineNumbersF2[]
Definition: ntv2formatdescriptor.cpp:1251
AJA_NULL
#define AJA_NULL
Definition: ajatypes.h:199
NTV2RasterLineOffsets
std::vector< ULWord > NTV2RasterLineOffsets
An ordered sequence of zero-based line offsets into a frame buffer.
Definition: ntv2formatdescriptor.h:23
RGB48LINEPITCH_4096
#define RGB48LINEPITCH_4096
Definition: ntv2videodefines.h:117
NTV2_VANCMODE_INVALID
@ NTV2_VANCMODE_INVALID
This identifies the invalid (unspecified, uninitialized) VANC mode.
Definition: ntv2enums.h:3772
NTV2FormatDescriptor::PlaneToString
std::string PlaneToString(const UWord inPlaneIndex0) const
Definition: ntv2formatdescriptor.cpp:1011
HD_YCBCRLINEPITCH_1080_HDV
#define HD_YCBCRLINEPITCH_1080_HDV
Definition: ntv2videodefines.h:101
NTV2FormatDescriptor::GetChangedLines
bool GetChangedLines(NTV2RasterLineOffsets &outDiffs, const void *pInBuffer1, const void *pInBuffer2, const ULWord inMaxLines=0) const
Compares two buffers line-by-line (using my description of the buffer contents).
Definition: ntv2formatdescriptor.cpp:1173
NTV2_FBF_8BIT_YCBCR_YUY2
@ NTV2_FBF_8BIT_YCBCR_YUY2
See Alternate 8-Bit YCbCr ('YUY2').
Definition: ntv2enums.h:218
HD_NUMCOMPONENTPIXELS_720_HDV
#define HD_NUMCOMPONENTPIXELS_720_HDV
Definition: ntv2videodefines.h:82
NTV2FormatDescriptor::firstActiveLine
ULWord firstActiveLine
First active line of video (0 if NTV2_VANCMODE_OFF)
Definition: ntv2formatdescriptor.h:369
NTV2Buffer::GetHostAddress
void * GetHostAddress(const ULWord inByteOffset, const bool inFromEnd=false) const
Definition: ntv2publicinterface.cpp:1825
RGB12PLINEPITCH_625
#define RGB12PLINEPITCH_625
Definition: ntv2videodefines.h:122
NTV2SegmentedXferInfo::setElementLength
NTV2SegmentedXferInfo & setElementLength(const ULWord inBytesPerElement)
Sets my element length.
Definition: ntv2publicinterface.h:6015
RGB48LINEPITCH_625
#define RGB48LINEPITCH_625
Definition: ntv2videodefines.h:112
ntv2formatdescriptor.h
Declares the NTV2FormatDescriptor class.
NTV2_FORMAT_UNKNOWN
@ NTV2_FORMAT_UNKNOWN
Definition: ntv2enums.h:525
gPlaneLabels
static const string gPlaneLabels[NTV2_FBF_NUMFRAMEBUFFERFORMATS][4]
Definition: ntv2formatdescriptor.cpp:28
NTV2_STANDARD_2K
@ NTV2_STANDARD_2K
Definition: ntv2enums.h:163
NTV2_FBF_10BIT_YCBCR
@ NTV2_FBF_10BIT_YCBCR
See 10-Bit YCbCr Format.
Definition: ntv2enums.h:213
NTV2_VANCMODE_TALLER
@ NTV2_VANCMODE_TALLER
This identifies the mode in which there are some + extra VANC lines in the frame buffer.
Definition: ntv2enums.h:3771
DEC
#define DEC(__x__)
Definition: ntv2publicinterface.h:5647
RGB48LINEPITCH_720
#define RGB48LINEPITCH_720
Definition: ntv2videodefines.h:113
UByte
uint8_t UByte
Definition: ajatypes.h:250
NTV2FormatDescriptor::GetWriteableRowAddress
void * GetWriteableRowAddress(void *pInStartAddress, const ULWord inRowIndex0, const UWord inPlaneIndex0=0) const
Definition: ntv2formatdescriptor.cpp:1113
NTV2_STANDARD_525
@ NTV2_STANDARD_525
Identifies SMPTE SD 525i.
Definition: ntv2enums.h:160
NTV2FormatDescriptor::Print
std::ostream & Print(std::ostream &inOutStream, const bool inDetailed=true) const
Writes a human-readable description of me into the given output stream.
Definition: ntv2formatdescriptor.cpp:1203
RGB24LINEPITCH_7680
#define RGB24LINEPITCH_7680
Definition: ntv2videodefines.h:108
NTV2FrameBufferFormatToString
std::string NTV2FrameBufferFormatToString(const NTV2FrameBufferFormat inValue, const bool inForRetailDisplay=false)
Definition: ntv2utils.cpp:6988
gBitsPerComponent
static const uint8_t gBitsPerComponent[NTV2_FBF_NUMFRAMEBUFFERFORMATS][3]
Definition: ntv2formatdescriptor.cpp:65
NTV2_FBF_10BIT_YCBCR_DPX
@ NTV2_FBF_10BIT_YCBCR_DPX
See 10-Bit YCbCr - DPX Format.
Definition: ntv2enums.h:222
HD_YCBCRLINEPITCH_720_DVCPRO
#define HD_YCBCRLINEPITCH_720_DVCPRO
Definition: ntv2videodefines.h:94
YCBCRLINEPITCH_SD
#define YCBCRLINEPITCH_SD
Definition: ntv2videodefines.h:48
std
Definition: json.hpp:5362
NTV2_FBF_10BIT_YCBCR_422PL3_LE
@ NTV2_FBF_10BIT_YCBCR_422PL3_LE
See 3-Plane 10-Bit YCbCr 4:2:2 ('I422_10LE' a.k.a. 'YUV-P-L10').
Definition: ntv2enums.h:241
RGB48LINEPITCH_1080
#define RGB48LINEPITCH_1080
Definition: ntv2videodefines.h:114
NTV2_STANDARD_2Kx1080i
@ NTV2_STANDARD_2Kx1080i
Identifies SMPTE HD 2K1080psf.
Definition: ntv2enums.h:165
NTV2_IS_VALID_FIELD
#define NTV2_IS_VALID_FIELD(__x__)
Definition: ntv2enums.h:1833
RGB24LINEPITCH_4096
#define RGB24LINEPITCH_4096
Definition: ntv2videodefines.h:107
NTV2VideoFormat
enum _NTV2VideoFormat NTV2VideoFormat
Identifies a particular video format.
NTV2_FBF_8BIT_YCBCR_420PL3
@ NTV2_FBF_8BIT_YCBCR_420PL3
See 3-Plane 8-Bit YCbCr 4:2:0 ('I420' a.k.a. 'YUV-P420').
Definition: ntv2enums.h:224
HD_NUMCOMPONENTPIXELS_1080
#define HD_NUMCOMPONENTPIXELS_1080
Definition: videoutilities.h:17
GetGeometryFromStandard
NTV2FrameGeometry GetGeometryFromStandard(const NTV2Standard inStandard)
Definition: ntv2utils.cpp:3972
NTV2_STANDARD_720
@ NTV2_STANDARD_720
Identifies SMPTE HD 720p.
Definition: ntv2enums.h:159
NTV2FrameGeometry
NTV2FrameGeometry
Identifies a particular video frame geometry.
Definition: ntv2enums.h:339
NTV2PrintRasterLineOffsets
ostream & NTV2PrintRasterLineOffsets(const NTV2RasterLineOffsets &inObj, ostream &inOutStream)
Definition: ntv2formatdescriptor.cpp:1403
NTV2FormatDescriptor::RasterLineToByteOffset
ULWord RasterLineToByteOffset(const ULWord inRowIndex0, const UWord inPlaneIndex0=0) const
Definition: ntv2formatdescriptor.cpp:1131
HD_NUMCOMPONENTPIXELS_720
#define HD_NUMCOMPONENTPIXELS_720
Definition: ntv2videodefines.h:67
NTV2_FBF_8BIT_YCBCR_422PL2
@ NTV2_FBF_8BIT_YCBCR_422PL2
8-Bit 4:2:2 2-Plane YCbCr
Definition: ntv2enums.h:245
HD_YCBCRLINEPITCH_3840
#define HD_YCBCRLINEPITCH_3840
Definition: ntv2videodefines.h:89
NTV2FormatDescriptor::MakeInvalid
void MakeInvalid(void)
Resets me into an invalid (NULL) state.
Definition: ntv2formatdescriptor.cpp:930
NTV2StringListConstIter
NTV2StringList::const_iterator NTV2StringListConstIter
Definition: ntv2utils.h:1145
LineNumbersF2t
static const ULWord LineNumbersF2t[]
Definition: ntv2formatdescriptor.cpp:1254
LineNumbersF2tt
static const ULWord LineNumbersF2tt[]
Definition: ntv2formatdescriptor.cpp:1257
formatDescriptorTable
const static NTV2FormatDescriptor formatDescriptorTable[NTV2_NUM_STANDARDS][NTV2_FBF_NUMFRAMEBUFFERFORMATS]
Definition: ntv2formatdescriptor.cpp:102
RGB12PLINEPITCH_2048
#define RGB12PLINEPITCH_2048
Definition: ntv2videodefines.h:125
GetNTV2StandardFromVideoFormat
NTV2Standard GetNTV2StandardFromVideoFormat(const NTV2VideoFormat inVideoFormat)
Definition: ntv2utils.cpp:2279
NTV2_FBF_8BIT_YCBCR_422PL3
@ NTV2_FBF_8BIT_YCBCR_422PL3
See 3-Plane 8-Bit YCbCr 4:2:2 (Weitek 'Y42B' a.k.a. 'YUV-P8').
Definition: ntv2enums.h:237
HD_YCBCRLINEPITCH_4K
#define HD_YCBCRLINEPITCH_4K
Definition: ntv2videodefines.h:90
HD_NUMCOMPONENTPIXELS_4K
#define HD_NUMCOMPONENTPIXELS_4K
Definition: ntv2videodefines.h:72
NTV2_FBF_10BIT_RGB
@ NTV2_FBF_10BIT_RGB
See 10-Bit RGB Format.
Definition: ntv2enums.h:217
NTV2FormatDescriptor::ByteOffsetToRasterLine
UWord ByteOffsetToRasterLine(const ULWord inByteOffset) const
Definition: ntv2formatdescriptor.cpp:1037
NTV2_IS_VALID_FRAME_BUFFER_FORMAT
#define NTV2_IS_VALID_FRAME_BUFFER_FORMAT(__s__)
Definition: ntv2enums.h:254
RGB12PLINEPITCH_720
#define RGB12PLINEPITCH_720
Definition: ntv2videodefines.h:123
xHEX0N
#define xHEX0N(__x__, __n__)
Definition: ntv2publicinterface.h:5646
NTV2FormatDescriptor::NTV2FormatDescriptor
NTV2FormatDescriptor()
My default constructor initializes me in an "invalid" state.
Definition: ntv2formatdescriptor.cpp:903
NTV2SmpteLineNumber::firstFieldTop
bool firstFieldTop
True if the first field on the wire is the top-most field in the raster (field dominance)
Definition: ntv2utils.h:881
HD_NUMCOMPONENTPIXELS_1080_HDV
#define HD_NUMCOMPONENTPIXELS_1080_HDV
Definition: ntv2videodefines.h:83
NTV2_IS_VALID_VANCMODE
#define NTV2_IS_VALID_VANCMODE(__v__)
Definition: ntv2enums.h:3775
NUMCOMPONENTPIXELS
#define NUMCOMPONENTPIXELS
Definition: ntv2videodefines.h:47
FD_YCBCRLINEPITCH_8K
#define FD_YCBCRLINEPITCH_8K
Definition: ntv2videodefines.h:92
RGB24LINEPITCH_1080
#define RGB24LINEPITCH_1080
Definition: ntv2videodefines.h:104
NTV2RasterLineOffsetsConstIter
NTV2RasterLineOffsets::const_iterator NTV2RasterLineOffsetsConstIter
A handy const iterator into an NTV2RasterLineOffsets.
Definition: ntv2formatdescriptor.h:24
NTV2FormatDescriptor::GetVisibleRasterDimensions
NTV2FrameDimensions GetVisibleRasterDimensions(void) const
Definition: ntv2formatdescriptor.cpp:1358
NTV2FormatDescriptor::GetFullRasterHeight
ULWord GetFullRasterHeight(void) const
Definition: ntv2formatdescriptor.h:193
NTV2FormatDescriptor::IsValid
bool IsValid(void) const
Definition: ntv2formatdescriptor.h:112
RGB24LINEPITCH_525
#define RGB24LINEPITCH_525
Definition: ntv2videodefines.h:51
NTV2FormatDescriptor::GetSMPTELineNumber
bool GetSMPTELineNumber(const ULWord inLineOffset, ULWord &outSMPTELine, bool &outIsField2) const
Answers with the equivalent SMPTE line number for the given line offset into the frame buffer I descr...
Definition: ntv2formatdescriptor.cpp:1263
HD_NUMACTIVELINES_1080
#define HD_NUMACTIVELINES_1080
Definition: ntv2videodefines.h:57
NTV2_FBF_ABGR
@ NTV2_FBF_ABGR
See 8-Bit ARGB, RGBA, ABGR Formats.
Definition: ntv2enums.h:219
NTV2_IS_VALID_VIDEO_FORMAT
#define NTV2_IS_VALID_VIDEO_FORMAT(__f__)
Definition: ntv2enums.h:716
RGB24LINEPITCH_2048
#define RGB24LINEPITCH_2048
Definition: ntv2videodefines.h:105
NTV2_IS_PROGRESSIVE_STANDARD
#define NTV2_IS_PROGRESSIVE_STANDARD(__s__)
Definition: ntv2enums.h:180
NTV2FormatDescriptor::ByteOffsetToPlane
UWord ByteOffsetToPlane(const ULWord inByteOffset) const
Definition: ntv2formatdescriptor.cpp:1020
NTV2Buffer::Set
bool Set(const void *pInUserPointer, const size_t inByteCount)
Sets (or resets) me from a client-supplied address and size.
Definition: ntv2publicinterface.cpp:1753
LineNumbersF1t
static const ULWord LineNumbersF1t[]
Definition: ntv2formatdescriptor.cpp:1253