AJA NTV2 SDK  18.1.0.2149
NTV2 SDK 18.1.0.2149
ntv2publicinterface.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: MIT */
8 #ifndef NTV2PUBLICINTERFACE_H
9 #define NTV2PUBLICINTERFACE_H
10 
11 #include "ajatypes.h"
12 #include "ntv2enums.h"
13 #if !defined(NTV2_BUILDING_DRIVER)
14  #include <iostream>
15  #include <set>
16  #include <map>
17  #include <vector>
18  #include <string>
19  #include <iomanip>
20  #include <bitset>
21  #include <string>
22  #include <bitset>
23  #include "string.h" // for memcpy
24  #include "ajaexport.h"
25  #if defined(MSWindows)
26  #pragma warning(disable:4800) // int/bool conversion
27  #pragma warning(disable:4127) // Stop MSVC from bitching about "do{...}while(false)" macros
28  #endif
29 #endif // user-space clients only
30 
31 #if defined (MSWindows)
32  #include <basetsd.h>
33 #elif defined (AJAMac)
34  #pragma GCC diagnostic ignored "-Wunused-private-field"
35 #endif
36 
37 #if !defined (NTV2_BUILDING_DRIVER)
38  typedef std::vector<uint8_t> UByteSequence;
39  typedef UByteSequence::const_iterator UByteSequenceConstIter;
40  typedef UByteSequence::iterator UByteSequenceIter;
41 
42  typedef std::vector<uint16_t> UWordSequence;
43  typedef UWordSequence::const_iterator UWordSequenceConstIter;
44  typedef UWordSequence::iterator UWordSequenceIter;
45 
46  typedef std::vector<uint32_t> ULWordSequence;
47  typedef ULWordSequence::const_iterator ULWordSequenceConstIter;
48  typedef ULWordSequence::iterator ULWordSequenceIter;
49 
50  typedef std::vector<uint64_t> ULWord64Sequence;
51  typedef ULWord64Sequence::const_iterator ULWord64SequenceConstIter;
52  typedef ULWord64Sequence::iterator ULWord64SequenceIter;
53 
54  typedef std::set<ULWord> ULWordSet;
55  typedef ULWordSet::const_iterator ULWordSetConstIter;
56  typedef ULWordSet::iterator ULWordSetIter;
57 
58  typedef std::vector <std::string> NTV2StringList; // New in SDK 12.5
59  typedef NTV2StringList::iterator NTV2StringListIter; // New in SDK 16.0
60  typedef NTV2StringList::const_iterator NTV2StringListConstIter;// New in SDK 12.5
61  AJAExport std::ostream & operator << (std::ostream & inOutStream, const NTV2StringList & inData); // New in SDK 15.5
62 
63  typedef std::set <std::string> NTV2StringSet; // New in SDK 12.5
64  typedef NTV2StringSet::const_iterator NTV2StringSetConstIter; // New in SDK 12.5
65  AJAExport std::ostream & operator << (std::ostream & inOutStream, const NTV2StringSet & inData);
66 
67  typedef std::set <NTV2AudioChannelPair> NTV2AudioChannelPairs;
68  typedef NTV2AudioChannelPairs::const_iterator NTV2AudioChannelPairsConstIter;
69  AJAExport std::ostream & operator << (std::ostream & inOutStr, const NTV2AudioChannelPairs & inSet);
70 
71  typedef std::set <NTV2AudioChannelQuad> NTV2AudioChannelQuads;
72  typedef NTV2AudioChannelQuads::const_iterator NTV2AudioChannelQuadsConstIter;
73  AJAExport std::ostream & operator << (std::ostream & inOutStr, const NTV2AudioChannelQuads & inSet);
74 
75  typedef std::set <NTV2AudioChannelOctet> NTV2AudioChannelOctets;
76  typedef NTV2AudioChannelOctets::const_iterator NTV2AudioChannelOctetsConstIter;
77  AJAExport std::ostream & operator << (std::ostream & inOutStr, const NTV2AudioChannelOctets & inSet);
78 
79  typedef std::vector <double> NTV2DoubleArray;
80  typedef NTV2DoubleArray::iterator NTV2DoubleArrayIter;
81  typedef NTV2DoubleArray::const_iterator NTV2DoubleArrayConstIter;
82  AJAExport std::ostream & operator << (std::ostream & inOutStr, const NTV2DoubleArray & inVector);
83 
84  typedef UByte NTV2DID;
85  typedef std::set <UByte> NTV2DIDSet;
86  typedef NTV2DIDSet::iterator NTV2DIDSetIter;
87  typedef NTV2DIDSet::const_iterator NTV2DIDSetConstIter;
88  AJAExport std::ostream & operator << (std::ostream & inOutStr, const NTV2DIDSet & inDIDs);
89 
90  typedef std::bitset<16> NTV2AudioChannelsMuted16;
94 #endif // NTV2_BUILDING_DRIVER
95 
96 
97 #if !defined (NTV2_BUILDING_DRIVER)
99  #define NTV2_RPC_ENCODE_DECL bool RPCEncode (NTV2_RPC_BLOB_TYPE & outBlob);
100  #define NTV2_RPC_DECODE_DECL bool RPCDecode (const NTV2_RPC_BLOB_TYPE & inBlob, size_t & inOutIndex);
101  #define NTV2_RPC_DECODECLIENT_DECL bool RPCDecodeClient (const NTV2_RPC_BLOB_TYPE & inBlob, size_t & inOutIndex);
102  #define NTV2_RPC_ENCODECLIENT_DECL bool RPCEncodeClient (NTV2_RPC_BLOB_TYPE & inBlob);
103  #define NTV2_RPC_DECODESERVER_DECL bool RPCDecodeServer (const NTV2_RPC_BLOB_TYPE & inBlob, size_t & inOutIndex);
104  #define NTV2_RPC_ENCODESERVER_DECL bool RPCEncodeServer (NTV2_RPC_BLOB_TYPE & inBlob);
105 
106  #define NTV2_RPC_CODEC_DECLS public: \
107  NTV2_RPC_ENCODE_DECL \
108  NTV2_RPC_DECODE_DECL \
109  NTV2_RPC_DECODECLIENT_DECL \
110  NTV2_RPC_ENCODECLIENT_DECL \
111  NTV2_RPC_DECODESERVER_DECL \
112  NTV2_RPC_ENCODESERVER_DECL
113 
114  // NTV2Buffer has its own RPC encode/decode methods
115  #define NTV2_RPC_BUFFER_ENCODE_DECL bool RPCEncode (NTV2_RPC_BLOB_TYPE & outBlob, bool fillBuffer=true);
116  #define NTV2_RPC_BUFFER_DECODE_DECL bool RPCDecode (const NTV2_RPC_BLOB_TYPE & inBlob, size_t & inOutIndex, bool fillBuffer=true);
117  #define NTV2_RPC_BUFFER_DECODE2_DECL bool RPCDecodeNoAllocate (const NTV2_RPC_BLOB_TYPE & inBlob, size_t & inOutIndex);
118 
119  #define NTV2_RPC_BUFFER_CODEC_DECLS public: \
120  NTV2_RPC_BUFFER_ENCODE_DECL \
121  NTV2_RPC_BUFFER_DECODE_DECL \
122  NTV2_RPC_BUFFER_DECODE2_DECL
123 #else
124  #define NTV2_RPC_CODEC_DECLS
125  #define NTV2_RPC_BUFFER_CODEC_DECLS
126 #endif // NTV2_BUILDING_DRIVER
127 
128 
129 typedef enum
130 {
150  kRegOutputTimingFinePhase, // 19 (was kRegReserved3)
153  kRegStatus, // 21
182  kRegBoardID, // 50
199  kRegCanDoStatus, // 67 SDK 15.6 and later
200  kRegCh1ColorCorrectionControl, // 68 CamelCase fix in SDK 16.0
201  kRegCh2ColorCorrectionControl, // 69 CamelCase fix SDK 16.0
213 
224 
235 
244 
246  kRegReserved109, // 109 // Used for camera record flag kRegLANCAndLensTap = kRegReserved109, // Borg //Note: Lens Tap is no longer supported by software. ref bug 3342. 4/5/2012
251 
256 
263 
274 
287 
293 
299 
300  kRegField1Line21CaptionDecode, // 152 // OBSOLETE
301  kRegField2Line21CaptionDecode, // 153 // OBSOLETE
302  kRegField1Line21CaptionEncode, // 154 // OBSOLETE
303  kRegField2Line21CaptionEncode, // 155 // OBSOLETE
304  kRegVANCGrabberSetup, // 156 // OBSOLETE
305  kRegVANCGrabberStatus1, // 157 // OBSOLETE
306  kRegVANCGrabberStatus2, // 158 // OBSOLETE
307  kRegVANCGrabberDataBuffer, // 159 // OBSOLETE
308  kRegVANCInserterSetup1, // 160 // OBSOLETE
309  kRegVANCInserterSetup2, // 161 // OBSOLETE
310  kRegVANCInserterDataBuffer, // 162 // OBSOLETE
311 
322  kRegAudioChannelMappingCh1, // 173 // OBSOLETE
325  kRegAudioChannelMappingCh4, // 176 // OBSOLETE
326  kRegAudioChannelMappingCh5, // 177 // OBSOLETE
327  kRegAudioChannelMappingCh6, // 178 // OBSOLETE
328  kRegAudioChannelMappingCh7, // 179 // OBSOLETE
329  kRegAudioChannelMappingCh8, // 180 // OBSOLETE
330 
417  kRegStatus2, // 265
443 
449 
455 
459 
462 
467 
474 
477 
480 
490 
492 
493  //HDMI HDR Registers
501 
505 
509 
511 
514 
516 
522 
524 
526 
527  kRegDC1, // 354
528  kRegDC2, // 355
530 
533 
534  //HDMI V2 In Registers
552 
554 
555  //Scott: New Dax/Multi-channel Registers
563 
568 
573 
578 
583 
594 
597 
607 
617 
627 
629 
634 
639 
644 
649 
651 
653 
656 
662 
668 
674 
678 
686 
690 
694 
696 
701 
704 
719 
722 
724 
725 #define kRegCh1ColorCorrectioncontrol kRegCh1ColorCorrectionControl // CamelCase fixed in SDK 16.0
726 #define kRegCh2ColorCorrectioncontrol kRegCh2ColorCorrectionControl // CamelCase fixed in SDK 16.0
727 
728 // Discontinuous block of registers used for monitoring the incoming SDI signals
730 {
731  kRegRXSDI1Status = 2048, // 2048
739 
748 
757 
766 
775 
784 
793 
802 
805 
806  kRegNumRXSDIRegisters = 2113 - 2048 + 1
808 
809 typedef enum
810 {
811  kReg1DLUTLoadControl1 = 2200, //2200
820 
821 typedef enum
822 {
854 
855 // Discontinuous block of registers used for detecting non-PCM embedded audio.
857 {
869 
870 // New in SDK 15.6:
871 // Some boards have new firmware that implements a "valid route" bitmap ROM accessed by a contiguous block of registers:
873 {
874  kRegFirstValidXptROMRegister = 3072, // Starts at reg 3072
875  kRegNumValidXptROMRegisters = 1024, // It's 4096 bytes long
879 
880 // Discontinuous block of registers used to control the enhanced color space converters
881 typedef enum
882 {
883  kRegEnhancedCSC1Mode = 5120, // 5120
900 
901  kRegNumEnhancedCSCRegisters = 5136 - 5120 + 1,
902 
903  kRegEnhancedCSC2Mode = 5184, // 5184
920 
921  kRegEnhancedCSC3Mode = 5248, // 5248
938 
939  kRegEnhancedCSC4Mode = 5312, // 5312
956 
957  kRegEnhancedCSC5Mode = 5376, // 5376
974 
975  kRegEnhancedCSC6Mode = 5440, // 5440 or fight
992 
993  kRegEnhancedCSC7Mode = 5504, // 5504
1010 
1011  kRegEnhancedCSC8Mode = 5568, // 5568
1028 
1030 
1031 typedef enum _NTV2OERegisters
1032 {
1033  kRegOEData1 = 0x1700,
1034  kRegOEData256 = 0x173F
1035 } NTV2OERegisters;
1036 
1037 typedef enum
1038 {
1041 
1043 {
1058 
1060 {
1066  kRegMRSupport = 0x1747
1068 
1069 typedef enum
1070 {
1073 
1074 typedef enum
1075 {
1076  kRegIDSwitch = 0x40020
1078 
1079 typedef enum
1080 {
1084 
1085 typedef enum
1086 {
1087  kRegBOBStatus = 0x3680,
1093 
1094 typedef enum
1095 {
1105 
1106 typedef enum
1107 {
1108  kRegCMWControl = 0x36c0,
1115 
1116 typedef enum
1117 {
1118  kRegLPRJ45IP = 14080, // External IP Address
1119  kRegLPTunnelIP = 14081, // ajatun IP Address
1120  kRegLPSFP1IP = 14082, // SFP 1 IP Address
1121  kRegLPSFP2IP = 14083, // SFP 1 IP Address
1122  kRegLPIPVidStatus = 14084, // Video Enabled/Active Statuses : 0-7: Input enabled
1123  kRegLPIPAudStatus = 14085, // Audio Enabled/Active Statuses : 16-23: Output enabled
1124  kRegLPIPAncStatus = 14086, // Anc Enabled/Active Statuses : 24-31: Output Active
1125  kRegLPIPOut1Config = 14087, // Stuff beyond VPID definition Out 1
1126  kRegLPIPOut2Config = 14088, // " Out 2
1127  kRegLPIPOut3Config = 14089, // " Out 3
1128  kRegLPIPOut4Config = 14090, // " Out 4
1129  kRegLPPTPSFPStatus = 14091, // Which SFP is PTP locked to
1130  //14092 - 14093 Available
1131  kRegLPHeartBeat = 14094, // Local Proc isAlive counter
1132  kRegLPFrameTask = 14095 // Used to report OEM/Retail configuration
1134 
1135 typedef enum
1136 {
1149 
1152 
1153 typedef enum
1154 {
1167 
1170 
1171 
1172 
1173 #define NTV2_HDMIAuxMaxFrames 8
1174 #define NTV2_HDMIAuxDataSize 32
1175 
1176 // Virtual registers
1177 #include "ntv2virtualregisters.h"
1178 
1179 typedef struct
1180 {
1185  ULWord CbOffset; // Not user controllable
1186  ULWord CrOffset; // Not user controllable
1190 
1191 typedef struct
1192 {
1196 
1197 // These have a nice mapping to the virtual registers
1198 typedef struct
1199 {
1203  UByte CbOffset; // Not user controllable
1204  UByte CrOffset; // Not user controllable
1207 } ADV7189BProcAmpRegisters; // Works for SD portion of ADV7402A also
1208 
1209 // These do not have a nice mapping to the virtual registers
1210 // All are 10-bit registers spread out over two I2C addresses.
1211 typedef struct
1212 {
1213  UByte hex73; // [7:6] set, [5:0] upper bits contrast
1214  UByte hex74; // [7:4] lower bits contrast, [3:0] upper bits saturation Cb
1215  UByte hex75; // [7:2] lower bits saturation Cb, [1:0] upper bits saturation Cr
1216  UByte hex76; // [7:0] lower bits saturation Cr
1217  UByte hex77; // [7:6] clear, [5:0] upper bits brightness.
1218  UByte hex78; // [7:4] lower bits brightness, [3:0] high bits Cb offset
1219  UByte hex79; // [7:2] lower bits Cb offset, [1:0] high bits Cr offset
1220  UByte hex7A; // [7:0] lower bits Cr offset
1222 
1223 // Kind of a hack
1224 // This will have to be a union or something if/when we add another proc amp processor
1225 typedef struct
1226 {
1227  ADV7189BProcAmpRegisters SD; // Works for SD portion of ADV7402A also
1230 
1231 // SD procamp regs
1232 typedef enum
1233 {
1241 } ADV7189BRegisterNum; // Works for SD portion of ADV7402A also
1242 
1243 typedef enum
1244 {
1245  // Global Control
1246  kRegMaskFrameRate = BIT(0) + BIT(1) + BIT(2),
1248  kRegMaskGeometry = BIT(3) + BIT(4) + BIT(5) + BIT(6),
1249  kRegMaskStandard = BIT(7) + BIT(8) + BIT(9),
1250  kRegMaskRefSource = BIT(10) + BIT(11) + BIT(12),
1251  kRegMaskRefInputVoltage = BIT(12), // DEPRECATED! - Now part of kRegMaskRefSource - do not use on new boards
1253  kRegMaskLED = BIT(16) + BIT(17) + BIT(18) + BIT(19),
1262 
1263  // Global Control 2
1293 
1294  // kRegGlobalControl3 (reg 108)
1303  kRegMaskFramePulseRefSelect = BIT(8) + BIT(9) + BIT(10) + BIT(11),
1304 
1305  // Audio Control 2
1314 
1315  // Channel Control - kRegCh1Control, kRegCh2Control, kRegCh3Control, kRegCh4Control
1317  kRegMaskFrameFormat = BIT(1) + BIT(2) + BIT(3) + BIT(4),
1334  kRegMaskQuality2 = BIT(25) + BIT(26),
1335  kRegCh1BlackOutputMask = BIT(27), // KiPro black output bit
1339 
1340  // Video Crosspoint Control
1343  kRegMaskVidXptFGKey = BIT(8) + BIT(9) + BIT(10),
1344  kRegMaskVidXptBGKey = BIT(12) + BIT(13) + BIT(14),
1345  kRegMaskVidXptSecVideo = BIT(16) + BIT(17) + BIT(18),
1346 
1347  // Video Processing Control
1352  kRegMaskVidProcMux5 = BIT(8) + BIT(9) + BIT(10),
1363  kRegMaskVidProcSplitStd = BIT(28) + BIT(29) + BIT(30),
1365 
1366  // kRegStatus
1367  kRegMaskHardwareVersion = BIT(0) + BIT(1) + BIT(2) + BIT(3),
1368  kRegMaskFPGAVersion = BIT(4)+BIT(5)+BIT(6)+BIT(7)+BIT(8)+BIT(9)+BIT(10)+BIT(11),
1370 
1371  // Video Interrupt Control
1372  kRegMaskIntEnableMask = BIT(5) + BIT(4) + BIT(3) + BIT(2) + BIT(1) + BIT(0),
1373 
1374  // Audio Control
1376  kRegMaskNumBits = BIT(1), // shouldn't this be BIT(2)?
1383  kRegMaskInputStartAtVBI = BIT(10), // New in 15.6
1385  kRegMaskEmbeddedOutputMuteCh1 = BIT(12), // added for FS1
1386  kRegMaskEmbeddedOutputSupressCh1 = BIT(13), // added for FS1 but available on other boards
1387  kRegMaskOutputStartAtVBI = BIT(14), // New in 15.6
1388  kRegMaskEmbeddedOutputSupressCh2 = BIT(15), // added for FS1 but available on other boards
1390  kRegMaskEmbeddedOutputMuteCh2 = BIT(17), // added for FS1
1392  kRegMaskEncodedAudioMode = BIT(19), // addded for FS1 but available on other boards
1404  kK2RegMaskAverageAudioLevel = 0xFFFFffff, // read the entire register
1405 
1408  // FS1 output control "Freeze (last good frame) On Input Loss"
1410 
1411  // Audio Source Select
1412  kRegMaskAudioSource = BIT(0)+BIT(1)+BIT(2)+BIT(3)+BIT(4)+BIT(5)+BIT(6)+BIT(7)+BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1421 
1422  // Input Status
1440 
1441  // RP-188 Source
1442  kRegMaskRP188SourceSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1443  kRegMaskRP188DBB = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7),
1444 
1445  // DMA Control
1448  kRegMaskFirmWareRev = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1450 
1451  // Color Correction Control - kRegCh1ColorCorrectionControl (68), kRegCh2ColorCorrectionControl (69)
1452  kRegMaskSaturationValue = BIT(0)+BIT(1)+BIT(2)+BIT(3)+BIT(4)+BIT(5)+BIT(6)+BIT(7)+BIT(8)+BIT(9),
1461 
1462  // kRegCanDoStatus
1470 
1471  // kRegLUTV2Control
1498 
1499 
1500  // RS422 Control
1512  kRegMaskRS422ParitySense = BIT(12), // 0 = Odd, 1 = Even
1513  kRegMaskRS422ParityDisable = BIT(13), // 0 = Use bit 12 setting, 1 = No parity
1515 
1516 
1517  // FS1 ProcAmp Control
1518  kFS1RegMaskProcAmpC1Y = BIT(0)+BIT(1)+BIT(2)+BIT(3)+BIT(4)+BIT(5)+BIT(6)+BIT(7)+BIT(8)+BIT(9)+BIT(10)+BIT(11),
1519  kFS1RegMaskProcAmpC1CB = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23)+BIT(24)+BIT(25)+BIT(26)+BIT(27),
1520  kFS1RegMaskProcAmpC1CR = BIT(0)+BIT(1)+BIT(2)+BIT(3)+BIT(4)+BIT(5)+BIT(6)+BIT(7)+BIT(8)+BIT(9)+BIT(10)+BIT(11),
1521  kFS1RegMaskProcAmpC2CB = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23)+BIT(24)+BIT(25)+BIT(26)+BIT(27),
1522  kFS1RegMaskProcAmpC2CR = BIT(0)+BIT(1)+BIT(2)+BIT(3)+BIT(4)+BIT(5)+BIT(6)+BIT(7)+BIT(8)+BIT(9)+BIT(10)+BIT(11),
1523  kFS1RegMaskProcAmpOffsetY = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23)+BIT(24)+BIT(25)+BIT(26)+BIT(27),
1524 
1525 
1526  kRegMaskAudioInDelay = BIT(0)+BIT(1)+BIT(2)+BIT(3)+BIT(4)+BIT(5)+BIT(6)+BIT(7)+BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12),
1527  kRegMaskAudioOutDelay = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23)+BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28),
1528 
1529  // FS1 Audio Delay
1530  kFS1RegMaskAudioDelay = BIT(0)+BIT(1)+BIT(2)+BIT(3)+BIT(4)+BIT(5)+BIT(6)+BIT(7)+BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12),
1531 
1532  // Borg Audio Delay
1533  kBorgRegMaskPlaybackEEAudioDelay = BIT(0)+BIT(1)+BIT(2)+BIT(3)+BIT(4)+BIT(5)+BIT(6)+BIT(7)+BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1534  kBorgRegMaskCaputreAudioDelay = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23)+BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1535 
1536 
1537  // kRegOutputTimingControl
1538  kBorgRegMaskOutTimingCtrlHorzOfs = BIT(0)+BIT(1)+BIT(2)+BIT(3)+BIT(4)+BIT(5)+BIT(6)+BIT(7)+BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12),
1539  kBorgRegMaskOutTimingCtrlVertOfs = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23)+BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28),
1540 
1541 
1542  // FS1 I2C
1551 
1552  kFS1RegMaskI2CAddress = BIT(0)+BIT(1)+BIT(2)+BIT(3)+BIT(4) + BIT(5)+BIT(6)+BIT(7),
1553  kFS1RegMaskI2CSubAddress = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1554  kFS1RegMaskI2CWriteData = BIT(0)+BIT(1)+BIT(2)+BIT(3)+BIT(4) + BIT(5)+BIT(6)+BIT(7),
1555  kFS1RegMaskI2CReadData = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1556 
1557  // kRegFS1ReferenceSelect (in Reg 95)
1565  kFS1RegMaskProcAmpInputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1566  kFS1RegMaskSecondAnalogOutInputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1567 
1568  // FS1 AFD Mode
1578 
1579  // FS1 AFD Inserter
1583  kFS1RegMaskAFDVANCInserter_Line = BIT(26)+BIT(25)+BIT(24)+BIT(23)+BIT(22)+BIT(21)+BIT(20)+BIT(19)+BIT(18)+BIT(17)+BIT(16),
1584 
1585  // FS1 Audio Channel Mapping
1586  kFS1RegMaskAudioChannelMapping_Gain = BIT(0)+BIT(1)+BIT(2)+BIT(3)+BIT(4) + BIT(5)+BIT(6)+BIT(7)+BIT(8)+BIT(9),
1590 
1591  // FS1 Output Timing Fine Phase Adjust
1592  kRegMaskOutputTimingFinePhase = BIT(0)+BIT(1)+BIT(2)+BIT(3)+BIT(4) + BIT(5)+BIT(6)+BIT(7)+BIT(8),
1593 
1594  //kRegAnalogInputStatus
1599 
1600  //kRegAnalogInputControl (Note - on some boards, ADC mode is set in Reg 128, kK2RegAnalogOutControl!)
1602 
1603  //kRegHDMIOut3DControl
1606 
1607  //kRegHDMIOutControl
1628 
1629  //kRegHDMIInputStatus
1630  kRegMaskInputStatusLock = BIT(0), // rename to kRegMaskAnalogInputStatusLock
1645  kRegMaskInputStatusFPS = BIT(28)+BIT(29)+BIT(30)+BIT(31),
1646 
1647  //kRegHDMIInputControl
1667 
1668  //kRegHDMIInputControl / kRegHDMIOutControl
1670  kRegMaskHDMIPolarity = BIT(16)+BIT(17)+BIT(18)+BIT(19),
1671 
1672  //kK2RegAnalogOutControl - (controls Analog Inputs also, for some boards)
1676  kLSRegMaskVideoADCMode = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20),
1678  kLHIRegMaskVideoDACSetup = BIT(21), // bitwise interpretation of kLHIRegMaskVideoDACMode
1679  kLHIRegMaskVideoDACJapan = BIT(22), // bitwise interpretation of kLHIRegMaskVideoDACMode
1680  kLHIRegMaskVideoDACRGB = BIT(23), // bitwise interpretation of kLHIRegMaskVideoDACMode
1681  kLHIRegMaskVideoDACComponent = BIT(24), // bitwise interpretation of kLHIRegMaskVideoDACMode
1682  kK2RegMaskOutHTiming = BIT(31)+BIT(30)+BIT(29)+BIT(28)+BIT(27)+BIT(26)+BIT(25)+BIT(24),
1683 
1684  //kK2RegSDIOut1Control + kK2RegSDIOut2Control + kK2RegSDIOut3Control + kK2RegSDIOut4Control + kK2RegAnalogOutControl
1706 
1707 
1708  //kK2RegConversionControl and kK2Reg2ndConversionControl,
1720 
1721  //kK2RegFrameSync1Control and kK2RegFrameSync2Control
1726 
1727  //kK2RegXptSelectGroup1
1728  kK2RegMaskCompressionModInputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1729  kK2RegMaskConversionModInputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1731  kK2RegMaskXptLUTInputSelect = BIT(0)+BIT(1)+BIT(2)+BIT(3)+BIT(4)+BIT(5)+BIT(6)+BIT(7),
1732 
1733  //kK2RegXptSelectGroup2
1734  kK2RegMaskDuallinkOutInputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1735  kK2RegMaskFrameSync2InputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1736  kK2RegMaskFrameSync1InputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1738 
1739  //kK2RegXptSelectGroup3
1740  kK2RegMaskCSC1KeyInputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1741  kK2RegMaskSDIOut2InputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1742  kK2RegMaskSDIOut1InputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1744 
1745  //kK2RegXptSelectGroup4
1746  kK2RegMaskMixerBGKeyInputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1747  kK2RegMaskMixerBGVidInputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1748  kK2RegMaskMixerFGKeyInputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1750 
1751  //kK2RegXptSelectGroup5
1752  kK2RegMaskCSC2KeyInputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1753  kK2RegMaskCSC2VidInputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1754  kK2RegMaskXptLUT2InputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1756 
1757  //kK2RegXptSelectGroup6
1759  kK2RegMaskIICTInputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1760  kK2RegMaskHDMIOutInputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1761  kK2RegMaskSecondConverterInputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1762 
1763  //kK2RegXptSelectGroup7
1765  kK2RegMaskIICT2InputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1766  kK2RegMaskDuallinkOut2InputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1767 
1768  //kK2RegXptSelectGroup8
1769  kK2RegMaskSDIOut3InputSelect = BIT(0)+BIT(1)+BIT(2)+BIT(3)+BIT(4)+BIT(5)+BIT(6)+BIT(7),
1770  kK2RegMaskSDIOut4InputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1771  kK2RegMaskSDIOut5InputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1772 
1773  //kRegCh1ControlExtended
1774  //kRegCh2ControlExtended
1776 
1777  //kK2RegXptSelectGroup9
1779  kK2RegMaskMixer2FGKeyInputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1780  kK2RegMaskMixer2BGVidInputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1781  kK2RegMaskMixer2BGKeyInputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1782 
1783  //kK2RegXptSelectGroup10
1785  kK2RegMaskSDIOut2DS2InputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1786 
1787  //kK2RegXptSelectGroup11
1789  kK2RegMaskDuallinkIn1DSInputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1790  kK2RegMaskDuallinkIn2InputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1791  kK2RegMaskDuallinkIn2DSInputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1792 
1793  //kK2RegXptSelectGroup12
1794  kK2RegMaskXptLUT3InputSelect = BIT(0)+BIT(1)+BIT(2)+BIT(3)+BIT(4)+BIT(5)+BIT(6)+BIT(7),
1795  kK2RegMaskXptLUT4InputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1796  kK2RegMaskXptLUT5InputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1797  kK2RegMaskXpt3DLUT1InputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1798 
1799  //kK2RegXptSelectGroup13
1801  kK2RegMaskFrameBuffer4InputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1802 
1803  //kK2RegXptSelectGroup14
1804  kK2RegMaskSDIOut3DS2InputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1805  kK2RegMaskSDIOut5DS2InputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1806  kK2RegMaskSDIOut4DS2InputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1807 
1808  //kRegXptSelectGroup15
1810  kK2RegMaskDuallinkIn3DSInputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1811  kK2RegMaskDuallinkIn4InputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1812  kK2RegMaskDuallinkIn4DSInputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1813 
1814  //kRegXptSelectGroup16
1816  kK2RegMaskDuallinkOut4InputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1817  kK2RegMaskDuallinkOut5InputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1818 
1819  //kK2RegXptSelectGroup17
1820  kK2RegMaskCSC3VidInputSelect = BIT(0)+BIT(1)+BIT(2)+BIT(3)+BIT(4)+BIT(5)+BIT(6)+BIT(7),
1821  kK2RegMaskCSC3KeyInputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1822  kK2RegMaskCSC4VidInputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1823  kK2RegMaskCSC4KeyInputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1824 
1825  //kRegXptSelectGroup18
1826  kK2RegMaskCSC5VidInputSelect = BIT(0)+BIT(1)+BIT(2)+BIT(3)+BIT(4)+BIT(5)+BIT(6)+BIT(7),
1827  kK2RegMaskCSC5KeyInputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1828 
1829  //kRegXptSelectGroup19
1830  kK2RegMask4KDCQ1InputSelect = BIT(0)+BIT(1)+BIT(2)+BIT(3)+BIT(4)+BIT(5)+BIT(6)+BIT(7),
1831  kK2RegMask4KDCQ2InputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1832  kK2RegMask4KDCQ3InputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1833  kK2RegMask4KDCQ4InputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1834 
1835  //kRegXptSelectGroup20
1837  kK2RegMaskHDMIOutV2Q2InputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1838  kK2RegMaskHDMIOutV2Q3InputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1839  kK2RegMaskHDMIOutV2Q4InputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1840 
1841  //kRegXptSelectGroup21
1843  kK2RegMaskFrameBuffer6InputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1844  kK2RegMaskFrameBuffer7InputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1845  kK2RegMaskFrameBuffer8InputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1846 
1847  //kRegXptSelectGroup22
1848  kK2RegMaskSDIOut6InputSelect = BIT(0)+BIT(1)+BIT(2)+BIT(3)+BIT(4)+BIT(5)+BIT(6)+BIT(7),
1849  kK2RegMaskSDIOut6DS2InputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1850  kK2RegMaskSDIOut7InputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1851  kK2RegMaskSDIOut7DS2InputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1852 
1853  //kRegXptSelectGroup23
1854  kK2RegMaskCSC7VidInputSelect = BIT(0)+BIT(1)+BIT(2)+BIT(3)+BIT(4)+BIT(5)+BIT(6)+BIT(7),
1855  kK2RegMaskCSC7KeyInputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1856  kK2RegMaskCSC8VidInputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1857  kK2RegMaskCSC8KeyInputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1858 
1859  //kRegXptSelectGroup24
1860  kK2RegMaskXptLUT6InputSelect = BIT(0)+BIT(1)+BIT(2)+BIT(3)+BIT(4)+BIT(5)+BIT(6)+BIT(7),
1861  kK2RegMaskXptLUT7InputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1862  kK2RegMaskXptLUT8InputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1863 
1864  //kRegXptSelectGroup25
1866  kK2RegMaskDuallinkIn5DSInputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1867  kK2RegMaskDuallinkIn6InputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1868  kK2RegMaskDuallinkIn6DSInputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1869 
1870  //kRegXptSelectGroup26
1872  kK2RegMaskDuallinkIn7DSInputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1873  kK2RegMaskDuallinkIn8InputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1874  kK2RegMaskDuallinkIn8DSInputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1875 
1876  //kRegXptSelectGroup27
1878  kK2RegMaskDuallinkOut7InputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1879  kK2RegMaskDuallinkOut8InputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1880 
1881  //kRegXptSelectGroup28
1883  kK2RegMaskMixer3FGKeyInputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1884  kK2RegMaskMixer3BGVidInputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1885  kK2RegMaskMixer3BGKeyInputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1886 
1887  //kRegXptSelectGroup29
1889  kK2RegMaskMixer4FGKeyInputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1890  kK2RegMaskMixer4BGVidInputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1891  kK2RegMaskMixer4BGKeyInputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1892 
1893  //kRegXptSelectGroup30
1894  kK2RegMaskSDIOut8InputSelect = BIT(0)+BIT(1)+BIT(2)+BIT(3)+BIT(4)+BIT(5)+BIT(6)+BIT(7),
1895  kK2RegMaskSDIOut8DS2InputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1896  kK2RegMaskCSC6VidInputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1897  kK2RegMaskCSC6KeyInputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1898 
1899  //kRegXptSelectGroup32
1901  kK2RegMask425Mux1BInputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1902  kK2RegMask425Mux2AInputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1903  kK2RegMask425Mux2BInputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1904 
1905  //kRegXptSelectGroup33
1907  kK2RegMask425Mux3BInputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1908  kK2RegMask425Mux4AInputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1909  kK2RegMask425Mux4BInputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1910 
1911  //kRegXptSelectGroup34
1913  kK2RegMaskFrameBuffer2BInputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1914  kK2RegMaskFrameBuffer3BInputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1915  kK2RegMaskFrameBuffer4BInputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1916 
1917  //kRegXptSelectGroup35
1919  kK2RegMaskFrameBuffer6BInputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1920  kK2RegMaskFrameBuffer7BInputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1921  kK2RegMaskFrameBuffer8BInputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1922 
1923  //kRegXptSelectGroup36
1926 
1927  //kK2RegCSCoefficients1_2
1928  //kK2RegCSC2oefficients1_2,
1929  //kK2RegCSC3oefficients1_2,
1930  //kK2RegCSC4oefficients1_2,
1931  //kK2RegCSC5Coefficients1_2,
1932  //kK2RegCSC6Coefficients1_2,
1933  //kK2RegCSC7Coefficients1_2,
1934  //kK2RegCSC8Coefficients1_2,
1939 
1940  //kRegCSCoefficients3_4,
1941  //kRegCS2Coefficients3_4,
1942  //kRegCS3Coefficients3_4,
1943  //kRegCS4Coefficients3_4,
1944  //kRegCS5Coefficients3_4,
1945  //kRegCS6Coefficients3_4,
1946  //kRegCS7Coefficients3_4,
1947  //kRegCS8Coefficients3_4,
1949 
1950  //kK2RegCSCoefficients5_6,
1952 
1953  //kK2RegCSCoefficients5_6,
1955 
1956  //custom coefficients
1957  kK2RegMaskCustomCoefficientLow = BIT(0)+BIT(1)+BIT(2)+BIT(3)+BIT(4)+BIT(5)+BIT(6)+BIT(7)+BIT(8)+BIT(9)+BIT(10),
1958  kK2RegMaskCustomCoefficientHigh = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23)+BIT(24)+BIT(25)+BIT(26),
1959 
1960  // Enhanced Color Space Converter contol
1967 
1970 
1971  // Xena2K and Konax video processing
1976 
1977  // 12(13 with sign) bit custom coefficients - backwards compatible with the 10(11 with sign) bit soft and hardware - jac
1978  kK2RegMaskCustomCoefficient12BitLow = BIT(0)+BIT(1)+BIT(2)+BIT(3)+BIT(4)+BIT(5)+BIT(6)+BIT(7)+BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12),
1979  kK2RegMaskCustomCoefficient12BitHigh = BIT(14)+BIT(15)+BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23)+BIT(24)+BIT(25)+BIT(26),
1980 
1981  //kRegLTCStatusControl (see register 233 -- kRegLTCStatusControl)
1986 
1987  // kRegAudioOutputSourceMap
1988  kRegMaskMonitorSource = BIT(21)+BIT(20)+BIT(19)+BIT(18)+BIT(17)+BIT(16),
1989  kRegMaskHDMIOutAudioSource = BIT(31)+BIT(30)+BIT(29)+BIT(28)+BIT(27)+BIT(26)+BIT(25)+BIT(24),
1990 
1991  // kRegSDIInput3GStatus
2007 
2008 
2009  // kRegSDIInput3GStatus2
2024 
2025  // kRegSDI5678Input3GStatus
2054 
2055  // kRegVPID
2071  kRegMaskVPIDStandard = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
2073 
2074  //Borg Test Pattern Generator
2075  kRegMaskTPGChromaSample = BIT(9)+BIT(8)+BIT(7)+BIT(6)+BIT(5)+BIT(4)+BIT(3)+BIT(2)+BIT(1)+BIT(0),
2077  kRegMaskTPGFrameRate = BIT(15)+BIT(14)+BIT(13)+BIT(12),
2078  kRegMaskTPGLuma = BIT(25)+BIT(24)+BIT(23)+BIT(22)+BIT(21)+BIT(20)+BIT(19)+BIT(18)+BIT(17)+BIT(16),
2081  kRegMaskTPGStandard = BIT(30) + BIT(29) + BIT(28),
2083 
2084  // Bones Actel Registers
2085  kRegMaskCFS1 = BIT(0) + BIT(1),
2086  kRegMaskCFS2 = BIT(2) + BIT(3) ,
2087 
2088  // Audio Channel Control 2 or 8 channel playback mask
2090 
2091  // Stereo Compressor Control
2099  kRegMaskStereoCompressorLeftSource = BIT(23)+BIT(22)+BIT(21)+BIT(20)+BIT(19)+BIT(18)+BIT(17)+BIT(16),
2100  kRegMaskStereoCompressorRightSource = BIT(31)+BIT(30)+BIT(29)+BIT(28)+BIT(27)+BIT(26)+BIT(25)+BIT(24),
2101 
2102  // SDI Direction Control
2111 
2112  // SDI watchdog control
2120 
2121  // 4K Down Convert
2126 
2127  // Quadrant Rasterizer Control
2132 
2133  // kRegRXSDI1Status, kRegRXSDI2Status, etc
2134  kRegMaskSDIInUnlockCount = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) + BIT(8) + BIT(9) + BIT(10) + BIT(11) + BIT(12) + BIT(13) + BIT(14) + BIT(15),
2139 
2140  kRegMaskSDIInCRCErrorCountA = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) + BIT(8) + BIT(9) + BIT(10) + BIT(11) + BIT(12) + BIT(13) + BIT(14) + BIT(15),
2141  kRegMaskSDIInCRCErrorCountB = BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23) + BIT(24) + BIT(25) + BIT(26) + BIT(27) + BIT(28) + BIT(29) + BIT(30) + BIT(31),
2142  kRegMask2MFrameSize = BIT(4)+BIT(3)+BIT(2)+BIT(1)+BIT(0),
2143  kRegMaskChannelBar = BIT(24)+BIT(23)+BIT(22)+BIT(21)+BIT(20)+BIT(19)+BIT(18)+BIT(17)+BIT(16),
2144 
2153 
2162 
2171 
2180 
2189 
2198 
2207 
2216 
2218  kRegThermalMask = BIT(17) + BIT(18) + BIT(19),
2219 
2220  //kRegHDMIHDR.... 330-336
2221  kRegMaskHDMIHDRGreenPrimaryX = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) + BIT(8) + BIT(9) + BIT(10) + BIT(11) + BIT(12) + BIT(13) + BIT(14) + BIT(15),
2222  kRegMaskHDMIHDRGreenPrimaryY = BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23) + BIT(24) + BIT(25) + BIT(26) + BIT(27) + BIT(28) + BIT(29) + BIT(30) + BIT(31),
2223  kRegMaskHDMIHDRBluePrimaryX = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) + BIT(8) + BIT(9) + BIT(10) + BIT(11) + BIT(12) + BIT(13) + BIT(14) + BIT(15),
2224  kRegMaskHDMIHDRBluePrimaryY = BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23) + BIT(24) + BIT(25) + BIT(26) + BIT(27) + BIT(28) + BIT(29) + BIT(30) + BIT(31),
2225  kRegMaskHDMIHDRRedPrimaryX = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) + BIT(8) + BIT(9) + BIT(10) + BIT(11) + BIT(12) + BIT(13) + BIT(14) + BIT(15),
2226  kRegMaskHDMIHDRRedPrimaryY = BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23) + BIT(24) + BIT(25) + BIT(26) + BIT(27) + BIT(28) + BIT(29) + BIT(30) + BIT(31),
2227  kRegMaskHDMIHDRWhitePointX = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) + BIT(8) + BIT(9) + BIT(10) + BIT(11) + BIT(12) + BIT(13) + BIT(14) + BIT(15),
2228  kRegMaskHDMIHDRWhitePointY = BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23) + BIT(24) + BIT(25) + BIT(26) + BIT(27) + BIT(28) + BIT(29) + BIT(30) + BIT(31),
2229  kRegMaskHDMIHDRMaxMasteringLuminance = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) + BIT(8) + BIT(9) + BIT(10) + BIT(11) + BIT(12) + BIT(13) + BIT(14) + BIT(15),
2230  kRegMaskHDMIHDRMinMasteringLuminance = BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23) + BIT(24) + BIT(25) + BIT(26) + BIT(27) + BIT(28) + BIT(29) + BIT(30) + BIT(31),
2231  kRegMaskHDMIHDRMaxContentLightLevel = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) + BIT(8) + BIT(9) + BIT(10) + BIT(11) + BIT(12) + BIT(13) + BIT(14) + BIT(15),
2232  kRegMaskHDMIHDRMaxFrameAverageLightLevel = BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23) + BIT(24) + BIT(25) + BIT(26) + BIT(27) + BIT(28) + BIT(29) + BIT(30) + BIT(31),
2233 
2237  kRegMaskElectroOpticalTransferFunction = BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23),
2238  kRegMaskHDRStaticMetadataDescriptorID = BIT(24) + BIT(25) + BIT(26) + BIT(27) + BIT(28) + BIT(29) + BIT(30) + BIT(31),
2239 
2244  kRegMaskAudioMixerOutputChannelsMute = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) + BIT(8) + BIT(9) + BIT(10) + BIT(11) + BIT(12) + BIT(13) + BIT(14) + BIT(15),
2264  kRegMaskAudioMixerAux1Channel1Level = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) + BIT(8) + BIT(9) + BIT(10) + BIT(11) + BIT(12) + BIT(13) + BIT(14) + BIT(15),
2265  kRegMaskAudioMixerAux1Channel2Level = BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23) + BIT(24) + BIT(25) + BIT(26) + BIT(27) + BIT(28) + BIT(29) + BIT(30) + BIT(31),
2266  kRegMaskAudioMixerAux2Channel1Level = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) + BIT(8) + BIT(9) + BIT(10) + BIT(11) + BIT(12) + BIT(13) + BIT(14) + BIT(15),
2267  kRegMaskAudioMixerAux2Channel2Level = BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23) + BIT(24) + BIT(25) + BIT(26) + BIT(27) + BIT(28) + BIT(29) + BIT(30) + BIT(31),
2268  kRegMaskAudioMixerMainChannel1Level = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) + BIT(8) + BIT(9) + BIT(10) + BIT(11) + BIT(12) + BIT(13) + BIT(14) + BIT(15),
2269  kRegMaskAudioMixerMainChannel2Level = BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23) + BIT(24) + BIT(25) + BIT(26) + BIT(27) + BIT(28) + BIT(29) + BIT(30) + BIT(31),
2270  kRegMaskAudioMixerMainChannel3Level = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) + BIT(8) + BIT(9) + BIT(10) + BIT(11) + BIT(12) + BIT(13) + BIT(14) + BIT(15),
2271  kRegMaskAudioMixerMainChannel4Level = BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23) + BIT(24) + BIT(25) + BIT(26) + BIT(27) + BIT(28) + BIT(29) + BIT(30) + BIT(31),
2272  kRegMaskAudioMixerMainChannel5Level = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) + BIT(8) + BIT(9) + BIT(10) + BIT(11) + BIT(12) + BIT(13) + BIT(14) + BIT(15),
2273  kRegMaskAudioMixerMainChannel6Level = BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23) + BIT(24) + BIT(25) + BIT(26) + BIT(27) + BIT(28) + BIT(29) + BIT(30) + BIT(31),
2274  kRegMaskAudioMixerMainChannel7Level = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) + BIT(8) + BIT(9) + BIT(10) + BIT(11) + BIT(12) + BIT(13) + BIT(14) + BIT(15),
2275  kRegMaskAudioMixerMainChannel8Level = BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23) + BIT(24) + BIT(25) + BIT(26) + BIT(27) + BIT(28) + BIT(29) + BIT(30) + BIT(31),
2276  kRegMaskAudioMixerMainChannel9Level = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) + BIT(8) + BIT(9) + BIT(10) + BIT(11) + BIT(12) + BIT(13) + BIT(14) + BIT(15),
2277  kRegMaskAudioMixerMainChannel10Level = BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23) + BIT(24) + BIT(25) + BIT(26) + BIT(27) + BIT(28) + BIT(29) + BIT(30) + BIT(31),
2278  kRegMaskAudioMixerMainChannel11Level = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) + BIT(8) + BIT(9) + BIT(10) + BIT(11) + BIT(12) + BIT(13) + BIT(14) + BIT(15),
2279  kRegMaskAudioMixerMainChannel12Level = BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23) + BIT(24) + BIT(25) + BIT(26) + BIT(27) + BIT(28) + BIT(29) + BIT(30) + BIT(31),
2280  kRegMaskAudioMixerMainChannel13Level = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) + BIT(8) + BIT(9) + BIT(10) + BIT(11) + BIT(12) + BIT(13) + BIT(14) + BIT(15),
2281  kRegMaskAudioMixerMainChannel14Level = BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23) + BIT(24) + BIT(25) + BIT(26) + BIT(27) + BIT(28) + BIT(29) + BIT(30) + BIT(31),
2282  kRegMaskAudioMixerMainChannel15Level = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) + BIT(8) + BIT(9) + BIT(10) + BIT(11) + BIT(12) + BIT(13) + BIT(14) + BIT(15),
2283  kRegMaskAudioMixerMainChannel16Level = BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23) + BIT(24) + BIT(25) + BIT(26) + BIT(27) + BIT(28) + BIT(29) + BIT(30) + BIT(31),
2284  kRegMaskAudioMixerMainMixedOutputChannel1Level = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) + BIT(8) + BIT(9) + BIT(10) + BIT(11) + BIT(12) + BIT(13) + BIT(14) + BIT(15),
2285  kRegMaskAudioMixerMainMixedOutputChannel2Level = BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23) + BIT(24) + BIT(25) + BIT(26) + BIT(27) + BIT(28) + BIT(29) + BIT(30) + BIT(31),
2286  kRegMaskAudioMixerInputLeftLevel = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) + BIT(8) + BIT(9) + BIT(10) + BIT(11) + BIT(12) + BIT(13) + BIT(14) + BIT(15),
2287  kRegMaskAudioMixerInputRightLevel = BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23) + BIT(24) + BIT(25) + BIT(26) + BIT(27) + BIT(28) + BIT(29) + BIT(30) + BIT(31),
2288  kRegMaskAudioMixerLevelSampleCount = BIT(8) + BIT(9) + BIT(10) + BIT(11) + BIT(12) + BIT(13) + BIT(14) + BIT(15),
2289 
2290  kRegMaskRotaryEncoderValue = BIT(7)+BIT(6)+BIT(5)+BIT(4)+BIT(3)+BIT(2)+BIT(1)+BIT(0),
2291  kRegMaskRotaryEncoderGain = BIT(13)+BIT(12)+BIT(11)+BIT(10)+BIT(9)+BIT(8),
2292 
2293  kRegMaskLUTAddress = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) + BIT(8) + BIT(9) + BIT(10) + BIT(11) + BIT(12) + BIT(13) + BIT(14) + BIT(15) + \
2294  BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23) + BIT(24) + BIT(25) + BIT(26) + BIT(27) + BIT(28) + BIT(29),
2296 
2297  kRegMaskMRStandard = BIT(3) + BIT(2) + BIT(1) + BIT(0),
2298  kRegMaskMRFrameLocation = BIT(15) + BIT(14) + BIT(13) + BIT(12) + BIT(11) + BIT(10) + BIT(9) + BIT(8),
2301  kRegMaskMRSupport = BIT(2) + BIT(1) + BIT(0),
2302 
2307 
2308  kRegMaskPWMFanSpeed = BIT(7)+BIT(6)+BIT(5)+BIT(4)+BIT(3)+BIT(2)+BIT(1)+BIT(0),
2310 
2313 
2317 
2321  kRegMaskBOBGPIIn4Data = BIT(15)+BIT(14)+BIT(13)+BIT(12),
2322 
2327 
2331  kRegMaskBOBGPIOut4Data = BIT(15)+BIT(14)+BIT(13)+BIT(12),
2332 
2336 
2337  kRegMaskLEDBlueControl = BIT(7)+BIT(6)+BIT(5)+BIT(4)+BIT(3)+BIT(2)+BIT(1)+BIT(0),
2338  kRegMaskLEDGreenControl = BIT(15)+BIT(14)+BIT(13)+BIT(12)+BIT(11)+BIT(10)+BIT(9)+BIT(8),
2339  kRegMaskLEDRedControl = BIT(23)+BIT(22)+BIT(21)+BIT(20)+BIT(19)+BIT(18)+BIT(17)+BIT(16),
2340 } RegisterMask;
2341 
2342 typedef enum
2343 {
2344  // Global Control
2361 
2362  // Global Control 2
2392 
2393  // kRegGlobalControl3 (reg 108)
2401 
2402  // Audio Control 2
2411 
2412  // Channel Control - kRegCh1Control, kRegCh2Control, kRegCh3Control, kRegCh4Control
2430  kRegShiftVBlankRGBRangeMode = 24, // Deprecated
2433  kRegCh1BlackOutputShift = 27, // KiPro bit set results in black output video and muted audio in capture mode, black output video in playback
2437 
2438  // Video Crosspoint Control
2444 
2445  // Video Processing Control
2463 
2464 
2465  // Note: See more bitfields for this register below, in the 'Xena2K and Konax Video Processing.' section
2466 
2467  // kRegStatus
2471 
2472  // Video Interrupt Control
2474 
2475  // Audio Control
2477  kRegShiftNumBits = 1, // shouldn't this be 2?
2484  kRegShiftInputStartAtVBI = 10, // New in 15.6
2486  kRegShiftEmbeddedOutputMuteCh1 = 12, // added for FS1
2487  kRegShiftEmbeddedOutputSupressCh1 = 13, // added for FS1 but available on other boards
2488  kRegShiftOutputStartAtVBI = 14, // New in 15.6
2489  kRegShiftEmbeddedOutputSupressCh2 = 15, // added for FS1 but available on other boards
2491  kRegShiftEmbeddedOutputMuteCh2 = 17, // added for FS1
2506 
2507  // Audio Source Select
2517 
2519 
2520  // Input Status
2538 
2539  // RP-188 Source
2542 
2543  // DMA Control
2548 
2549  // Color Correction Control
2559 
2560  // kRegCanDoStatus
2568 
2569  // kRegLUTV2Control
2596 
2597  // RS422 Control
2612 
2613 
2614  // FS1 ProcAmp Control
2621 
2624 
2625  // FS1 Audio Delay
2627 
2628  // Borg Audio Delay
2631 
2632  // kRegOutputTimingControl
2635 
2636  // FS1 I2C
2645 
2650 
2651  //kRegFS1ReferenceSelect
2661 
2662  // FS1 AFD Mode
2672 
2673  // FS1 AFD Inserter
2678 
2679  // FS1 Audio Channel Mapping
2684 
2685  // FS1 Output Timing Fine Phase Adjust
2687 
2688  //kRegAnalogInputStatus
2693 
2694  //kRegAnalogInputControl
2696 
2697  //kRegHDMIOut3DControl
2700 
2701  //kRegHDMIOutControl
2720 
2721  //kRegHDMIInputStatus
2737 
2738  //kRegHDMIInputControl
2758 
2759  //kRegHDMIInputControl / kRegHDMIOutControl ???
2762 
2763  //kK2RegAnalogOutControl,
2768  kLHIRegShiftVideoDACMode = 21, // 4 bit enum equivalent of bit 21-24
2774 
2775  //kK2RegSDIOut1Control + kRegK2SDIOut2Control + kK2RegAnalogOutControl
2791 
2792  //kK2RegConversionControl,
2805 
2806  //kK2RegFrameSync1Control and kK2RegFrameSync2Control
2811 
2812  //kK2RegXptSelectGroup1
2817 
2818  //kK2RegXptSelectGroup2
2823 
2824  //kK2RegXptSelectGroup3
2829 
2830  //kK2RegXptSelectGroup4
2835 
2836  //kK2RegXptSelectGroup5
2841 
2842  //kK2RegXptSelectGroup6
2847 
2848  //kK2RegXptSelectGroup7
2852 
2853  //kK2RegXptSelectGroup8
2857 
2858  //kRegCh1ControlExtended
2859  //kRegCh2ControlExtended
2861 
2862  //kK2RegXptSelectGroup9
2867 
2868  //kK2RegXptSelectGroup10
2871 
2872  //kK2RegXptSelectGroup11
2877 
2878  //kK2RegXptSelectGroup12
2883 
2884  //kK2RegXptSelectGroup13
2887 
2888  //kK2RegXptSelectGroup14
2892 
2893  //kRegXptSelectGroup15
2898 
2899  //kRegXptSelectGroup16
2903 
2904  //kK2RegXptSelectGroup17
2909 
2910  //kRegXptSelectGroup18
2913 
2914  //kRegXptSelectGroup19
2919 
2920  //kRegXptSelectGroup20
2925 
2926  //kK2RegXptSelectGroup21
2931 
2932  //kK2RegXptSelectGroup22
2937 
2938  //kK2RegXptSelectGroup30
2943 
2944  //kK2RegXptSelectGroup23
2949 
2950  //kK2RegXptSelectGroup24
2954 
2955  //kK2RegXptSelectGroup25
2960 
2961  //kK2RegXptSelectGroup26
2966 
2967  //kK2RegXptSelectGroup27
2971 
2972  //kK2RegXptSelectGroup28
2977 
2978  //kK2RegXptSelectGroup29
2983 
2984  //kRegXptSelectGroup31
2989 
2990  //kRegXptSelectGroup32
2995 
2996  //kRegXptSelectGroup33
3001 
3002  //kRegXptSelectGroup36
3005 
3006  //kRegXptSelectGroup34
3011 
3012  //kK2RegCSCoefficients1_2
3017  //kK2RegCSCoefficients3_4
3019 
3020  //kK2RegCSCoefficients5_6,
3022 
3023  //kK2RegCSCoefficients5_6,
3025 
3028 
3029  // Enhanced Color Space Converter contol
3036 
3039 
3040  // Xena2K and Konax Video Processing.
3046 
3047  // the newer 13(12) bit coefficients end on bit 14 unlike the
3048  // 11(10) bit ones on 16 - jac
3051 
3052  //kRegLTCStatusControl
3057 
3058  // kRegAudioOutputSourceMap
3061 
3062  // kRegSDIInput3GStatus
3078 
3079  // kRegSDIInput3GStatus2
3094 
3095  // kRegSDI5678Input3GStatus
3124 
3125  // kRegVPID
3143 
3144  // Borg Test Pattern Generator
3153 
3154  // Audio Channel Control 2 or 8 channel playback shift
3156 
3157  // Stereo Compressor control shift
3167 
3168  // SDI Direction Control Shift
3177 
3178  // SDI watchdog control
3186 
3188 
3189  // 4K Down Convert
3194 
3195  // Quadrant Rasterizer Control
3200 
3201  // kRegRXSDI1Status, kRegRXSDI2Status, etc
3209 
3212 
3221 
3230 
3239 
3248 
3257 
3266 
3275 
3284 
3287 
3288  //kRegHDMIHDR.... 330-336
3301 
3307 
3357 
3360 
3363 
3369 
3374 
3377 
3380 
3384 
3389 
3394 
3399 
3403 
3407 } RegisterShift;
3408 
3409 
3410 // NWL Registers
3411 
3412 // For the Mac we define an offset. This is done so that read/write register can easily identify an NWL register from a VP register.
3413 // This is necessary since the NWL registers lives in another PCI BAR and these offsets conflict with normal VP registers. With this
3414 // offset the driver knows which mapped BAR to use. Windows maps individual registers at start so this isn't necessary for Windows.
3415 #ifdef AJAMac
3416  #define NWL_REG_START 18000
3417 #else
3418  #define NWL_REG_START 0
3419 #endif
3420 
3421 typedef enum
3422 {
3429 
3436 
3443 
3450 
3455 
3456 } NwlRegisterNum;
3457 
3458 // This is an aid for utility routines that maintain tables indexed by a register number, like spinlocks
3459 typedef enum
3460 {
3467 
3474 
3481 
3488 
3493 
3496 
3497 typedef enum
3498 {
3502  kRegMaskNwlCapabilitiesEngineNumber = (BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15)),
3503  kRegMaskNwlCapabilitiesAddressSize = (BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23)),
3504 
3516 
3541 
3542 } NwlRegisterMask;
3543 
3544 typedef enum
3545 {
3551 
3563 
3588 
3590 
3591 // XLNX Registers
3592 #define XLNX_MAX_CHANNELS 4
3593 #define XLNX_REG_TARGET_SIZE 0x400
3594 #define XLNX_REG_CHANNEL_SIZE 0x40
3595 #define XLNX_SUBSYSTEM_ID 0x1fc
3596 
3597 typedef enum
3598 {
3608 
3609 typedef enum
3610 {
3630 
3642 
3648 
3649 } XlnxRegisterNum;
3650 
3651 typedef enum
3652 {
3654  kRegMaskXlnxTarget = 0x000f0000,
3656  kRegMaskXlnxIdTarget = 0x00000f00,
3657  kRegMaskXlnxVersion = 0x000000ff,
3658 
3662  kRegMaskXlnxRun = 0x00000001,
3663 
3667 
3677 
3678  kRegMaskXlnxPerfRun = 0x00000004,
3680  kRegMaskXlnxPerfAuto = 0x00000001,
3681 
3684 
3687 
3690 
3692 
3693 typedef enum
3694 {
3700 
3705 
3709 
3719 
3723 
3726 
3729 
3732 
3734 
3735 // P2P Registers
3736 
3737 typedef enum
3738 {
3760 
3761 
3762 typedef enum
3763 {
3777 
3778 
3779 #define kTransferFlagVideoDMA1 (BIT(0)) // use dma channel 1 for video transfer
3780 #define kTransferFlagVideoDMA2 (BIT(1)) // use dma channel 2 for video transfer
3781 #define kTransferFlagVideoDMA3 (BIT(2)) // use dma channel 3 for video tranfer
3782 #define kTransferFlagVideoDMA4 (BIT(3)) // use dma channel 4 for video transfer
3783 #define kTransferFlagVideoDMAAny (BIT(0)+BIT(1)+BIT(2)+BIT(3))
3784 #define kTransferFlagAudioDMA1 (BIT(4)) // use dma channel 1 for audio transfer
3785 #define kTransferFlagAudioDMA2 (BIT(5)) // use dma channel 2 for audio transfer
3786 #define kTransferFlagAudioDMA3 (BIT(6)) // use dma channel 3 for audio transfer
3787 #define kTransferFlagAudioDMA4 (BIT(7)) // use dma channel 4 for audio transfer
3788 #define kTransferFlagAudioDMAAny (BIT(4)+BIT(5)+BIT(6)+BIT(7))
3789 #define kTransferFlagDMAAny (BIT(0)+BIT(1)+BIT(2)+BIT(3)+BIT(4)+BIT(5)+BIT(6)+BIT(7))
3790 #define kTransferFlagQuadFrame (BIT(8)) // transfer a quad hd or 4k frame
3791 #define kTransferFlagP2PPrepare (BIT(9)) // prepare p2p target for synchronous transfer (no message)
3792 #define kTransferFlagP2PComplete (BIT(10)) // complete synchronous p2p transfer
3793 #define kTransferFlagP2PTarget (BIT(11)) // prepare p2p target for asynchronous transfer (with message)
3794 #define kTransferFlagP2PTransfer (BIT(12)) // transfer to p2p sync or async target
3795 
3796 #define MAX_FRAMEBUFFERS 512 // Max for Corvid88
3797 
3798 #define KONAIP_REGS_START 0x40000
3799 
3801 
3802 //----------------------- AJA XENA2 ---------------------------------
3803 
3804  // Offset in Base Address 1 Space to Channel 2 Frame Buffer
3805 #define XENA2_CHANNEL2_OFFSET (0x2000000) // 32 MBytes..not applicable
3806 
3807  // Size of each frame buffer
3808 #define XENA2_FRAMEBUFFER_SIZE (0x800000) // 8 MBytes
3809 
3810  // the event name shared among all Windows NT
3811  // This name to be appended to the actual Win32Name
3812 #define XENA2_NUM_FRAMEBUFFERS (16)
3813 #define XENA2_NTV2_VERTICALINTERRUPT_GLOBAL_EVENT_NAME "_Xena2VerticalInterruptSignalEvent"
3814 
3815  // the event name shared among all Windows NT
3816  // This name to be appended to the actual Win32Name
3817 #define KHD_NTV2_CHANGE_GLOBAL_EVENT_NAME "_HDChangeSignalEvent"
3818 
3819 
3820 //
3821 // Special defines
3822 //
3823 #define NTV2_MIN_FRAMEBUFFERSIZE KSD_FRAMEBUFFER_SIZE
3824 #define NTV2_MAX_FRAMEBUFFERSIZE KHD_FRAMEBUFFER_SIZE
3825 #define NTV2_MIN_FRAMEBUFFERS HDNTV_NUM_FRAMEBUFFERS
3826 #if defined(XENA2)
3827 #define NTV2_MAX_FRAMEBUFFERS MAX_FRAMEBUFFERS
3828 #else
3829 #define NTV2_MAX_FRAMEBUFFERS BONES_NUM_FRAMEBUFFERS
3830 #endif
3831 
3832 #define NTV2_UART_FIFO_SIZE (127)
3833 
3834 #define NTV2_PROGRAM_READY_BIT ( BIT_8 )
3835 #define NTV2_PROGRAM_DONE_BIT ( BIT_9 )
3836 #define NTV2_PROGRAM_RESET_BIT ( BIT_10 )
3837 
3838 /* PORT C(7) is output (default) */
3839 #define NTV2_FS1_FALLBACK_MODE_BIT ( BIT_11 )
3840 
3841 /* PORT C(7) is input/3-state */
3842 #define NTV2_FS1_CPLD_ENH_MODE_BIT ( BIT_12 )
3843 
3845 // Enums used to specify Property actions with interrupts
3847 
3848 typedef enum _INTERRUPT_ENUMS_
3849 {
3853  eInput1, // 2
3854  eInput2, // 3
3855  eAudio, // 4
3858  eDMA1, // 7
3859  eDMA2, // 8
3860  eDMA3, // 9
3861  eDMA4, // 10
3864  eWrapRate, // 13
3865  eUartTx, // 14
3867  eUartRx, // 15
3871  eLowPower, // 18
3874  eTemp1High, // 21
3875  eTemp2High, // 22
3877  eInput3, // 24
3878  eInput4, // 25
3879  eUartTx2, // 26
3881  eUartRx2, // 27
3884  eInput5, // 29
3885  eInput6, // 30
3886  eInput7, // 31
3887  eInput8, // 32
3889  eOutput2, // 34
3890  eOutput3, // 35
3891  eOutput4, // 36
3892  eOutput5, // 37
3893  eOutput6, // 38
3894  eOutput7, // 39
3895  eOutput8, // 40
3896  eNumInterruptTypes // This must be last // 41
3897 } INTERRUPT_ENUMS;
3898 
3899 
3900 #define MAX_NUM_EVENT_CODES (eNumInterruptTypes)
3901 #define NTV2_IS_VALID_INTERRUPT_ENUM(__e__) ((__e__) >= eOutput1 && (__e__) < eNumInterruptTypes)
3902 #define NTV2_IS_INPUT_INTERRUPT(__e__) ( (__e__) == eInput1 \
3903  || (__e__) == eInput2 \
3904  || (__e__) == eInput3 \
3905  || (__e__) == eInput4 \
3906  || (__e__) == eInput5 \
3907  || (__e__) == eInput6 \
3908  || (__e__) == eInput7 \
3909  || (__e__) == eInput8 )
3910 
3911 #define NTV2_IS_OUTPUT_INTERRUPT(__e__) ( (__e__) == eOutput1 \
3912  || (__e__) == eOutput2 \
3913  || (__e__) == eOutput3 \
3914  || (__e__) == eOutput4 \
3915  || (__e__) == eOutput5 \
3916  || (__e__) == eOutput6 \
3917  || (__e__) == eOutput7 \
3918  || (__e__) == eOutput8 )
3919 
3920 
3921 // Some Mac only ENUMS that had to be moved over to get Win/Linux code to compile,
3922 // so these are only used by the Mac.
3923 typedef enum
3924 {
3928 } ReferenceSelect;
3929 
3930 
3931 #if !defined (NTV2_BUILDING_DRIVER)
3932  typedef std::vector <ULWord> NTV2ULWordVector;
3933 
3940  AJAExport std::ostream & NTV2PrintULWordVector (const NTV2ULWordVector & inObj, std::ostream & inOutStream = std::cout); // New in SDK 16.0
3941 
3942  typedef std::vector <NTV2Channel> NTV2ChannelList;
3943  typedef NTV2ChannelList::const_iterator NTV2ChannelListConstIter;
3944 
3952  AJAExport std::ostream & NTV2PrintChannelList (const NTV2ChannelList & inObj, const bool inCompact = true, std::ostream & inOutStream = std::cout); // New in SDK 16.0
3953 
3959  AJAExport std::string NTV2ChannelListToStr (const NTV2ChannelList & inObj, const bool inCompact = true); // New in SDK 16.0
3960 
3961  typedef std::set <NTV2Channel> NTV2ChannelSet;
3962  typedef NTV2ChannelSet::const_iterator NTV2ChannelSetConstIter;
3963 
3971  AJAExport std::ostream & NTV2PrintChannelSet (const NTV2ChannelSet & inObj, const bool inCompact = true, std::ostream & inOutStream = std::cout); // New in SDK 16.0
3972 
3978  AJAExport std::string NTV2ChannelSetToStr (const NTV2ChannelSet & inObj, const bool inCompact = true); // New in SDK 16.0
3979 
3985  AJAExport NTV2ChannelSet NTV2MakeChannelSet (const NTV2Channel inFirstChannel, const UWord inNumChannels = 1); // New in SDK 16.0
3986 
3991  AJAExport NTV2ChannelSet NTV2MakeChannelSet (const NTV2ChannelList inChannels); // New in SDK 16.0
3992 
3998  AJAExport NTV2ChannelList NTV2MakeChannelList (const NTV2Channel inFirstChannel, const UWord inNumChannels = 1); // New in SDK 16.0
3999 
4004  AJAExport NTV2ChannelList NTV2MakeChannelList (const NTV2ChannelSet inChannels); // New in SDK 16.0
4005 
4006 
4007  typedef std::set <NTV2AudioSystem> NTV2AudioSystemSet;
4008  typedef NTV2AudioSystemSet::const_iterator NTV2AudioSystemSetConstIter;
4009 
4017  AJAExport std::ostream & NTV2PrintAudioSystemSet (const NTV2AudioSystemSet & inObj, const bool inCompact = true, std::ostream & inOutStream = std::cout); // New in SDK 16.2
4018 
4024  AJAExport std::string NTV2AudioSystemSetToStr (const NTV2AudioSystemSet & inObj, const bool inCompact = true); // New in SDK 16.2
4025 
4031  AJAExport NTV2AudioSystemSet NTV2MakeAudioSystemSet (const NTV2AudioSystem inFirstAudioSystem, const UWord inCount = 1); // New in SDK 16.2
4032 
4033 
4040  #define NTV2_STRUCT_BEGIN(__struct_name__) class AJAExport __struct_name__ {public:
4041  #define NTV2_STRUCT_END(__struct_name__) };
4042  #define NTV2_BEGIN_PRIVATE private:
4043  #define NTV2_END_PRIVATE public:
4044  #define NTV2_BEGIN_PROTECTED protected:
4045  #define NTV2_END_PROTECTED public:
4046 
4047  #if defined (_DEBUG)
4048  #define NTV2_IS_STRUCT_VALID_IMPL(__hr__,__tr__) bool NTV2_IS_STRUCT_VALID (void) const {return __hr__.IsValid() && __tr__.IsValid();}
4049  #define NTV2_ASSERT_STRUCT_VALID do {NTV2_ASSERT (NTV2_IS_STRUCT_VALID ());} while (false)
4050  #else
4051  #define NTV2_IS_STRUCT_VALID_IMPL(__hr__,__tr__)
4052  #define NTV2_ASSERT_STRUCT_VALID
4053  #endif
4054 #else // defined (NTV2_BUILDING_DRIVER)
4055  #define NTV2_STRUCT_BEGIN(__struct_name__) typedef struct __struct_name__ {
4056  #define NTV2_STRUCT_END(__struct_name__) } __struct_name__;
4057  #define NTV2_BEGIN_PRIVATE
4058  #define NTV2_END_PRIVATE
4059  #define NTV2_BEGIN_PROTECTED
4060  #define NTV2_END_PROTECTED
4061  #define NTV2_IS_STRUCT_VALID_IMPL(__hr__,__tr__)
4062  #define NTV2_ASSERT_STRUCT_VALID
4063 #endif // !defined (NTV2_BUILDING_DRIVER)
4064 
4065 
4070  ULWord registerNumber;
4071  ULWord registerValue;
4072  ULWord registerMask;
4073  ULWord registerShift;
4074 
4075  #if !defined(NTV2_BUILDING_DRIVER)
4076 
4083  NTV2RegInfo (const ULWord inRegNum = 0, const ULWord inValue = 0, const ULWord inMask = 0xFFFFFFFF, const ULWord inShift = 0)
4084  : registerNumber (inRegNum),
4085  registerValue (inValue),
4086  registerMask (inMask),
4087  registerShift (inShift)
4088  {
4089  }
4090 
4098  inline void Set (const ULWord inRegNum, const ULWord inValue,
4099  const ULWord inMask = 0xFFFFFFFF, const ULWord inShift = 0)
4100  {setRegNum(inRegNum).setValue(inValue).setMask(inMask).setShift(inShift);}
4104  inline void MakeInvalid (void)
4105  {registerNumber = registerValue = registerMask = registerShift = 0xFFFFFFFF;}
4106 
4111  inline bool IsValid (void) const {return !(regNum() == 0xFFFFFFFF && value() == 0xFFFFFFFF && mask() == 0xFFFFFFFF && shift() == 0xFFFFFFFF)
4112  && mask() && shift() < 32;}
4113 
4120  inline bool operator == (const NTV2RegInfo & inRHS) const {return regNum() == inRHS.regNum() && value() == inRHS.value()
4121  && mask() == inRHS.mask() && shift() == inRHS.shift();}
4127  bool operator < (const NTV2RegInfo & inRHS) const;
4128 
4136  std::ostream & Print (std::ostream & outputStream, const bool inAsCode = false) const;
4137 
4146  std::ostream & PrintCode (std::ostream & outputStream, const int inRadix = 16, const NTV2DeviceID inDeviceID = DEVICE_ID_INVALID, const std::string & sCard = "card") const; // New in SDK 16.0, added inDeviceID in 16.2
4147 
4154  std::ostream & PrintLog (std::ostream & outputStream, const NTV2DeviceID inDeviceID = DEVICE_ID_INVALID) const; // New in SDK 18.1
4155 
4163  bool ImportFromLog (const NTV2StringList & inLogLines); // New in SDK 18.1
4164 
4165  inline ULWord regNum (void) const {return registerNumber;} // New in SDK 17.5
4166  inline ULWord value (void) const {return registerValue;} // New in SDK 17.5
4167  inline ULWord mask (void) const {return registerMask;} // New in SDK 17.5
4168  inline ULWord shift (void) const {return registerShift;} // New in SDK 17.5
4169  inline ULWord offset (void) const {return registerNumber == 0xFFFFFFFF ? 0xFFFFFFFF : registerNumber * 4;} // New in SDK 18.1
4170  inline NTV2RegInfo & setRegNum (const ULWord val){registerNumber = val; return *this;} // New in SDK 17.5
4171  inline NTV2RegInfo & setValue (const ULWord val) {registerValue = val; return *this;} // New in SDK 17.5
4172  inline NTV2RegInfo & setMask (const ULWord val) {registerMask = val; return *this;} // New in SDK 17.5
4173  inline NTV2RegInfo & setShift (const ULWord val) {if (val < 32) registerShift = val; return *this;} // New in SDK 17.5
4174  #endif // !defined(NTV2_BUILDING_DRIVER)
4176 
4178 
4179 #if !defined (NTV2_BUILDING_DRIVER)
4180  typedef std::vector <NTV2RegInfo> NTV2RegisterWrites, NTV2RegWrites;
4181  typedef NTV2RegWrites::const_iterator NTV2RegisterWritesConstIter, NTV2RegWritesConstIter;
4182  typedef NTV2RegWrites::iterator NTV2RegisterWritesIter, NTV2RegWritesIter;
4186 
4193  AJAExport NTV2RegReadsConstIter FindFirstMatchingRegisterNumber (const uint32_t inRegNum, const NTV2RegReads & inRegInfos);
4194 
4201  AJAExport std::ostream & operator << (std::ostream & inOutStream, const NTV2RegInfo & inObj);
4202 
4209  AJAExport std::ostream & operator << (std::ostream & inOutStream, const NTV2RegisterWrites & inObj);
4210 #endif // !defined (NTV2_BUILDING_DRIVER)
4211 
4212 
4213 typedef struct NTV2RoutingEntry
4214 {
4219  #if !defined (NTV2_BUILDING_DRIVER)
4220  NTV2RoutingEntry & operator = (const NTV2RegInfo & inRHS);
4221  #endif // !defined (NTV2_BUILDING_DRIVER)
4222 } NTV2RoutingEntry;
4223 
4224 #define MAX_ROUTING_ENTRIES 32
4225 
4226 typedef struct
4227 {
4230 } NTV2RoutingTable;
4231 
4232 
4233 // Color Space Convert Custom Coefficients
4234 typedef struct
4235 {
4247 
4249 // RP188 data structure used in AutoCirculate
4251 
4252 typedef struct RP188_STRUCT {
4254  ULWord Low; // | BG 4 | Secs10 | BG 3 | Secs 1 | BG 2 | Frms10 | BG 1 | Frms 1 |
4255  ULWord High; // | BG 8 | Hrs 10 | BG 7 | Hrs 1 | BG 6 | Mins10 | BG 5 | Mins 1 |
4256 
4258 } RP188_STRUCT;
4259 
4260 
4261 #define RP188_STRUCT_SET(_struct_,_dbb_,_lo_,_hi_) do \
4262  { \
4263  (_struct_).DBB = (_dbb_); \
4264  (_struct_).Low = (_lo_); \
4265  (_struct_).High = (_hi_); \
4266  } while (false)
4267 
4268 #define RP188_PSTRUCT_SET(_pStruct_,_dbb_,_lo_,_hi_) do \
4269  { \
4270  (_pStruct_)->DBB = (_dbb_); \
4271  (_pStruct_)->Low = (_lo_); \
4272  (_pStruct_)->High = (_hi_); \
4273  } while (false)
4274 
4275  // convenience masks to extract fields in .Low and .High words
4276 #define RP188_FRAMEUNITS_MASK 0x0000000F // Frames (units digit) in bits 3- 0 of .Low word
4277 #define RP188_FRAMETENS_MASK 0x00000300 // Frames (tens digit) in bits 9- 8 of .Low word
4278 #define RP188_SECONDUNITS_MASK 0x000F0000 // Seconds (units digit) in bits 19-16 of .Low word
4279 #define RP188_SECONDTENS_MASK 0x07000000 // Seconds (tens digit) in bits 26-24 of .Low word
4280 #define RP188_LOW_TIME_MASK (RP188_FRAMEUNITS_MASK | RP188_FRAMETENS_MASK | RP188_SECONDUNITS_MASK | RP188_SECONDTENS_MASK)
4281 
4282 #define RP188_MINUTESUNITS_MASK 0x0000000F // Minutes (units digit) in bits 3- 0 of .High word
4283 #define RP188_MINUTESTENS_MASK 0x00000700 // Minutes (tens digit) in bits 10- 8 of .High word
4284 #define RP188_HOURUNITS_MASK 0x000F0000 // Hours (units digit) in bits 19-16 of .High word
4285 #define RP188_HOURTENS_MASK 0x03000000 // Hours (tens digit) in bits 25-24 of .High word
4286 #define RP188_HIGH_TIME_MASK (RP188_MINUTESUNITS_MASK | RP188_MINUTESTENS_MASK | RP188_HOURUNITS_MASK | RP188_HOURTENS_MASK)
4287 
4288  // private bit flags added to the RP188 DBB word
4289 #define NEW_RP188_RCVD 0x00010000 // new RP188 data was received on ANY of the channels (LTC, VITC, etc.) (capture only)
4290 #define NEW_SELECT_RP188_RCVD 0x00020000 // new RP188 data was received on the selected channel (capture only)
4291 #define RP188_720P_FRAMEID 0x00400000 // 720p FrameID (capture only - set by driver software)
4292 #define RP188_CHANGED_FLAG 0x00800000 // RP188 data changed compared to last frame (capture only - set by driver software)
4293 
4294 
4296 // Color Correction data structure used in AutoCirculate
4298 // Color Corrector has 3 tables(usually R, G and B). Each table has 1024 entries
4299 // with 2 entries per 32 bit word....therefore 512 32 bit words per table.
4300 #define NTV2_COLORCORRECTOR_WORDSPERTABLE (512) // number of ULONG words in EACH color table
4301 #define NTV2_COLORCORRECTOR_TOTALWORDS (NTV2_COLORCORRECTOR_WORDSPERTABLE * 3) // total number of ULONG words in all 3 tables
4302 #define NTV2_COLORCORRECTOR_TABLESIZE (NTV2_COLORCORRECTOR_TOTALWORDS * 4) // total length in bytes of all 3 tables: numWords * numColors * bytes/word
4303 
4304 // 12 bit Color Corrector has 3 tables(usually R, G and B). Each table has 4096 entries
4305 // with 2 entries per 32 bit word....therefore 2048 32 bit words per table.
4306 #define NTV2_12BIT_COLORCORRECTOR_WORDSPERTABLE (2048) // number of ULONG words in EACH color table
4307 #define NTV2_12BIT_COLORCORRECTOR_TOTALWORDS (NTV2_12BIT_COLORCORRECTOR_WORDSPERTABLE * 3) // total number of ULONG words in all 3 tables
4308 #define NTV2_12BIT_COLORCORRECTOR_TABLESIZE (NTV2_12BIT_COLORCORRECTOR_TOTALWORDS * 4) // total length in bytes of all 3 tables: numWords * numColors * bytes/word
4309 
4310 
4317 
4318 
4319 typedef struct {
4325 
4326 typedef struct {
4332 
4333 // within each 32-bit LUT word, bits <31:22> = LUT[2i+1], bits <15:6> = LUT[2i]
4334 #define kRegColorCorrectionLUTOddShift 22
4335 #define kRegColorCorrectionLUTEvenShift 6
4336 
4337 // the base BYTE offsets (from PCI Config Base Address 0) of the three Color Correction LUTs
4338 // Note: if using these with GetRegisterBaseAddress() be sure to divide by 4 to get WORD offset!
4339 #define kColorCorrectionLUTOffset_Red (0x0800)
4340 #define kColorCorrectionLUTOffset_Green (0x1000)
4341 #define kColorCorrectionLUTOffset_Blue (0x1800)
4342 
4343 // within each 32-bit LUT word, bits <31:22> = LUT[2i+1], bits <15:6> = LUT[2i]
4344 #define kRegColorCorrection12BitLUTOddShift 16
4345 #define kRegColorCorrection12BitLUTEvenShift 0
4346 
4347 #define kRegColorCorrection10To12BitLUTOddShift 18
4348 #define kRegColorCorrection10To12BitLUTEvenShift 2
4349 
4350 // Note: there is code that assumes that the three LUTs are contiguous. So if this relationship
4351 // changes (i.e. there are "gaps" between tables) then code will need to change!
4352 #define kColorCorrectionLUTOffset_Base (0x0800) // BYTE offset
4353 #define kColorCorrection12BitLUTOffset_Base (0xe000) // BYTE offset
4354 
4355 // cc lut v3 locations
4356 
4357 #define kColorCorrectionLUTV3WidgetOffset (0xd800) // byte offset
4358 #define kColorCorrectionLUTV3WidgetSize (16) // byte size
4359 #define kColorCorrectionLUTV3DataOffset (0xe000) // byte offset
4360 
4361 // cc lut v3 registers
4362 typedef enum
4363 {
4365  regCCLUTV3Capabilities = regCCLUTV3_FIRST, // Reg 0 - read only
4366  regCCLUTV3DmaLoad, // Reg 1 - dma load address and trigger
4367  regCCLUTV3HostLoad, // Reg 2 - host load enable and bank/plain selects
4370 
4371 typedef enum
4372 {
4373  // regCCLUTV3Capabilities
4374  maskCCLUTV3Depth12 = BIT(0), // lut supports 12/10 bits
4376  maskCCLUTV3DmaLoad = BIT(4), // lut supports dma loading
4378  maskCCLUTV3Banks2 = BIT(8), // lut supports 2 banks
4380  maskCCLUTV3HostLoad = BIT(12), // lut supports host loading
4382  // regCCLUTV3DmaLoad
4384  BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) +
4385  BIT(8) + BIT(9) + BIT(10) + BIT(11) + BIT(12) + BIT(13) + BIT(14) + BIT(15) + \
4386  BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23) +
4387  BIT(24) + BIT(25) + BIT(26) + BIT(27) + BIT(28) + BIT(29),
4391  // regCCLUTV3HostLoad
4401 
4402 
4404 // VidProc data structure used in AutoCirculate
4406 
4407 typedef enum
4408 {
4415 
4416 #define NTV2_IS_VALID_AUTOCIRCVIDPROCMODE(__m__) ((__m__) >= AUTOCIRCVIDPROCMODE_MIX && (__m__) < AUTOCIRCVIDPROCMODE_INVALID)
4417 
4418 
4419 
4420 typedef struct AutoCircVidProcInfo
4421 {
4429 
4430  #if !defined (NTV2_BUILDING_DRIVER)
4431  public:
4432  AJAExport explicit AutoCircVidProcInfo ();
4434  #endif // user-space clients only
4436 
4437 
4439 // CustomAncData data structure used in AutoCirculate
4441 typedef struct
4442 {
4448 
4449 #define OBSOLETE_ANC_STRUCT CUSTOM_ANC_STRUCT
4450 
4451 
4453 // Control
4455 
4456 typedef enum _AutoCircCommand_
4457 {
4477 
4478 #define NTV2_IS_AUTO_CIRC_XFER_CMD(__m__) ((__m__) == eTransferAutoCirculate && (__m__) == eTransferAutoCirculateEx && (__m__) == eTransferAutoCirculateEx2)
4479 
4480 
4484 typedef enum
4485 {
4495 
4496 #define NTV2_IS_VALID_AUTO_CIRC_STATE(__m__) ((__m__) >= NTV2_AUTOCIRCULATE_DISABLED && (__m__) < NTV2_AUTOCIRCULATE_INVALID)
4497 
4498 
4502 typedef enum
4503 {
4508 } NTV2TaskMode;
4509 
4510 #if !defined(NTV2_DEPRECATE_18_0)
4512 #endif // !defined(NTV2_DEPRECATE_18_0)
4513 
4514 #define NTV2_IS_VALID_TASK_MODE(__m__) ((__m__) == NTV2_DISABLE_TASKS || (__m__) == NTV2_STANDARD_TASKS || (__m__) == NTV2_OEM_TASKS)
4515 #define NTV2_IS_STANDARD_TASKS(__m__) ((__m__) == NTV2_STANDARD_TASKS)
4516 #define NTV2_IS_DRIVER_ACTIVE_TASKS(__m__) ((__m__) == NTV2_STANDARD_TASKS || (__m__) == NTV2_OEM_TASKS)
4517 
4518 
4519 typedef enum
4520 {
4523 } NTV2DebugReg;
4524 
4525 
4526 #ifdef AJAMac
4527  #pragma pack(4) // removes 64 bit alignment on non-64 bit fields
4528 #endif
4529 
4530 // Structure used for GetAutoCirculate
4532 {
4533  NTV2Crosspoint channelSpec; // Not used by Windows.
4537  LWord activeFrame; // Current Frame# actually being output (or input), -1, if not active
4538  ULWord64 rdtscStartTime; // Performance Counter at start
4539  ULWord64 audioClockStartTime; // Register 28 with Wrap Logic
4540  ULWord64 rdtscCurrentTime; // Performance Counter at time of call
4541  ULWord64 audioClockCurrentTime; // Register 28 with Wrap Logic
4544  ULWord bufferLevel; // how many buffers ready to record or playback in driver
4552 
4555 
4556 
4557 typedef struct
4558 {
4561 
4568 
4577 
4582 
4584 
4585 
4586 typedef struct AUTOCIRCULATE_DATA
4587 {
4590 
4597 
4606 
4607  void* pvVal1;
4608  void* pvVal2;
4609  void* pvVal3;
4610  void* pvVal4;
4611 
4612  #if !defined (NTV2_BUILDING_DRIVER)
4613  public:
4615  AJAExport std::ostream & Print (std::ostream & oss) const;
4617  #endif // user-space clients only
4619 
4620 
4621 typedef struct
4622 {
4625 
4632 
4641 
4646 
4648 
4649 
4651 // GetFrameStamp
4653 
4654 typedef struct FRAME_STAMP_STRUCT
4655 {
4656  NTV2Crosspoint channelSpec; // Ignored in Windows
4657 
4658  //
4659  // Information from the requested frame (#FRAMESTAMP_CONTROL_STRUCT:frameNum
4660  //
4661 
4662  // Clock (System PerformanceCounter under Windows) at time of play or record.
4663  // audioClockTimeStamp is preferred, but not available on all boards. (See comments below at 'currentTime' member.)
4665 
4668 
4670  ULWord64 audioClockTimeStamp; // Register 28 with Wrap Logic
4671 
4674 
4676  ULWord audioInStartAddress; // AudioInAddress at the time this Frame was stamped.
4677 
4679  ULWord audioInStopAddress; // AudioInAddress at the Frame AFTER this Frame was stamped.
4680 
4682  ULWord audioOutStopAddress; // AudioOutAddress at the time this Frame was stamped.
4683 
4685  ULWord audioOutStartAddress; // AudioOutAddress at the Frame AFTER this Frame was stamped.
4686 
4689 
4699 
4700  //
4701  // Information from the current (active) frame
4702  //
4703 
4705  // This is the finest-grained counter available from the OS.
4706  // The granularity of this counter can vary depending on the PC's HAL.
4707  // audioClockCurrentTime is the recommended time-stamp to use instead of this (but is not available on all boards)!
4710 
4712  RP188_STRUCT currentRP188; // ignored if withRP188 is false
4713 
4716 
4718  ULWord64 audioClockCurrentTime; // Register 28 with Wrap Logic
4719  // audioClockCurrentTime (from 48 kHz on-board clock) is consistent and accurate!
4720  // but is not available on the XenaSD-22.
4721 
4724 
4727 
4733 
4736 
4737 
4738 typedef struct
4739 {
4740  NTV2Crosspoint channelSpec; // specify Input or Output channel for desired Frame
4741  NTV2AutoCirculateState state; // current state
4742  LWord transferFrame; // framebuffer number the frame transferred to, -1 on error
4743  ULWord bufferLevel; // how many buffers ready to record or playback
4746  FRAME_STAMP_STRUCT frameStamp; // record. framestramp for that frame,playback
4750 
4751 
4752 typedef struct
4753 {
4754  NTV2Crosspoint channelSpec; // Specify Input or Output channel for desired Frame
4755  Pointer64 videoBuffer; // Keep 64 bit aligned for performance reasons
4757  ULWord videoDmaOffset; // Must be initialized, 64 bit aligned
4758  Pointer64 audioBuffer; // Keep 64 bit aligned for performance reasons
4760  ULWord audioStartSample; // To ensure correct alignment in audio buffer .. NOT USED in Windows... audio now always starts at sample zero.
4761  ULWord audioNumChannels; // 1-6 NOTE!!! only 6 supported at this time
4762  ULWord frameRepeatCount; // NOTE!!! not supported yet.
4763  RP188_STRUCT rp188; // Ignored if withRP188 is false
4764  LWord desiredFrame; // -1 if you want driver to find next available
4765  ULWord hUser; // A user cookie returned by frame stamp
4766  ULWord transferFlags; // disableAudioDMA is no longer used
4767  BOOL_ bDisableExtraAudioInfo; // No 24 byte 0 at front or size info in buffer
4768  NTV2FrameBufferFormat frameBufferFormat; // Should be initialized, but can be overridden
4773  // The following params are for cases when you need to DMA multiple discontiguous "segments" of a video frame. One example
4774  // would be when a frame in Host memory is not "packed", i.e. there are extra "padding" bytes at the end of each row.
4775  // In this case you would set videoBufferSize to the number of active bytes per row, videoNumSegments to the number of rows,
4776  // and videoSegmentHostPitch to the number of bytes from the beginning of one row to the next. In this example,
4777  // videoSegmentCardPitch would be equal to videoBufferSize (i.e. the frame is packed in board memory).
4778  // Another example would be DMAing a sub-section of a frame. In this case set videoBufferSize to the number of bytes in
4779  // one row of the subsection, videoNumSegments to the number of rows in the subsection, videoSegmentHostPitch to the rowBytes
4780  // of the entire frame in Host Memory, and videoSegmentCardPitch to the rowBytes of the entire frame in board memory.
4781  // Note: setting videoNumSegments to 0 or 1 defaults to original behavior (i.e. DMA one complete packed frame)
4782  ULWord videoNumSegments; // Number of segments of size videoBufferSize to DMA (i.e. numLines)
4783  ULWord videoSegmentHostPitch; // Offset (in bytes) between the beginning of one host segment and the beginning of the next host segment (i.e. host rowBytes)
4784  ULWord videoSegmentCardPitch; // Offset (in bytes) between the beginning of one board segment and the beginning of the next board segment (i.e. board memory rowBytes)
4785  NTV2QuarterSizeExpandMode videoQuarterSizeExpand; // Turns on the "quarter-size expand" (2x H + 2x V) hardware
4787 
4788 
4790 {
4791  NTV2Crosspoint channelSpec; // specify Input or Output channel for desired Frame
4792  ULWord * videoBuffer; // Keep 64 bit aligned for performance reasons
4794  ULWord videoDmaOffset; // must be initialized, 64 bit aligned
4795  ULWord * audioBuffer; // Keep 64 bit aligned for performance reasons
4797  ULWord audioStartSample; // To ensure correct alignment in audio buffer .. NOT USED in Windows... audio now always starts at sample zero.
4798  ULWord audioNumChannels; // 1-6 NOTE!!! only 6 supported at this time
4799  ULWord frameRepeatCount; // NOTE!!! not supported yet.
4800  RP188_STRUCT rp188; // Ignored if withRP188 is false
4801  LWord desiredFrame; // -1 if you want driver to find next available
4802  ULWord hUser; // A user cookie returned by frame stamp
4803  ULWord transferFlags; // disableAudioDMA is no longer used
4804  BOOL_ bDisableExtraAudioInfo; // No 24 byte 0 at front or size info in buffer
4805  NTV2FrameBufferFormat frameBufferFormat; // Should be initialized, but can be overridden
4810  // The following params are for cases when you need to DMA multiple discontiguous "segments" of a video frame. One example
4811  // would be when a frame in Host memory is not "packed", i.e. there are extra "padding" bytes at the end of each row.
4812  // In this case you would set videoBufferSize to the number of active bytes per row, videoNumSegments to the number of rows,
4813  // and videoSegmentHostPitch to the number of bytes from the beginning of one row to the next. In this example,
4814  // videoSegmentCardPitch would be equal to videoBufferSize (i.e. the frame is packed in board memory).
4815  // Another example would be DMAing a sub-section of a frame. In this case set videoBufferSize to the number of bytes in
4816  // one row of the subsection, videoNumSegments to the number of rows in the subsection, videoSegmentHostPitch to the rowBytes
4817  // of the entire frame in Host Memory, and videoSegmentCardPitch to the rowBytes of the entire frame in board memory.
4818  // Note: setting videoNumSegments to 0 or 1 defaults to original behavior (i.e. DMA one complete packed frame)
4819  ULWord videoNumSegments; // Number of segments of size videoBufferSize to DMA (i.e. numLines)
4820  ULWord videoSegmentHostPitch; // Offset (in bytes) between the beginning of one host segment and the beginning of the next host segment (i.e. host rowBytes)
4821  ULWord videoSegmentCardPitch; // Offset (in bytes) between the beginning of one board segment and the beginning of the next board segment (i.e. board memory rowBytes)
4822  NTV2QuarterSizeExpandMode videoQuarterSizeExpand; // Turns on the "quarter-size expand" (2x H + 2x V) hardware
4823 
4826 
4827 
4828 typedef struct
4829 {
4830  NTV2Crosspoint channelSpec; // Specify Input or Output channel for desired Frame
4831  ULWord * POINTER_32 videoBuffer; // Keep 64 bit aligned for performance reasons
4833  ULWord videoDmaOffset; // Must be initialized, 64 bit aligned
4834  ULWord * POINTER_32 audioBuffer; // Keep 64 bit aligned for performance reasons
4836  ULWord audioStartSample; // To ensure correct alignment in audio buffer .. NOT USED in Windows... audio now always starts at sample zero.
4837  ULWord audioNumChannels; // 1-6 NOTE!!! only 6 supported at this time
4838  ULWord frameRepeatCount; // NOTE!!! not supported yet.
4839  RP188_STRUCT rp188; // Ignored if withRP188 is false
4840  LWord desiredFrame; // -1 if you want driver to find next available
4841  ULWord hUser; // A user cookie returned by frame stamp
4842  ULWord transferFlags; // disableAudioDMA is no longer used
4843  BOOL_ bDisableExtraAudioInfo; // No 24 byte 0 at front or size info in buffer .. NOT USED in Windows, extra audio no longer supported
4844  NTV2FrameBufferFormat frameBufferFormat; // Should be initialized, but can be overridden
4849  // The following params are for cases when you need to DMA multiple discontiguous "segments" of a video frame. One example
4850  // would be when a frame in Host memory is not "packed", i.e. there are extra "padding" bytes at the end of each row.
4851  // In this case you would set videoBufferSize to the number of active bytes per row, videoNumSegments to the number of rows,
4852  // and videoSegmentHostPitch to the number of bytes from the beginning of one row to the next. In this example,
4853  // videoSegmentCardPitch would be equal to videoBufferSize (i.e. the frame is packed in board memory).
4854  // Another example would be DMAing a sub-section of a frame. In this case set videoBufferSize to the number of bytes in
4855  // one row of the subsection, videoNumSegments to the number of rows in the subsection, videoSegmentHostPitch to the rowBytes
4856  // of the entire frame in Host Memory, and videoSegmentCardPitch to the rowBytes of the entire frame in board memory.
4857  // Note: setting videoNumSegments to 0 or 1 defaults to original behavior (i.e. DMA one complete packed frame)
4858  ULWord videoNumSegments; // Number of segments of size videoBufferSize to DMA (i.e. numLines)
4859  ULWord videoSegmentHostPitch; // Offset (in bytes) between the beginning of one host segment and the beginning of the next host segment (i.e. host rowBytes)
4860  ULWord videoSegmentCardPitch; // Offset (in bytes) between the beginning of one board segment and the beginning of the next board segment (i.e. board memory rowBytes)
4861  NTV2QuarterSizeExpandMode videoQuarterSizeExpand; // Turns on the "quarter-size expand" (2x H + 2x V) hardware
4863 
4864 
4865 // Structure for autocirculate peer to peer transfers. For p2p target specify kTransferFlagP2PPrepare
4866 // for completion using kTransferFlagP2PComplete or kTransferFlagP2PTarget for completion with message transfer.
4867 // Autocirculate will write an AUTOCIRCULATE_P2P_STRUCT to the video buffer specified to the target. Pass this
4868 // buffer as the video buffer to the autocirculate p2p source (kTransferFlagP2PTransfer) to do the p2p transfer.
4869 // For completion with kTransferFlagP2PComplete specify the transferFrame from the kTransferFlagP2PPrepare.
4870 typedef struct
4871 {
4872  ULWord p2pSize; // size of p2p structure
4873  ULWord p2pflags; // p2p transfer flags
4874  ULWord64 videoBusAddress; // frame buffer bus address
4875  ULWord64 messageBusAddress; // message register bus address (0 if not required)
4876  ULWord videoBusSize; // size of the video aperture (bytes)
4877  ULWord messageData; // message data (write to message bus address to complete video transfer)
4879 
4880 
4881 #define AUTOCIRCULATE_TASK_VERSION 0x00000001
4882 #define AUTOCIRCULATE_TASK_MAX_TASKS 128
4883 
4887 typedef enum
4888 {
4890  eAutoCircTaskRegisterWrite, // AutoCircRegisterTask
4891  eAutoCircTaskRegisterRead, // AutoCircRegisterTask
4892  eAutoCircTaskTimeCodeWrite, // AutoCircTimeCodeTask
4893  eAutoCircTaskTimeCodeRead, // AutoCircTimeCodeTask
4896 
4897 
4898 #define NTV2_IS_VALID_TASK_TYPE(_x_) ((_x_) > eAutoCircTaskNone && (_x_) < MAX_NUM_AutoCircTaskTypes)
4899 
4900 #define NTV2_IS_REGISTER_READ_TASK(_x_) ((_x_) == eAutoCircTaskRegisterRead)
4901 #define NTV2_IS_REGISTER_WRITE_TASK(_x_) ((_x_) == eAutoCircTaskRegisterWrite)
4902 #define NTV2_IS_REGISTER_TASK(_x_) (NTV2_IS_REGISTER_WRITE_TASK (_x_) || NTV2_IS_REGISTER_READ_TASK (_x_))
4903 
4904 #define NTV2_IS_TIMECODE_READ_TASK(_x_) ((_x_) == eAutoCircTaskTimeCodeRead)
4905 #define NTV2_IS_TIMECODE_WRITE_TASK(_x_) ((_x_) == eAutoCircTaskTimeCodeWrite)
4906 #define NTV2_IS_TIMECODE_TASK(_x_) (NTV2_IS_TIMECODE_WRITE_TASK (_x_) || NTV2_IS_TIMECODE_READ_TASK (_x_))
4907 
4908 
4909 typedef struct
4910 {
4916 
4917 typedef struct
4918 {
4938 
4939 typedef struct AutoCircGenericTask
4940 {
4942  union
4943  {
4946  } u;
4947 
4948  #if !defined (NTV2_BUILDING_DRIVER)
4949  public:
4950  AJAExport explicit AutoCircGenericTask () {u.registerTask.regNum = u.registerTask.mask = u.registerTask.shift = u.registerTask.value = 0;}
4952  #endif // user-space clients only
4954 
4955 typedef struct
4956 {
4967 
4969 {
4979 
4982 
4983 typedef struct
4984 {
4995 
4996 
4997 // Information about the currently programmed Xilinx .bit file
4998 #define NTV2_BITFILE_DATETIME_STRINGLENGTH (16)
4999 #define NTV2_BITFILE_DESIGNNAME_STRINGLENGTH (100)
5000 #define NTV2_BITFILE_PARTNAME_STRINGLENGTH (16)
5001 // Increment this when you change the bitfile information structure
5002 // And be sure to update the driver so it can handle the new version.
5003 #define NTV2_BITFILE_STRUCT_VERSION (4)
5004 
5005 // There is room for up to 4kbytes after the audio in the last frame,
5006 // but a 4KB data struct overflows the stack in the ioctl routine in
5007 // the driver under Linux.
5008 //#define NTV2_BITFILE_RESERVED_ULWORDS (244)
5009 //#define NTV2_BITFILE_RESERVED_ULWORDS (243) // added bitFileType
5010 //#define NTV2_BITFILE_RESERVED_ULWORDS (239) // added designName
5011 //#define NTV2_BITFILE_RESERVED_ULWORDS (235) // added partName
5012 #define NTV2_BITFILE_RESERVED_ULWORDS (234) // added whichFPGA
5013 
5014 typedef struct {
5015  ULWord checksum; // Platform-dependent. Deprecated on Linux.
5016  ULWord structVersion; // Version of this structure
5017  ULWord structSize; // Total size of this structure
5018 
5019  ULWord numBytes; // Xilinx bitfile bytecount
5020  char dateStr[NTV2_BITFILE_DATETIME_STRINGLENGTH]; // Date Xilinx bitfile compiled
5021  char timeStr[NTV2_BITFILE_DATETIME_STRINGLENGTH]; // Time Xilinx bitfile compiled
5023 
5024  ULWord bitFileType; // NTV2BitfileType
5025 
5026  char partNameStr[NTV2_BITFILE_PARTNAME_STRINGLENGTH]; // Part name (v4)
5028 
5030 
5032 
5033 
5034 typedef struct {
5036  ULWord dmaFlags; // flags passed into DMA currently bit 1 is set for to indicate weird 4096 10bit YUV 4K frame
5037 
5038  Pointer64 dmaHostBuffer; // vitrual address of host buffer
5039  ULWord dmaSize; // number of bytes to DMA
5040  ULWord dmaCardFrameNumber; // card frame number
5041  ULWord dmaCardFrameOffset; // offset (in bytes) into card frame to begin DMA
5042  ULWord dmaNumberOfSegments; // number of segments of size videoBufferSize to DMA
5043  ULWord dmaSegmentSize; // size of each segment (if videoNumSegments > 1)
5044  ULWord dmaSegmentHostPitch; // offset (in bytes) between the beginning of one host-memory segment and the beginning of the next host-memory segment
5045  ULWord dmaSegmentCardPitch; // offset (in bytes) between the beginning of one Kona-memory segment and the beginning of the next Kona-memory segment
5046 
5047  BOOL_ dmaToCard; // direction of DMA transfer
5048 
5050 
5051 
5052 // NOTE: Max bitfilestruct size was NTV2_AUDIO_READBUFFEROFFSET - NTV2_AUDIO_WRAPADDRESS
5053 // but is now practically unlimited.
5054 
5055 // The following structure is used to retrieve the timestamp values of the last video
5056 // interrupts. Use GetInterruptTimeStamps(&
5057 typedef struct {
5062 
5063 // System status calls and structs associated with specific opcodes
5064 
5065 typedef enum
5066 {
5067  SSC_GetFirmwareProgress, // return firmware progress informaiton
5068  SSC_End // end of list
5070 
5071 typedef enum
5072 {
5089 } ProgramState;
5090 
5091 typedef enum {
5101 } ProgramCommand;
5102 
5103 typedef struct {
5108 
5109 // System control calls and structs associated with specific opcodes
5110 
5111 typedef enum
5112 {
5113  SCC_Test, // just a test for now
5114  SCC_End // end of list
5116 
5117 typedef struct {
5118  ULWord param1; // test parameter 1
5119  ULWord param2; // test parameter 2
5120 } SCC_TEST_STRUCT;
5121 
5122 
5123 // Build information
5124 #define NTV2_BUILD_STRINGLENGTH (1024)
5125 #define NTV2_BUILD_STRUCT_VERSION (0)
5126 
5127 #define NTV2_BUILD_RESERVED_BYTES (1016)
5128 
5129 typedef struct {
5130  ULWord structVersion; // Version of this structure
5131  ULWord structSize; // Total size of this structure
5132 
5133  char buildStr[NTV2_BUILD_STRINGLENGTH]; // User-defined build string
5134  unsigned char reserved[NTV2_BUILD_RESERVED_BYTES];
5135 
5137 
5138 
5139 #ifdef AJAMac
5140 #pragma options align=reset
5141 #endif
5142 
5143  // used to filter the vout menu display
5144 typedef enum
5145 {
5146  kUndefinedFilterFormats = 0, // Undefined
5147  kDropFrameFormats = BIT(0), // 23.98 / 29.97 / 59.94
5148  kNonDropFrameFormats = BIT(1), // 24 / 30 / 60
5149  kEuropeanFormats = BIT(2), // 25 / 50
5150  k1080ProgressiveFormats = BIT(3), // 1080p 23.98/24/29.97/30 (exclude 1080psf)
5151  kREDFormats = BIT(4), // RED's odd geometries
5152  k2KFormats = BIT(5), // 2K formats
5153  k4KFormats = BIT(6) // 4K formats
5154 
5156 
5157 // STUFF moved from ntv2macinterface.h that is now common
5159 {
5160  kDesktopFBIniting = 0, // waiting for Finder? Window Mgr? to discover us
5161  kDesktopFBOff = 1, // Running - not in use
5162  kDesktopFBOn = 2 // Running - in-use as Mac Desktop
5163 
5165 
5166 
5168 {
5171 
5173 
5174 
5175 #if !defined(R2_DEPRECATED)
5176 
5177 typedef enum TimelapseUnits
5178 {
5179  kTimelapseFrames = 0, // frames
5180  kTimelapseSeconds = 1, // seconds
5181  kTimelapseMinutes = 2, // minutes
5182  kTimelapseHours = 3 // hours
5183 
5184 } TimelapseUnits;
5185 
5186 typedef enum
5187 {
5188  kDefaultModeDesktop, // deprecated
5190  kDefaultModeBlack, // deprecated
5195 
5196 typedef enum
5197 {
5203  kHDMIOutCSCYCbCr8bit, // deprecated
5206 
5207 typedef enum
5208 {
5214 
5215 typedef enum
5216 {
5222 
5224 
5226 {
5233 };
5234 
5235 // deprecated - NTV2TestPatternSelect
5236 // note: this order mimics (somewhat) that of NTV2TestPatternSelect in "ntv2testpatterngen.h"
5237 typedef enum
5238 {
5242  kTestPatternMultiburst, // Mulitburst
5243  kTestPatternLinesweep, // Line Sweep
5244  kTestPatternPathological, // Pathological
5245  kTestPatternFlatField, // Flat Field (50%)
5246  kTestPatternMultiPattern, // a swath of everything
5249  kTestPatternCustom // Custom ("Load File...")
5250 
5252 
5253 
5254 #endif //R2_DEPRECATED
5255 
5256 
5257 
5258 typedef enum
5259 {
5260  kRP188SourceEmbeddedLTC = 0x0, // NOTE these values are same as RP188 DBB channel select
5265 
5266 
5267 // Masks
5268 enum
5269 {
5270  // kRegUserState1
5271  kMaskInputFormatSelect = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7),
5272  kMaskPrimaryFormatSelect = BIT(8) + BIT(9) + BIT(10) + BIT(11) + BIT(12) + BIT(13) + BIT(14) + BIT(15),
5273  kMaskSecondaryFormatSelect = BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23),
5275  kMaskAnalogInputType = BIT(28) + BIT(29) + BIT(30) + BIT(31),
5276 
5277  //kRegIoHDGlobalStatus
5279 
5280  // kRegIoHDGlobalControl
5281  kMaskStandAloneMode = BIT(0) + BIT(1) + BIT(2),
5282  kMaskDisplayMode = BIT(4) + BIT(5) + BIT(6) + BIT(7),
5283  kMaskDisplayModeTCType = BIT(8) + BIT(9) + BIT(10) + BIT(11), // TimecodeFormat - when set to zero, Timecode type follows primary format
5284 
5285  // kVRegStartupStatusFlags
5289 };
5290 
5291 // isoch streams (channels)
5293 {
5294  kStartPhase1 = 1, // These start out at 1 because they become a bit setting
5296 };
5297 
5298 typedef enum
5299 {
5302 } IoHDDisplayMode;
5303 
5304 #define KONA_DEBUGFILTER_STRINGLENGTH 128
5305 typedef struct
5306 {
5307  char includeString[KONA_DEBUGFILTER_STRINGLENGTH];
5308  char excludeString[KONA_DEBUGFILTER_STRINGLENGTH];
5310 
5311 
5312 typedef enum
5313 {
5324  maskSyncro = BIT(24) + BIT(25),
5332  maskField1CutoffLine = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) + BIT(8) + BIT(9) + BIT(10),
5334  maskField2CutoffLine = BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23) + BIT(24) + BIT(25) + BIT(26),
5336  maskTotalBytesIn = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) +
5337  BIT(8) + BIT(9) + BIT(10) + BIT(11) + BIT(12) + BIT(13) + BIT(14) + BIT(15) +
5338  BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23),
5342  maskField1BytesIn = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) +
5343  BIT(8) + BIT(9) + BIT(10) + BIT(11) + BIT(12) + BIT(13) + BIT(14) + BIT(15) +
5344  BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23),
5348  maskField2BytesIn = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) +
5349  BIT(8) + BIT(9) + BIT(10) + BIT(11) + BIT(12) + BIT(13) + BIT(14) + BIT(15) +
5350  BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23),
5354  maskField1StartLine = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) + BIT(8) + BIT(9) + BIT(10),
5356  maskField2StartLine = BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23) + BIT(24) + BIT(25) + BIT(26),
5358  maskTotalFrameLines = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) + BIT(8) + BIT(9) + BIT(10),
5360  maskFIDHi = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) + BIT(8) + BIT(9) + BIT(10),
5362  maskFIDLow = BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23) + BIT(24) + BIT(25) + BIT(26),
5364  maskPktIgnore_1_5_9_13_17 = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7),
5366  maskPktIgnore_2_6_10_14_18 = BIT(8) + BIT(9) + BIT(10) + BIT(11) + BIT(12) + BIT(13) + BIT(14) + BIT(15),
5368  maskPktIgnore_3_7_11_15_19 = BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23),
5370  maskPktIgnore_4_8_12_16_20 = BIT(24) + BIT(25) + BIT(26) + BIT(27) + BIT(28) + BIT(29) + BIT(30) + BIT(31),
5372  maskField1AnalogStartLine = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) + BIT(8) + BIT(9) + BIT(10),
5374  maskField2AnalogStartLine = BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23) + BIT(24) + BIT(25) + BIT(26),
5376 } ANCExtMaskShift;
5377 
5378 typedef enum
5379 {
5381  regAncExtControl = regAncExt_FIRST, // Reg 0 - Control register
5382  regAncExtField1StartAddress, // Reg 1 - f1_start_address[31:0]
5383  regAncExtField1EndAddress, // Reg 2 - f1_end_address[31:0]
5384  regAncExtField2StartAddress, // Reg 3 - f2_start_addr[31:0]
5385  regAncExtField2EndAddress, // Reg 4 - f2_end_address[31:0]
5386  regAncExtFieldCutoffLine, // Reg 5 - f2_cutoff_line[10:0], f1_cutoff_line[10:0]
5387  regAncExtTotalStatus, // Reg 6 - mem_sz_overrun, total_bytes[15:0]
5388  regAncExtField1Status, // Reg 7 - mem_sz_overrun_f1, total_bytes_f1[15:0]
5389  regAncExtField2Status, // Reg 8 - mem_sz_overrun_f2, total_bytes_f2[15:0]
5390  regAncExtFieldVBLStartLine, // Reg 9 - f2_vbl_start[10:0], f1_vbl_start[10:0]
5391  regAncExtTotalFrameLines, // Reg 10 - total_lines[10:0]
5392  regAncExtFID, // Reg 11 - fid_low[10:0], fid_hi[10:0]
5393  regAncExtIgnorePacketReg_1_2_3_4, // Reg 12 - Packet Ignore bytes
5395  regAncExtIgnorePacketReg_5_6_7_8, // Reg 13 - Packet Ignore bytes
5396  regAncExtIgnorePacketReg_9_10_11_12, // Reg 14 - Packet Ignore bytes
5397  regAncExtIgnorePacketReg_13_14_15_16, // Reg 15 - Packet Ignore bytes
5398  regAncExtIgnorePacketReg_17_18_19_20, // Reg 16 - Packet Ignore bytes
5400  regAncExtAnalogStartLine, // Reg 17 - analog_start_line[10:0]
5401  regAncExtField1AnalogYFilter, // Reg 18 - analog_line_y_f1[31:0] - one bit per F1 line past analog_start_line, 1=captureAnalogY, 0=normal
5402  regAncExtField2AnalogYFilter, // Reg 19 - analog_line_y_f2[31:0] - one bit per F2 line past analog_start_line, 1=captureAnalogY, 0=normal
5403  regAncExtField1AnalogCFilter, // Reg 20 - analog_line_c_f1[31:0] - one bit per F1 line past analog_start_line, 1=captureAnalogC, 0=normal
5404  regAncExtField2AnalogCFilter, // Reg 21 - analog_line_c_f2[31:0] - one bit per F2 line past analog_start_line, 1=captureAnalogC, 0=normal
5405  regAncExtTwoFrameCadenceDetect, // Reg 22 - not used in NTV2
5406  regAncExtRP188Type, // Reg 23 - not used in NTV2
5407  regAncExtTimecodeStatus0_31, // Reg 24 - not used in NTV2
5408  regAncExtTimecodeStatus32_63, // Reg 25 - not used in NTV2
5409  regAncExtTimecodeStatusDBB, // Reg 26 - not used in NTV2
5410  regAncExtAnalogActiveLineLength, // Reg 27 - analog active line length
5412 } ANCExtRegisters;
5413 
5414 typedef enum
5415 {
5437 } ANCInsRegisters;
5438 
5439 typedef enum
5440 {
5441  maskInsField1Bytes = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) + BIT(8) + BIT(9) + BIT(10) + BIT(11) + BIT(12) + BIT(13) + BIT(14) + BIT(15),
5443  maskInsField2Bytes = BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23) + BIT(24) + BIT(25) + BIT(26) + +BIT(27) + BIT(28) + BIT(29) + BIT(30) + BIT(31),
5461  maskInsHancDelay = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) + BIT(8) + BIT(9),
5463  maskInsVancDelay = BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23) + BIT(24) + BIT(25) + BIT(26),
5465  maskInsField1FirstActive = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) + BIT(8) + BIT(9) + BIT(10),
5467  maskInsField2FirstActive = BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23) + BIT(24) + BIT(25) + BIT(26),
5469  maskInsActivePixelsInLine = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) + BIT(8) + BIT(9) + BIT(10),
5471  maskInsTotalPixelsInLine = BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23) + BIT(24) + BIT(25) + BIT(26) + BIT(27),
5473  maskInsTotalLinesPerFrame = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) + BIT(8) + BIT(9) + BIT(10),
5475  maskInsFieldIDHigh = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) + BIT(8) + BIT(9) + BIT(10),
5477  maskInsFieldIDLow = BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23) + BIT(24) + BIT(25) + BIT(26),
5479 
5480 } ANCInsMaskShift;
5481 
5482 // HDMI AUX extractor registers
5483 typedef enum
5484 {
5486  regAuxExtControl = regAuxExt_FIRST, // Reg 0 - filter_inv[29], dis_mem_wr[28], syncro[25:24], prog[16]
5487  regAuxExtField1StartAddress, // Reg 1 - f1_start_address[31:0]
5488  regAuxExtField1EndAddress, // Reg 2 - f1_end_address[31:0]
5489  regAuxExtField2StartAddress, // Reg 3 - f2_start_addr[31:0]
5490  regAuxExt4, // Reg 4
5491  regAuxExt5, // Reg 5
5492  regAuxExtTotalStatus, // Reg 6 - mem_sz_overrun[28], total_bytes[23:0]
5493  regAuxExtField1Status, // Reg 7 - mem_sz_overrun_f1[28], total_bytes_f1[23:0]
5494  regAuxExtField2Status, // Reg 8 - mem_sz_overrun_f2[28], total_bytes_f2[23:0]
5495  regAuxExtFieldVBLStartLine, // Reg 9 - f2_vbl_start[27:16], f1_vbl_start[11:0]
5496  regAuxExtTotalFrameLines, // Reg 10 - total_lines[11:0]
5497  regAuxExtFID, // Reg 11 - fid_low[27:16], fid_hi[11:0]
5498  regAuxExtPacketMask0, // Reg 12 - Packet Ignore bytes
5500  regAuxExtPacketMask1, // Reg 13 - Packet Ignore bytes
5501  regAuxExtPacketMask2, // Reg 14 - Packet Ignore bytes
5502  regAuxExtPacketMask3, // Reg 15 - Packet Ignore bytes
5504  regAuxExtFillData, // Reg 16 - Buffer fill data
5506 } AUXExtRegisters;
5507 
5508 typedef enum
5509 {
5510  // regAuxExtControl
5513  maskAuxSyncro = BIT(24) + BIT(25),
5519  // regAuxExtField1StartAddress, regAuxExtField1EndAddress, regAuxExtField2StartAddress
5520  maskAuxTotalBytesIn = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) +
5521  BIT(8) + BIT(9) + BIT(10) + BIT(11) + BIT(12) + BIT(13) + BIT(14) + BIT(15) +
5522  BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23),
5524  // regAuxExtTotalStatus
5527  // regAuxExtField1Status, regAuxExtField2Status
5528  maskAuxFieldBytesIn = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) +
5529  BIT(8) + BIT(9) + BIT(10) + BIT(11) + BIT(12) + BIT(13) + BIT(14) + BIT(15) +
5530  BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23),
5534  // regAuxExtFieldVBLStartLine
5535  maskAuxField1StartLine = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) + BIT(8) + BIT(9) + BIT(10) + BIT(11),
5537  maskAuxField2StartLine = BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23) + BIT(24) + BIT(25) + BIT(26) + BIT(27),
5539  // regAuxExtTotalFrameLines
5540  maskAuxTotalFrameLines = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) + BIT(8) + BIT(9) + BIT(10) + BIT(11),
5542  // regAuxExtFID
5543  maskAuxFIDHi = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) + BIT(8) + BIT(9) + BIT(10) + BIT(11),
5545  maskAuxFIDLow = BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23) + BIT(24) + BIT(25) + BIT(26) + BIT(27),
5547  // regAuxExtPacketMask0, regAuxExtPacketMask1, regAuxExtPacketMask2, regAuxExtPacketMask3
5548  maskAuxPacket0 = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7),
5550  maskAuxPacket1 = BIT(8) + BIT(9) + BIT(10) + BIT(11) + BIT(12) + BIT(13) + BIT(14) + BIT(15),
5552  maskAuxPacket2 = BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23),
5554  maskAuxPacket3 = BIT(24) + BIT(25) + BIT(26) + BIT(27) + BIT(28) + BIT(29) + BIT(30) + BIT(31),
5556 } AUXExtMaskShift;
5557 
5558 
5559 // Driver Version ULWord encode/decode macros
5560 // Introduced in SDK 15.0
5561 // Common ULWord format on all platforms:
5562 //
5563 // 3 2 1
5564 // 10987654321098765432109876543210
5565 // TTXMMMMMMMmmmmmmPPPPPPbbbbbbbbbb
5566 //
5567 // MMMMMMM: [28:22] major version number (7 bits, 0-127)
5568 // mmmmmm: [21:16] minor version number (6 bits, 0-63)
5569 // PPPPPP: [15:10] point release number (6 bits, 0-63)
5570 // bbbbbbbbbb: [9:0] build number (10 bits, 0-1023)
5571 // TT: [31:30] build type (0=release, 1=beta, 2=alpha, 3=dev)
5572 #if defined(__CPLUSPLUS__) || defined(__cplusplus)
5573  #define NTV2DriverVersionEncode(__maj__, __min__, __pt__, __bld__) ((ULWord(__maj__) & 0x0000007F) << 22) \
5574  | ((ULWord(__min__) & 0x0000003F) << 16) \
5575  | ((ULWord(__pt__ ) & 0x0000003F) << 10) \
5576  | ((ULWord(__bld__) & 0x000003FF) << 0)
5577  #define NTV2DriverVersionDecode_Major(__vers__) ((ULWord(__vers__) >> 22) & 0x0000007F)
5578  #define NTV2DriverVersionDecode_Minor(__vers__) ((ULWord(__vers__) >> 16) & 0x0000003F)
5579  #define NTV2DriverVersionDecode_Point(__vers__) ((ULWord(__vers__) >> 10) & 0x0000003F)
5580  #define NTV2DriverVersionDecode_Build(__vers__) ((ULWord(__vers__) >> 0) & 0x000003FF)
5581 #else
5582  #define NTV2DriverVersionEncode(__maj__, __min__, __pt__, __bld__) (((ULWord)(__maj__) & 0x0000007F) << 22) \
5583  | (((ULWord)(__min__) & 0x0000003F) << 16) \
5584  | (((ULWord)(__pt__ ) & 0x0000003F) << 10) \
5585  | (((ULWord)(__bld__) & 0x000003FF) << 0)
5586  #define NTV2DriverVersionDecode_Major(__vers__) (((ULWord)(__vers__) >> 22) & 0x0000007F)
5587  #define NTV2DriverVersionDecode_Minor(__vers__) (((ULWord)(__vers__) >> 16) & 0x0000003F)
5588  #define NTV2DriverVersionDecode_Point(__vers__) (((ULWord)(__vers__) >> 10) & 0x0000003F)
5589  #define NTV2DriverVersionDecode_Build(__vers__) (((ULWord)(__vers__) >> 0) & 0x000003FF)
5590 #endif
5591 #define NTV2DriverVersionBuildTypeToOrdinal(__ch__) ((__ch__) == 'd' ? 3UL : ((__ch__) == 'a' ? 2UL : ((__ch__) == 'b' ? 1UL : 0UL)))
5592 #define NTV2DriverVersionEncodedBuildType (NTV2DriverVersionBuildTypeToOrdinal(AJA_NTV2_SDK_BUILD_TYPE[0]) << 30)
5593 
5594 // Pack/Unpack SDK version in & out of ULWord:
5595 #define NTV2SDKVersionEncode NTV2DriverVersionEncode
5596 #define NTV2SDKVersionDecode_Major NTV2DriverVersionDecode_Major
5597 #define NTV2SDKVersionDecode_Minor NTV2DriverVersionDecode_Minor
5598 #define NTV2SDKVersionDecode_Point NTV2DriverVersionDecode_Point
5599 #define NTV2SDKVersionDecode_Build NTV2DriverVersionDecode_Build
5600 
5601 
5603 
5604  #if AJATargetBigEndian
5605  #if defined(__CPLUSPLUS__) || defined(__cplusplus)
5606  #define NTV2_4CC(_str_) ( (uint32_t((UByte*(_str_))[0]) << 0) | \
5607  (uint32_t((UByte*(_str_))[1]) << 8) | \
5608  (uint32_t((UByte*(_str_))[2]) << 16) | \
5609  (uint32_t((UByte*(_str_))[3]) << 24))
5610 
5611  #define NTV2_FOURCC(_a_,_b_,_c_,_d_) ( ((uint32_t(_a_)) << 0) | \
5612  ((uint32_t(_b_)) << 8) | \
5613  ((uint32_t(_c_)) << 16) | \
5614  ((uint32_t(_d_)) << 24))
5615  #if !defined (NTV2_BUILDING_DRIVER)
5616  #define NTV2_4CC_AS_STRING(_x_) std::string (1, ((_x_) & 0x000000FF) >> 0) + \
5617  std::string (1, ((_x_) & 0x0000FF00) >> 8) + \
5618  std::string (1, ((_x_) & 0x00FF0000) >> 16) + \
5619  std::string (1, ((_x_) & 0xFF000000) >> 24)
5620  #endif // !defined (NTV2_BUILDING_DRIVER)
5621  #else
5622  #define NTV2_4CC(_str_) ( ((uint32_t)(((UByte *)(_str_))[0]) << 0) | \
5623  ((uint32_t)(((UByte *)(_str_))[1]) << 8) | \
5624  ((uint32_t)(((UByte *)(_str_))[2]) << 16) | \
5625  ((uint32_t)(((UByte *)(_str_))[3]) << 24))
5626 
5627  #define NTV2_FOURCC(_a_,_b_,_c_,_d_) ( (((uint32_t)(_a_)) << 0) | \
5628  (((uint32_t)(_b_)) << 8) | \
5629  (((uint32_t)(_c_)) << 16) | \
5630  (((uint32_t)(_d_)) << 24))
5631  #endif // C
5632  #else
5633  #if defined(__CPLUSPLUS__) || defined(__cplusplus)
5634  #define NTV2_4CC(_str_) ( (uint32_t((UByte*(_str_))[3]) << 0) | \
5635  (uint32_t((UByte*(_str_))[2]) << 8) | \
5636  (uint32_t((UByte*(_str_))[1]) << 16) | \
5637  (uint32_t((UByte*(_str_))[0]) << 24))
5638 
5639  #define NTV2_FOURCC(_a_,_b_,_c_,_d_) ( ((uint32_t(_a_)) << 24) | \
5640  ((uint32_t(_b_)) << 16) | \
5641  ((uint32_t(_c_)) << 8) | \
5642  ((uint32_t(_d_)) << 0) )
5643  #if !defined (NTV2_BUILDING_DRIVER)
5644  #define NTV2_4CC_AS_STRING(_x_) std::string(1, char((uint32_t(_x_) & 0xFF000000) >> 24)) + \
5645  std::string(1, char((uint32_t(_x_) & 0x00FF0000) >> 16)) + \
5646  std::string(1, char((uint32_t(_x_) & 0x0000FF00) >> 8)) + \
5647  std::string(1, char((uint32_t(_x_) & 0x000000FF) >> 0))
5648  #endif // !defined (NTV2_BUILDING_DRIVER)
5649  #else
5650  #define NTV2_4CC(_str_) ( ((uint32_t)(((UByte *)(_str_))[3]) << 0) | \
5651  ((uint32_t)(((UByte *)(_str_))[2]) << 8) | \
5652  ((uint32_t)(((UByte *)(_str_))[1]) << 16) | \
5653  ((uint32_t)(((UByte *)(_str_))[0]) << 24))
5654 
5655  #define NTV2_FOURCC(_a_,_b_,_c_,_d_) ( (((uint32_t)(_a_)) << 24) | \
5656  (((uint32_t)(_b_)) << 16) | \
5657  (((uint32_t)(_c_)) << 8) | \
5658  (((uint32_t)(_d_)) << 0) )
5659  #endif // C
5660  #endif // else Little-Endian
5661 
5662 
5663  #define NTV2_CURRENT_HEADER_VERSION 0
5664  #define NTV2_CURRENT_TRAILER_VERSION 0
5665 
5666  #define AUTOCIRCULATE_STRUCT_VERSION 0
5667 
5668  #define NTV2_HEADER_TAG NTV2_FOURCC ('N', 'T', 'V', '2')
5669  #define NTV2_TRAILER_TAG NTV2_FOURCC ('n', 't', 'v', '2')
5670 
5671  #define NTV2_IS_VALID_HEADER_TAG(_x_) ((_x_) == NTV2_HEADER_TAG)
5672  #define NTV2_IS_VALID_TRAILER_TAG(_x_) ((_x_) == NTV2_TRAILER_TAG)
5673 
5674  #define NTV2_TYPE_VIRTUAL_DATA_RW NTV2_FOURCC ('v', 'd', 'a', 't')
5675  #define NTV2_TYPE_BANKGETSET NTV2_FOURCC ('b', 'n', 'k', 'S')
5676  #define NTV2_TYPE_ACCONTROL NTV2_FOURCC ('c', 'o', 'n', 't')
5677  #define NTV2_TYPE_ACSTATUS NTV2_FOURCC ('s', 't', 'a', 't')
5678  #define NTV2_TYPE_ACXFER NTV2_FOURCC ('x', 'f', 'e', 'r')
5679  #define NTV2_TYPE_ACXFERSTATUS NTV2_FOURCC ('x', 'f', 's', 't')
5680  #define NTV2_TYPE_ACTASK NTV2_FOURCC ('t', 'a', 's', 'k')
5681  #define NTV2_TYPE_ACFRAMESTAMP NTV2_FOURCC ('s', 't', 'm', 'p')
5682  #define NTV2_TYPE_GETREGS NTV2_FOURCC ('r', 'e', 'g', 'R')
5683  #define NTV2_TYPE_SETREGS NTV2_FOURCC ('r', 'e', 'g', 'W')
5684  #define NTV2_TYPE_SDISTATS NTV2_FOURCC ('s', 'd', 'i', 'S')
5685  #define NTV2_TYPE_AJADEBUGLOGGING NTV2_FOURCC ('d', 'b', 'l', 'g')
5686  #define NTV2_TYPE_AJABUFFERLOCK NTV2_FOURCC ('b', 'f', 'l', 'k')
5687  #define NTV2_TYPE_AJABITSTREAM NTV2_FOURCC ('b', 't', 's', 't')
5688  #define NTV2_TYPE_AJASTREAMCHANNEL NTV2_FOURCC ('s', 't', 'c', 'h')
5689  #define NTV2_TYPE_AJASTREAMBUFFER NTV2_FOURCC ('s', 't', 'b', 'u')
5690  #define NTV2_TYPE_AJAMAILBUFFER NTV2_FOURCC ('m', 'a', 'i', 'l')
5691  #if defined(NTV2_DEPRECATE_16_3)
5692  #define AUTOCIRCULATE_TYPE_STATUS NTV2_TYPE_ACSTATUS
5693  #define AUTOCIRCULATE_TYPE_XFER NTV2_TYPE_ACXFER
5694  #define AUTOCIRCULATE_TYPE_XFERSTATUS NTV2_TYPE_ACXFERSTATUS
5695  #define AUTOCIRCULATE_TYPE_TASK NTV2_TYPE_ACTASK
5696  #define AUTOCIRCULATE_TYPE_FRAMESTAMP NTV2_TYPE_ACFRAMESTAMP
5697  #define AUTOCIRCULATE_TYPE_GETREGS NTV2_TYPE_GETREGS
5698  #define AUTOCIRCULATE_TYPE_SETREGS NTV2_TYPE_SETREGS
5699  #define AUTOCIRCULATE_TYPE_SDISTATS NTV2_TYPE_SDISTATS
5700  #endif // defined(NTV2_DEPRECATE_16_3)
5701 
5702  #define NTV2_IS_VALID_STRUCT_TYPE(_x_) ( (_x_) == NTV2_TYPE_ACSTATUS || \
5703  (_x_) == NTV2_TYPE_ACXFER || \
5704  (_x_) == NTV2_TYPE_ACXFERSTATUS || \
5705  (_x_) == NTV2_TYPE_ACTASK || \
5706  (_x_) == NTV2_TYPE_ACFRAMESTAMP || \
5707  (_x_) == NTV2_TYPE_GETREGS || \
5708  (_x_) == NTV2_TYPE_SETREGS || \
5709  (_x_) == NTV2_TYPE_SDISTATS || \
5710  (_x_) == NTV2_TYPE_BANKGETSET || \
5711  (_x_) == NTV2_TYPE_VIRTUAL_DATA_RW || \
5712  (_x_) == NTV2_TYPE_AJADEBUGLOGGING || \
5713  (_x_) == NTV2_TYPE_AJABUFFERLOCK || \
5714  (_x_) == NTV2_TYPE_AJABITSTREAM || \
5715  (_x_) == NTV2_TYPE_AJASTREAMCHANNEL || \
5716  (_x_) == NTV2_TYPE_AJASTREAMBUFFER || \
5717  (_x_) == NTV2_TYPE_AJAMAILBUFFER)
5718 
5719  // NTV2Buffer FLAGS
5720  #define NTV2Buffer_ALLOCATED BIT(0)
5721  #define NTV2Buffer_PAGE_ALIGNED BIT(1)
5722  #define NTV2Buffer_SHARED BIT(2)
5723  #define NTV2Buffer_SHARED_GLOBAL BIT(4)
5724 
5726  #define NTV2Buffer_TO_ULWORD64(__p__) ((sizeof(int*) == 4) ? (ULWord64(ULWord64(__p__) << 32) | 0x00000000BAADF00D) : ULWord64(__p__))
5727  #if !defined(NTV2_DEPRECATE_17_0)
5728  #define NTV2_POINTER_ALLOCATED NTV2Buffer_ALLOCATED
5729  #define NTV2_POINTER_PAGE_ALIGNED NTV2Buffer_PAGE_ALIGNED
5730  #define NTV2_POINTER_TO_ULWORD64(_p_) NTV2Buffer_TO_ULWORD64(_p_)
5731  #endif // defined(NTV2_DEPRECATE_17_0)
5732 
5733 
5734  // AUTOCIRCULATE OPTION FLAGS
5735  #define AUTOCIRCULATE_WITH_RP188 BIT(0)
5736  #define AUTOCIRCULATE_WITH_LTC BIT(1)
5737  #define AUTOCIRCULATE_WITH_FBFCHANGE BIT(2)
5738  #define AUTOCIRCULATE_WITH_FBOCHANGE BIT(3)
5739  #define AUTOCIRCULATE_WITH_COLORCORRECT BIT(4)
5740  #define AUTOCIRCULATE_WITH_VIDPROC BIT(5)
5741  #define AUTOCIRCULATE_WITH_ANC BIT(6)
5742  #define AUTOCIRCULATE_WITH_AUDIO_CONTROL BIT(7)
5743  #define AUTOCIRCULATE_WITH_FIELDS BIT(8)
5744  #define AUTOCIRCULATE_WITH_HDMIAUX BIT(9)
5745  #define AUTOCIRCULATE_WITH_MULTILINK_AUDIO1 BIT(10)
5746  #define AUTOCIRCULATE_WITH_MULTILINK_AUDIO2 BIT(11)
5747  #define AUTOCIRCULATE_WITH_MULTILINK_AUDIO3 BIT(12)
5748 
5749  #define AUTOCIRCULATE_FRAME_FULL BIT(20)
5750  #define AUTOCIRCULATE_FRAME_FIELD0 BIT(21)
5751  #define AUTOCIRCULATE_FRAME_FIELD1 BIT(22)
5752 
5753  #define AUTOCIRCULATE_P2P_PREPARE BIT(28)
5754  #define AUTOCIRCULATE_P2P_COMPLETE BIT(29)
5755  #define AUTOCIRCULATE_P2P_TARGET BIT(30)
5756  #define AUTOCIRCULATE_P2P_TRANSFER BIT(31)
5757 
5758  #define DMABUFFERLOCK_LOCK BIT(0)
5759  #define DMABUFFERLOCK_UNLOCK_ALL BIT(1)
5760  #define DMABUFFERLOCK_MAP BIT(2)
5761  #define DMABUFFERLOCK_UNLOCK BIT(3)
5762  #define DMABUFFERLOCK_AUTO BIT(4)
5763  #define DMABUFFERLOCK_MANUAL BIT(5)
5764  #define DMABUFFERLOCK_MAX_SIZE BIT(6)
5765  #define DMABUFFERLOCK_RDMA BIT(7)
5766 
5767  // Bitstream flags
5768  #define BITSTREAM_WRITE BIT(0)
5769  #define BITSTREAM_FRAGMENT BIT(1)
5770  #define BITSTREAM_SWAP BIT(2)
5771  #define BITSTREAM_RESET_CONFIG BIT(3)
5772  #define BITSTREAM_RESET_MODULE BIT(4)
5773  #define BITSTREAM_READ_REGISTERS BIT(5)
5774  #define BITSTREAM_SUSPEND BIT(6)
5775  #define BITSTREAM_RESUME BIT(7)
5776 
5777  // Bitstream registers
5778  #define BITSTREAM_EXT_CAP 0
5779  #define BITSTREAM_VENDOR_HEADER 1
5780  #define BITSTREAM_JTAG_ID 2
5781  #define BITSTREAM_VERSION 3
5782  #define BITSTREAM_MCAP_STATUS 4
5783  #define BITSTREAM_MCAP_CONTROL 5
5784  #define BITSTREAM_MCAP_DATA 6
5785  #define BITSTREAM_NUM_REGISTERS 7
5786 
5787  #if !defined (NTV2_BUILDING_DRIVER)
5788  // Convenience macros for compactly formatting ostream output...
5789  #define Hex(__x__) std::hex << (__x__) << std::dec
5790  #define xHex(__x__) "0x" << Hex(__x__)
5791  #define HexN(__x__,__n__) std::hex << std::setw(int(__n__)) << (__x__) << std::dec
5792  #define xHexN(__x__,__n__) "0x" << HexN((__x__),(__n__))
5793  #define Hex0N(__x__,__n__) std::hex << std::setw(int(__n__)) << std::setfill('0') << (__x__) << std::dec << std::setfill(' ')
5794  #define xHex0N(__x__,__n__) "0x" << Hex0N((__x__),(__n__))
5795  #define HEX(__x__) std::hex << std::uppercase << (__x__) << std::dec << std::nouppercase
5796  #define xHEX(__x__) "0x" << HEX(__x__)
5797  #define HEXN(__x__,__n__) std::hex << std::uppercase << std::setw(int(__n__)) << (__x__) << std::dec << std::nouppercase
5798  #define xHEXN(__x__,__n__) "0x" << HEXN((__x__),(__n__))
5799  #define HEX0N(__x__,__n__) std::hex << std::uppercase << std::setw(int(__n__)) << std::setfill('0') << (__x__) << std::dec << std::setfill(' ') << std::nouppercase
5800  #define xHEX0N(__x__,__n__) "0x" << HEX0N((__x__),(__n__))
5801  #define DEC(__x__) std::dec << std::right << (int(__x__))
5802  #define DECN(__x__,__n__) std::dec << std::setw(int(__n__)) << std::right << (__x__)
5803  #define DEC0N(__x__,__n__) std::dec << std::setw(int(__n__)) << std::setfill('0') << std::right << (__x__) << std::dec << std::setfill(' ')
5804  #define OCT(__x__) std::oct << (__x__) << std::dec
5805  #define OCT0N(__x__,__n__) std::oct << std::setw(int(__n__)) << std::setfill('0') << (__x__) << std::dec << std::setfill(' ')
5806  #define oOCT(__x__) "o" << std::oct << (__x__) << std::dec
5807  #define oOCT0N(__x__,__n__) "o" << std::oct << std::setw(int(__n__)) << std::setfill('0') << (__x__) << std::dec << std::setfill(' ')
5808  #define BIN064(__x__) std::bitset<8>((uint64_t(__x__)&0xFF00000000000000)>>56) << "." \
5809  << std::bitset<8>((uint64_t(__x__)&0x00FF000000000000)>>48) << "." \
5810  << std::bitset<8>((uint64_t(__x__)&0x0000FF0000000000)>>40) << "." \
5811  << std::bitset<8>((uint64_t(__x__)&0x000000FF00000000)>>32) << "." \
5812  << std::bitset<8>((uint64_t(__x__)&0x00000000FF000000)>>24) << "." \
5813  << std::bitset<8>((uint64_t(__x__)&0x0000000000FF0000)>>16) << "." \
5814  << std::bitset<8>((uint64_t(__x__)&0x000000000000FF00)>>8) << "." \
5815  << std::bitset<8>( uint64_t(__x__)&0x00000000000000FF)
5816  #define BIN032(__x__) std::bitset<8>((uint32_t(__x__)&0xFF000000)>>24) << "." \
5817  << std::bitset<8>((uint32_t(__x__)&0x00FF0000)>>16) << "." \
5818  << std::bitset<8>((uint32_t(__x__)&0x0000FF00)>>8) << "." \
5819  << std::bitset<8>( uint32_t(__x__)&0x000000FF)
5820  #define BIN016(__x__) std::bitset<8>((uint16_t(__x__)&0xFF00)>>8) << "." \
5821  << std::bitset<8>( uint16_t(__x__)&0x00FF)
5822  #define BIN012(__x__) std::bitset<12>((uint16_t(__x__)&0x0FFF))
5823  #define BIN010(__x__) std::bitset<10>((uint16_t(__x__)&0x03FF))
5824  #define BIN08(__x__) std::bitset<8>(uint8_t(__x__))
5825  #define BIN04(__x__) std::bitset<4>(uint8_t(__x__))
5826  #define BIN0N(__x__,__n__) std::bitset<__n__>(uint8_t(__x__))
5827  #define bBIN064(__x__) "b" << BIN064(__x__)
5828  #define bBIN032(__x__) "b" << BIN032(__x__)
5829  #define bBIN016(__x__) "b" << BIN016(__x__)
5830  #define bBIN012(__x__) "b" << BIN012(__x__)
5831  #define bBIN010(__x__) "b" << BIN010(__x__)
5832  #define bBIN08(__x__) "b" << BIN08(__x__)
5833  #define bBIN04(__x__) "b" << BIN04(__x__)
5834  #define bBIN0N(__x__,__n__) "b" << BIN0N(__x__,__n__)
5835  #define fDEC(__x__,__w__,__p__) std::dec << std::fixed << std::setw(__w__) << std::setprecision(__p__) << (__x__)
5836  #endif // !defined (NTV2_BUILDING_DRIVER)
5837 
5838 
5839  #if defined (AJAMac)
5840  #pragma pack (push, 4)
5841  #endif // defined (AJAMac)
5842 
5843 
5849  #if !defined (NTV2_BUILDING_DRIVER)
5850  // Member Functions
5851 
5857  explicit inline NTV2FrameSize (const ULWord inWidth = 0, const ULWord inHeight = 0) {set (inWidth, inHeight);}
5858  explicit inline NTV2FrameSize (const NTV2FrameGeometry inFG) {set(FGWidth(inFG), FGHeight(inFG));}
5859  inline ULWord width (void) const {return mWidth;}
5860  inline ULWord height (void) const {return mHeight;}
5861  inline bool isValid (void) const {return magnitude() > 0;}
5862  inline bool operator == (const NTV2FrameSize & rhs) const {return magnitude() == rhs.magnitude();}
5863  inline bool operator < (const NTV2FrameSize & rhs) const {return magnitude() < rhs.magnitude();}
5864  inline operator bool() const {return isValid();}
5865  operator NTV2FrameGeometry() const;
5866 
5872  inline NTV2FrameSize & setWidth (const ULWord inValue) {mWidth = inValue; return *this;}
5873 
5879  inline NTV2FrameSize & setHeight (const ULWord inValue) {mHeight = inValue; return *this;}
5880 
5887  inline NTV2FrameSize & set (const ULWord inWidth, const ULWord inHeight) {return setWidth(inWidth).setHeight(inHeight);}
5888 
5894  inline NTV2FrameSize & operator = (const NTV2FrameGeometry & rhs) {return set(FGWidth(rhs), FGHeight(rhs));}
5895 
5900  inline NTV2FrameSize & reset (void) {return set (0, 0);}
5901 
5906  inline NTV2FrameSize & swap (void) {return set (height(), width());}
5907 
5908  #if !defined(NTV2_DEPRECATE_17_5)
5909  inline ULWord NTV2_DEPRECATED_17_5(GetWidth (void) const) {return width();}
5910  inline ULWord NTV2_DEPRECATED_17_5(GetHeight (void) const) {return height();}
5911  inline ULWord NTV2_DEPRECATED_17_5(Width (void) const) {return width();}
5912  inline ULWord NTV2_DEPRECATED_17_5(Height (void) const) {return height();}
5913  inline bool NTV2_DEPRECATED_17_5(IsValid (void) const) {return isValid();}
5914  inline NTV2FrameSize & NTV2_DEPRECATED_17_5(SetWidth (const ULWord v)) {return setWidth(v);}
5915  inline NTV2FrameSize & NTV2_DEPRECATED_17_5(SetHeight (const ULWord v)) {return setHeight(v);}
5916  inline NTV2FrameSize & NTV2_DEPRECATED_17_5(Set (const ULWord w, const ULWord h)) {return set(w,h);}
5917  inline NTV2FrameSize & NTV2_DEPRECATED_17_5(Reset (void)) {return reset();}
5918  #endif // !defined(NTV2_DEPRECATE_17_5)
5919 
5920  static ULWord FGWidth (const NTV2FrameGeometry fg);
5921  static ULWord FGHeight (const NTV2FrameGeometry fg);
5922 
5924  inline uint64_t magnitude(void) const {return (uint64_t(width()) << 32) | uint64_t(height());}
5925  typedef std::map<NTV2FrameGeometry, ULWord> FGSizesMap;
5926  typedef FGSizesMap::const_iterator FGSizesMapCI;
5928  #endif // !defined (NTV2_BUILDING_DRIVER)
5929 
5931  ULWord mWidth;
5932  ULWord mHeight;
5935  #if !defined(NTV2_DEPRECATE_17_5)
5937  #endif // !defined(NTV2_DEPRECATE_17_5)
5938 
5959  #if !defined (NTV2_BUILDING_DRIVER)
5960 
5964  : mFlags (0),
5965  mNumSegments (0),
5966  mElementsPerSegment (0),
5967  mInitialSrcOffset (0),
5968  mInitialDstOffset (0),
5969  mSrcElementsPerRow (0),
5970  mDstElementsPerRow (0) {setElementLength(1);}
5971 
5975  inline bool isValid (void) const {return getSegmentCount() && getSegmentLength() ? true : false;}
5977  inline ULWord getSegmentCount (void) const {return mNumSegments;}
5978  inline ULWord getSegmentLength (void) const {return mElementsPerSegment;}
5979  inline ULWord getSourceOffset (void) const {return mInitialSrcOffset;}
5980  inline ULWord getDestOffset (void) const {return mInitialDstOffset;}
5981  inline ULWord getSourcePitch (void) const {return mSrcElementsPerRow;}
5982  inline ULWord getDestPitch (void) const {return mDstElementsPerRow;}
5983 
5988  inline ULWord getElementLength (void) const {return ULWord(1 << (mFlags & 3));}
5990  inline bool isSourceBottomUp (void) const {return mFlags & BIT(8) ? true : false;}
5991  inline bool isSourceTopDown (void) const {return mFlags & BIT(8) ? false : true;}
5992  inline bool isDestBottomUp (void) const {return mFlags & BIT(9) ? true : false;}
5993  inline bool isDestTopDown (void) const {return mFlags & BIT(9) ? false : true;}
5994  inline ULWord getTotalElements (void) const {return getSegmentCount() * getSegmentLength();}
5995  inline ULWord getTotalBytes (void) const {return getTotalElements() * getElementLength();}
5996 
6000  inline ULWord getSourceEndOffset (void) const // New in SDK 16.0
6001  {return getSourceOffset() + getSourcePitch() * getSegmentCount() + getSegmentLength();}
6002 
6006  inline ULWord getDestEndOffset (void) const // New in SDK 16.0
6007  {return getDestOffset() + getDestPitch() * getSegmentCount() + getSegmentLength();}
6008 
6015  std::ostream & Print (std::ostream & inStrm, const bool inDumpSegments = false) const;
6016 
6022  std::string getSourceCode (const bool inInclDecl = true) const; // New in SDK 16.0
6023 
6028  bool containsElementAtOffset (const ULWord inElementOffset) const; // New in SDK 16.0
6029 
6035  bool operator != (const NTV2SegmentedXferInfo & inRHS) const; // New in SDK 16.0
6036 
6042  inline bool operator == (const NTV2SegmentedXferInfo & inRHS) const {return !(*this != inRHS);} // New in SDK 16.0
6044 
6048 
6050  NTV2SegmentedXferInfo & reset (void);
6051 
6058  inline NTV2SegmentedXferInfo & setSegmentInfo (const ULWord inNumSegs, const ULWord inSegLength)
6059  {return setSegmentCount(inNumSegs).setSegmentLength(inSegLength);}
6060 
6066  inline NTV2SegmentedXferInfo & setSegmentCount (const ULWord inNumSegments)
6067  {mNumSegments = inNumSegments; return *this;}
6068 
6074  inline NTV2SegmentedXferInfo & setSegmentLength (const ULWord inNumElements)
6075  {mElementsPerSegment = inNumElements; return *this;}
6076 
6083  inline NTV2SegmentedXferInfo & setSourceInfo (const ULWord inOffset, const ULWord inPitch)
6084  {return setSourceOffset(inOffset).setSourcePitch(inPitch);}
6085 
6092  {mInitialSrcOffset = inOffset; return *this;}
6093 
6100  {mSrcElementsPerRow = inPitch; return *this;}
6101 
6108  inline NTV2SegmentedXferInfo & setSourceDirection (const bool inTopDown)
6109  { mFlags &= ~(BIT(8)); // set top-down
6110  if (!inTopDown)
6111  mFlags |= BIT(8); // set bottom-up
6112  return *this;
6113  }
6120  inline NTV2SegmentedXferInfo & setSourceFlipped (const bool inFlipped = Direction_Flipped) {return setSourceDirection(inFlipped);}
6121 
6128  inline NTV2SegmentedXferInfo & setDestInfo (const ULWord inOffset, const ULWord inPitch)
6129  {return setDestOffset(inOffset).setDestPitch(inPitch);}
6130 
6136  inline NTV2SegmentedXferInfo & setDestOffset (const ULWord inOffset) {mInitialDstOffset = inOffset; return *this;}
6137 
6143  inline NTV2SegmentedXferInfo & setDestPitch (const ULWord inPitch) {mDstElementsPerRow = inPitch; return *this;}
6144 
6151  inline NTV2SegmentedXferInfo & setDestDirection (const bool inTopDown)
6152  { mFlags &= ~(BIT(9)); // set top-down
6153  if (!inTopDown)
6154  mFlags |= BIT(9); // set bottom-up
6155  return *this;
6156  }
6163  inline NTV2SegmentedXferInfo & setDestFlipped (const bool inFlipped = Direction_Flipped) {return setDestDirection(inFlipped);}
6164 
6171  inline NTV2SegmentedXferInfo & setElementLength (const ULWord inBytesPerElement)
6172  {
6173  if (inBytesPerElement && inBytesPerElement < 9)
6174  if (!(inBytesPerElement & (inBytesPerElement - 1))) // Power of 2?
6175  {
6176  ULWord num(inBytesPerElement), lengthBits(0);
6177  while (num >>= 1)
6178  lengthBits++;
6179  mFlags = (mFlags & ~3UL) | (lengthBits & 3UL);
6180  }
6181  return *this;
6182  }
6187  NTV2SegmentedXferInfo & swapSourceAndDestination (void); // New in SDK 16.0
6189 
6193  static const bool Direction_TopToBottom = true;
6195  static const bool Direction_TopDown = true;
6196  static const bool Direction_Normal = true;
6197  static const bool Direction_BottomToTop = false;
6198  static const bool Direction_BottomUp = false;
6199  static const bool Direction_Flipped = false;
6200  #endif // !defined (NTV2_BUILDING_DRIVER)
6202 
6204  ULWord mFlags;
6205  ULWord mNumSegments;
6206  ULWord mElementsPerSegment;
6207  ULWord mInitialSrcOffset;
6208  ULWord mInitialDstOffset;
6209  ULWord mSrcElementsPerRow;
6210  ULWord mDstElementsPerRow;
6213 
6214 
6252  ULWord64 fUserSpacePtr;
6253  ULWord fByteCount;
6254  ULWord fFlags;
6256  #if defined (AJAMac)
6257  ULWord64 fKernelSpacePtr;
6258  ULWord64 fIOMemoryDesc;
6259  ULWord64 fIOMemoryMap;
6260  #else
6261  //ULWord64 fKernelSpacePtr; ///< @brief Reserved -- New in SDK 17.5
6262  ULWord64 fKernelHandle;
6263  #endif
6265 
6266  #if !defined (NTV2_BUILDING_DRIVER)
6267 
6270 
6277  explicit NTV2Buffer (const void * pInUserPointer, const size_t inByteCount);
6278 
6286  NTV2Buffer (const size_t inByteCount = 0);
6287 
6292  explicit NTV2Buffer (const NTV2Buffer & inObj);
6293 
6297  ~NTV2Buffer ();
6299 
6303 
6307  inline void * GetHostPointer (void) const
6308  {
6309  if (sizeof(int*) == 4)
6310  return reinterpret_cast <void*>((fUserSpacePtr & 0xFFFFFFFF00000000) >> 32);
6311  else
6312  return reinterpret_cast <void*>(fUserSpacePtr);
6313  }
6314 
6319  inline ULWord64 GetRawHostPointer (void) const {return fUserSpacePtr;}
6320 
6324  inline size_t GetByteCount (void) const {return size_t(fByteCount);}
6325 
6330  inline bool IsAllocatedBySDK (void) const {return flags() & NTV2Buffer_ALLOCATED ? true : false;}
6331 
6336  inline bool IsProvidedByClient (void) const {return flags() & NTV2Buffer_ALLOCATED ? false : true;}
6337 
6341  inline bool IsPageAligned (void) const {return flags() & NTV2Buffer_PAGE_ALIGNED ? true : false;} // New in SDK 17.0
6342 
6346  inline bool IsNULL (void) const {return GetHostPointer() == AJA_NULL || GetByteCount() == 0;}
6347 
6351  inline operator bool() const {return !IsNULL();}
6352 
6356  inline operator size_t() const {return GetByteCount();} // New in SDK 16.0
6357 
6365  void * GetHostAddress (const ULWord inByteOffset, const bool inFromEnd = false) const;
6366 
6376  template<typename T> bool Find (const T & inValue, int & inOutIndex) const // New in SDK 16.0
6377  {
6378  const bool isAscending(inOutIndex >= 0);
6379  const int maxNdx(int(GetByteCount()) / sizeof(T));
6380  if (isAscending && inOutIndex >= maxNdx)
6381  return false; // Past end
6382  if (!isAscending && (1 - inOutIndex) >= maxNdx)
6383  return false; // Before start
6384  const T * pValues(*this);
6385  if (isAscending)
6386  {
6387  for (int ndx(inOutIndex); ndx < maxNdx; ndx++)
6388  if (pValues[ndx] == inValue)
6389  {inOutIndex = ndx; return true;}
6390  }
6391  else
6392  {
6393  const int minNdx(0 - maxNdx);
6394  for (int ndx(inOutIndex); ndx >= minNdx; ndx++)
6395  if (pValues[maxNdx + ndx] == inValue)
6396  {inOutIndex = ndx; return true;}
6397  }
6398  inOutIndex = 0;
6399  return false; // Not found
6400  }
6401 
6411  ULWordSet & Find (ULWordSet & outOffsets, const NTV2Buffer & inValue, const size_t inLimit = 0) const; // Originally FindAll before SDK 18.1
6412 
6419  bool IsContentEqual (const NTV2Buffer & inBuffer, const ULWord inByteOffset = 0, const ULWord inByteCount = 0xFFFFFFFF) const;
6420 
6429  bool NextDifference (const NTV2Buffer & inBuffer, ULWord & byteOffset) const;
6430 
6450  bool GetRingChangedByteRange (const NTV2Buffer & inBuffer, ULWord & outByteOffsetFirst, ULWord & outByteOffsetLast) const;
6452 
6456 
6467  bool Allocate (const size_t inByteCount, const bool inPageAligned = false);
6468 
6473  bool Deallocate (void);
6474 
6480  template<typename T> bool Fill (const T & inValue)
6481  {
6482  T* pT = reinterpret_cast<T*>(GetHostPointer());
6483  if (!pT)
6484  return false;
6485 
6486  const size_t bufferSize (GetByteCount() / sizeof(T));
6487  if (!bufferSize)
6488  return false;
6489 
6490  for (size_t i(0); i < bufferSize; i++)
6491  pT[i] = inValue;
6492  return true;
6493  }
6494 
6502  template<typename T> bool Fill (const T & inValue, const NTV2SegmentedXferInfo & inXferInfo)
6503  {
6504  if (!inXferInfo.isValid())
6505  return false;
6506  // Fill a temporary buffer to hold all the segment data...
6507  NTV2Buffer segData(inXferInfo.getElementLength() * inXferInfo.getSegmentCount() * inXferInfo.getSegmentLength());
6508  if (!segData.Fill(inValue))
6509  return false; // Fill failed
6510 
6511  // Copy the segment data into me...
6512  ULWord srcOffset (0);
6513  ULWord dstOffset (inXferInfo.getDestOffset() * inXferInfo.getElementLength());
6514  const ULWord dstPitch (inXferInfo.getDestPitch() * inXferInfo.getElementLength());
6515  const ULWord bytesPerSeg (inXferInfo.getSegmentLength() * inXferInfo.getElementLength());
6516  for (ULWord segNdx(0); segNdx < inXferInfo.getSegmentCount(); segNdx++)
6517  {
6518  const void * pSrc (segData.GetHostAddress(srcOffset));
6519  void * pDst (GetHostAddress(dstOffset));
6520  if (!pSrc) return false;
6521  if (!pDst) return false;
6522  if (dstOffset + bytesPerSeg > GetByteCount())
6523  return false; // memcpy will write past end
6524  ::memcpy (pDst, pSrc, bytesPerSeg);
6525  srcOffset += bytesPerSeg; // Bump src offset
6526  dstOffset += dstPitch; // Bump dst offset
6527  } // for each segment
6528  return true;
6529  }
6530 
6537  bool Truncate (const size_t inByteCount);
6538 
6543  NTV2Buffer & operator = (const NTV2Buffer & inRHS);
6544 
6555  bool Set (const void * pInUserPointer, const size_t inByteCount);
6556 
6568  bool SetAndFill (const void * pInUserPointer, const size_t inByteCount, const UByte inValue);
6569 
6577  bool SetFrom (const NTV2Buffer & inBuffer);
6578 
6588  bool SetFromHexString (const std::string & inStr);
6589 
6596  bool CopyFrom (const void * pInSrcBuffer, const ULWord inByteCount);
6597 
6608  bool CopyFrom (const NTV2Buffer & inSrcBuffer, const ULWord inSrcByteOffset, const ULWord inDstByteOffset, const ULWord inByteCount);
6609 
6617  bool CopyFrom (const NTV2Buffer & inSrcBuffer, const NTV2SegmentedXferInfo & inXferInfo);
6618 
6628  bool SwapWith (NTV2Buffer & inBuffer);
6629 
6635  bool ByteSwap64 (void); // New in SDK 16.0
6636 
6642  bool ByteSwap32 (void); // New in SDK 16.0
6643 
6649  bool ByteSwap16 (void); // New in SDK 16.0
6651 
6655 
6661  std::ostream & Print (std::ostream & inOutStream) const;
6662 
6667  std::string AsString (UWord inDumpMaxBytes = 0) const;
6668 
6676  std::string AsCode (const size_t inBytesPerWord = 4, const std::string & inVarName = "", const bool inUseSTL = false, const bool inByteSwap = false) const;
6677 
6686  bool toHexString (std::string & outStr, const size_t inLineBreakInterval = 0) const;
6687 
6708  std::ostream & Dump ( std::ostream & inOutputStream = std::cout,
6709  const size_t inStartByteOffset = 0,
6710  const size_t inByteCount = 0,
6711  const size_t inRadix = 16,
6712  const size_t inBytesPerGroup = 4,
6713  const size_t inGroupsPerLine = 8,
6714  const size_t inAddressRadix = 0,
6715  const bool inShowAscii = false,
6716  const size_t inAddrOffset = 0) const;
6717 
6739  std::string & Dump ( std::string & inOutputString,
6740  const size_t inStartByteOffset = 0,
6741  const size_t inByteCount = 0,
6742  const size_t inRadix = 16,
6743  const size_t inBytesPerGroup = 4,
6744  const size_t inGroupsPerLine = 8,
6745  const size_t inAddressRadix = 0,
6746  const bool inShowAscii = false,
6747  const size_t inAddrOffset = 0) const;
6749 
6753 
6757  template<typename T> operator const T*() const {return reinterpret_cast<const T*>(GetHostPointer());} // New in SDK 16.0
6758 
6762  template<typename T> operator T*() const {return reinterpret_cast<T*>(GetHostPointer());} // New in SDK 16.0
6763 
6774  NTV2Buffer & Segment (NTV2Buffer & outPtr, const ULWord inByteOffset, const ULWord inByteCount) const;
6775 
6782  inline uint8_t U8 (const int inIndex) const {const uint8_t* pVal(*this); return pVal[inIndex < 0 ? int(GetByteCount()) + inIndex : inIndex];} // New in SDK 16.0
6783 
6790  inline uint8_t & U8 (const int inIndex) {uint8_t* pVal(*this); return pVal[inIndex < 0 ? int(GetByteCount()) + inIndex : inIndex];} // New in SDK 16.0
6791 
6792  inline int8_t I8 (const int inIndex) const {const int8_t* pVal(*this); return pVal[inIndex < 0 ? int(GetByteCount()) + inIndex : inIndex];} // New in SDK 16.0
6793  inline int8_t & I8 (const int inIndex) {int8_t* pVal(*this); return pVal[inIndex < 0 ? int(GetByteCount()) + inIndex : inIndex];} // New in SDK 16.0
6794  inline uint16_t U16 (const int inIndex) const {const uint16_t* pVal(*this); return pVal[inIndex < 0 ? int(GetByteCount()/2) + inIndex : inIndex];} // New in SDK 16.0
6795  inline uint16_t & U16 (const int inIndex) {uint16_t* pVal(*this); return pVal[inIndex < 0 ? int(GetByteCount()/2) + inIndex : inIndex];} // New in SDK 16.0
6796  inline int16_t I16 (const int inIndex) const {const int16_t* pVal(*this); return pVal[inIndex < 0 ? int(GetByteCount()/2) + inIndex : inIndex];} // New in SDK 16.0
6797  inline int16_t & I16 (const int inIndex) {int16_t* pVal(*this); return pVal[inIndex < 0 ? int(GetByteCount()/2) + inIndex : inIndex];} // New in SDK 16.0
6798  inline uint32_t U32 (const int inIndex) const {const uint32_t* pVal(*this); return pVal[inIndex < 0 ? int(GetByteCount()/4) + inIndex : inIndex];} // New in SDK 16.0
6799  inline uint32_t & U32 (const int inIndex) {uint32_t* pVal(*this); return pVal[inIndex < 0 ? int(GetByteCount()/4) + inIndex : inIndex];} // New in SDK 16.0
6800  inline int32_t I32 (const int inIndex) const {const int32_t* pVal(*this); return pVal[inIndex < 0 ? int(GetByteCount()/4) + inIndex : inIndex];} // New in SDK 16.0
6801  inline int32_t & I32 (const int inIndex) {int32_t* pVal(*this); return pVal[inIndex < 0 ? int(GetByteCount()/4) + inIndex : inIndex];} // New in SDK 16.0
6802  inline uint64_t U64 (const int inIndex) const {const uint64_t* pVal(*this); return pVal[inIndex < 0 ? int(GetByteCount()/8) + inIndex : inIndex];} // New in SDK 16.0
6803  inline uint64_t & U64 (const int inIndex) {uint64_t* pVal(*this); return pVal[inIndex < 0 ? int(GetByteCount()/8) + inIndex : inIndex];} // New in SDK 16.0
6804  inline int64_t I64 (const int inIndex) const {const int64_t* pVal(*this); return pVal[inIndex < 0 ? int(GetByteCount()/8) + inIndex : inIndex];} // New in SDK 16.0
6805  inline int64_t & I64 (const int inIndex) {int64_t* pVal(*this); return pVal[inIndex < 0 ? int(GetByteCount()/8) + inIndex : inIndex];} // New in SDK 16.0
6806  inline float FL (const int inIndex) const {const float* pVal(*this); return pVal[inIndex < 0 ? int(GetByteCount()/sizeof(float)) + inIndex : inIndex];} // New in SDK 16.0
6807  inline float & FL (const int inIndex) {float* pVal(*this); return pVal[inIndex < 0 ? int(GetByteCount()/sizeof(float)) + inIndex : inIndex];} // New in SDK 16.0
6808  inline double DBL (const int inIndex) const {const double* pVal(*this); return pVal[inIndex < 0 ? int(GetByteCount()/sizeof(double)) + inIndex : inIndex];} // New in SDK 16.0
6809  inline double & DBL (const int inIndex) {double* pVal(*this); return pVal[inIndex < 0 ? int(GetByteCount()/sizeof(double)) + inIndex : inIndex];} // New in SDK 16.0
6811 
6815 
6830  bool GetU64s (ULWord64Sequence & outU64s, const size_t inU64Offset = 0, const size_t inMaxSize = 16, const bool inByteSwap = false) const;
6831 
6844  inline ULWord64Sequence GetU64s (const size_t inU64Offset = 0, const size_t inMaxSize = 16, const bool inByteSwap = false) const {ULWord64Sequence result; GetU64s(result, inU64Offset, inMaxSize, inByteSwap); return result;}
6845 
6860  bool GetU32s (ULWordSequence & outU32s, const size_t inU32Offset = 0, const size_t inMaxSize = 32, const bool inByteSwap = false) const;
6861 
6874  inline ULWordSequence GetU32s (const size_t inU32Offset = 0, const size_t inMaxSize = 32, const bool inByteSwap = false) const {ULWordSequence result; GetU32s(result, inU32Offset, inMaxSize, inByteSwap); return result;}
6875 
6890  bool GetU16s (UWordSequence & outU16s, const size_t inU16Offset = 0, const size_t inMaxSize = 64, const bool inByteSwap = false) const;
6891 
6904  inline UWordSequence GetU16s (const size_t inU16Offset = 0, const size_t inMaxSize = 64, const bool inByteSwap = false) const {UWordSequence result; GetU16s(result, inU16Offset, inMaxSize, inByteSwap); return result;}
6905 
6916  bool GetU8s (UByteSequence & outU8s, const size_t inU8Offset = 0, const size_t inMaxSize = 128) const;
6917 
6926  inline UByteSequence GetU8s (const size_t inU8Offset = 0, const size_t inMaxSize = 128) const {UByteSequence result; GetU8s(result, inU8Offset, inMaxSize); return result;}
6927 
6933  bool AppendU8s (UByteSequence & outU8s) const;
6934 
6946  bool GetString (std::string & outString, const size_t inU8Offset = 0, const size_t inMaxSize = 128) const;
6947 
6957  inline std::string GetString (const size_t inU8Offset = 0, const size_t inMaxSize = 128) const {std::string result; GetString(result, inU8Offset, inMaxSize); return result;}
6958 
6968  bool PutU64s (const ULWord64Sequence & inU64s, const size_t inU64Offset = 0, const bool inByteSwap = false);
6969 
6979  bool PutU32s (const ULWordSequence & inU32s, const size_t inU32Offset = 0, const bool inByteSwap = false);
6980 
6990  bool PutU16s (const UWordSequence & inU16s, const size_t inU16Offset = 0, const bool inByteSwap = false);
6991 
6999  bool PutU8s (const UByteSequence & inU8s, const size_t inU8Offset = 0);
7001 
7002  inline NTV2_DEPRECATED_18_1(ULWordSet & FindAll (ULWordSet & outOffsets, const NTV2Buffer & inValue) const) {return Find(outOffsets,inValue);} // New in SDK 16.3, renamed in SDK 18.1
7003 
7004  private:
7005  inline uint8_t flags (void) const {return uint8_t(fFlags);}
7006 
7007  public:
7011 
7015  static size_t DefaultPageSize (void);
7016 
7022  static bool SetDefaultPageSize (const size_t inNewSize);
7023 
7027  static size_t HostPageSize (void); // New in SDK 16.3
7029 
7031  #endif // user-space clients only
7033 
7034  #if !defined(NTV2_DEPRECATE_17_0)
7035  typedef NTV2Buffer NTV2_POINTER; // Renamed in SDK 17.0
7036  #endif // !defined(NTV2_DEPRECATE_17_0
7037 
7038 
7043  ULWord fDBB;
7044  ULWord fLo;
7045  ULWord fHi;
7046 
7047  #if defined (NTV2_BUILDING_DRIVER)
7048  #define NTV2_RP188_from_RP188_STRUCT(_n_,_r_) { (_n_).fDBB = (_r_).DBB; \
7049  (_n_).fLo = (_r_).Low; \
7050  (_n_).fHi = (_r_).High; }
7051 
7052  #define NTV2_RP188P_from_RP188_STRUCT(_np_,_r_) { (_np_)->fDBB = (_r_).DBB; \
7053  (_np_)->fLo = (_r_).Low; \
7054  (_np_)->fHi = (_r_).High; }
7055 
7056  #define RP188_STRUCT_from_NTV2_RP188(_r_,_n_) { (_r_).DBB = (_n_).fDBB; \
7057  (_r_).Low = (_n_).fLo; \
7058  (_r_).High = (_n_).fHi; }
7059 
7060  #define RP188_STRUCT_from_NTV2_RP188P(_r_,_np_) { (_r_).DBB = (_np_)->fDBB; \
7061  (_r_).Low = (_np_)->fLo; \
7062  (_r_).High = (_np_)->fHi; }
7063 
7064  #define NTV2_RP188_IS_VALID(_n_) ((_n_).fDBB != 0xFFFFFFFF || (_n_).fLo != 0xFFFFFFFF || (_n_).fHi != 0xFFFFFFFF)
7065  #else
7066 
7073  inline explicit NTV2_RP188 (const ULWord inDBB = 0xFFFFFFFF, const ULWord inLow = 0xFFFFFFFF, const ULWord inHigh = 0xFFFFFFFF) : fDBB (inDBB), fLo (inLow), fHi (inHigh) {}
7074 
7079  inline explicit NTV2_RP188 (const RP188_STRUCT & inOldRP188) : fDBB (inOldRP188.DBB), fLo (inOldRP188.Low), fHi (inOldRP188.High) {}
7080 
7084  inline bool IsValid (void) const {return fDBB != 0xFFFFFFFF || fLo != 0xFFFFFFFF || fHi != 0xFFFFFFFF;}
7085 
7091  inline NTV2_RP188 & operator = (const RP188_STRUCT & inRHS) {fDBB = inRHS.DBB; fLo = inRHS.Low; fHi = inRHS.High; return *this;}
7092 
7097  inline bool operator != (const RP188_STRUCT & inRHS) const {return fDBB != inRHS.DBB || fLo != inRHS.Low || fHi != inRHS.High;}
7098 
7105  inline void Set (const ULWord inDBB = 0xFFFFFFFF, const ULWord inLow = 0xFFFFFFFF, const ULWord inHigh = 0xFFFFFFFF) {fDBB = inDBB; fLo = inLow; fHi = inHigh;}
7106 
7111  inline operator RP188_STRUCT () const {RP188_STRUCT result; result.DBB = fDBB; result.Low = fLo; result.High = fHi; return result;}
7112 
7116  inline operator bool () const {return IsValid();}
7117 
7119  #endif // user-space clients only
7121 
7122  #if !defined (NTV2_BUILDING_DRIVER)
7123  typedef std::vector <NTV2_RP188> NTV2TimeCodeList;
7124  typedef NTV2TimeCodeList::const_iterator NTV2TimeCodeListConstIter;
7127  //typedef NTV2TimeCodeList::iterator NTV2TimeCodeListIter;
7128  typedef std::map <NTV2TCIndex, NTV2_RP188> NTV2TimeCodes;
7129  typedef NTV2TimeCodes::const_iterator NTV2TimeCodesConstIter;
7130 
7131  typedef std::set <NTV2TCIndex> NTV2TCIndexes, NTV2TCIndexSet;
7132  typedef NTV2TCIndexes::const_iterator NTV2TCIndexesConstIter, NTV2TCIndexSetConstIter;
7133 
7140  NTV2TimeCodeList & operator << (NTV2TimeCodeList & inOutList, const NTV2_RP188 & inRP188);
7141  #endif // !defined (NTV2_BUILDING_DRIVER)
7142 
7143 
7149  UWord mCRCTallyA;
7150  UWord mCRCTallyB;
7152  ULWord mUnlockTally;
7154  //ULWord64 mFrameTally; ///< @brief The number of frames that have been detected on the SDI input since this tally was last reset.
7155  ULWord64 mFrameRefClockCount;
7156  ULWord64 mGlobalClockCount;
7157  bool mFrameTRSError;
7158  bool mLocked;
7160  bool mVPIDValidA;
7162  bool mVPIDValidB;
7163  #if !defined (NTV2_BUILDING_DRIVER)
7164 
7167  explicit NTV2SDIInputStatus ();
7168 
7172  void Clear (void);
7173 
7179  std::ostream & Print (std::ostream & inOutStream) const;
7180  #endif // !defined (NTV2_BUILDING_DRIVER)
7182 
7183 
7184 
7190  bool mEnabled;
7191  bool mPixel420;
7192  NTV2HDMIColorSpace mColorSpace;
7193  NTV2HDMIRange mRGBRange;
7194  NTV2HDMIProtocol mProtocol;
7195  NTV2Standard mVideoStandard;
7196  NTV2FrameRate mVideoRate;
7197  NTV2HDMIBitDepth mVideoBitDepth;
7198  NTV2AudioFormat mAudioFormat;
7199  NTV2AudioRate mAudioRate;
7200  NTV2HDMIAudioChannels mAudioChannels;
7201  #if !defined (NTV2_BUILDING_DRIVER)
7202 
7205  explicit NTV2HDMIOutputStatus () {Clear();}
7206 
7211  explicit NTV2HDMIOutputStatus (const ULWord inData) {Clear(); SetFromRegValue(inData);}
7212 
7213  void Clear (void);
7214 
7220  bool SetFromRegValue (const ULWord inData);
7221 
7227  std::ostream & Print (std::ostream & inOutStream) const;
7228  #endif // !defined (NTV2_BUILDING_DRIVER)
7229  NTV2_STRUCT_END (NTV2HMDIOutputStatus)
7230 
7231 
7232 
7238  ULWord fHeaderTag;
7239  ULWord fType;
7240  ULWord fHeaderVersion;
7241  ULWord fVersion;
7242  ULWord fSizeInBytes;
7243  ULWord fPointerSize;
7244  ULWord fOperation;
7245  ULWord fResultStatus;
7247 
7248  #if !defined (NTV2_BUILDING_DRIVER)
7249 
7254  explicit NTV2_HEADER (const ULWord inStructureType, const ULWord inSizeInBytes);
7255 
7256  inline ULWord GetSizeInBytes (void) const {return fSizeInBytes;}
7257  inline ULWord GetTag (void) const {return fHeaderTag;} // New in SDK 16.3
7258  inline ULWord GetType (void) const {return fType;} // New in SDK 16.3
7259  inline ULWord GetHeaderVersion (void) const {return fHeaderVersion;} // New in SDK 16.3
7260  inline ULWord GetVersion (void) const {return fVersion;} // New in SDK 16.3
7261  inline ULWord GetPointerSize (void) const {return fPointerSize;} // New in SDK 16.3
7262  inline ULWord GetConnectionID (void) const {return fOperation;} // New in SDK 16.3
7263  inline void SetConnectionID (const ULWord inValue) {fOperation = inValue;} // New in SDK 16.3
7264  inline ULWord GetResultStatus (void) const {return fResultStatus;} // New in SDK 17.5
7265 
7271  std::ostream & Print (std::ostream & inOutStream) const;
7272 
7276  inline bool IsValid (void) const {return NTV2_IS_VALID_HEADER_TAG(fHeaderTag) && NTV2_IS_VALID_STRUCT_TYPE(fType);}
7277 
7278  inline void ClearResultStatus (void) {fResultStatus = 0;} // New in SDK 17.5
7279 
7280  static std::string FourCCToString (const ULWord in4CC);
7281 
7283  #endif // user-space clients only
7285 
7286 
7287 
7292  ULWord fTrailerVersion;
7293  ULWord fTrailerTag;
7294 
7295  #if !defined (NTV2_BUILDING_DRIVER)
7296  explicit NTV2_TRAILER ();
7297 
7301  inline bool IsValid (void) const {return NTV2_IS_VALID_TRAILER_TAG (fTrailerTag);}
7302 
7304  #endif // user-space clients only
7306 
7307 
7308 
7332  ULWord acNumSegments;
7333  ULWord acNumActiveBytesPerRow;
7335  ULWord acSegmentHostPitch;
7336  ULWord acSegmentDevicePitch;
7338 
7340  #if !defined (NTV2_BUILDING_DRIVER)
7341 
7344  explicit NTV2SegmentedDMAInfo ();
7345 
7353  explicit NTV2SegmentedDMAInfo (const ULWord inNumSegments, const ULWord inNumActiveBytesPerRow, const ULWord inHostBytesPerRow, const ULWord inDeviceBytesPerRow);
7354 
7363  void Set (const ULWord inNumSegments, const ULWord inNumActiveBytesPerRow, const ULWord inHostBytesPerRow, const ULWord inDeviceBytesPerRow);
7364 
7368  void Reset (void);
7369 
7373  inline ULWord GetSegmentCount (void) const {return acNumSegments;}
7374 
7378  inline bool IsSegmented (void) const {return GetSegmentCount() > 1;}
7379 
7381  #endif // user-space clients only
7383 
7384 
7385 
7391  ULWord ccSaturationValue;
7392 
7398  NTV2Buffer ccLookupTables;
7399 
7400  #if !defined (NTV2_BUILDING_DRIVER)
7401 
7404  explicit NTV2ColorCorrectionData ();
7405 
7410 
7414  void Clear (void);
7415 
7419  inline bool IsActive (void) const {return NTV2_IS_ACTIVE_COLOR_CORRECTION_MODE (ccMode) && ccLookupTables.GetHostPointer ();}
7420 
7429  bool Set (const NTV2ColorCorrectionMode inMode, const ULWord inSaturation, const void * pInTableData);
7430 
7432 
7434  inline explicit NTV2ColorCorrectionData (const NTV2ColorCorrectionData & inObj) : ccLookupTables (0) {(void) inObj;}
7435  inline NTV2ColorCorrectionData & operator = (const NTV2ColorCorrectionData & inRHS) {(void) inRHS; return *this;}
7437  #endif // user-space clients only
7439 
7440 
7441 
7446  NTV2_HEADER acHeader;
7447  NTV2Crosspoint acCrosspoint;
7449  LWord acStartFrame;
7450  LWord acEndFrame;
7451  LWord acActiveFrame;
7452  ULWord64 acRDTSCStartTime;
7453  ULWord64 acAudioClockStartTime;
7454  ULWord64 acRDTSCCurrentTime;
7455  ULWord64 acAudioClockCurrentTime;
7456  ULWord acFramesProcessed;
7457  ULWord acFramesDropped;
7458  ULWord acBufferLevel;
7459  ULWord acOptionFlags;
7460  NTV2AudioSystem acAudioSystem;
7461  NTV2_TRAILER acTrailer;
7462 
7463  #if !defined (NTV2_BUILDING_DRIVER)
7464 
7467  explicit AUTOCIRCULATE_STATUS (const NTV2Crosspoint inCrosspoint = NTV2CROSSPOINT_CHANNEL1);
7468 
7474  bool CopyTo (AUTOCIRCULATE_STATUS_STRUCT & outOldStruct);
7475 
7481  bool CopyFrom (const AUTOCIRCULATE_STATUS_STRUCT & inOldStruct);
7482 
7486  void Clear (void);
7487 
7491  inline ULWord GetFrameCount (void) const {return IsStopped() ? 0 : ULWord (acEndFrame - acStartFrame + 1);}
7492 
7496  inline ULWord GetDroppedFrameCount (void) const {return acFramesDropped;}
7497 
7501  inline ULWord GetProcessedFrameCount (void) const {return acFramesProcessed;}
7502 
7506  inline ULWord GetBufferLevel (void) const {return acBufferLevel;}
7507 
7511  inline ULWord GetNumAvailableOutputFrames (void) const {return GetFrameCount () > GetBufferLevel() ? GetFrameCount () - GetBufferLevel() : 0;}
7512 
7516  inline bool CanAcceptMoreOutputFrames (void) const {return GetNumAvailableOutputFrames () > 1;}
7517 
7555  inline bool HasAvailableInputFrame (void) const {return GetBufferLevel() > 1;}
7556 
7560  inline LWord GetActiveFrame (void) const {return acActiveFrame;}
7561 
7565  inline uint16_t GetStartFrame (void) const {return uint16_t(acStartFrame);}
7566 
7570  inline uint16_t GetEndFrame (void) const {return uint16_t(acEndFrame);}
7571 
7575  inline NTV2AutoCirculateState GetState (void) const {return acState;}
7576 
7580  inline NTV2AudioSystem GetAudioSystem (void) const {return acAudioSystem;}
7581 
7585  inline bool IsRunning (void) const {return GetState () == NTV2_AUTOCIRCULATE_RUNNING;}
7586 
7590  inline bool IsStarting (void) const {return GetState () == NTV2_AUTOCIRCULATE_STARTING || GetState () == NTV2_AUTOCIRCULATE_STARTING_AT_TIME;}
7591 
7595  inline bool IsStopped (void) const {return GetState () == NTV2_AUTOCIRCULATE_DISABLED;}
7596 
7600  inline bool IsStopping (void) const {return GetState () == NTV2_AUTOCIRCULATE_STOPPING;}
7601 
7605  inline bool IsPaused (void) const {return GetState () == NTV2_AUTOCIRCULATE_PAUSED;}
7606 
7610  inline bool WithAudio (void) const {return NTV2_IS_VALID_AUDIO_SYSTEM (GetAudioSystem ());}
7611 
7615  inline ULWord OptionFlags (void) const {return acOptionFlags;} // New in SDK 16.0
7616 
7620  inline bool WithCustomAnc (void) const {return OptionFlags() & AUTOCIRCULATE_WITH_ANC;} // New in SDK 16.0
7621 
7625  inline bool WithRP188 (void) const {return OptionFlags() & AUTOCIRCULATE_WITH_RP188;} // New in SDK 16.0
7626 
7630  inline bool WithLTC (void) const {return OptionFlags() & AUTOCIRCULATE_WITH_LTC;} // New in SDK 16.0
7631 
7635  inline bool WithFBFChange (void) const {return OptionFlags() & AUTOCIRCULATE_WITH_FBFCHANGE;} // New in SDK 16.0
7636 
7640  inline bool WithFBOChange (void) const {return OptionFlags() & AUTOCIRCULATE_WITH_FBOCHANGE;} // New in SDK 16.0
7641 
7645  inline bool WithColorCorrect (void) const {return OptionFlags() & AUTOCIRCULATE_WITH_COLORCORRECT;} // New in SDK 16.0
7646 
7650  inline bool WithVidProc (void) const {return OptionFlags() & AUTOCIRCULATE_WITH_VIDPROC;} // New in SDK 16.0
7651 
7655  inline bool IsFieldMode (void) const {return OptionFlags() & AUTOCIRCULATE_WITH_FIELDS;} // New in SDK 16.0
7656 
7660  inline bool WithHDMIAuxData (void) const {return OptionFlags() & AUTOCIRCULATE_WITH_HDMIAUX;} // New in SDK 16.0
7661 
7665  inline bool IsInput (void) const {return NTV2_IS_INPUT_CROSSPOINT(acCrosspoint);}
7666 
7670  inline bool IsOutput (void) const {return NTV2_IS_OUTPUT_CROSSPOINT(acCrosspoint);}
7671 
7675  inline NTV2Mode GetMode (void) const {return IsStopped() ? NTV2_MODE_INVALID : (IsInput() ? NTV2_MODE_INPUT : NTV2_MODE_OUTPUT);} // New in SDK 15.5
7676 
7680  NTV2Channel GetChannel (void) const;
7681 
7686  std::string operator [] (const unsigned inIndexNum) const;
7687 
7691  inline operator NTV2_HEADER*() {return reinterpret_cast<NTV2_HEADER*>(this);} // New in SDK 16.3
7692 
7694  NTV2_IS_STRUCT_VALID_IMPL(acHeader,acTrailer)
7695  #endif // user-space clients only
7697 
7698 
7699  #if !defined (NTV2_BUILDING_DRIVER)
7704 
7710 
7717  NTV2RegisterNumberSet & operator << (NTV2RegisterNumberSet & inOutSet, const ULWord inRegisterNumber);
7718 
7719  typedef std::map <ULWord, ULWord> NTV2RegisterValueMap;
7720  typedef NTV2RegisterValueMap::const_iterator NTV2RegValueMapConstIter;
7721  typedef NTV2RegisterValueMap::iterator NTV2RegValueMapIter;
7722  #endif // !defined (NTV2_BUILDING_DRIVER)
7723 
7724 
7730  NTV2_STRUCT_BEGIN (NTV2GetRegisters) // NTV2_TYPE_GETREGS
7732  NTV2_HEADER mHeader;
7733  ULWord mInNumRegisters;
7734  NTV2Buffer mInRegisters;
7735  ULWord mOutNumRegisters;
7736  NTV2Buffer mOutGoodRegisters;
7737  NTV2Buffer mOutValues;
7738  NTV2_TRAILER mTrailer;
7740 
7741  #if !defined (NTV2_BUILDING_DRIVER)
7742 
7747  explicit NTV2GetRegisters (const NTV2RegNumSet & inRegisterNumbers = NTV2RegNumSet());
7748 
7753  explicit NTV2GetRegisters (NTV2RegisterReads & inRegReads);
7754 
7759  bool ResetUsing (const NTV2RegNumSet & inRegisterNumbers);
7760 
7766  inline bool ResetUsing (const NTV2RegisterReads & inRegReads) {return ResetUsing(::GetRegisterNumbers(inRegReads));}
7767 
7773  bool GetGoodRegisters (NTV2RegNumSet & outGoodRegNums) const;
7774 
7780  bool GetRegisterValues (NTV2RegisterValueMap & outValues) const;
7781 
7789  bool GetRegisterValues (NTV2RegisterReads & inOutValues) const;
7790 
7796  bool GetRequestedRegisterNumbers (NTV2RegNumSet & outRegNums) const; // New in SDK 16.3
7797 
7803  bool GetBadRegisters (NTV2RegNumSet & outBadRegNums) const; // New in SDK 16.3
7804 
7811  bool PatchRegister (const ULWord inRegNum, const ULWord inValue); // New in SDK 17.0
7812 
7818  std::ostream & Print (std::ostream & inOutStream) const;
7819 
7823  inline operator NTV2_HEADER*() {return reinterpret_cast<NTV2_HEADER*>(this);} // New in SDK 16.3
7824 
7825  inline ULWord numRegisters (void) const {return mInNumRegisters;} // New in SDK 18.0
7826  inline const NTV2Buffer & requestedRegisterNumbers (void) const {return mInRegisters;} // New in SDK 18.0
7827  inline ULWord & outNumRegisters (void) {return mOutNumRegisters;} // New in SDK 18.0
7828  inline NTV2Buffer & outGoodRegisterNumbers (void) {return mOutGoodRegisters;} // New in SDK 18.0
7829  inline NTV2Buffer & outRegisterValues (void) {return mOutValues;} // New in SDK 18.0
7830 
7832  NTV2_IS_STRUCT_VALID_IMPL(mHeader,mTrailer)
7833 
7835  inline explicit NTV2GetRegisters (const NTV2GetRegisters & inObj) : mHeader(0xFEFEFEFE, 0), mInRegisters(0), mOutGoodRegisters(0), mOutValues(0)
7836  {(void) inObj;}
7837  inline NTV2GetRegisters & operator = (const NTV2GetRegisters & inRHS) {(void) inRHS; return *this;}
7839 
7840  #endif // !defined (NTV2_BUILDING_DRIVER)
7842 
7843 
7844 
7849  NTV2_STRUCT_BEGIN (NTV2SetRegisters) // NTV2_TYPE_SETREGS
7850  NTV2_HEADER mHeader;
7851  ULWord mInNumRegisters;
7852  NTV2Buffer mInRegInfos;
7853  ULWord mOutNumFailures;
7854  NTV2Buffer mOutBadRegIndexes;
7855  NTV2_TRAILER mTrailer;
7856 
7857  #if !defined (NTV2_BUILDING_DRIVER)
7858 
7863  NTV2SetRegisters (const NTV2RegWrites & inRegWrites = NTV2RegWrites());
7864 
7870  bool ResetUsing (const NTV2RegWrites & inRegWrites);
7871 
7877  bool GetFailedRegisterWrites (NTV2RegWrites & outFailedRegWrites) const;
7878 
7882  inline operator NTV2_HEADER*() {return reinterpret_cast<NTV2_HEADER*>(this);} // New in SDK 16.3
7883 
7884  inline ULWord GetRequestedRegisterCount (void) const {return mInNumRegisters;} // New in SDK 16.3
7885  bool GetRequestedRegisterWrites (NTV2RegWrites & outRegWrites) const; // New in SDK 16.3
7886  inline ULWord GetNumFailedWrites (void) const {return mOutNumFailures;} // New in SDK 16.3
7887 
7893  std::ostream & Print (std::ostream & inOutStream) const;
7894 
7895  inline const NTV2Buffer & regInfos (void) const {return mInRegInfos;} // New in SDK 18.0
7896  inline ULWord & outNumFailures (void) {return mOutNumFailures;} // New in SDK 18.0
7897  inline NTV2Buffer & outBadRegIndexes (void) {return mOutBadRegIndexes;} // New in SDK 18.0
7898 
7900  NTV2_IS_STRUCT_VALID_IMPL(mHeader,mTrailer)
7901 
7903  inline explicit NTV2SetRegisters (const NTV2SetRegisters & inObj) : mHeader(0xFEFEFEFE, 0), mInNumRegisters(0), mInRegInfos(0), mOutNumFailures(0), mOutBadRegIndexes(0)
7904  {(void) inObj;}
7905  inline NTV2SetRegisters & operator = (const NTV2SetRegisters & inRHS) {(void) inRHS; return *this;}
7907 
7908  #endif // !defined (NTV2_BUILDING_DRIVER)
7910 
7911 
7912 
7916  NTV2_STRUCT_BEGIN (NTV2BankSelGetSetRegs) // NTV2_TYPE_BANKGETSET
7917  NTV2_HEADER mHeader;
7918  ULWord mIsWriting;
7919  NTV2Buffer mInBankInfos;
7920  NTV2Buffer mInRegInfos;
7921  NTV2_TRAILER mTrailer;
7922 
7923  #if !defined (NTV2_BUILDING_DRIVER)
7924 
7930  explicit NTV2BankSelGetSetRegs (const NTV2RegInfo & inBankSelect, const NTV2RegInfo & inRegInfo, const bool inDoWrite = false);
7931 
7936  NTV2RegInfo GetRegInfo (const UWord inIndex0 = 0) const;
7937 
7943  std::ostream & Print (std::ostream & inOutStream) const;
7944 
7948  inline operator NTV2_HEADER*() {return reinterpret_cast<NTV2_HEADER*>(this);} // New in SDK 16.3
7949 
7951  NTV2_IS_STRUCT_VALID_IMPL(mHeader,mTrailer)
7952 
7954  inline explicit NTV2BankSelGetSetRegs (const NTV2BankSelGetSetRegs & inObj) : mHeader(0xFEFEFEFE, 0), mIsWriting(false), mInBankInfos(0), mInRegInfos(0)
7955  {(void) inObj;}
7956  inline NTV2BankSelGetSetRegs & operator = (const NTV2BankSelGetSetRegs & inRHS) {(void) inRHS; return *this;}
7958  #endif // !defined (NTV2_BUILDING_DRIVER)
7960 
7961 
7962 
7966  NTV2_STRUCT_BEGIN (NTV2VirtualData) // NTV2_TYPE_VIRTUAL_DATA_RW
7967  NTV2_HEADER mHeader;
7968  ULWord mTag;
7969  ULWord mIsWriting;
7970  NTV2Buffer mVirtualData;
7971  NTV2_TRAILER mTrailer;
7972 
7973  #if !defined (NTV2_BUILDING_DRIVER)
7974 
7981  explicit NTV2VirtualData (const ULWord inTag, const void* inVirtualData, const size_t inVirtualDataSize, const bool inDoWrite = false);
7982 
7988  std::ostream & Print (std::ostream & inOutStream) const;
7989 
7993  inline operator NTV2_HEADER*() {return reinterpret_cast<NTV2_HEADER*>(this);} // New in SDK 16.3
7994 
7996  NTV2_IS_STRUCT_VALID_IMPL(mHeader,mTrailer)
7997 
7998  #endif // !defined (NTV2_BUILDING_DRIVER)
8000 
8001 
8002 
8007  NTV2_STRUCT_BEGIN (NTV2SDIInStatistics) // NTV2_TYPE_SDISTATS
8009  NTV2_HEADER mHeader;
8010  NTV2Buffer mInStatistics;
8011  NTV2_TRAILER mTrailer;
8013 
8014  #if !defined (NTV2_BUILDING_DRIVER)
8015 
8019 
8023  void Clear (void);
8024 
8031  bool GetSDIInputStatus (NTV2SDIInputStatus & outStatus, const UWord inSDIInputIndex0 = 0);
8032 
8037  NTV2SDIInputStatus & operator [] (const size_t inSDIInputIndex0); // New in SDK 16.0
8038 
8044  std::ostream & Print (std::ostream & inOutStream) const;
8045 
8047  NTV2_IS_STRUCT_VALID_IMPL(mHeader,mTrailer)
8048  #endif // !defined (NTV2_BUILDING_DRIVER)
8050 
8051 
8052 
8065  NTV2_STRUCT_BEGIN (FRAME_STAMP) // NTV2_TYPE_ACFRAMESTAMP
8066  NTV2_HEADER acHeader;
8067 
8070  LWord64 acFrameTime;
8072  ULWord acRequestedFrame;
8076  ULWord64 acAudioClockTimeStamp;
8079  ULWord acAudioExpectedAddress;
8085  ULWord acAudioInStartAddress;
8086  ULWord acAudioInStopAddress;
8088  ULWord acAudioOutStopAddress;
8090  ULWord acAudioOutStartAddress;
8092  ULWord acTotalBytesTransferred;
8094  ULWord acStartSample;
8095 
8107  NTV2Buffer acTimeCodes;
8109  LWord64 acCurrentTime;
8119  ULWord acCurrentFrame;
8124  LWord64 acCurrentFrameTime;
8125  ULWord64 acAudioClockCurrentTime;
8129  ULWord acCurrentAudioExpectedAddress; // FIXFIXFIX Document What is this?!
8136  ULWord acCurrentAudioStartAddress;
8137  ULWord acCurrentFieldCount;
8138  ULWord acCurrentLineCount;
8139  ULWord acCurrentReps;
8140  ULWord64 acCurrentUserCookie;
8141  ULWord acFrame;
8146  NTV2_TRAILER acTrailer;
8148 
8149  #if !defined (NTV2_BUILDING_DRIVER)
8150 
8153  explicit FRAME_STAMP ();
8154 
8159  FRAME_STAMP (const FRAME_STAMP & inObj);
8160 
8164  ~FRAME_STAMP ();
8165 
8170  bool SetFrom (const FRAME_STAMP_STRUCT & inOldStruct);
8171 
8176  bool CopyTo (FRAME_STAMP_STRUCT & outOldStruct) const;
8177 
8184  bool GetInputTimeCodes (NTV2TimeCodeList & outValues) const;
8185 
8195  bool GetInputTimeCodes (NTV2TimeCodes & outTimeCodes, const NTV2Channel inSDIInput, const bool inValidOnly = true) const;
8196 
8205  bool GetInputTimeCode (NTV2_RP188 & outTimeCode, const NTV2TCIndex inTCIndex = NTV2_TCINDEX_SDI1) const;
8206 
8213  bool GetSDIInputStatus (NTV2SDIInputStatus & outStatus, const UWord inSDIInputIndex0 = 0) const;
8214 
8222  bool SetInputTimecode (const NTV2TCIndex inTCNdx, const NTV2_RP188 & inTimecode);
8223 
8228  FRAME_STAMP & operator = (const FRAME_STAMP & inRHS);
8229 
8234  std::string operator [] (const unsigned inIndexNum) const;
8235 
8239  inline operator NTV2_HEADER*() {return reinterpret_cast<NTV2_HEADER*>(this);} // New in SDK 16.3
8240 
8242  NTV2_IS_STRUCT_VALID_IMPL(acHeader,acTrailer)
8243 
8244  #endif // !defined (NTV2_BUILDING_DRIVER)
8246 
8247 
8248 
8254  NTV2_HEADER acHeader;
8256  LWord acTransferFrame;
8257  ULWord acBufferLevel;
8258  ULWord acFramesProcessed;
8259  ULWord acFramesDropped;
8260  FRAME_STAMP acFrameStamp;
8261  ULWord acAudioTransferSize;
8262  ULWord acAudioStartSample;
8263  ULWord acAncTransferSize;
8264  ULWord acAncField2TransferSize;
8265  NTV2_TRAILER acTrailer;
8266 
8267  #if !defined (NTV2_BUILDING_DRIVER)
8268 
8271  explicit AUTOCIRCULATE_TRANSFER_STATUS ();
8272 
8276  inline const FRAME_STAMP & GetFrameStamp (void) const {return acFrameStamp;}
8277 
8281  inline LWord GetTransferFrame (void) const {return acTransferFrame;}
8282 
8286  inline NTV2AutoCirculateState GetState (void) const {return acState;}
8287 
8291  inline ULWord GetBufferLevel (void) const {return acBufferLevel;}
8292 
8296  inline ULWord GetProcessedFrameCount (void) const {return acFramesProcessed;}
8297 
8301  inline ULWord GetDroppedFrameCount (void) const {return acFramesDropped;}
8302 
8308  inline ULWord GetCapturedAudioByteCount (void) const {return acAudioTransferSize;}
8309 
8316  inline ULWord GetCapturedAncByteCount (const bool inField2 = false) const {return inField2 ? acAncField2TransferSize : acAncTransferSize;}
8317 
8324  inline ULWord GetCapturedAuxByteCount (const bool inField2 = false) const {return GetCapturedAncByteCount(inField2);}
8325 
8327  NTV2_IS_STRUCT_VALID_IMPL(acHeader,acTrailer)
8328 
8330  inline explicit AUTOCIRCULATE_TRANSFER_STATUS (const AUTOCIRCULATE_TRANSFER_STATUS & inObj) : acHeader(0xFEFEFEFE, 0) {(void) inObj;}
8331  inline AUTOCIRCULATE_TRANSFER_STATUS & operator = (const AUTOCIRCULATE_TRANSFER_STATUS & inRHS) {(void) inRHS; return *this;}
8333  #endif // !defined (NTV2_BUILDING_DRIVER)
8335 
8336 
8337 
8343  NTV2_HEADER acHeader;
8344 
8350  NTV2Buffer acVideoBuffer;
8351 
8357  NTV2Buffer acAudioBuffer;
8358 
8368  NTV2Buffer acANCBuffer;
8369 
8379  NTV2Buffer acANCField2Buffer;
8380 
8387  NTV2Buffer acOutputTimeCodes;
8388 
8395 
8401  ULWord64 acInUserCookie;
8402 
8409  ULWord acInVideoDMAOffset;
8410 
8411  NTV2SegmentedDMAInfo acInSegmentedDMAInfo;
8412  NTV2ColorCorrectionData acColorCorrection;
8413  NTV2FrameBufferFormat acFrameBufferFormat;
8414  NTV2FBOrientation acFrameBufferOrientation;
8415  AutoCircVidProcInfo acVidProcInfo;
8416  NTV2QuarterSizeExpandMode acVideoQuarterSizeExpand;
8417 
8418  NTV2Buffer acHDMIAuxData;
8419 
8423  ULWord acPeerToPeerFlags;
8425  ULWord acFrameRepeatCount;
8426  LWord acDesiredFrame;
8429  NTV2_TRAILER acTrailer;
8431 
8432  #if !defined (NTV2_BUILDING_DRIVER)
8433 
8436  explicit AUTOCIRCULATE_TRANSFER ();
8439 
8463  explicit AUTOCIRCULATE_TRANSFER (ULWord * pInVideoBuffer, const ULWord inVideoByteCount, ULWord * pInAudioBuffer = AJA_NULL,
8464  const ULWord inAudioByteCount = 0, ULWord * pInANCBuffer = AJA_NULL, const ULWord inANCByteCount = 0,
8465  ULWord * pInANCF2Buffer = AJA_NULL, const ULWord inANCF2ByteCount = 0);
8470  void Clear (void);
8471 
8473  inline explicit AUTOCIRCULATE_TRANSFER (const AUTOCIRCULATE_TRANSFER & inObj)
8474  : acHeader(0xFEFEFEFE, 0), acVideoBuffer(0), acAudioBuffer(0),
8475  acANCBuffer(0), acANCField2Buffer(0), acOutputTimeCodes(0), acHDMIAuxData(0)
8476  {(void) inObj;}
8477  inline AUTOCIRCULATE_TRANSFER & operator = (const AUTOCIRCULATE_TRANSFER & inRHS) {(void) inRHS; return *this;}
8480 
8484 
8510  bool SetBuffers (ULWord * pInVideoBuffer, const ULWord inVideoByteCount,
8511  ULWord * pInAudioBuffer, const ULWord inAudioByteCount,
8512  ULWord * pInANCBuffer, const ULWord inANCByteCount,
8513  ULWord * pInANCF2Buffer = AJA_NULL, const ULWord inANCF2ByteCount = 0);
8514 
8526  bool SetVideoBuffer (ULWord * pInVideoBuffer, const ULWord inVideoByteCount);
8527 
8538  bool SetAudioBuffer (ULWord * pInAudioBuffer, const ULWord inAudioByteCount);
8539 
8561  bool SetAncBuffers (ULWord * pInANCBuffer, const ULWord inANCByteCount,
8562  ULWord * pInANCF2Buffer = AJA_NULL, const ULWord inANCF2ByteCount = 0);
8566  inline const NTV2Buffer & GetVideoBuffer (void) const {return acVideoBuffer;}
8567 
8571  inline const NTV2Buffer & GetAudioBuffer (void) const {return acAudioBuffer;}
8572 
8577  inline const NTV2Buffer & GetAncBuffer (const bool inField2 = false) const {return inField2 ? acANCField2Buffer : acANCBuffer;}
8579 
8583 
8593  bool SetOutputTimeCodes (const NTV2TimeCodes & inValues);
8594 
8605  bool SetOutputTimeCode (const NTV2_RP188 & inTimecode, const NTV2TCIndex inTCIndex = NTV2_TCINDEX_SDI1);
8606 
8615  bool SetAllOutputTimeCodes (const NTV2_RP188 & inTimecode, const bool inIncludeF2 = true);
8616 
8624  bool GetInputTimeCodes (NTV2TimeCodeList & outValues) const;
8625 
8636  bool GetInputTimeCode (NTV2_RP188 & outTimeCode, const NTV2TCIndex inTCIndex = NTV2_TCINDEX_SDI1) const;
8637 
8650  bool GetInputTimeCodes (NTV2TimeCodes & outTimeCodes, const NTV2Channel inSDIInput = NTV2_CHANNEL1, const bool inValidOnly = true) const;
8652 
8656 
8667  inline bool SetFrameUserCookie (const ULWord64 & inUserCookie) {acInUserCookie = inUserCookie; return true;}
8668 
8676  bool SetFrameBufferFormat (const NTV2FrameBufferFormat inNewFormat);
8677 
8681  inline void EnableQuarterSizeExpandMode (void) {acVideoQuarterSizeExpand = NTV2_QuarterSizeExpandOn;}
8682 
8686  inline void DisableQuarterSizeExpandMode (void) {acVideoQuarterSizeExpand = NTV2_QuarterSizeExpandOff;}
8687 
8691  inline bool IsQuarterSizeExpandModeEnabled (void) const {return acVideoQuarterSizeExpand == NTV2_QuarterSizeExpandOn;}
8692 
8697  inline const AUTOCIRCULATE_TRANSFER_STATUS & GetTransferStatus (void) const {return acTransferStatus;}
8698 
8703  inline const FRAME_STAMP & GetFrameInfo (void) const {return acTransferStatus.acFrameStamp;}
8704 
8709  inline ULWord GetCapturedAudioByteCount (void) const {return acTransferStatus.GetCapturedAudioByteCount();}
8710 
8711  inline NTV2_DEPRECATED_f(ULWord GetAudioByteCount (void) const) {return GetCapturedAudioByteCount ();}
8712 
8719  inline ULWord GetCapturedAncByteCount (const bool inField2 = false) const {return acTransferStatus.GetCapturedAncByteCount(inField2);}
8720  inline NTV2_SHOULD_BE_DEPRECATED(ULWord GetAncByteCount (const bool inField2 = false) const) {return GetCapturedAncByteCount(inField2);}
8721 
8725  inline NTV2FrameBufferFormat GetFrameBufferFormat (void) const {return acFrameBufferFormat;}
8726 
8730  inline LWord GetTransferFrameNumber (void) const {return acTransferStatus.GetTransferFrame();}
8732 
8736 
8750  bool EnableSegmentedDMAs (const ULWord inNumSegments, const ULWord inNumActiveBytesPerLine,
8751  const ULWord inHostBytesPerLine, const ULWord inDeviceBytesPerLine);
8756  bool DisableSegmentedDMAs (void);
8757 
8761  bool SegmentedDMAsEnabled (void) const;
8763 
8767  inline operator NTV2_HEADER*() {return reinterpret_cast<NTV2_HEADER*>(this);} // New in SDK 16.3
8768 
8770  NTV2_IS_STRUCT_VALID_IMPL(acHeader,acTrailer)
8771  #endif // user-space clients only
8773 
8774 
8775 
8780  NTV2_HEADER mHeader;
8781  NTV2Buffer mSharedMemory;
8782  // and its length. The AJADebug logging facility owns and manages this memory.
8783  // If NULL or zero length, debug logging will be disabled in the driver.
8784  // If non-NULL and zero length, debug logging will be enabled in the driver.
8785  ULWord mReserved[32];
8786  NTV2_TRAILER mTrailer;
8787 
8788  #if !defined (NTV2_BUILDING_DRIVER)
8789 
8793  explicit NTV2DebugLogging (const bool inEnable = false);
8794 
8800  std::ostream & Print (std::ostream & inOutStream) const;
8801 
8802  NTV2_IS_STRUCT_VALID_IMPL(mHeader, mTrailer)
8803 
8804  #endif // !defined (NTV2_BUILDING_DRIVER)
8806 
8807 
8808 
8816  NTV2_HEADER mHeader;
8817  NTV2Buffer mBuffer;
8818  // A NULL buffer (or zero length) releases all locked buffers.
8819  ULWord mFlags;
8820  ULWord64 mMaxLockSize;
8821  ULWord mReserved[30];
8822  NTV2_TRAILER mTrailer;
8823 
8824  #if !defined (NTV2_BUILDING_DRIVER)
8825 
8828  explicit NTV2BufferLock ();
8830  inline ~NTV2BufferLock () {}
8831 
8837  explicit NTV2BufferLock (const NTV2Buffer & inBuffer, const ULWord inFlags);
8838 
8845  explicit NTV2BufferLock (const ULWord * pInBuffer, const ULWord inByteCount, const ULWord inFlags);
8846 
8852  explicit NTV2BufferLock (const ULWord64 inMaxLockSize, const ULWord inFlags); // New in SDK 16.0
8854 
8858 
8864  bool SetBuffer (const NTV2Buffer & inBuffer);
8865 
8872  inline bool SetBuffer (const ULWord * pInBuffer, const ULWord inByteCount)
8873  {
8874  return SetBuffer(NTV2Buffer(pInBuffer, inByteCount));
8875  }
8876 
8881  inline void SetFlags (const ULWord inFlags) {NTV2_ASSERT_STRUCT_VALID; mFlags = inFlags;}
8882 
8887  inline void SetMaxLockSize (const ULWord64 inNumBytes) {NTV2_ASSERT_STRUCT_VALID; mMaxLockSize = inNumBytes;} // New in SDK 16.0
8888 
8893  inline void Clear (void)
8894  {
8895  SetBuffer(NTV2Buffer());
8896  SetFlags(0);
8897  SetMaxLockSize(0);
8898  }
8900 
8906  std::ostream & Print (std::ostream & inOutStream) const;
8907 
8908  NTV2_IS_STRUCT_VALID_IMPL(mHeader, mTrailer)
8909 
8910  #endif // !defined (NTV2_BUILDING_DRIVER)
8912 
8913 
8914 
8920  NTV2_HEADER mHeader;
8921  NTV2Buffer mBuffer;
8922  ULWord mFlags;
8923  ULWord mStatus;
8924  ULWord mRegisters[16];
8925  ULWord mReserved[32];
8926  NTV2_TRAILER mTrailer;
8927 
8928  #if !defined (NTV2_BUILDING_DRIVER)
8929 
8932  explicit NTV2Bitstream ();
8934  inline ~NTV2Bitstream () {}
8935 
8941  explicit NTV2Bitstream (const NTV2Buffer & inBuffer, const ULWord inFlags);
8942 
8949  explicit NTV2Bitstream (const ULWord * pInBuffer, const ULWord inByteCount, const ULWord inFlags);
8951 
8955 
8961  bool SetBuffer (const NTV2Buffer & inBuffer);
8962 
8969  inline bool SetBuffer (const ULWord * pInBuffer, const ULWord inByteCount) {return SetBuffer(NTV2Buffer(pInBuffer, inByteCount));}
8970 
8975  inline void SetFlags (const ULWord inFlags) {NTV2_ASSERT_STRUCT_VALID; mFlags = inFlags;}
8976 
8980  inline void Clear (void) {SetBuffer(NTV2Buffer());}
8982 
8988  std::ostream & Print (std::ostream & inOutStream) const;
8989 
8993  inline operator NTV2_HEADER*() {return reinterpret_cast<NTV2_HEADER*>(this);} // New in SDK 16.3
8994 
8996  NTV2_IS_STRUCT_VALID_IMPL(mHeader, mTrailer)
8997 
8998  #endif // !defined (NTV2_BUILDING_DRIVER)
9000 
9001 
9002  // Stream channel action flags
9003  #define NTV2_STREAM_CHANNEL_INITIALIZE BIT(0)
9004  #define NTV2_STREAM_CHANNEL_RELEASE BIT(1)
9005  #define NTV2_STREAM_CHANNEL_START BIT(2)
9006  #define NTV2_STREAM_CHANNEL_STOP BIT(3)
9007  #define NTV2_STREAM_CHANNEL_FLUSH BIT(4)
9008  #define NTV2_STREAM_CHANNEL_STATUS BIT(5)
9009  #define NTV2_STREAM_CHANNEL_WAIT BIT(6)
9010 
9011  // Stream channel state flags
9012  #define NTV2_STREAM_CHANNEL_STATE_DISABLED BIT(0)
9013  #define NTV2_STREAM_CHANNEL_STATE_INITIALIZED BIT(1)
9014  #define NTV2_STREAM_CHANNEL_STATE_RELEASED BIT(2)
9015  #define NTV2_STREAM_CHANNEL_STATE_IDLE BIT(3)
9016  #define NTV2_STREAM_CHANNEL_STATE_ACTIVE BIT(4)
9017  #define NTV2_STREAM_CHANNEL_STATE_ERROR BIT(5)
9018 
9019  // Stream buffer action flags
9020  #define NTV2_STREAM_BUFFER_QUEUE BIT(1)
9021  #define NTV2_STREAM_BUFFER_RELEASE BIT(2)
9022  #define NTV2_STREAM_BUFFER_STATUS BIT(3)
9023 
9024  // Stream buffer state flags
9025  #define NTV2_STREAM_BUFFER_STATE_QUEUED BIT(0)
9026  #define NTV2_STREAM_BUFFER_STATE_LINKED BIT(1)
9027  #define NTV2_STREAM_BUFFER_STATE_COMPLETED BIT(2)
9028  #define NTV2_STREAM_BUFFER_STATE_FLUSHED BIT(3)
9029  #define NTV2_STREAM_BUFFER_STATE_RELEASED BIT(4)
9030  #define NTV2_STREAM_BUFFER_STATE_ERROR BIT(5)
9031 
9032  // Stream action status flags
9033  #define NTV2_STREAM_STATUS_SUCCESS BIT(0)
9034  #define NTV2_STREAM_STATUS_FAIL BIT(1)
9035  #define NTV2_STREAM_STATUS_STATE BIT(2)
9036  #define NTV2_STREAM_STATUS_MESSAGE BIT(3)
9037  #define NTV2_STREAM_STATUS_INVALID BIT(4)
9038  #define NTV2_STREAM_STATUS_TIMEOUT BIT(5)
9039  #define NTV2_STREAM_STATUS_RESOURCE BIT(6)
9040  #define NTV2_STREAM_STATUS_OWNER BIT(7)
9041 
9043  NTV2_HEADER mHeader;
9044  NTV2Channel mChannel;
9045  ULWord mFlags;
9046  ULWord mStatus;
9047  ULWord mStreamState;
9048  ULWord64 mBufferCookie;
9049  LWord64 mStartTime;
9050  LWord64 mStopTime;
9051  ULWord64 mQueueCount;
9052  ULWord64 mReleaseCount;
9053  ULWord64 mActiveCount;
9054  ULWord64 mRepeatCount;
9055  ULWord64 mIdleCount;
9056  ULWord mReserved[32];
9057  NTV2_TRAILER mTrailer;
9058 
9059  #if !defined (NTV2_BUILDING_DRIVER)
9060 
9063  explicit NTV2StreamChannel ();
9065  inline ~NTV2StreamChannel () {}
9066 
9068  inline operator NTV2_HEADER*() {return reinterpret_cast<NTV2_HEADER*>(this);} // New in SDK 16.3
9069 
9074  inline ULWord GetQueueDepth (void) {return (ULWord)(mQueueCount - mReleaseCount);}
9075 
9080  inline bool IsIdle (void) {return ((mStreamState & NTV2_STREAM_CHANNEL_STATE_IDLE) != 0);}
9081 
9086  inline bool IsActive (void) {return ((mStreamState & NTV2_STREAM_CHANNEL_STATE_ACTIVE) != 0);}
9087 
9092  inline bool HasError (void) {return ((mStreamState & NTV2_STREAM_CHANNEL_STATE_ERROR) != 0);}
9093 
9094  std::ostream & Print (std::ostream & inOutStream) const;
9095 
9096  NTV2_IS_STRUCT_VALID_IMPL(mHeader, mTrailer)
9097 
9098  #endif // !defined (NTV2_BUILDING_DRIVER)
9099 
9101 
9103  NTV2_HEADER mHeader;
9104  NTV2Channel mChannel;
9105  ULWord mFlags;
9106  ULWord mStatus;
9107  NTV2Buffer mBuffer;
9108  ULWord mSegmentSize;
9109  LWord mSegmentPitch;
9110  ULWord mNumSegments;
9111  ULWord64 mBufferCookie;
9112  ULWord mBufferState;
9113  LWord64 mQueueTime;
9114  LWord64 mActiveTime;
9115  LWord64 mCompleteTime;
9116  LWord64 mFlushTime;
9117  ULWord64 mTransferCount;
9118  ULWord mReserved[32];
9119  NTV2_TRAILER mTrailer;
9120 
9121  #if !defined (NTV2_BUILDING_DRIVER)
9122 
9125  explicit NTV2StreamBuffer ();
9127  inline ~NTV2StreamBuffer () {}
9128 
9130  inline operator NTV2_HEADER*() {return reinterpret_cast<NTV2_HEADER*>(this);} // New in SDK 16.3
9131 
9132  std::ostream & Print (std::ostream & inOutStream) const;
9133 
9134  NTV2_IS_STRUCT_VALID_IMPL(mHeader, mTrailer)
9135 
9136  #endif // !defined (NTV2_BUILDING_DRIVER)
9137 
9139 
9140  // Mail buffer action flags
9141  #define NTV2_MAIL_BUFFER_SEND BIT(0)
9142  #define NTV2_MAIL_BUFFER_RECEIVE BIT(1)
9143 
9144  // Mail buffer status flags
9145  #define NTV2_MAIL_BUFFER_SUCCESS BIT(0)
9146  #define NTV2_MAIL_BUFFER_FAIL BIT(1)
9147  #define NTV2_MAIL_BUFFER_OVERFLOW BIT(2)
9148  #define NTV2_MAIL_BUFFER_TIMEOUT BIT(3)
9149  #define NTV2_MAIL_BUFFER_TRYAGAIN BIT(4)
9150 
9151  // Mail buffer maximum size
9152  #define NTV2_MAIL_BUFFER_MAX 4096
9153 
9155  NTV2_HEADER mHeader;
9156  NTV2Channel mChannel;
9157  NTV2Buffer mBuffer;
9158  ULWord mDataSize;
9159  ULWord mFlags;
9160  ULWord mDelay;
9161  ULWord mTimeout;
9162  ULWord mStatus;
9163  ULWord mReserved[32];
9164  NTV2_TRAILER mTrailer;
9165 
9166  #if !defined (NTV2_BUILDING_DRIVER)
9167 
9170  explicit NTV2MailBuffer ();
9172  inline ~NTV2MailBuffer () {}
9173 
9175  inline operator NTV2_HEADER*() {return reinterpret_cast<NTV2_HEADER*>(this);} // New in SDK 16.3
9176 
9177  std::ostream & Print (std::ostream & inOutStream) const;
9178 
9179  NTV2_IS_STRUCT_VALID_IMPL(mHeader, mTrailer)
9180 
9181  #endif // !defined (NTV2_BUILDING_DRIVER)
9182 
9184 
9185  #if !defined (NTV2_BUILDING_DRIVER)
9186  typedef std::set <NTV2VideoFormat> NTV2VideoFormatSet;
9187  typedef NTV2VideoFormatSet::const_iterator NTV2VideoFormatSetConstIter;
9188 
9189  typedef std::set <NTV2FrameBufferFormat> NTV2FrameBufferFormatSet;
9190  typedef NTV2FrameBufferFormatSet::const_iterator NTV2FrameBufferFormatSetConstIter;
9191  typedef NTV2FrameBufferFormatSet NTV2PixelFormats; // New in SDK 17.0
9193 
9194  typedef std::set <NTV2FrameGeometry> NTV2GeometrySet;
9195  typedef NTV2GeometrySet::const_iterator NTV2GeometrySetConstIter;
9196 
9197  typedef std::set <NTV2Standard> NTV2StandardSet;
9198  typedef NTV2StandardSet::const_iterator NTV2StandardSetConstIter;
9199 
9200  typedef std::set <NTV2InputSource> NTV2InputSourceSet;
9201  typedef NTV2InputSourceSet::const_iterator NTV2InputSourceSetConstIter;
9202 
9203  typedef std::set <NTV2OutputDestination> NTV2OutputDestinations;
9204  typedef NTV2OutputDestinations::const_iterator NTV2OutputDestinationsConstIter;
9205 
9206  typedef std::set <NTV2FrameRate> NTV2FrameRateSet;
9207  typedef NTV2FrameRateSet::const_iterator NTV2FrameRateSetConstIter;
9208 
9209  typedef std::set <NTV2AudioRate> NTV2AudioRateSet;
9210  typedef NTV2AudioRateSet::const_iterator NTV2AudioRateSetConstIter;
9211 
9218  AJAExport std::ostream & operator << (std::ostream & inOutStream, const UWordSequence & inData);
9219 
9226  AJAExport std::ostream & operator << (std::ostream & inOutStream, const ULWordSequence & inData);
9227 
9234  AJAExport std::ostream & operator << (std::ostream & inOutStream, const ULWord64Sequence & inData);
9235 
9241 
9250  AJAExport bool NTV2DeviceGetSupportedVideoFormats (const NTV2DeviceID inDeviceID, NTV2VideoFormatSet & outFormats);
9251 
9259 
9266  AJAExport std::ostream & operator << (std::ostream & inOStream, const NTV2VideoFormatSet & inFormats);
9267 
9275  AJAExport bool NTV2DeviceGetSupportedPixelFormats (const NTV2DeviceID inDeviceID, NTV2PixelFormats & outFormats);
9276 
9282  AJAExport bool NTV2GetSupportedPixelFormats (NTV2PixelFormats & outFormats); // New in SDK 17.0
9283 
9289  AJAExport bool NTV2GetUnsupportedPixelFormats (NTV2PixelFormats & outFormats); // New in SDK 17.0
9290 
9296  AJAExport bool NTV2GetSupportedStandards (NTV2StandardSet & outStandards); // New in SDK 17.0
9297 
9303  AJAExport bool NTV2GetUnsupportedStandards (NTV2StandardSet & outStandards); // New in SDK 17.0
9304 
9311  AJAExport std::ostream & operator << (std::ostream & inOStream, const NTV2PixelFormats & inFormats);
9312 
9320 
9328  AJAExport bool NTV2DeviceGetSupportedStandards (const NTV2DeviceID inDeviceID, NTV2StandardSet & outStandards);
9329 
9336  AJAExport std::ostream & operator << (std::ostream & inOStream, const NTV2StandardSet & inStandards);
9337 
9345 
9353  AJAExport bool NTV2DeviceGetSupportedGeometries (const NTV2DeviceID inDeviceID, NTV2GeometrySet & outGeometries);
9354 
9361  AJAExport std::ostream & operator << (std::ostream & inOStream, const NTV2GeometrySet & inGeometries);
9362 
9370 
9377  AJAExport std::ostream & operator << (std::ostream & inOStream, const NTV2InputSourceSet & inSet);
9378 
9386 
9396  AJAExport bool NTV2DeviceGetSupportedInputSources (const NTV2DeviceID inDeviceID, NTV2InputSourceSet & outInputSources, const NTV2IOKinds inKinds = NTV2_IOKINDS_ALL); // New in SDK 16.3
9397 
9404  AJAExport std::ostream & operator << (std::ostream & inOStream, const NTV2OutputDestinations & inSet); // New in SDK 16.0
9405 
9412  AJAExport NTV2OutputDestinations & operator += (NTV2OutputDestinations & inOutSet, const NTV2OutputDestinations & inSet); // New in SDK 16.0
9413 
9423  AJAExport bool NTV2DeviceGetSupportedOutputDests (const NTV2DeviceID inDeviceID, NTV2OutputDestinations & outOutputDests, const NTV2IOKinds inKinds = NTV2_IOKINDS_ALL); // New in SDK 16.3
9424 
9431  AJAExport std::ostream & operator << (std::ostream & inOStream, const NTV2FrameRateSet & inSet); // New in SDK 17.0
9432 
9439  AJAExport NTV2FrameRateSet & operator += (NTV2FrameRateSet & inOutSet, const NTV2FrameRateSet & inSet); // New in SDK 17.0
9440 
9449  AJAExport bool NTV2DeviceGetSupportedFrameRates (const NTV2DeviceID inDeviceID, NTV2FrameRateSet & outRates); // New in SDK 17.0
9450 
9451 
9458  AJAExport std::ostream & operator << (std::ostream & inOutStream, const NTV2_HEADER & inObj);
9459 
9466  AJAExport std::ostream & operator << (std::ostream & inOutStream, const NTV2_TRAILER & inObj);
9467 
9474  AJAExport std::ostream & operator << (std::ostream & inOutStream, const NTV2Buffer & inObj);
9475 
9482  AJAExport std::ostream & operator << (std::ostream & inOutStream, const NTV2_RP188 & inObj);
9483 
9490  AJAExport std::ostream & operator << (std::ostream & inOutStream, const NTV2TimeCodeList & inObj);
9491 
9498  AJAExport std::ostream & operator << (std::ostream & inOutStream, const NTV2TimeCodes & inObj);
9499 
9506  AJAExport std::ostream & operator << (std::ostream & inOutStream, const NTV2TCIndexes & inObj);
9507 
9514  AJAExport NTV2TCIndexes & operator += (NTV2TCIndexes & inOutSet, const NTV2TCIndexes & inSet);
9515 
9522  AJAExport std::ostream & operator << (std::ostream & inOutStream, const FRAME_STAMP & inObj);
9523 
9530  AJAExport std::ostream & operator << (std::ostream & inOutStream, const AUTOCIRCULATE_STATUS & inObj);
9531 
9538  AJAExport std::ostream & operator << (std::ostream & inOutStream, const NTV2SegmentedDMAInfo & inObj);
9539 
9546  AJAExport std::ostream & operator << (std::ostream & inOutStream, const AUTOCIRCULATE_TRANSFER & inObj);
9547 
9554  AJAExport std::ostream & operator << (std::ostream & inOutStream, const FRAME_STAMP & inObj);
9555 
9562  AJAExport std::ostream & operator << (std::ostream & inOutStream, const AUTOCIRCULATE_TRANSFER_STATUS & inObj);
9563 
9570  AJAExport std::ostream & operator << (std::ostream & inOutStream, const NTV2RegisterNumberSet & inObj);
9571 
9578  AJAExport std::ostream & operator << (std::ostream & inOutStream, const NTV2RegisterValueMap & inObj);
9579 
9586  AJAExport std::ostream & operator << (std::ostream & inOutStream, const AutoCircVidProcInfo & inObj);
9587 
9594  AJAExport std::ostream & operator << (std::ostream & inOutStream, const NTV2ColorCorrectionData & inObj);
9595 
9602  AJAExport inline std::ostream & operator << (std::ostream & inOutStream, const NTV2GetRegisters & inObj) {return inObj.Print (inOutStream);}
9603 
9610  AJAExport inline std::ostream & operator << (std::ostream & inOutStream, const NTV2SetRegisters & inObj) {return inObj.Print (inOutStream);}
9611 
9618  AJAExport inline std::ostream & operator << (std::ostream & inOutStream, const NTV2BankSelGetSetRegs & inObj) {return inObj.Print (inOutStream);}
9619 
9626  AJAExport inline std::ostream & operator << (std::ostream & inOutStream, const NTV2SDIInStatistics & inObj) {return inObj.Print (inOutStream);}
9627 
9634  AJAExport inline std::ostream & operator << (std::ostream & inOutStream, const NTV2SDIInputStatus & inObj) {return inObj.Print (inOutStream);}
9635 
9642  AJAExport std::ostream & operator << (std::ostream & inOutStrm, const NTV2SegmentedXferInfo & inXferInfo);
9643 
9650  AJAExport inline std::ostream & operator << (std::ostream & inOutStream, const NTV2DebugLogging & inObj) {return inObj.Print (inOutStream);}
9651 
9658  AJAExport inline std::ostream & operator << (std::ostream & inOutStream, const NTV2BufferLock & inObj) {return inObj.Print (inOutStream);}
9659  #endif // !defined (NTV2_BUILDING_DRIVER)
9660 
9661  #if defined (AJAMac)
9662  #pragma pack (pop)
9663  #endif // defined (AJAMac)
9664 
9666 #if !defined(NTV2_DEPRECATE_17_6)
9667 
9669  // maximum number of hevc streams
9670  #define HEVC_STREAM_MAX 4
9671 
9672  // maximum number of gpio ports
9673  #define HEVC_GPIO_MAX 64
9674 
9675  // version string maximum size (bytes)
9676  #define HEVC_VERSION_STRING_SIZE 64
9677 
9678  // picture and encoded information additional data size (bytes)
9679  #define HEVC_ADDITIONAL_DATA_SIZE ((4 + 4 + 256) * 16)
9680 
9681  // codec state flags
9682  #define HEVC_STATE_FLAG_VIDEO_STARTED 0x00000001U // codec video input capture started
9683 
9684  // transfer flags
9685  #define HEVC_TRANSFER_FLAG_IS_LAST_FRAME 0x00000001U // last stream frame
9686 
9687  // driver io status codes
9688  #define HEVC_STATUS_SUCCESS 0x00000001U
9689 
9690  // fatal error registers
9691  #define HEVC_FATAL_ERROR_INFO_REG 0x08000100U // codec error register base
9692  #define HEVC_FATAL_ERROR_INFO_COUNT 64 // number of codec error registers
9693 
9694  // driver debug register output enable bits
9695  #define HEVC_DEBUG_DRIVER_REGISTER 0x080000FCU // register address of debug bits
9696  #define HEVC_DEBUG_MASK_INFO 0x00000001 // general probe and cleanup
9697  #define HEVC_DEBUG_MASK_WARNING 0x00000002 // general warinings
9698  #define HEVC_DEBUG_MASK_ERROR 0x00000004 // general erros
9699  #define HEVC_DEBUG_MASK_INT_PRIMARY 0x00000008 // primary interrupt info
9700  #define HEVC_DEBUG_MASK_INT_COMMAND 0x00000010 // command tasklet info
9701  #define HEVC_DEBUG_MASK_INT_VEI 0x00000020 // raw stream tasklet info
9702  #define HEVC_DEBUG_MASK_INT_SEO 0x00000040 // encoded stream tasklet info
9703  #define HEVC_DEBUG_MASK_INT_ERROR 0x00000080 // interrupt errors
9704  #define HEVC_DEBUG_MASK_REGISTER_INFO 0x00000100 // register read/write info
9705  #define HEVC_DEBUG_MASK_REGISTER_STATE 0x00000200 // detailed register access info
9706  #define HEVC_DEBUG_MASK_REGISTER_ERROR 0x00000400 // register access errors
9707  #define HEVC_DEBUG_MASK_COMMAND_INFO 0x00000800 // command queue info
9708  #define HEVC_DEBUG_MASK_COMMAND_STATE 0x00001000 // detailed command processing info
9709  #define HEVC_DEBUG_MASK_COMMAND_ERROR 0x00002000 // command queue errors
9710  #define HEVC_DEBUG_MASK_STREAM_INFO 0x00004000 // stream (dma) queue info
9711  #define HEVC_DEBUG_MASK_STREAM_STATE 0x00008000 // detailed stream processing info
9712  #define HEVC_DEBUG_MASK_STREAM_COPY 0x00010000 // stream data copy info
9713  #define HEVC_DEBUG_MASK_STREAM_SEGMENT 0x00020000 // stream data segment info
9714  #define HEVC_DEBUG_MASK_STREAM_FRAME 0x00040000 // stream vif frame info
9715  #define HEVC_DEBUG_MASK_STREAM_ERROR 0x00080000 // stream queue errors
9716  #define HEVC_DEBUG_MASK_MEMORY_ALLOC 0x00100000 // buffer memory allocation info
9717  #define HEVC_DEBUG_MASK_MEMORY_ERROR 0x00200000 // buffer memory allocation errors
9718  #define HEVC_DEBUG_MASK_DMA_INFO 0x00400000 // dma send info
9719  #define HEVC_DEBUG_MASK_DMA_DESCRIPTOR 0x00800000 // dma descriptor dump
9720  #define HEVC_DEBUG_MASK_DMA_ERROR 0x01000000 // dma errors
9721  #define HEVC_DEBUG_MASK_STATUS_INFO 0x02000000 // status info requests
9722  #define HEVC_DEBUG_MASK_RESERVED_0 0x04000000
9723  #define HEVC_DEBUG_MASK_RESERVED_1 0x08000000
9724  #define HEVC_DEBUG_MASK_RESERVED_2 0x10000000
9725  #define HEVC_DEBUG_MASK_RESERVED_3 0x20000000
9726  #define HEVC_DEBUG_MASK_RESERVED_4 0x40000000
9727  #define HEVC_DEBUG_MASK_RESERVED_5 0x80000000
9728 
9729  // ntv2 gpio input registers
9730  #define HEVC_NTV2_GPIO_REGISTER_LOW 510
9731  #define HEVC_NTV2_GPIO_REGISTER_HIGH 511
9732 
9733 
9734  // hevc version information
9735  typedef struct HevcVersion
9736  {
9741  } HevcVersion;
9742 
9743  // pci id information
9744  typedef struct HevcPciId
9745  {
9750  } HevcPciId;
9751 
9752  // hevc device mode
9753  typedef enum HevcDeviceMode
9754  {
9756  Hevc_DeviceMode_Codec, // codec mode
9757  Hevc_DeviceMode_Maintenance, // maintenance mode
9759  } HevcDeviceMode;
9760 
9761  // hevc device information message
9762  typedef struct HevcDeviceInfo
9763  {
9764  HevcVersion driverVersion; // driver version
9765  HevcVersion mcpuVersion; // firmware versions
9771  HevcPciId pciId; // pci ids
9772  HevcDeviceMode deviceMode; // hardware device mode
9773  bool mcpuVersionCheck; // mcpu version supported
9774  bool systemVersionCheck; // system version supported
9775  bool standardSingleCheck; // standard firmware single version supported
9776  bool standardMultipleCheck; // standard fimwrare multiple version supported
9777  bool pciIdCheck; // pci id supported
9778  } HevcDeviceInfo;
9779 
9780  // hevc register
9781  typedef struct HevcDeviceRegister
9782  {
9783  ULWord address; // register address
9784  ULWord writeValue; // register write value
9785  ULWord readValue; // register read value
9786  ULWord mask; // register value mask
9787  ULWord shift; // register value shift
9788  bool write; // write flag
9789  bool read; // read flag
9790  bool forceBar4; // force bar4 access
9792 
9793  // hevc main state
9794  typedef enum HevcMainState
9795  {
9797  Hevc_MainState_Boot, // codec has booted
9798  Hevc_MainState_Init, // initialize codec
9799  Hevc_MainState_Encode, // configure encoding (load firmware?)
9800  Hevc_MainState_Error, // codec must be reset
9802  } HevcMainState;
9803 
9804  // encoder mode
9805  typedef enum HevcEncodeMode
9806  {
9808  Hevc_EncodeMode_Single, // encode a sigle stream
9809  Hevc_EncodeMode_Multiple, // encode multiple streams
9811  } HevcEncodeMode;
9812 
9813  // encoder firmware type
9814  typedef enum HevcFirmwareType
9815  {
9817  Hevc_FirmwareType_Standard, // encode firmware standard
9818  Hevc_FirmwareType_User, // encode firmware user
9820  } HevcFirmwareType;
9821 
9822  // hevc video interface state
9823  typedef enum HevcVifState
9824  {
9826  Hevc_VifState_Stop, // video interface stop
9827  Hevc_VifState_Start, // video interface start
9829  } HevcVifState;
9830 
9831  // hevc video input state
9832  typedef enum HevcVinState
9833  {
9835  Hevc_VinState_Stop, // video input stop
9836  Hevc_VinState_Start, // video input start
9838  } HevcVinState;
9839 
9840  // hevc encoder state
9841  typedef enum HevcEhState
9842  {
9844  Hevc_EhState_Stop, // encoder stop
9845  Hevc_EhState_Start, // encoder start
9846  Hevc_EhState_ReadyToStop, // encoder ready to stop
9848  } HevcEhState;
9849 
9850  // hevc gpio control
9851  typedef enum HevcGpioControl
9852  {
9854  Hevc_GpioControl_Function, // configure gpio port function
9855  Hevc_GpioControl_Direction, // configure gpio port direction
9856  Hevc_GpioControl_Set, // set gpio port value
9857  Hevc_GpioControl_Get, // get pgio port value
9859  } HevcGpioControl;
9860 
9861  // hevc gpio function
9862  typedef enum HevcGpioFunction
9863  {
9865  Hevc_GpioFunction_Gpio, // gpio function is gpio
9866  Hevc_GpioFunction_Peripheral, // gpio function is peripheral
9868  } HevcGpioFunction;
9869 
9870  // hevc gpio direction
9871  typedef enum HevcGpioDirection
9872  {
9874  Hevc_GpioDirection_Input, // gpio direction is input
9875  Hevc_GpioDirection_Output, // gpio direction is output
9878 
9879  // hevc gpio value
9880  typedef enum HevcGpioValue
9881  {
9883  Hevc_GpioValue_Low, // gpio direction is input
9884  Hevc_GpioValue_High, // gpio direction is output
9886  } HevcGpioValue;
9887 
9888  typedef enum HevcChangeSequence
9889  {
9895 
9896  // hevc change param target
9897  #define Hevc_ParamTarget_None 0x00000000
9898  #define Hevc_ParamTarget_Vbr 0x00000001 // change variable bitrate
9899  #define Hevc_ParamTarget_Cbr 0x00000002 // change constant bitrate
9900  #define Hevc_ParamTarget_Resolution 0x00000004 // change size, crop, pan, etc.
9901  #define Hevc_ParamTarget_Frame_Rate 0x00000008 // change frame rate
9902  #define Hevc_ParamTarget_All 0x0000000f
9903 
9904  // hevc commands
9905  typedef enum HevcCommand
9906  {
9908  Hevc_Command_MainState, // set main state
9909  Hevc_Command_VinState, // set video input state
9910  Hevc_Command_EhState, // set encoder state
9911  Hevc_Command_Gpio, // control gpio
9912  Hevc_Command_Reset, // reset codec
9913  Hevc_Command_ChangeParam, // change dynamic params during encode
9914  Hevc_Command_ChangePicture, // change picture type
9916  } HevcCommand;
9917 
9918  // hevc command information
9919  typedef struct HevcDeviceCommand
9920  {
9921  HevcCommand command; // command type
9922  // main state command info
9923  HevcMainState mainState; // set main state
9924  HevcEncodeMode encodeMode; // set encoder mode
9925  HevcFirmwareType firmwareType; // set encode firmware type
9926  // vin/eh state command info
9927  HevcVinState vinState; // set video input state
9928  HevcEhState ehState; // set encoder state
9929  ULWord streamBits; // command applies to each stream bit
9930  // gpio command info
9931  HevcGpioControl gpioControl; // gpio control type
9932  ULWord gpioNumber; // gpio port number (function, direction, set, get)
9933  HevcGpioFunction gpioFunction; // gpio port function (function)
9934  HevcGpioDirection gpioDirection; // gpio port direction (direction)
9935  HevcGpioValue gpioValue; // gpio port value (set, get)
9936  // change encode params
9937  ULWord paramTarget; // parameters to change
9938  ULWord paramStreamId; // stream id
9939  HevcChangeSequence changeSequence; // start new sequence (vbr)
9940  ULWord maxBitRate; // maximum bitrate (vbr)
9941  ULWord aveBitRate; // average bitrate (vbr and cbr)
9942  ULWord minBitRate; // minimum bitrate (vbr)
9943  ULWord seqEndPicNumber; // last picture number of sequence (resolution and frame rate)
9944  ULWord hSizeEh; // resolution parameters
9964  ULWord frameRateCode; // frame rate parameter
9965  // change picture type
9966  ULWord picType; // picture type
9967  ULWord picStreamId; // stream id
9968  ULWord gopEndPicNumber; // last picture number of gop
9969  // general command flags
9970  ULWord flags; // command flags
9972 
9973  // hevc stream types
9974  typedef enum HevcStream
9975  {
9977  Hevc_Stream_VideoRaw, // raw data stream
9978  Hevc_Stream_VideoEnc, // encoded data stream
9980  } HevcStream;
9981 
9982  // hevc picture data (raw streams)
9983  typedef struct HevcPictureData
9984  {
9985  ULWord serialNumber; // serial number (application data)
9986  ULWord ptsValueLow; // presentation time stamp (90kHz)
9987  ULWord ptsValueHigh; // pts high bit only (33 bit roll over)
9988  ULWord pictureNumber; // start with 1 and increment for each picture
9989  ULWord numAdditionalData; // number of additional data entries
9990  } HevcPictureData;
9991 
9992  // hevc picture information (raw streams)
9993  typedef struct HevcPictureInfo
9994  {
9995  HevcPictureData pictureData; // raw stream picture data
9996  //
9997  // additional data format
9998  // u32 additional_data_type
9999  // u32 additional_data_size (256 bytes max)
10000  // u8... additional_data_payload
10001  // ... more additional data
10002  //
10003  // additional data types
10004  // 1 = sei data
10005  // 2 = passthrough data (to encoded additional data of encoded frame)
10006  // 4 = cancel sei on every gop (set additional size to 0)
10007  //
10008  // sei data format
10009  // u8 user_sei_location
10010  // u8 user_sei_type
10011  // u8 user_sei_length
10012  // u8... user_sei_payload
10013  //
10014  // user sei location
10015  // 2 = every gop head picture
10016  // 3 = this picture only
10017  //
10018  // passthrough data format
10019  // u8... passthrough_data_payload
10020  //
10022  } HevcPictureInfo;
10023 
10024  // hevc encoded stream data (encoded streams)
10025  typedef struct HevcEncodedData
10026  {
10027  ULWord serialNumber; // serial number (from picture information)
10028  ULWord esOffsetLow; // encoded stream frame location (?)
10029  ULWord esOffsetHigh; // es frame location high 32 bits
10030  ULWord esSize; // encoded stream frame size (?)
10031  ULWord ptsValueLow; // presentation time stamp (picture information)
10032  ULWord ptsValueHigh; // pts high bit (33 bit roll over)
10033  ULWord dtsValueLow; // decoding time stamp (90 kHz)
10034  ULWord dtsValueHigh; // dts high bit (33 bit roll over)
10035  ULWord itcValueLow; // internal time clock (90 kHz)
10036  ULWord itcValueHigh; // itc high bit (33 bit roll over)
10037  ULWord itcExtension; // internal time extension (27 MHz)
10038  ULWord temporalId; // temporal ID
10039  ULWord esIdrType; // 0 = not IDR, 1 = IDR, 3 = IDR command
10040  ULWord pictureType; // 0 = I-frame, 1 = P-frame, 2 = B-frame
10041  ULWord nalOffset; // offset to the nal top of the idr/i picture
10042  ULWord cpbValue; // codec picture buffer occupancy value
10043  ULWord esHSize; // horizontal resolution
10044  ULWord esVSize; // vertical resolution
10045  ULWord esUnitsInTick; // frame duration (2x eh param value for half rate)
10046  ULWord esBitRate; // bit rate (Kbps)
10047  ULWord esEndFlag; // 0 = not end of sequence, 1 = end of sequence
10048  ULWord esLastFrame; // 0xffffffff = last frame
10057  ULWord numAdditionalData; // number of additional data entries
10058  } HevcEncodedData;
10059 
10060  // hevc encode stream information (encoded streams)
10061  typedef struct HevcEncodedInfo
10062  {
10063  HevcEncodedData encodedData; // encoded stream data
10065  } HevcEncodedInfo;
10066 
10067  // hevc stream transfer information
10068  typedef struct HevcDeviceTransfer
10069  {
10070  HevcStream streamType; // transfer stream type
10071  ULWord streamId; // transfer stream id
10072 
10073  UByte* pVideoBuffer; // video buffer
10074  ULWord videoBufferSize; // total video buffer size
10075  ULWord videoDataSize; // video data size in buffer
10076 
10077  ULWord segVideoPitch; // video segment pitch
10078  ULWord segCodecPitch; // codec segment pitch
10079  ULWord segSize; // segment size
10080  ULWord segCount; // number of segments
10081 
10082  UByte* pInfoBuffer; // information buffer (picture or encoded)
10083  ULWord infoBufferSize; // total information buffer size
10084  ULWord infoDataSize; // information size in buffer
10085 
10086  LWord64 encodeTime; // frame encode time (100ns host system clock)
10087  ULWord flags; // transfer flags (see above for last frame flag)
10089 
10090  // hevc gpio port status
10091  typedef struct hevc_gpio_state
10092  {
10093  HevcGpioFunction function; // gpio last set port function
10094  HevcGpioDirection direction; // gpio last set port direction
10095  HevcGpioValue setValue; // gpio last set value
10096  HevcGpioValue getValue; // gpio last get value
10097  } HevcGpioState;
10098 
10099  // hevc stream statistics (nsec, bytes)
10100  typedef struct hevc_stream_statistics
10101  {
10102  LWord64 transferCount; // number of transfers queued
10103  LWord64 minTransferTime; // minimum time between transfers
10104  LWord64 avrTransferTime; // average time between transfers
10105  LWord64 maxTransferTime; // maximum time between transfers
10106  LWord64 minTransferSize; // minimum transfer size
10107  LWord64 maxTransferSize; // maximum transfer size
10108  LWord64 avrTransferSize; // average transfer size
10109  LWord64 minCopyDuration; // time for io thread to copy frames
10110  LWord64 maxCopyDuration; // to/from bounce buffer
10112  LWord64 minEnqueueDuration; // time from io thread enqueue
10113  LWord64 maxEnqueueDuration; // to send to codec
10115  LWord64 minSendDuration; // time from send to codec
10116  LWord64 maxSendDuration; // to codec acknowledge
10118  LWord64 minDmaDuration; // time from codec acknowledge
10119  LWord64 maxDmaDuration; // to codec dma completion
10121  LWord64 minDequeueDuration; // time from io thread enqueue
10122  LWord64 maxDequeueDuration; // to io thread dequeue
10125 
10126  // hevc status information
10127  typedef struct HevcDeviceStatus
10128  {
10129  HevcMainState mainState; // codec main state
10130  HevcEncodeMode encodeMode; // codec encode mode
10131  HevcFirmwareType firmwareType; // codec firmware type
10132 
10133  HevcVifState vifState[HEVC_STREAM_MAX]; // video interface state
10134  HevcVinState vinState[HEVC_STREAM_MAX]; // video input state
10137 
10138  LWord64 commandCount; // number of commands processed
10139  LWord64 rawTransferCount; // number of raw transfers processed
10140  LWord64 encTransferCount; // number of encoded transfers processed
10141 
10142  ULWord commandQueueLevel; // number of commands in command queue
10143  ULWord rawTransferQueueLevel; // number of transfers in raw transfer queue
10144  ULWord encTransferQueueLevel; // number of transfers in encoded transfer queue
10145  } HevcDeviceStatus;
10146 
10147  // hevc debug information
10148  typedef struct HevcDeviceDebug
10149  {
10150  HevcDeviceStatus deviceStatus; // device status structure
10151 
10152  HevcStreamStatistics rawStats[HEVC_STREAM_MAX]; // raw stream statistics
10153  HevcStreamStatistics encStats[HEVC_STREAM_MAX]; // encoded stream statistics
10154  ULWord queueLevel[HEVC_STREAM_MAX]; // stream queue level
10155  ULWord clearRawStatsBits; // stream bits to clear raw stream statistics
10156  ULWord clearEncStatsBits; // stream bits to clear encodec stream statistics
10157 
10158  ULWord cmdContCount; // codec command continuity count
10159  ULWord cmdAckContCount; // codec command acknowledge count
10160  ULWord cmdMsgContCount; // codec command message count
10161  ULWord rawContCount; // raw dma continuity count
10162  ULWord rawAckContCount; // raw dma acknowledge count
10163  ULWord rawMsgContCount; // raw dma message count
10164  ULWord encContCount; // encoded dma continuity count
10165  ULWord encAckContCount; // encoded dma acnowledge count
10166  ULWord encMsgContCount; // encoded dma message count
10167  } HevcDeviceDebug;
10168 
10169  // hevc driver ioctl message types
10170  typedef enum HevcMessageId
10171  {
10173  Hevc_MessageId_Info, // get device information
10174  Hevc_MessageId_Register, // write/read codec register
10175  Hevc_MessageId_Command, // send a codec command
10176  Hevc_MessageId_Transfer, // transfer codec stream data
10177  Hevc_MessageId_Status, // get codec status
10178  Hevc_MessageId_Debug, // get debug information
10180  } HevcMessageId;
10181 
10182  // hevc common driver ioctl message header
10183  typedef struct hevcMessageHeader
10184  {
10192 
10193  // hevc stream transfer data
10194  typedef struct HevcTransferData
10195  {
10210  } HevcTransferData;
10211 
10212  // hevc driver device information message
10213  typedef struct HevcMessageInfo
10214  {
10217  } HevcMessageInfo;
10218 
10219  // hevc driver register message
10220  typedef struct HevcMessageRegister
10221  {
10225 
10226  // hevc driver command message
10227  typedef struct HevcMessageCommand
10228  {
10232 
10233  // hevc driver transfer message
10234  typedef struct HevcMessageTransfer
10235  {
10239 
10240  // hevc driver status message
10241  typedef struct HevcMessageStatus
10242  {
10246 
10247  // hevc driver debug message
10248  typedef struct HevcMessageDebug
10249  {
10252  } HevcMessageDebug;
10253 #endif
10254 
10255 typedef struct HDRRegValues
10256 {
10257  uint16_t greenPrimaryX;
10258  uint16_t greenPrimaryY;
10259  uint16_t bluePrimaryX;
10260  uint16_t bluePrimaryY;
10261  uint16_t redPrimaryX;
10262  uint16_t redPrimaryY;
10263  uint16_t whitePointX;
10264  uint16_t whitePointY;
10271 
10272  #if !defined(NTV2_BUILDING_DRIVER)
10276  inline bool validPrimariesAndWhitePoint (void) const { const uint16_t kMax(0xC350);
10277  return greenPrimaryX <= kMax || greenPrimaryY <= kMax ||
10278  bluePrimaryX <= kMax || bluePrimaryY <= kMax ||
10279  redPrimaryX <= kMax || redPrimaryY <= kMax ||
10280  whitePointX <= kMax || whitePointY <= kMax; }
10281  inline HDRRegValues & setBT2020 (void) { greenPrimaryX = 0x2134; greenPrimaryY = 0x9BAA; bluePrimaryX = 0x1996; bluePrimaryY = 0x08FC;
10282  redPrimaryX = 0x8A48; redPrimaryY = 0x3908; whitePointX = 0x3D13; whitePointY = 0x4042;
10283  maxMasteringLuminance = 0x2710; minMasteringLuminance = 0x0032;
10285  electroOpticalTransferFunction = 0x02; staticMetadataDescriptorID = 0x00; return *this; }
10286  inline HDRRegValues & setDCIP3 (void) { greenPrimaryX = 0x33C2; greenPrimaryY = 0x86C4; bluePrimaryX = 0x1D4C; bluePrimaryY = 0x0BB8;
10287  redPrimaryX = 0x84D0; redPrimaryY = 0x3E80; whitePointX = 0x3D13; whitePointY = 0x4042;
10288  maxMasteringLuminance = 0x02E8; minMasteringLuminance = 0x0032;
10290  electroOpticalTransferFunction = 0x02; staticMetadataDescriptorID = 0x00; return *this; }
10291  #endif // !defined(NTV2_BUILDING_DRIVER)
10292 } HDRRegValues;
10293 
10294 typedef struct HDRFloatValues
10295 {
10310 
10311  #if !defined(NTV2_BUILDING_DRIVER)
10315 
10316  inline bool validPrimariesAndWhitePoint (void) const { return greenPrimaryX >= 0.0f || greenPrimaryX <= float(1.0f) ||
10317  greenPrimaryY >= 0.0f || greenPrimaryY <= float(1.0f) ||
10318  bluePrimaryX >= 0.0f || bluePrimaryX <= float(1.0f) ||
10319  bluePrimaryY >= 0.0f || bluePrimaryY <= float(1.0f) ||
10320  redPrimaryX >= 0.0f || redPrimaryX <= float(1.0f) ||
10321  redPrimaryY >= 0.0f || redPrimaryY <= float(1.0f) ||
10322  whitePointX >= 0.0f || whitePointX <= float(1.0f) ||
10323  whitePointY >= 0.0f || whitePointY <= float(1.0f) ||
10324  minMasteringLuminance >= 0 || minMasteringLuminance <= float(6.5535f); }
10325 
10326  inline bool setFromRegValues (const HDRRegValues & inRegValues) { if (!inRegValues.validPrimariesAndWhitePoint())
10327  return false;
10328  const float kMult(0.00002f), kMultLum(0.0001f);
10329  greenPrimaryX = float(inRegValues.greenPrimaryX * kMult);
10330  greenPrimaryY = float(inRegValues.greenPrimaryY * kMult);
10331  bluePrimaryX = float(inRegValues.bluePrimaryX * kMult);
10332  bluePrimaryY = float(inRegValues.bluePrimaryY * kMult);
10333  redPrimaryX = float(inRegValues.redPrimaryX * kMult);
10334  redPrimaryY = float(inRegValues.redPrimaryY * kMult);
10335  whitePointX = float(inRegValues.whitePointX * kMult);
10336  whitePointY = float(inRegValues.whitePointY * kMult);
10337  minMasteringLuminance = float(inRegValues.minMasteringLuminance * kMultLum);
10343  return true; }
10344 
10345  inline bool toRegValues (HDRRegValues & outVals) const { if (!validPrimariesAndWhitePoint())
10346  return false;
10347  outVals.greenPrimaryX = uint16_t(greenPrimaryX / float(0.00002f));
10348  outVals.greenPrimaryY = uint16_t(greenPrimaryY / float(0.00002f));
10349  outVals.bluePrimaryX = uint16_t(bluePrimaryX / float(0.00002f));
10350  outVals.bluePrimaryY = uint16_t(bluePrimaryY / float(0.00002f));
10351  outVals.redPrimaryX = uint16_t(redPrimaryX / float(0.00002f));
10352  outVals.redPrimaryY = uint16_t(redPrimaryY / float(0.00002f));
10353  outVals.whitePointX = uint16_t(whitePointX / float(0.00002f));
10354  outVals.whitePointY = uint16_t(whitePointY / float(0.00002f));
10355  outVals.minMasteringLuminance = uint16_t(minMasteringLuminance / float(0.0001f));
10361  return true; }
10362  #endif // !defined(NTV2_BUILDING_DRIVER)
10363 } HDRFloatValues;
10364 
10365 typedef struct HDRDriverValues{
10366  uint16_t greenPrimaryX;
10367  uint16_t greenPrimaryY;
10368  uint16_t bluePrimaryX;
10369  uint16_t bluePrimaryY;
10370  uint16_t redPrimaryX;
10371  uint16_t redPrimaryY;
10372  uint16_t whitePointX;
10373  uint16_t whitePointY;
10380  uint8_t luminance;
10382 
10383 #define NTV2_IS_VALID_HDR_PRIMARY(__val__) ((__val__) <= 0x0000C350)
10384 #define NTV2_IS_VALID_HDR_MASTERING_LUMINENCE(__val__) (true)
10385 #define NTV2_IS_VALID_HDR_LIGHT_LEVEL(__val__) (true)
10386 
10387 #if 0 && defined(_DEBUG)
10388  // One-stop-shop for pretend/fake device swap (AJA internal use only)
10389  #define NTV2_PRETEND_DEVICE
10390  #define NTV2_PRETEND_DEVICE_FROM DEVICE_ID_IOX3
10391  #define NTV2_PRETEND_DEVICE_TO DEVICE_ID_KONAHDMI
10392 #endif // _DEBUG
10393 #endif // NTV2PUBLICINTERFACE_H
NTV2LUTControlRegisters
NTV2_RP188(const ULWord inDBB=0xFFFFFFFF, const ULWord inLow=0xFFFFFFFF, const ULWord inHigh=0xFFFFFFFF)
Constructs an NTV2_RP188 from each of its DBB, low and high ULWord components.
std::set< NTV2VideoFormat > NTV2VideoFormatSet
A set of distinct NTV2VideoFormat values.
NTV2SegmentedXferInfo & setSourceDirection(const bool inTopDown)
Sets the scan direction for the source.
NTV2AutoCirculateState state
UWordSequence::iterator UWordSequenceIter
A handy non-const iterator for iterating over a UWordSequence.
NTV2VideoFrameBufferOrientation frameBufferOrientation
#define NTV2_STRUCT_END(__struct_name__)
HevcGpioControl gpioControl
ADV7189BRegisterNum
Everything needed to call CNTV2Card::ReadRegister or CNTV2Card::WriteRegister functions.
struct HDRDriverValues HDRDriverValues
const FRAME_STAMP & GetFrameInfo(void) const
Returns a constant reference to my FRAME_STAMP.
NTV2StandardSet::const_iterator NTV2StandardSetConstIter
A handy const iterator for iterating over an NTV2StandardSet.
ULWord GetCapturedAudioByteCount(void) const
ULWord audioInStopAddress
For record - end position (exclusive) in buffer of audio (includes base offset)
std::set< NTV2FrameBufferFormat > NTV2FrameBufferFormatSet
A set of distinct NTV2FrameBufferFormat values.
UByteSequence::iterator UByteSequenceIter
A handy non-const iterator for iterating over a UByteSequence.
struct AUTOCIRCULATE_TASK_STRUCT_64 * PAUTOCIRCULATE_TASK_STRUCT_64
struct AUTOCIRCULATE_P2P_STRUCT * PAUTOCIRCULATE_P2P_STRUCT
ULWord frame
The frame requested or -1 if not available.
#define HEVC_STREAM_MAX
NTV2HDMIOutAudioRegisters
HevcFirmwareType firmwareType
const NTV2AudioChannelsMuted16 NTV2AudioChannelsEnableAll
All 16 audio channels unmuted/enabled.
bool NTV2DeviceGetSupportedStandards(const NTV2DeviceID inDeviceID, NTV2StandardSet &outStandards)
Returns a set of distinct NTV2Standard values supported on the given device.
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
NTV2RegWrites::const_iterator NTV2RegWritesConstIter
A handy const (read-only) iterator for iterating over the contents of an NTV2RegisterWrites instance...
NTV2TCIndexes::const_iterator NTV2TCIndexSetConstIter
A handy const interator for iterating over an NTV2TCIndexes set.
NTV2AudioSystem
Used to identify an Audio System on an NTV2 device. See Audio System Operation for more information...
Definition: ntv2enums.h:3898
MessageRegisterMask
std::set< NTV2TCIndex > NTV2TCIndexSet
A set of distinct NTV2TCIndex values.
NTV2OutputDestinations::const_iterator NTV2OutputDestinationsConstIter
A handy const iterator for iterating over an NTV2OutputDestinations.
struct AUTOCIRCULATE_STATUS_STRUCT AUTOCIRCULATE_STATUS_STRUCT
For devices that support it (see NTV2DeviceCanDoSDIErrorChecks ), this struct reports SDI input error...
NTV2VideoFrameBufferOrientation
Determines the order that raster lines are written into, or read out of, frame buffer memory on the d...
Definition: ntv2enums.h:2043
std::set< NTV2TCIndex > NTV2TCIndexes
The AutoCirculate channel is running.
ULWord currentAudioStartAddress
As found by isr.
std::string NTV2ChannelSetToStr(const NTV2ChannelSet &inObj, const bool inCompact=true)
struct HevcPciId HevcPciId
void SetFlags(const ULWord inFlags)
Sets the action flags for use in a subsequent call to CNTV2Card::LoadBitstream.
char standardFirmwareSingle[64]
#define NTV2_IS_STRUCT_VALID_IMPL(__hr__, __tr__)
LWord64 currentTime
Current processor time ... on Windows, this is derived from KeQueryPerformanceCounter.
uint16_t & U16(const int inIndex)
int8_t I8(const int inIndex) const
std::set< NTV2FrameRate > NTV2FrameRateSet
A set of distinct NTV2FrameRate values. New in SDK 17.0.
NTV2Crosspoint
Logically, these are an NTV2Channel combined with an NTV2Mode.
Definition: ntv2enums.h:1703
mVideoBuffer Allocate(mFormatDesc.GetTotalRasterBytes())
NTV2TaskMode NTV2EveryFrameTaskMode
ULWord GetVersion(void) const
ADV7402AHDProcAmpRegisters HD
CUSTOM_ANC_STRUCT customAncInfo
This field is obsolete. Do not use.
enum _NTV2OERegisters NTV2OERegisters
NTV2RegWritesConstIter NTV2RegReadsConstIter
A handy const (read-only) iterator for iterating over the contents of an NTV2RegisterReads instance...
std::vector< double > NTV2DoubleArray
An array of double-precision floating-point values.
struct BUILD_INFO_STRUCT * PBUILD_INFO_STRUCT
HevcMessageHeader header
NTV2HDMIColorSpace
Indicates or specifies HDMI Color Space.
Definition: ntv2enums.h:3608
ULWordSet NTV2RegisterNumberSet
A set of distinct ULWord values.
bool WithCustomAnc(void) const
bool IsNULL(void) const
ULWord audioOutStartAddress
For play - end position (exclusive) in buffer of audio.
NTV2RegInfo(const ULWord inRegNum=0, const ULWord inValue=0, const ULWord inMask=0xFFFFFFFF, const ULWord inShift=0)
Constructs a valid NTV2RegInfo from the given optional parameters.
ULWord shift(void) const
~NTV2StreamBuffer()
My default destructor, which frees all allocatable fields that I own.
ULWord getElementLength(void) const
int16_t & I16(const int inIndex)
CUSTOM_ANC_STRUCT customAncInfo
This field is obsolete. Do not use.
NTV2RegInfo & setMask(const ULWord val)
struct hevc_stream_statistics HevcStreamStatistics
The AutoCirculate channel is starting, waiting for the first VBI and/or call to CNTV2Card::AutoCircul...
NTV2FrameBufferFormat
Identifies a particular video frame buffer pixel format. See Device Frame Buffer Formats for details...
Definition: ntv2enums.h:221
#define BIT(_x_)
Definition: ajatypes.h:596
MessageRegisterShift
defined(NTV2_DEPRECATE_17_6)
NTV2ChannelSet::const_iterator NTV2ChannelSetConstIter
A handy const iterator into an NTV2ChannelSet.
NTV2TaskMode
Describes the task mode state. See also: Sharing AJA Devices With Other Applications.
ULWord getTotalBytes(void) const
ULWord OptionFlags(void) const
DefaultVideoOutMode
CCLUTV3Registers
#define NTV2_IS_VALID_TRAILER_TAG(_x_)
NTV2StringSet::const_iterator NTV2StringSetConstIter
UByte NTV2DID
An ancillary Data IDentifier.
struct HevcDeviceStatus HevcDeviceStatus
int64_t I64(const int inIndex) const
ULWord GetCapturedAudioByteCount(void) const
std::set< NTV2InputSource > NTV2InputSourceSet
A set of distinct NTV2InputSource values.
float & FL(const int inIndex)
ULWord GetType(void) const
int Fixed_
Definition: ajatypes.h:302
uint16_t minMasteringLuminance
size_t GetByteCount(void) const
struct HevcMessageRegister HevcMessageRegister
ULWord width(void) const
unsigned int BOOL_
Definition: ajatypes.h:300
ULWord GetBufferLevel(void) const
#define KONA_DEBUGFILTER_STRINGLENGTH
NTV2IDSwitchRegister
NTV2StringList::const_iterator NTV2StringListConstIter
enum NTV2VideoFrameBufferOrientation NTV2FBOrientation
bool WithFBOChange(void) const
std::ostream & NTV2PrintChannelList(const NTV2ChannelList &inObj, const bool inCompact=true, std::ostream &inOutStream=std::cout)
Streams a human-readable dump of the given NTV2ChannelList into the specified output stream...
The AutoCirculate channel is initializing, waiting for CNTV2Card::AutoCirculateStart to be called...
ULWord GetNumAvailableOutputFrames(void) const
NTV2DoubleArray::iterator NTV2DoubleArrayIter
Handy non-const iterator to iterate over an NTV2DoubleArray.
bool isSourceTopDown(void) const
std::ostream & NTV2PrintChannelSet(const NTV2ChannelSet &inObj, const bool inCompact=true, std::ostream &inOutStream=std::cout)
Streams a human-readable dump of the given NTV2ChannelSet into the specified output stream...
void SetMaxLockSize(const ULWord64 inNumBytes)
Sets the maximum lock size for use in a subsequent call to CNTV2Card::DMABufferLock.
NTV2TimeCodeList::const_iterator NTV2TimeCodeListConstIter
A handy const interator for iterating over an NTV2TimeCodeList.
NTV2SegmentedXferInfo & setSourceOffset(const ULWord inOffset)
Sets my source offset.
int16_t I16(const int inIndex) const
AutoCircTaskType
These are the available AutoCirculate task types.
uint32_t U32(const int inIndex) const
AutoCircVidProcMode
ULWordSet::iterator ULWordSetIter
ULWordSequence::const_iterator ULWordSequenceConstIter
A handy const iterator for iterating over a ULWordSequence.
void SetConnectionID(const ULWord inValue)
uint64_t & U64(const int inIndex)
ULWord bytesRead
Total audio and video bytes transfered.
bool SetFrameUserCookie(const ULWord64 &inUserCookie)
Intended for playout, replaces my current acUserCookie value with the new value.
#define NTV2_STREAM_CHANNEL_STATE_ERROR
Used in NTV2StreamChannel stream error.
ULWord GetTag(void) const
bool IsValid(void) const
Answers true if I&#39;m valid, or false if I&#39;m not valid.
ULWord registerNum
ULWord audioExpectedAddress
The address that was used to transfer.
NTV2RegWrites::const_iterator NTV2RegisterWritesConstIter
std::ostream & NTV2PrintULWordVector(const NTV2ULWordVector &inObj, std::ostream &inOutStream=std::cout)
Streams a human-readable dump of the given NTV2ULWordVector into the specified output stream...
std::map< ULWord, ULWord > NTV2RegisterValueMap
A mapping of distinct NTV2RegisterNumbers to their corresponding ULWord values.
ULWord getDestPitch(void) const
ULWord offset(void) const
bool WithAudio(void) const
HevcDeviceRegister data
ULWordSetConstIter NTV2RegNumSetConstIter
A const iterator that iterates over a set of distinct NTV2RegisterNumbers.
struct RP188_STRUCT RP188_STRUCT
int32_t LWord
Definition: ajatypes.h:235
struct HevcEncodedInfo HevcEncodedInfo
NTV2AudioSystemSet NTV2MakeAudioSystemSet(const NTV2AudioSystem inFirstAudioSystem, const UWord inCount=1)
NTV2HDMIOutputStatus(const ULWord inData)
Constructs a NTV2HDMIOutputStatus from a register data value.
NTV2VideoFrameBufferOrientation frameBufferOrientation
VirtualProcAmpRegisters_base HD
#define AUTOCIRCULATE_WITH_FBFCHANGE
Use this to AutoCirculate with the possibility of frame buffer format changes.
HevcFirmwareType firmwareType
NTV2ClockMonitorWidgetRegisters
std::bitset< 16 > NTV2AudioChannelsMuted16
Per-audio-channel mute state for up to 16 audio channels.
FRAME_STAMP acFrameStamp
Frame stamp for the transferred frame.
AUTOCIRCULATE_DATA(const AUTO_CIRC_COMMAND inCommand=AUTO_CIRC_COMMAND_INVALID, const NTV2Crosspoint inCrosspoint=NTV2CROSSPOINT_INVALID)
UByteSequence::const_iterator UByteSequenceConstIter
A handy const iterator for iterating over a UByteSequence.
NTV2FrameSize(const ULWord inWidth=0, const ULWord inHeight=0)
My constructor.
HevcGpioDirection gpioDirection
NTV2AudioChannelQuads::const_iterator NTV2AudioChannelQuadsConstIter
Handy const iterator to iterate over a set of distinct NTV2AudioChannelQuad values.
Specifies any/all input/output kinds.
Definition: ntv2enums.h:1297
bool CanAcceptMoreOutputFrames(void) const
bool validPrimariesAndWhitePoint(void) const
ULWord value(void) const
HevcDeviceStatus deviceStatus
UByteSequence NTV2_RPC_BLOB_TYPE
void MakeInvalid(void)
Invalidates me, setting my register number, value, mask and shift values to 0xFFFFFFFF.
NTV2FrameBufferFormatSet NTV2PixelFormats
struct AUTOCIRCULATE_TASK_STRUCT * PAUTOCIRCULATE_TASK_STRUCT
AUTO_CIRC_COMMAND eCommand
UByteSequence GetU8s(const size_t inU8Offset=0, const size_t inMaxSize=128) const
ULWord currentFrame
Last vertical blank frame for this channel&#39;s auto-circulate. (at the time of the IOCTL_NTV2_GET_FRAME...
FGSizesMap::const_iterator FGSizesMapCI
HevcGpioDirection direction
NTV2HDMIAudioChannels
Indicates or specifies the HDMI audio channel count.
Definition: ntv2enums.h:3670
NTV2FrameSize NTV2FrameDimensions
bool IsIdle(void)
Is the stream idle.
int32_t & I32(const int inIndex)
const NTV2AudioChannelsMuted16 NTV2AudioChannelsMuteAll
All 16 audio channels muted/disabled.
uint16_t maxFrameAverageLightLevel
NTV2AutoCirculateState GetState(void) const
std::set< NTV2OutputDestination > NTV2OutputDestinations
A set of distinct NTV2OutputDestination values.
_NTV2MultiRasterRegisters
const NTV2Buffer & requestedRegisterNumbers(void) const
bool isSourceBottomUp(void) const
ULWord GetNumFailedWrites(void) const
bool operator!=(const json_pointer< RefStringTypeLhs > &lhs, const json_pointer< RefStringTypeRhs > &rhs) noexcept
Definition: json.hpp:14762
HevcVersion driverVersion
struct DMA_TRANSFER_STRUCT_64 * PDMA_TRANSFER_STRUCT_64
#define false
NTV2HDMIRange
Indicates or specifies the HDMI RGB range.
Definition: ntv2enums.h:3638
uint32_t ULWord
Definition: ajatypes.h:236
NTV2SegmentedXferInfo & setElementLength(const ULWord inBytesPerElement)
Sets my element length.
NTV2AudioFormat
Definition: ntv2enums.h:1954
NTV2Channel
These enum values are mostly used to identify a specific widget_framestore. They&#39;re also commonly use...
Definition: ntv2enums.h:1359
Describes a segmented data transfer (copy or move) from a source memory location to a destination loc...
#define NTV2_BEGIN_PRIVATE
NTV2SegmentedXferInfo & setSegmentInfo(const ULWord inNumSegs, const ULWord inSegLength)
Sets both my segment count and length.
std::vector< NTV2RegInfo > NTV2RegWrites
An ordered sequence of zero or more NTV2RegInfo structs intended for WriteRegister.
uint32_t & U32(const int inIndex)
HevcEncodeMode encodeMode
NTV2FrameRateSet::const_iterator NTV2FrameRateSetConstIter
A handy const iterator for iterating over an NTV2FrameRateSet.
struct AutoCircGenericTask AutoCircGenericTask
std::set< NTV2AudioChannelPair > NTV2AudioChannelPairs
A set of distinct NTV2AudioChannelPair values.
NTV2AudioRateSet::const_iterator NTV2AudioRateSetConstIter
A handy const iterator for iterating over an NTV2AudioRateSet.
std::set< NTV2AudioChannelQuad > NTV2AudioChannelQuads
A set of distinct NTV2AudioChannelQuad values.
uint8_t electroOpticalTransferFunction
std::set< NTV2Standard > NTV2StandardSet
A set of distinct NTV2Standard values.
uint64_t Pointer64
Definition: ajatypes.h:240
std::string NTV2AudioSystemSetToStr(const NTV2AudioSystemSet &inObj, const bool inCompact=true)
ULWord GetProcessedFrameCount(void) const
const NTV2Buffer & GetAudioBuffer(void) const
Output (playout, display) mode, which reads from device SDRAM.
Definition: ntv2enums.h:1244
HevcChangeSequence changeSequence
NTV2SegmentedXferInfo & setDestFlipped(const bool inFlipped=Direction_Flipped)
Sets the scan direction for the destination.
NTV2_RP188(const RP188_STRUCT &inOldRP188)
Constructs an NTV2_RP188 from the given RP188_STRUCT.
bool NTV2GetSupportedStandards(NTV2StandardSet &outStandards)
Returns a set of all NTV2Standard values supported (used) by any/all supported NTV2 devices...
NTV2LocalProcBlockRegisters
std::vector< uint8_t > UByteSequence
An ordered sequence of UByte (uint8_t) values.
ULWord64Sequence GetU64s(const size_t inU64Offset=0, const size_t inMaxSize=16, const bool inByteSwap=false) const
ULWordSet::const_iterator ULWordSetConstIter
struct AutoCircVidProcInfo AutoCircVidProcInfo
AUTO_CIRC_COMMAND eCommand
This struct replaces the old RP188_STRUCT.
NTV2RegWritesConstIter NTV2RegisterReadsConstIter
NTV2GeometrySet::const_iterator NTV2GeometrySetConstIter
A handy const iterator for iterating over an NTV2GeometrySet.
AutoCircGenericTask * taskArray
bool isValid(void) const
NTV2LocalProcRegisterShift
ULWord height(void) const
ULWord regNum(void) const
NTV2ChannelList NTV2MakeChannelList(const NTV2Channel inFirstChannel, const UWord inNumChannels=1)
struct HevcDeviceTransfer HevcDeviceTransfer
NTV2RegInfo & setRegNum(const ULWord val)
ULWord value
NTV2TCIndex
These enum values are indexes into the capture/playout AutoCirculate timecode arrays.
Definition: ntv2enums.h:3954
NTV2XilinxFPGA
Definition: ntv2enums.h:3849
bool Fill(const T &inValue)
Fills me with the given scalar value.
bool Find(const T &inValue, int &inOutIndex) const
Searches me for the given scalar value of type T starting at a given index position.
struct INTERRUPT_TIMESTAMP_STRUCT * PINTERRUPT_TIMESTAMP_STRUCT
SharedPrefsPermissions
bool IsProvidedByClient(void) const
NTV2PWMFanRegisters
ULWord currentReps
At Call Line# currently being OUTPUT (at the time of the IOCTL_NTV2_GET_FRAMESTAMP) ...
ULWord GetSegmentCount(void) const
bool IsValid(void) const
NTV2Buffer & outRegisterValues(void)
enum _NTV2MultiRasterRegisters NTV2MultiRasterRegisters
struct AUTOCIRCULATE_TRANSFER_STATUS_STRUCT * PAUTOCIRCULATE_TRANSFER_STATUS_STRUCT
#define NTV2_RPC_BUFFER_CODEC_DECLS
AutoCircVidProcMode mode
NTV2FrameRate
Identifies a particular video frame rate.
Definition: ntv2enums.h:414
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
double & DBL(const int inIndex)
HevcPictureData pictureData
#define true
ULWordSetIter NTV2RegNumSetIter
A non-constant iterator that iterates over a set of distinct NTV2RegisterNumbers. ...
NTV2Standard
Identifies a particular video standard.
Definition: ntv2enums.h:167
0: Disabled (never recommended): device configured exclusively by client application(s).
bool IsStarting(void) const
AutoCircTimeCodeTask timeCodeTask
struct HevcPictureData HevcPictureData
bool IsAllocatedBySDK(void) const
uint8_t electroOpticalTransferFunction
ULWord GetSizeInBytes(void) const
My total size, in bytes, including header, body and trailer (but excluding embedded NTV2Buffer data) ...
NTV2DeviceID
Identifies a specific AJA NTV2 device model number. The NTV2DeviceID is actually the PROM part number...
Definition: ntv2enums.h:20
HDMIOutColorSpaceMode
Enumerations for controlling NTV2 devices.
~NTV2MailBuffer()
My default destructor, which frees all allocatable fields that I own.
NTV2RegisterValueMap::iterator NTV2RegValueMapIter
A non-constant iterator that iterates over NTV2RegisterValueMap entries.
ULWord getDestEndOffset(void) const
void Set(const ULWord inRegNum, const ULWord inValue, const ULWord inMask=0xFFFFFFFF, const ULWord inShift=0)
Sets me from the given parameters.
This is used to perform virtual data reads or writes.
bool IsQuarterSizeExpandModeEnabled(void) const
ULWord UWord_
Definition: ajatypes.h:301
struct HevcEncodedData HevcEncodedData
The invalid mode.
Definition: ntv2enums.h:1247
struct hevc_gpio_state HevcGpioState
#define NTV2_IS_ACTIVE_COLOR_CORRECTION_MODE(__x__)
Definition: ntv2enums.h:2093
bool WithHDMIAuxData(void) const
std::set< std::string > NTV2StringSet
NTV2FrameSize & swap(void)
Swaps my width and height.
NTV2HDMIOutputStatus()
Constructs a default NTV2HDMIOutputStatus.
NTV2ColorCorrectionInfo_32 colorCorrectionInfo
int64_t & I64(const int inIndex)
const AUTOCIRCULATE_TRANSFER_STATUS & GetTransferStatus(void) const
Returns a constant reference to my AUTOCIRCULATE_TRANSFER_STATUS.
bool NTV2GetSupportedPixelFormats(NTV2PixelFormats &outFormats)
Returns a set of all NTV2PixelFormat values supported (used) by any/all supported NTV2 devices...
NTV2VideoFormatSet::const_iterator NTV2VideoFormatSetConstIter
A handy const iterator for iterating over an NTV2VideoFormatSet.
Defines the import/export macros for producing DLLs or LIBs.
The AutoCirculate channel is stopping.
ULWord GetProcessedFrameCount(void) const
void SetFlags(const ULWord inFlags)
Sets the action flags for use in a subsequent call to CNTV2Card::DMABufferLock.
_INTERRUPT_ENUMS_
HevcEncodeMode encodeMode
NTV2DMAEngine
Definition: ntv2enums.h:1859
#define AJA_NULL
Definition: ajatypes.h:180
struct HDRFloatValues HDRFloatValues
#define NWL_REG_START
#define POINTER_32
Definition: ajatypes.h:321
#define NTV2_DEPRECATED_18_1(__f__)
Definition: ajatypes.h:591
NTV2TimeCodes::const_iterator NTV2TimeCodesConstIter
A handy const interator for iterating over NTV2TCIndex/NTV2TimeCodeList pairs.
struct AUTOCIRCULATE_TASK_STRUCT AUTOCIRCULATE_TASK_STRUCT
NTV2ColorCorrectionMode mode
enum _AutoCircCommand_ NTV2AutoCirculateCommand
Reports HDMI output status information.
HevcMessageHeader header
Declares the most fundamental data types used by NTV2. Since Windows NT was the first principal devel...
HDMIOutProtocolMode
NTV2RegWritesIter NTV2RegReadsIter
A handy non-const iterator for iterating over the contents of an NTV2RegisterReads instance...
TestPatternSelect
struct hevcMessageHeader HevcMessageHeader
ULWord GetResultStatus(void) const
std::vector< ULWord > NTV2ULWordVector
An ordered sequence of ULWords.
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
enum _INTERRUPT_ENUMS_ INTERRUPT_ENUMS
struct HevcDeviceCommand HevcDeviceCommand
#define NTV2_END_PRIVATE
ULWord GetRequestedRegisterCount(void) const
NTV2ColorCorrectionMode
Definition: ntv2enums.h:2082
bool IsStopped(void) const
bool IsValid(void) const
2: OEM (recommended): device configured by client application(s) with some driver involvement...
NTV2SegmentedXferInfo()
Constructs me as empty/invalid.
std::ostream & operator<<(std::ostream &inOutStream, const NTV2StringList &inData)
NTV2QuarterSizeExpandMode
Definition: ntv2enums.h:2489
HevcMessageHeader header
NTV2ColorCorrectionInfo colorCorrectionInfo
NTV2RegisterNumberSet NTV2RegNumSet
A set of distinct NTV2RegisterNumbers.
This is used to atomically perform bank-selected register reads or writes.
std::set< ULWord > ULWordSet
A collection of unique ULWord (uint32_t) values.
ULWord64Sequence::iterator ULWord64SequenceIter
A handy non-const iterator for iterating over a ULWord64Sequence.
NTV2StringList::iterator NTV2StringListIter
struct AUTOCIRCULATE_TRANSFER_STRUCT AUTOCIRCULATE_TRANSFER_STRUCT
HDMIOutStereoSelect
ULWord GetHeaderVersion(void) const
NTV2SegmentedXferInfo & setDestPitch(const ULWord inPitch)
Sets my destination pitch.
enum _NTV2XptValidROMRegisters NTV2XptValidROMRegisters
struct AUTOCIRCULATE_DATA AUTOCIRCULATE_DATA
NTV2ColorCorrectionInfo_64 colorCorrectionInfo
#define NTV2_SHOULD_BE_DEPRECATED(__f__)
Definition: ajatypes.h:504
int64_t LWord64
Definition: ajatypes.h:238
All new NTV2 structs start with this common header.
NTV2RegWrites NTV2RegisterReads
XlnxRegisterShift
std::vector< uint16_t > UWordSequence
An ordered sequence of UWord (uint16_t) values.
bool NTV2DeviceGetSupportedFrameRates(const NTV2DeviceID inDeviceID, NTV2FrameRateSet &outRates)
Returns a set of distinct NTV2FrameRate values supported on the given device.
#define NTV2_IS_INPUT_CROSSPOINT(__x__)
Definition: ntv2enums.h:1727
std::set< NTV2FrameGeometry > NTV2GeometrySet
A set of distinct NTV2FrameGeometry values.
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
UWordSequence::const_iterator UWordSequenceConstIter
A handy const iterator for iterating over a UWordSequence.
std::set< NTV2AudioSystem > NTV2AudioSystemSet
A set of distinct NTV2AudioSystem values. New in SDK 16.2.
uint16_t maxMasteringLuminance
ULWord GetPointerSize(void) const
#define NTV2_RPC_CODEC_DECLS
NTV2HDMIProtocol
Indicates or specifies the HDMI protocol.
Definition: ntv2enums.h:3624
struct HevcMessageStatus HevcMessageStatus
The AutoCirculate channel is starting, waiting for the start time specified in the call to CNTV2Card:...
ULWord shift
ULWord GetDroppedFrameCount(void) const
bool NTV2DeviceGetSupportedVideoFormats(const NTV2DeviceID inDeviceID, NTV2VideoFormatSet &outFormats)
Returns a set of distinct NTV2VideoFormat values supported on the given device.
enum _NTV2HDMIRegisters NTV2HDMIRegisters
ULWord64 audioClockCurrentTime
48kHz clock in reg 28 extended to 64 bits
uint16_t maxFrameAverageLightLevel
struct HevcPictureInfo HevcPictureInfo
double DBL(const int inIndex) const
std::string GetString(const size_t inU8Offset=0, const size_t inMaxSize=128) const
std::ostream & NTV2PrintAudioSystemSet(const NTV2AudioSystemSet &inObj, const bool inCompact=true, std::ostream &inOutStream=std::cout)
Streams a human-readable dump of the given NTV2AudioSystemSet into the specified output stream...
The AutoCirculate channel is stopped.
NTV2RegWrites::iterator NTV2RegisterWritesIter
bool WithRP188(void) const
#define AUTOCIRCULATE_WITH_ANC
Use this to AutoCirculate with ancillary data.
NTV2FrameBufferFormat frameBufferFormat
#define NTV2_END_PROTECTED
void Clear(void)
Resets the struct to its initialized state.
enum _AutoCircCommand_ NTV2AutoCircCmd
uint64_t ULWord64
Definition: ajatypes.h:239
NTV2QuarterSizeExpandMode videoQuarterSizeExpand
NTV2DIDSet::const_iterator NTV2DIDSetConstIter
Handy const iterator to iterate over an NTV2DIDSet.
std::set< NTV2AudioRate > NTV2AudioRateSet
A set of distinct NTV2AudioRate values. New in SDK 18.0.
LWord GetActiveFrame(void) const
ULWord getDestOffset(void) const
NTV2RoutingEntry & operator=(const NTV2RegInfo &inRHS)
Assigns an NTV2RegInfo to me.
HevcChangeSequence
int8_t & I8(const int inIndex)
HDRRegValues & setDCIP3(void)
#define NTV2_IS_VALID_STRUCT_TYPE(_x_)
uint8_t UByte
Definition: ajatypes.h:231
DriverStartPhase
The AutoCirculate channel is paused.
NTV2Crosspoint channelSpec
bool IsPageAligned(void) const
This is used by the CNTV2Card::ReadRegisters function.
NTV2ColorCorrectionMode mode
uint16_t maxContentLightLevel
NTV2LEDWidgetRegisters
NTV2Crosspoint backgroundVideoCrosspoint
NTV2AudioMixerRegisters
NwlRegisterShift
#define NTV2_BUILD_STRINGLENGTH
NTV2FrameSize & reset(void)
Sets both my width and height to zero (an invalid state).
const NTV2Buffer & GetVideoBuffer(void) const
bool validPrimariesAndWhitePoint(void) const
This is used to prelock a video/audio/anc buffer used as the source or target of DMA transfers...
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me into the given output stream.
NTV2AutoCirculateState
Describes the state of an AutoCirculate channel. See AUTOCIRCULATE_STATUS.
bool NTV2DeviceGetSupportedPixelFormats(const NTV2DeviceID inDeviceID, NTV2PixelFormats &outFormats)
Returns a set of distinct NTV2FrameBufferFormat values supported on the given device.
struct FRAME_STAMP_STRUCT FRAME_STAMP_STRUCT
ULWord getTotalElements(void) const
ActiveVideoOutSelect
std::ostream & Print(std::ostream &oss) const
AutoCircRegisterTask registerTask
HevcGpioFunction gpioFunction
NTV2SegmentedXferInfo & setDestOffset(const ULWord inOffset)
Sets my destination offset.
ULWord getSourceEndOffset(void) const
This is used for bitstream maintainance. (New in SDK 16.0)
Describes a user-space buffer on the host computer. I have an address and a length, plus some optional attributes (allocated by SDK?, page-aligned? etc.).
ULWord audioInStartAddress
For record - first position in buffer of audio (includes base offset)
std::map< NTV2TCIndex, NTV2_RP188 > NTV2TimeCodes
A mapping of NTV2TCIndex enum values to NTV2_RP188 structures.
bool IsValid(void) const
NTV2Mode
Used to identify the mode of a widget_framestore, or the direction of an AutoCirculate stream: either...
Definition: ntv2enums.h:1241
bool NTV2DeviceGetSupportedOutputDests(const NTV2DeviceID inDeviceID, NTV2OutputDestinations &outOutputDests, const NTV2IOKinds inKinds=NTV2_IOKINDS_ALL)
Returns a set of distinct NTV2OutputDest values supported on the given device.
uint16_t GetEndFrame(void) const
HevcMessageHeader header
NTV2DIDSet::iterator NTV2DIDSetIter
Handy non-const iterator to iterate over an NTV2DIDSet.
ULWord GetCapturedAuxByteCount(const bool inField2=false) const
const ULWord LUTTablePartitionSize
#define NTV2_STREAM_CHANNEL_STATE_ACTIVE
Used in NTV2StreamChannel stream active.
struct NTV2RoutingEntry NTV2RoutingEntry
HevcStreamStatistics encStats[4]
NTV2InputSourceSet::const_iterator NTV2InputSourceSetConstIter
A handy const iterator for iterating over an NTV2InputSourceSet.
std::string NTV2AutoCirculateStateToString(const NTV2AutoCirculateState inState)
#define AUTOCIRCULATE_WITH_FBOCHANGE
Use this to AutoCirculate with the possibility of frame buffer orientation changes.
#define NTV2_IS_VALID_HEADER_TAG(_x_)
void ClearResultStatus(void)
NTV2RegisterNumber RegisterNum
struct AUTOCIRCULATE_P2P_STRUCT CHANNEL_P2P_STRUCT
This object specifies the information that will be transferred to or from the AJA device in the CNTV2...
_NTV2XptValidROMRegisters
union AutoCircGenericTask::@39 u
struct HevcMessageDebug HevcMessageDebug
#define HEVC_VERSION_STRING_SIZE
uint8_t staticMetadataDescriptorID
NTV2Buffer & outBadRegIndexes(void)
HevcVifState vifState[4]
bool operator==(const json_pointer< RefStringTypeLhs > &lhs, const json_pointer< RefStringTypeRhs > &rhs) noexcept
Definition: json.hpp:14737
bool IsActive(void)
Is the stream active.
const FRAME_STAMP & GetFrameStamp(void) const
NTV2RegisterNumber
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
bool HasError(void)
Has the stream encountered an error.
#define AJAExport
Definition: export.h:33
LWord GetTransferFrameNumber(void) const
NTV2SegmentedXferInfo & setSourcePitch(const ULWord inPitch)
Sets my source pitch.
NTV2FrameGeometry
Identifies a particular video frame geometry.
Definition: ntv2enums.h:350
std::set< NTV2Channel > NTV2ChannelSet
A set of distinct NTV2Channel values.
NTV2AudioChannelOctets::const_iterator NTV2AudioChannelOctetsConstIter
Handy const iterator to iterate over a set of distinct NTV2AudioChannelOctet values.
uint16_t maxFrameAverageLightLevel
CCLUTV3MaskShift
SystemStatusCode
NTV2FrameSize & setWidth(const ULWord inValue)
Sets my width dimension.
NTV2RegNumSet GetRegisterNumbers(const NTV2RegReads &inRegInfos)
void Set(const ULWord inDBB=0xFFFFFFFF, const ULWord inLow=0xFFFFFFFF, const ULWord inHigh=0xFFFFFFFF)
Sets my fields from the given DBB, low and high ULWord components.
bool IsStopping(void) const
ULWord GetCapturedAncByteCount(const bool inField2=false) const
SystemControlCode
HevcDeviceCommand data
NTV2Crosspoint foregroundKeyCrosspoint
ULWordSequence GetU32s(const size_t inU32Offset=0, const size_t inMaxSize=32, const bool inByteSwap=false) const
Describes the horizontal and vertical size dimensions of a raster, bitmap, frame or image...
NTV2SegmentedXferInfo & setSegmentLength(const ULWord inNumElements)
Sets my segment length.
#define NTV2_BITFILE_RESERVED_ULWORDS
std::vector< uint64_t > ULWord64Sequence
An ordered sequence of ULWord64 (uint64_t) values.
bool ResetUsing(const NTV2RegisterReads &inRegReads)
Resets me, starting over, using the given NTV2RegisterReads vector.
struct AUTOCIRCULATE_TRANSFER_STRUCT_64 * PAUTOCIRCULATE_TRANSFER_STRUCT_64
#define NTV2Buffer_PAGE_ALIGNED
Allocated page-aligned?
struct HevcMessageCommand HevcMessageCommand
Pointer64 ccLookupTables
only used in 3way color correction mode.
AUTO_CIRC_COMMAND eCommand
This struct is used to augment the default full-frame AutoCirculate DMA transfer to accommodate multi...
NTV2RotaryEncoderRegister
#define NTV2_STRUCT_BEGIN(__struct_name__)
#define NTV2_BITFILE_PARTNAME_STRINGLENGTH
NTV2SegmentedXferInfo & setDestInfo(const ULWord inOffset, const ULWord inPitch)
A convenience function that sets both my destination offset and pitch.
NTV2ColorCorrectionMode mode
ULWord * ccLookupTables
only used in 3way color correction mode.
ULWord GetFrameCount(void) const
NTV2VideoFormatSet & operator+=(NTV2VideoFormatSet &inOutSet, const NTV2VideoFormatSet inSet)
Appends the given NTV2VideoFormatSet contents into the given set.
This is returned from the CNTV2Card::AutoCirculateGetStatus function.
#define HEVC_ADDITIONAL_DATA_SIZE
#define AUTOCIRCULATE_WITH_COLORCORRECT
Use this to AutoCirculate with color correction.
std::vector< NTV2_RP188 > NTV2TimeCodeList
An ordered sequence of zero or more NTV2_RP188 structures. An NTV2TCIndex enum value can be used as a...
struct HevcMessageInfo HevcMessageInfo
HevcGpioState gpioState[64]
#define NTV2_IS_OUTPUT_CROSSPOINT(__x__)
Definition: ntv2enums.h:1736
NTV2RegisterValueMap::const_iterator NTV2RegValueMapConstIter
A const iterator that iterates over NTV2RegisterValueMap entries.
ULWord mask
uint16_t UWord
Definition: ajatypes.h:234
uint16_t U16(const int inIndex) const
ULWord numRegisters(void) const
NTV2DoubleArray::const_iterator NTV2DoubleArrayConstIter
Handy const iterator to iterate over an NTV2DoubleArray.
1: Standard/Retail: device configured by AJA ControlPanel, service/daemon, and driver.
Specifies channel or FrameStore 1 (or the first item).
Definition: ntv2enums.h:1361
~NTV2Bitstream()
My default destructor, which frees all allocatable fields that I own.
NTV2Buffer NTV2_POINTER
UWordSequence GetU16s(const size_t inU16Offset=0, const size_t inMaxSize=64, const bool inByteSwap=false) const
NTV2SegmentedXferInfo & setSourceFlipped(const bool inFlipped=Direction_Flipped)
Sets the scan direction for the source.
bool NTV2DeviceGetSupportedInputSources(const NTV2DeviceID inDeviceID, NTV2InputSourceSet &outInputSources, const NTV2IOKinds inKinds=NTV2_IOKINDS_ALL)
Returns a set of distinct NTV2InputSource values supported on the given device.
enum _AutoCircCommand_ AUTO_CIRC_COMMAND
struct ColorSpaceConverterCustomCoefficients NTV2CSCCustomCoeffs
#define NTV2_ASSERT_STRUCT_VALID
NTV2FrameSize & setHeight(const ULWord inValue)
Sets my height dimension.
HevcMessageHeader header
HevcDeviceMode deviceMode
#define NTV2_IS_VALID_AUDIO_SYSTEM(__x__)
Definition: ntv2enums.h:3917
ULWord currenthUser
Contains validCount (Play - reps remaining, Record - drops on frame)
bool SetBuffer(const ULWord *pInBuffer, const ULWord inByteCount)
Sets the buffer to lock for use in a subsequent call to CNTV2Card::DMABufferLock. ...
bool NTV2GetUnsupportedPixelFormats(NTV2PixelFormats &outFormats)
Returns a set of NTV2PixelFormat values not suported by any NTV2 device.
ULWord getSourcePitch(void) const
NTV2RegWritesIter NTV2RegisterReadsIter
NTV2RegInfo & setValue(const ULWord val)
bool toRegValues(HDRRegValues &outVals) const
NTV2FrameBufferFormat GetFrameBufferFormat(void) const
NTV2AudioSystemSet::const_iterator NTV2AudioSystemSetConstIter
A handy const iterator into an NTV2AudioSystemSet. New in SDK 16.2.
ULWord * ccLookupTables
only used in 3way color correction mode.
HDRFloatValues & zero(void)
_NTV2OERegisters
bool operator<(const value_t lhs, const value_t rhs) noexcept
comparison operator for JSON types
Definition: json.hpp:2902
ULWord & outNumFailures(void)
bool setFromRegValues(const HDRRegValues &inRegValues)
This object is embedded in the AUTOCIRCULATE_TRANSFER struct that&#39;s returned from the CNTV2Card::Auto...
uint64_t magnitude(void) const
ADV7189BProcAmpRegisters SD
_NTV2HDMIRegisters
bool HasAvailableInputFrame(void) const
Input (capture) mode, which writes into device SDRAM.
Definition: ntv2enums.h:1246
void EnableQuarterSizeExpandMode(void)
Enables quarter-size expansion mode.
bool NTV2DeviceGetSupportedGeometries(const NTV2DeviceID inDeviceID, NTV2GeometrySet &outGeometries)
Returns a set of distinct NTV2FrameGeometry values supported on the given device. ...
NTV2ChannelSet NTV2MakeChannelSet(const NTV2Channel inFirstChannel, const UWord inNumChannels=1)
#define NTV2_DEPRECATED_17_5(__f__)
Definition: ajatypes.h:576
ULWord getSegmentLength(void) const
float FL(const int inIndex) const
NTV2RXSDIStatusRegister
HevcGpioFunction
bool isDestBottomUp(void) const
NTV2SegmentedXferInfo & setSegmentCount(const ULWord inNumSegments)
Sets my segment count.
ULWord currentAudioExpectedAddress
As set by play.
RP188SourceFilterSelect
This class/object reports information about the current and/or requested AutoCirculate frame...
std::map< NTV2FrameGeometry, ULWord > FGSizesMap
ULWord getSourceOffset(void) const
NTV2ChannelList::const_iterator NTV2ChannelListConstIter
A handy const iterator into an NTV2ChannelList.
#define NTV2_BUILD_RESERVED_BYTES
bool SetBuffer(const ULWord *pInBuffer, const ULWord inByteCount)
Sets the buffer to lock for use in a subsequent call to CNTV2Card::LoadBitstream. ...
NTV2AudioRate
Definition: ntv2enums.h:1931
std::vector< uint32_t > ULWordSequence
An ordered sequence of ULWord (uint32_t) values.
RP188_STRUCT currentRP188
Last vertical blank timecode (RP-188)
NTV2BOBWidgetRegisters
struct HevcDeviceInfo HevcDeviceInfo
HevcMessageHeader header
_AutoCircCommand_
ULWord GetConnectionID(void) const
std::vector< NTV2Channel > NTV2ChannelList
An ordered sequence of NTV2Channel values.
const NTV2Buffer & regInfos(void) const
bool IsRunning(void) const
struct AUTOCIRCULATE_TRANSFER_STRUCT_32 * PAUTOCIRCULATE_TRANSFER_STRUCT_32
#define AUTOCIRCULATE_WITH_VIDPROC
Use this to AutoCirculate with video processing.
ULWord64Sequence::const_iterator ULWord64SequenceConstIter
A handy const iterator for iterating over a ULWord64Sequence.
NwlRegisterIndex
VirtualProcAmpRegisters_base SD
XlnxRegisterTarget
CUSTOM_ANC_STRUCT customAncInfo
This field is obsolete. Do not use.
uint64_t U64(const int inIndex) const
void * GetHostPointer(void) const
struct AUTOCIRCULATE_TRANSFER_STRUCT * PAUTOCIRCULATE_TRANSFER_STRUCT
uint8_t staticMetadataDescriptorID
_NTV2NonPCMAudioDetectRegisters
bool WithColorCorrect(void) const
NTV2SegmentedXferInfo & setDestDirection(const bool inTopDown)
Sets the scan direction for the destination.
This is used by the CNTV2Card::ReadSDIStatistics function.
NTV2RegWrites::iterator NTV2RegWritesIter
A handy non-const iterator for iterating over the contents of an NTV2RegisterWrites instance...
NTV2TCIndexes::const_iterator NTV2TCIndexesConstIter
Color correction data used with AUTOCIRCULATE_WITH_COLORCORRECT option.
uint8_t electroOpticalTransferFunction
ULWord GetCapturedAncByteCount(const bool inField2=false) const
ULWord & outNumRegisters(void)
std::vector< std::string > NTV2StringList
std::set< NTV2AudioChannelOctet > NTV2AudioChannelOctets
A set of distinct NTV2AudioChannelOctet values.
#define NTV2Buffer_ALLOCATED
Allocated using Allocate function?
uint8_t & U8(const int inIndex)
struct HevcTransferData HevcTransferData
NTV2SegmentedXferInfo & setSourceInfo(const ULWord inOffset, const ULWord inPitch)
A convenience function that sets both my source offset and pitch.
HevcFirmwareType
uint8_t U8(const int inIndex) const
ULWord audioOutStopAddress
For play - first position in buffer of audio.
UByte additionalData[((4+4+256) *16)]
std::vector< NTV2RegInfo > NTV2RegisterWrites
NTV2FrameSize(const NTV2FrameGeometry inFG)
enum NTV2RXSDIStatusRegister NTV2RXSDIStatusRegisters
#define AUTOCIRCULATE_WITH_RP188
Use this to AutoCirculate with RP188.
struct HevcMessageTransfer HevcMessageTransfer
LWord64 currentFrameTime
Vertical blank start of current frame.
UByte additionalData[((4+4+256) *16)]
NTV2Buffer & outGoodRegisterNumbers(void)
bool Fill(const T &inValue, const NTV2SegmentedXferInfo &inXferInfo)
Fills a portion of me with the given scalar value.
HevcGpioDirection
XlnxRegisterMask
std::ostream & Print(std::ostream &inOutStream) const
Prints a human-readable representation of me to the given output stream.
NTV2RegWrites NTV2RegReads
An ordered sequence of zero or more NTV2RegInfo structs intended for ReadRegister.
std::string NTV2ChannelListToStr(const NTV2ChannelList &inObj, const bool inCompact=true)
HDRRegValues & zero(void)
NTV2AudioChannelPairs::const_iterator NTV2AudioChannelPairsConstIter
Handy const iterator to iterate over a set of distinct NTV2AudioChannelPair values.
#define NTV2_DEPRECATED_f(__f__)
Definition: ajatypes.h:537
NTV2AudioSystem GetAudioSystem(void) const
NTV2EnhancedCSCRegisters
#define NTV2_BEGIN_PROTECTED
NTV2Crosspoint backgroundKeyCrosspoint
int32_t I32(const int inIndex) const
AutoCircTaskType taskType
NTV2QuarterSizeExpandMode videoQuarterSizeExpand
NTV2Crosspoint channelSpec
enum _NTV2NonPCMAudioDetectRegisters NTV2NonPCMAudioDetectRegisters
HevcVinState vinState[4]
#define AUTOCIRCULATE_WITH_FIELDS
Use this to AutoCirculate with fields as frames for interlaced formats.
#define HEVC_GPIO_MAX
~NTV2StreamChannel()
My default destructor, which frees all allocatable fields that I own.
ULWord mask(void) const
struct NTV2ColorCorrectionInfo_64 NTV2ColorCorrectionInfo_64
#define NTV2_BITFILE_DESIGNNAME_STRINGLENGTH
bool IsSegmented(void) const
ULWord GetQueueDepth(void)
Gets the queue depth.
#define AUTOCIRCULATE_WITH_HDMIAUX
Use this to AutoCirculate with HDMI auxiliary data.
bool IsFieldMode(void) const
NTV2Mode GetMode(void) const
DesktopFrameBuffStatus
bool WithFBFChange(void) const
bool NTV2GetUnsupportedStandards(NTV2StandardSet &outStandards)
Returns a set of NTV2Standard values not suported by any NTV2 device.
NTV2LocalProcRegisterMask
This is used to enable or disable AJADebug logging in the driver.
HevcEncodedData encodedData
struct BITFILE_INFO_STRUCT * PBITFILE_INFO_STRUCT
NTV2Crosspoint foregroundVideoCrosspoint
Declares enums for virtual registers used in all platform drivers and the SDK.
~NTV2BufferLock()
My default destructor, which frees all allocatable fields that I own.
#define NTV2_STREAM_CHANNEL_STATE_IDLE
Used in NTV2StreamChannel stream idle.
HevcStreamStatistics rawStats[4]
NTV2HDMIBitDepth
Indicates or specifies the HDMI video bit depth.
Definition: ntv2enums.h:3695
const NTV2Buffer & GetAncBuffer(const bool inField2=false) const
struct HevcVersion HevcVersion
NTV2RegInfo & setShift(const ULWord val)
struct HDRRegValues HDRRegValues
defined(NTV2_DEPRECATE_17_6)
uint16_t GetStartFrame(void) const
void DisableQuarterSizeExpandMode(void)
Enables quarter-size expansion mode.
SDI 1 embedded VITC.
Definition: ntv2enums.h:3957
HDRRegValues & setBT2020(void)
bool WithVidProc(void) const
#define AUTOCIRCULATE_WITH_LTC
Use this to AutoCirculate with analog LTC.
ULWord getSegmentCount(void) const
struct AUTOCIRCULATE_TASK_STRUCT_32 * PAUTOCIRCULATE_TASK_STRUCT_32
ULWord64 GetRawHostPointer(void) const
std::set< UByte > NTV2DIDSet
A set of distinct NTV2DID values.
This is used by the CNTV2Card::WriteRegisters function.
ULWord64 audioClockTimeStamp
48kHz clock (in reg 28, extended to 64 bits) at time of play or record.
struct HevcDeviceRegister HevcDeviceRegister
NTV2FrameBufferFormatSetConstIter NTV2PixelFormatsConstIter
NTV2VideoFrameBufferOrientation frameBufferOrientation
#define MAX_ROUTING_ENTRIES
char standardFirmwareMultiple[64]
ULWord NTV2IOKinds
Definition: ntv2enums.h:1312
void Clear(void)
Resets the struct to its initialized state.
NTV2RegReadsConstIter FindFirstMatchingRegisterNumber(const uint32_t inRegNum, const NTV2RegReads &inRegInfos)
Returns a const iterator to the first entry in the NTV2RegInfo collection with a matching register nu...
bool isDestTopDown(void) const
All new NTV2 structs end with this common trailer.
struct AUTOCIRCULATE_P2P_STRUCT * PCHANNEL_P2P_STRUCT
NTV2QuarterSizeExpandMode videoQuarterSizeExpand
#define NTV2_BITFILE_DATETIME_STRINGLENGTH
ULWordSequence::iterator ULWordSequenceIter
A handy non-const iterator for iterating over a ULWordSequence.
ULWord currentFieldCount
At Call Field0 or Field1 currently being OUTPUT (at the time of the IOCTL_NTV2_GET_FRAMESTAMP) ...
TestPatternFormat
NTV2FrameBufferFormatSet::const_iterator NTV2FrameBufferFormatSetConstIter
A handy const iterator for iterating over an NTV2FrameBufferFormatSet.
NTV2AutoCirculateState GetState(void) const
struct HevcDeviceDebug HevcDeviceDebug