AJA NTV2 SDK  18.1.0.2262
NTV2 SDK 18.1.0.2262
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_MESSAGE_DATA NTV2_FOURCC ('m', 'd', 'a', 't')
5676  #define NTV2_TYPE_BANKGETSET NTV2_FOURCC ('b', 'n', 'k', 'S')
5677  #define NTV2_TYPE_ACCONTROL NTV2_FOURCC ('c', 'o', 'n', 't')
5678  #define NTV2_TYPE_ACSTATUS NTV2_FOURCC ('s', 't', 'a', 't')
5679  #define NTV2_TYPE_ACXFER NTV2_FOURCC ('x', 'f', 'e', 'r')
5680  #define NTV2_TYPE_ACXFERSTATUS NTV2_FOURCC ('x', 'f', 's', 't')
5681  #define NTV2_TYPE_ACTASK NTV2_FOURCC ('t', 'a', 's', 'k')
5682  #define NTV2_TYPE_ACFRAMESTAMP NTV2_FOURCC ('s', 't', 'm', 'p')
5683  #define NTV2_TYPE_GETREGS NTV2_FOURCC ('r', 'e', 'g', 'R')
5684  #define NTV2_TYPE_SETREGS NTV2_FOURCC ('r', 'e', 'g', 'W')
5685  #define NTV2_TYPE_SDISTATS NTV2_FOURCC ('s', 'd', 'i', 'S')
5686  #define NTV2_TYPE_AJADEBUGLOGGING NTV2_FOURCC ('d', 'b', 'l', 'g')
5687  #define NTV2_TYPE_AJABUFFERLOCK NTV2_FOURCC ('b', 'f', 'l', 'k')
5688  #define NTV2_TYPE_AJABITSTREAM NTV2_FOURCC ('b', 't', 's', 't')
5689  #define NTV2_TYPE_AJASTREAMCHANNEL NTV2_FOURCC ('s', 't', 'c', 'h')
5690  #define NTV2_TYPE_AJASTREAMBUFFER NTV2_FOURCC ('s', 't', 'b', 'u')
5691  #define NTV2_TYPE_AJAMAILBUFFER NTV2_FOURCC ('m', 'a', 'i', 'l')
5692  #if defined(NTV2_DEPRECATE_16_3)
5693  #define AUTOCIRCULATE_TYPE_STATUS NTV2_TYPE_ACSTATUS
5694  #define AUTOCIRCULATE_TYPE_XFER NTV2_TYPE_ACXFER
5695  #define AUTOCIRCULATE_TYPE_XFERSTATUS NTV2_TYPE_ACXFERSTATUS
5696  #define AUTOCIRCULATE_TYPE_TASK NTV2_TYPE_ACTASK
5697  #define AUTOCIRCULATE_TYPE_FRAMESTAMP NTV2_TYPE_ACFRAMESTAMP
5698  #define AUTOCIRCULATE_TYPE_GETREGS NTV2_TYPE_GETREGS
5699  #define AUTOCIRCULATE_TYPE_SETREGS NTV2_TYPE_SETREGS
5700  #define AUTOCIRCULATE_TYPE_SDISTATS NTV2_TYPE_SDISTATS
5701  #endif // defined(NTV2_DEPRECATE_16_3)
5702 
5703  #define NTV2_IS_VALID_STRUCT_TYPE(_x_) ( (_x_) == NTV2_TYPE_ACSTATUS || \
5704  (_x_) == NTV2_TYPE_ACXFER || \
5705  (_x_) == NTV2_TYPE_ACXFERSTATUS || \
5706  (_x_) == NTV2_TYPE_ACTASK || \
5707  (_x_) == NTV2_TYPE_ACFRAMESTAMP || \
5708  (_x_) == NTV2_TYPE_GETREGS || \
5709  (_x_) == NTV2_TYPE_SETREGS || \
5710  (_x_) == NTV2_TYPE_SDISTATS || \
5711  (_x_) == NTV2_TYPE_BANKGETSET || \
5712  (_x_) == NTV2_TYPE_VIRTUAL_DATA_RW || \
5713  (_x_) == NTV2_TYPE_MESSAGE_DATA || \
5714  (_x_) == NTV2_TYPE_AJADEBUGLOGGING || \
5715  (_x_) == NTV2_TYPE_AJABUFFERLOCK || \
5716  (_x_) == NTV2_TYPE_AJABITSTREAM || \
5717  (_x_) == NTV2_TYPE_AJASTREAMCHANNEL || \
5718  (_x_) == NTV2_TYPE_AJASTREAMBUFFER || \
5719  (_x_) == NTV2_TYPE_AJAMAILBUFFER)
5720 
5721  // NTV2Buffer FLAGS
5722  #define NTV2Buffer_ALLOCATED BIT(0)
5723  #define NTV2Buffer_PAGE_ALIGNED BIT(1)
5724  #define NTV2Buffer_SHARED BIT(2)
5725  #define NTV2Buffer_SHARED_GLOBAL BIT(4)
5726 
5728  #define NTV2Buffer_TO_ULWORD64(__p__) ((sizeof(int*) == 4) ? (ULWord64(ULWord64(__p__) << 32) | 0x00000000BAADF00D) : ULWord64(__p__))
5729  #if !defined(NTV2_DEPRECATE_17_0)
5730  #define NTV2_POINTER_ALLOCATED NTV2Buffer_ALLOCATED
5731  #define NTV2_POINTER_PAGE_ALIGNED NTV2Buffer_PAGE_ALIGNED
5732  #define NTV2_POINTER_TO_ULWORD64(_p_) NTV2Buffer_TO_ULWORD64(_p_)
5733  #endif // defined(NTV2_DEPRECATE_17_0)
5734 
5735 
5736  // AUTOCIRCULATE OPTION FLAGS
5737  #define AUTOCIRCULATE_WITH_RP188 BIT(0)
5738  #define AUTOCIRCULATE_WITH_LTC BIT(1)
5739  #define AUTOCIRCULATE_WITH_FBFCHANGE BIT(2)
5740  #define AUTOCIRCULATE_WITH_FBOCHANGE BIT(3)
5741  #define AUTOCIRCULATE_WITH_COLORCORRECT BIT(4)
5742  #define AUTOCIRCULATE_WITH_VIDPROC BIT(5)
5743  #define AUTOCIRCULATE_WITH_ANC BIT(6)
5744  #define AUTOCIRCULATE_WITH_AUDIO_CONTROL BIT(7)
5745  #define AUTOCIRCULATE_WITH_FIELDS BIT(8)
5746  #define AUTOCIRCULATE_WITH_HDMIAUX BIT(9)
5747  #define AUTOCIRCULATE_WITH_MULTILINK_AUDIO1 BIT(10)
5748  #define AUTOCIRCULATE_WITH_MULTILINK_AUDIO2 BIT(11)
5749  #define AUTOCIRCULATE_WITH_MULTILINK_AUDIO3 BIT(12)
5750 
5751  #define AUTOCIRCULATE_FRAME_FULL BIT(20)
5752  #define AUTOCIRCULATE_FRAME_FIELD0 BIT(21)
5753  #define AUTOCIRCULATE_FRAME_FIELD1 BIT(22)
5754 
5755  #define AUTOCIRCULATE_P2P_PREPARE BIT(28)
5756  #define AUTOCIRCULATE_P2P_COMPLETE BIT(29)
5757  #define AUTOCIRCULATE_P2P_TARGET BIT(30)
5758  #define AUTOCIRCULATE_P2P_TRANSFER BIT(31)
5759 
5760  #define DMABUFFERLOCK_LOCK BIT(0)
5761  #define DMABUFFERLOCK_UNLOCK_ALL BIT(1)
5762  #define DMABUFFERLOCK_MAP BIT(2)
5763  #define DMABUFFERLOCK_UNLOCK BIT(3)
5764  #define DMABUFFERLOCK_AUTO BIT(4)
5765  #define DMABUFFERLOCK_MANUAL BIT(5)
5766  #define DMABUFFERLOCK_MAX_SIZE BIT(6)
5767  #define DMABUFFERLOCK_RDMA BIT(7)
5768 
5769  // Bitstream flags
5770  #define BITSTREAM_WRITE BIT(0)
5771  #define BITSTREAM_FRAGMENT BIT(1)
5772  #define BITSTREAM_SWAP BIT(2)
5773  #define BITSTREAM_RESET_CONFIG BIT(3)
5774  #define BITSTREAM_RESET_MODULE BIT(4)
5775  #define BITSTREAM_READ_REGISTERS BIT(5)
5776  #define BITSTREAM_SUSPEND BIT(6)
5777  #define BITSTREAM_RESUME BIT(7)
5778 
5779  // Bitstream registers
5780  #define BITSTREAM_EXT_CAP 0
5781  #define BITSTREAM_VENDOR_HEADER 1
5782  #define BITSTREAM_JTAG_ID 2
5783  #define BITSTREAM_VERSION 3
5784  #define BITSTREAM_MCAP_STATUS 4
5785  #define BITSTREAM_MCAP_CONTROL 5
5786  #define BITSTREAM_MCAP_DATA 6
5787  #define BITSTREAM_NUM_REGISTERS 7
5788 
5789  #if !defined (NTV2_BUILDING_DRIVER)
5790  // Convenience macros for compactly formatting ostream output...
5791  #define Hex(__x__) std::hex << (__x__) << std::dec
5792  #define xHex(__x__) "0x" << Hex(__x__)
5793  #define HexN(__x__,__n__) std::hex << std::setw(int(__n__)) << (__x__) << std::dec
5794  #define xHexN(__x__,__n__) "0x" << HexN((__x__),(__n__))
5795  #define Hex0N(__x__,__n__) std::hex << std::setw(int(__n__)) << std::setfill('0') << (__x__) << std::dec << std::setfill(' ')
5796  #define xHex0N(__x__,__n__) "0x" << Hex0N((__x__),(__n__))
5797  #define HEX(__x__) std::hex << std::uppercase << (__x__) << std::dec << std::nouppercase
5798  #define xHEX(__x__) "0x" << HEX(__x__)
5799  #define HEXN(__x__,__n__) std::hex << std::uppercase << std::setw(int(__n__)) << (__x__) << std::dec << std::nouppercase
5800  #define xHEXN(__x__,__n__) "0x" << HEXN((__x__),(__n__))
5801  #define HEX0N(__x__,__n__) std::hex << std::uppercase << std::setw(int(__n__)) << std::setfill('0') << (__x__) << std::dec << std::setfill(' ') << std::nouppercase
5802  #define xHEX0N(__x__,__n__) "0x" << HEX0N((__x__),(__n__))
5803  #define DEC(__x__) std::dec << std::right << (int(__x__))
5804  #define DECN(__x__,__n__) std::dec << std::setw(int(__n__)) << std::right << (__x__)
5805  #define DEC0N(__x__,__n__) std::dec << std::setw(int(__n__)) << std::setfill('0') << std::right << (__x__) << std::dec << std::setfill(' ')
5806  #define OCT(__x__) std::oct << (__x__) << std::dec
5807  #define OCT0N(__x__,__n__) std::oct << std::setw(int(__n__)) << std::setfill('0') << (__x__) << std::dec << std::setfill(' ')
5808  #define oOCT(__x__) "o" << std::oct << (__x__) << std::dec
5809  #define oOCT0N(__x__,__n__) "o" << std::oct << std::setw(int(__n__)) << std::setfill('0') << (__x__) << std::dec << std::setfill(' ')
5810  #define BIN064(__x__) std::bitset<8>((uint64_t(__x__)&0xFF00000000000000)>>56) << "." \
5811  << std::bitset<8>((uint64_t(__x__)&0x00FF000000000000)>>48) << "." \
5812  << std::bitset<8>((uint64_t(__x__)&0x0000FF0000000000)>>40) << "." \
5813  << std::bitset<8>((uint64_t(__x__)&0x000000FF00000000)>>32) << "." \
5814  << std::bitset<8>((uint64_t(__x__)&0x00000000FF000000)>>24) << "." \
5815  << std::bitset<8>((uint64_t(__x__)&0x0000000000FF0000)>>16) << "." \
5816  << std::bitset<8>((uint64_t(__x__)&0x000000000000FF00)>>8) << "." \
5817  << std::bitset<8>( uint64_t(__x__)&0x00000000000000FF)
5818  #define BIN032(__x__) std::bitset<8>((uint32_t(__x__)&0xFF000000)>>24) << "." \
5819  << std::bitset<8>((uint32_t(__x__)&0x00FF0000)>>16) << "." \
5820  << std::bitset<8>((uint32_t(__x__)&0x0000FF00)>>8) << "." \
5821  << std::bitset<8>( uint32_t(__x__)&0x000000FF)
5822  #define BIN016(__x__) std::bitset<8>((uint16_t(__x__)&0xFF00)>>8) << "." \
5823  << std::bitset<8>( uint16_t(__x__)&0x00FF)
5824  #define BIN012(__x__) std::bitset<12>((uint16_t(__x__)&0x0FFF))
5825  #define BIN010(__x__) std::bitset<10>((uint16_t(__x__)&0x03FF))
5826  #define BIN08(__x__) std::bitset<8>(uint8_t(__x__))
5827  #define BIN04(__x__) std::bitset<4>(uint8_t(__x__))
5828  #define BIN0N(__x__,__n__) std::bitset<__n__>(uint8_t(__x__))
5829  #define bBIN064(__x__) "b" << BIN064(__x__)
5830  #define bBIN032(__x__) "b" << BIN032(__x__)
5831  #define bBIN016(__x__) "b" << BIN016(__x__)
5832  #define bBIN012(__x__) "b" << BIN012(__x__)
5833  #define bBIN010(__x__) "b" << BIN010(__x__)
5834  #define bBIN08(__x__) "b" << BIN08(__x__)
5835  #define bBIN04(__x__) "b" << BIN04(__x__)
5836  #define bBIN0N(__x__,__n__) "b" << BIN0N(__x__,__n__)
5837  #define fDEC(__x__,__w__,__p__) std::dec << std::fixed << std::setw(__w__) << std::setprecision(__p__) << (__x__)
5838  #endif // !defined (NTV2_BUILDING_DRIVER)
5839 
5840 
5841  #if defined (AJAMac)
5842  #pragma pack (push, 4)
5843  #endif // defined (AJAMac)
5844 
5845 
5851  #if !defined (NTV2_BUILDING_DRIVER)
5852  // Member Functions
5853 
5859  explicit inline NTV2FrameSize (const ULWord inWidth = 0, const ULWord inHeight = 0) {set (inWidth, inHeight);}
5860  explicit inline NTV2FrameSize (const NTV2FrameGeometry inFG) {set(FGWidth(inFG), FGHeight(inFG));}
5861  inline ULWord width (void) const {return mWidth;}
5862  inline ULWord height (void) const {return mHeight;}
5863  inline bool isValid (void) const {return magnitude() > 0;}
5864  inline bool operator == (const NTV2FrameSize & rhs) const {return magnitude() == rhs.magnitude();}
5865  inline bool operator < (const NTV2FrameSize & rhs) const {return magnitude() < rhs.magnitude();}
5866  inline operator bool() const {return isValid();}
5867  operator NTV2FrameGeometry() const;
5868 
5874  inline NTV2FrameSize & setWidth (const ULWord inValue) {mWidth = inValue; return *this;}
5875 
5881  inline NTV2FrameSize & setHeight (const ULWord inValue) {mHeight = inValue; return *this;}
5882 
5889  inline NTV2FrameSize & set (const ULWord inWidth, const ULWord inHeight) {return setWidth(inWidth).setHeight(inHeight);}
5890 
5896  inline NTV2FrameSize & operator = (const NTV2FrameGeometry & rhs) {return set(FGWidth(rhs), FGHeight(rhs));}
5897 
5902  inline NTV2FrameSize & reset (void) {return set (0, 0);}
5903 
5908  inline NTV2FrameSize & swap (void) {return set (height(), width());}
5909 
5910  #if !defined(NTV2_DEPRECATE_17_5)
5911  inline ULWord NTV2_DEPRECATED_17_5(GetWidth (void) const) {return width();}
5912  inline ULWord NTV2_DEPRECATED_17_5(GetHeight (void) const) {return height();}
5913  inline ULWord NTV2_DEPRECATED_17_5(Width (void) const) {return width();}
5914  inline ULWord NTV2_DEPRECATED_17_5(Height (void) const) {return height();}
5915  inline bool NTV2_DEPRECATED_17_5(IsValid (void) const) {return isValid();}
5916  inline NTV2FrameSize & NTV2_DEPRECATED_17_5(SetWidth (const ULWord v)) {return setWidth(v);}
5917  inline NTV2FrameSize & NTV2_DEPRECATED_17_5(SetHeight (const ULWord v)) {return setHeight(v);}
5918  inline NTV2FrameSize & NTV2_DEPRECATED_17_5(Set (const ULWord w, const ULWord h)) {return set(w,h);}
5919  inline NTV2FrameSize & NTV2_DEPRECATED_17_5(Reset (void)) {return reset();}
5920  #endif // !defined(NTV2_DEPRECATE_17_5)
5921 
5922  static ULWord FGWidth (const NTV2FrameGeometry fg);
5923  static ULWord FGHeight (const NTV2FrameGeometry fg);
5924 
5926  inline uint64_t magnitude(void) const {return (uint64_t(width()) << 32) | uint64_t(height());}
5927  typedef std::map<NTV2FrameGeometry, ULWord> FGSizesMap;
5928  typedef FGSizesMap::const_iterator FGSizesMapCI;
5930  #endif // !defined (NTV2_BUILDING_DRIVER)
5931 
5933  ULWord mWidth;
5934  ULWord mHeight;
5937  #if !defined(NTV2_DEPRECATE_17_5)
5939  #endif // !defined(NTV2_DEPRECATE_17_5)
5940 
5961  #if !defined (NTV2_BUILDING_DRIVER)
5962 
5966  : mFlags (0),
5967  mNumSegments (0),
5968  mElementsPerSegment (0),
5969  mInitialSrcOffset (0),
5970  mInitialDstOffset (0),
5971  mSrcElementsPerRow (0),
5972  mDstElementsPerRow (0) {setElementLength(1);}
5973 
5977  inline bool isValid (void) const {return getSegmentCount() && getSegmentLength() ? true : false;}
5979  inline ULWord getSegmentCount (void) const {return mNumSegments;}
5980  inline ULWord getSegmentLength (void) const {return mElementsPerSegment;}
5981  inline ULWord getSourceOffset (void) const {return mInitialSrcOffset;}
5982  inline ULWord getDestOffset (void) const {return mInitialDstOffset;}
5983  inline ULWord getSourcePitch (void) const {return mSrcElementsPerRow;}
5984  inline ULWord getDestPitch (void) const {return mDstElementsPerRow;}
5985 
5990  inline ULWord getElementLength (void) const {return ULWord(1 << (mFlags & 3));}
5992  inline bool isSourceBottomUp (void) const {return mFlags & BIT(8) ? true : false;}
5993  inline bool isSourceTopDown (void) const {return mFlags & BIT(8) ? false : true;}
5994  inline bool isDestBottomUp (void) const {return mFlags & BIT(9) ? true : false;}
5995  inline bool isDestTopDown (void) const {return mFlags & BIT(9) ? false : true;}
5996  inline ULWord getTotalElements (void) const {return getSegmentCount() * getSegmentLength();}
5997  inline ULWord getTotalBytes (void) const {return getTotalElements() * getElementLength();}
5998 
6002  inline ULWord getSourceEndOffset (void) const // New in SDK 16.0
6003  {return getSourceOffset() + getSourcePitch() * getSegmentCount() + getSegmentLength();}
6004 
6008  inline ULWord getDestEndOffset (void) const // New in SDK 16.0
6009  {return getDestOffset() + getDestPitch() * getSegmentCount() + getSegmentLength();}
6010 
6017  std::ostream & Print (std::ostream & inStrm, const bool inDumpSegments = false) const;
6018 
6024  std::string getSourceCode (const bool inInclDecl = true) const; // New in SDK 16.0
6025 
6030  bool containsElementAtOffset (const ULWord inElementOffset) const; // New in SDK 16.0
6031 
6037  bool operator != (const NTV2SegmentedXferInfo & inRHS) const; // New in SDK 16.0
6038 
6044  inline bool operator == (const NTV2SegmentedXferInfo & inRHS) const {return !(*this != inRHS);} // New in SDK 16.0
6046 
6050 
6052  NTV2SegmentedXferInfo & reset (void);
6053 
6060  inline NTV2SegmentedXferInfo & setSegmentInfo (const ULWord inNumSegs, const ULWord inSegLength)
6061  {return setSegmentCount(inNumSegs).setSegmentLength(inSegLength);}
6062 
6068  inline NTV2SegmentedXferInfo & setSegmentCount (const ULWord inNumSegments)
6069  {mNumSegments = inNumSegments; return *this;}
6070 
6076  inline NTV2SegmentedXferInfo & setSegmentLength (const ULWord inNumElements)
6077  {mElementsPerSegment = inNumElements; return *this;}
6078 
6085  inline NTV2SegmentedXferInfo & setSourceInfo (const ULWord inOffset, const ULWord inPitch)
6086  {return setSourceOffset(inOffset).setSourcePitch(inPitch);}
6087 
6094  {mInitialSrcOffset = inOffset; return *this;}
6095 
6102  {mSrcElementsPerRow = inPitch; return *this;}
6103 
6110  inline NTV2SegmentedXferInfo & setSourceDirection (const bool inTopDown)
6111  { mFlags &= ~(BIT(8)); // set top-down
6112  if (!inTopDown)
6113  mFlags |= BIT(8); // set bottom-up
6114  return *this;
6115  }
6122  inline NTV2SegmentedXferInfo & setSourceFlipped (const bool inFlipped = Direction_Flipped) {return setSourceDirection(inFlipped);}
6123 
6130  inline NTV2SegmentedXferInfo & setDestInfo (const ULWord inOffset, const ULWord inPitch)
6131  {return setDestOffset(inOffset).setDestPitch(inPitch);}
6132 
6138  inline NTV2SegmentedXferInfo & setDestOffset (const ULWord inOffset) {mInitialDstOffset = inOffset; return *this;}
6139 
6145  inline NTV2SegmentedXferInfo & setDestPitch (const ULWord inPitch) {mDstElementsPerRow = inPitch; return *this;}
6146 
6153  inline NTV2SegmentedXferInfo & setDestDirection (const bool inTopDown)
6154  { mFlags &= ~(BIT(9)); // set top-down
6155  if (!inTopDown)
6156  mFlags |= BIT(9); // set bottom-up
6157  return *this;
6158  }
6165  inline NTV2SegmentedXferInfo & setDestFlipped (const bool inFlipped = Direction_Flipped) {return setDestDirection(inFlipped);}
6166 
6173  inline NTV2SegmentedXferInfo & setElementLength (const ULWord inBytesPerElement)
6174  {
6175  if (inBytesPerElement && inBytesPerElement < 9)
6176  if (!(inBytesPerElement & (inBytesPerElement - 1))) // Power of 2?
6177  {
6178  ULWord num(inBytesPerElement), lengthBits(0);
6179  while (num >>= 1)
6180  lengthBits++;
6181  mFlags = (mFlags & ~3UL) | (lengthBits & 3UL);
6182  }
6183  return *this;
6184  }
6189  NTV2SegmentedXferInfo & swapSourceAndDestination (void); // New in SDK 16.0
6191 
6195  static const bool Direction_TopToBottom = true;
6197  static const bool Direction_TopDown = true;
6198  static const bool Direction_Normal = true;
6199  static const bool Direction_BottomToTop = false;
6200  static const bool Direction_BottomUp = false;
6201  static const bool Direction_Flipped = false;
6202  #endif // !defined (NTV2_BUILDING_DRIVER)
6204 
6206  ULWord mFlags;
6207  ULWord mNumSegments;
6208  ULWord mElementsPerSegment;
6209  ULWord mInitialSrcOffset;
6210  ULWord mInitialDstOffset;
6211  ULWord mSrcElementsPerRow;
6212  ULWord mDstElementsPerRow;
6215 
6216 
6254  ULWord64 fUserSpacePtr;
6255  ULWord fByteCount;
6256  ULWord fFlags;
6258  #if defined (AJAMac)
6259  ULWord64 fKernelSpacePtr;
6260  ULWord64 fIOMemoryDesc;
6261  ULWord64 fIOMemoryMap;
6262  #else
6263  //ULWord64 fKernelSpacePtr; ///< @brief Reserved -- New in SDK 17.5
6264  ULWord64 fKernelHandle;
6265  #endif
6267 
6268  #if !defined (NTV2_BUILDING_DRIVER)
6269 
6272 
6279  explicit NTV2Buffer (const void * pInUserPointer, const size_t inByteCount);
6280 
6288  NTV2Buffer (const size_t inByteCount = 0);
6289 
6294  explicit NTV2Buffer (const NTV2Buffer & inObj);
6295 
6299  ~NTV2Buffer ();
6301 
6305 
6309  inline void * GetHostPointer (void) const
6310  {
6311  if (sizeof(int*) == 4)
6312  return reinterpret_cast <void*>((fUserSpacePtr & 0xFFFFFFFF00000000) >> 32);
6313  else
6314  return reinterpret_cast <void*>(fUserSpacePtr);
6315  }
6316 
6321  inline ULWord64 GetRawHostPointer (void) const {return fUserSpacePtr;}
6322 
6326  inline size_t GetByteCount (void) const {return size_t(fByteCount);}
6327 
6332  inline bool IsAllocatedBySDK (void) const {return flags() & NTV2Buffer_ALLOCATED ? true : false;}
6333 
6338  inline bool IsProvidedByClient (void) const {return flags() & NTV2Buffer_ALLOCATED ? false : true;}
6339 
6343  inline bool IsPageAligned (void) const {return flags() & NTV2Buffer_PAGE_ALIGNED ? true : false;} // New in SDK 17.0
6344 
6348  inline bool IsNULL (void) const {return GetHostPointer() == AJA_NULL || GetByteCount() == 0;}
6349 
6353  inline operator bool() const {return !IsNULL();}
6354 
6358  inline operator size_t() const {return GetByteCount();} // New in SDK 16.0
6359 
6367  void * GetHostAddress (const ULWord inByteOffset, const bool inFromEnd = false) const;
6368 
6378  template<typename T> bool Find (const T & inValue, int & inOutIndex) const // New in SDK 16.0
6379  {
6380  const bool isAscending(inOutIndex >= 0);
6381  const int maxNdx(int(GetByteCount()) / sizeof(T));
6382  if (isAscending && inOutIndex >= maxNdx)
6383  return false; // Past end
6384  if (!isAscending && (1 - inOutIndex) >= maxNdx)
6385  return false; // Before start
6386  const T * pValues(*this);
6387  if (isAscending)
6388  {
6389  for (int ndx(inOutIndex); ndx < maxNdx; ndx++)
6390  if (pValues[ndx] == inValue)
6391  {inOutIndex = ndx; return true;}
6392  }
6393  else
6394  {
6395  const int minNdx(0 - maxNdx);
6396  for (int ndx(inOutIndex); ndx >= minNdx; ndx++)
6397  if (pValues[maxNdx + ndx] == inValue)
6398  {inOutIndex = ndx; return true;}
6399  }
6400  inOutIndex = 0;
6401  return false; // Not found
6402  }
6403 
6413  ULWordSet & Find (ULWordSet & outOffsets, const NTV2Buffer & inValue, const size_t inLimit = 0) const; // Originally FindAll before SDK 18.1
6414 
6421  bool IsContentEqual (const NTV2Buffer & inBuffer, const ULWord inByteOffset = 0, const ULWord inByteCount = 0xFFFFFFFF) const;
6422 
6431  bool NextDifference (const NTV2Buffer & inBuffer, ULWord & byteOffset) const;
6432 
6452  bool GetRingChangedByteRange (const NTV2Buffer & inBuffer, ULWord & outByteOffsetFirst, ULWord & outByteOffsetLast) const;
6454 
6458 
6469  bool Allocate (const size_t inByteCount, const bool inPageAligned = false);
6470 
6475  bool Deallocate (void);
6476 
6482  template<typename T> bool Fill (const T & inValue)
6483  {
6484  T* pT = reinterpret_cast<T*>(GetHostPointer());
6485  if (!pT)
6486  return false;
6487 
6488  const size_t bufferSize (GetByteCount() / sizeof(T));
6489  if (!bufferSize)
6490  return false;
6491 
6492  for (size_t i(0); i < bufferSize; i++)
6493  pT[i] = inValue;
6494  return true;
6495  }
6496 
6504  template<typename T> bool Fill (const T & inValue, const NTV2SegmentedXferInfo & inXferInfo)
6505  {
6506  if (!inXferInfo.isValid())
6507  return false;
6508  // Fill a temporary buffer to hold all the segment data...
6509  NTV2Buffer segData(inXferInfo.getElementLength() * inXferInfo.getSegmentCount() * inXferInfo.getSegmentLength());
6510  if (!segData.Fill(inValue))
6511  return false; // Fill failed
6512 
6513  // Copy the segment data into me...
6514  ULWord srcOffset (0);
6515  ULWord dstOffset (inXferInfo.getDestOffset() * inXferInfo.getElementLength());
6516  const ULWord dstPitch (inXferInfo.getDestPitch() * inXferInfo.getElementLength());
6517  const ULWord bytesPerSeg (inXferInfo.getSegmentLength() * inXferInfo.getElementLength());
6518  for (ULWord segNdx(0); segNdx < inXferInfo.getSegmentCount(); segNdx++)
6519  {
6520  const void * pSrc (segData.GetHostAddress(srcOffset));
6521  void * pDst (GetHostAddress(dstOffset));
6522  if (!pSrc) return false;
6523  if (!pDst) return false;
6524  if (dstOffset + bytesPerSeg > GetByteCount())
6525  return false; // memcpy will write past end
6526  ::memcpy (pDst, pSrc, bytesPerSeg);
6527  srcOffset += bytesPerSeg; // Bump src offset
6528  dstOffset += dstPitch; // Bump dst offset
6529  } // for each segment
6530  return true;
6531  }
6532 
6539  bool Truncate (const size_t inByteCount);
6540 
6545  NTV2Buffer & operator = (const NTV2Buffer & inRHS);
6546 
6557  bool Set (const void * pInUserPointer, const size_t inByteCount);
6558 
6570  bool SetAndFill (const void * pInUserPointer, const size_t inByteCount, const UByte inValue);
6571 
6579  bool SetFrom (const NTV2Buffer & inBuffer);
6580 
6590  bool SetFromHexString (const std::string & inStr);
6591 
6598  bool CopyFrom (const void * pInSrcBuffer, const ULWord inByteCount);
6599 
6610  bool CopyFrom (const NTV2Buffer & inSrcBuffer, const ULWord inSrcByteOffset, const ULWord inDstByteOffset, const ULWord inByteCount);
6611 
6619  bool CopyFrom (const NTV2Buffer & inSrcBuffer, const NTV2SegmentedXferInfo & inXferInfo);
6620 
6630  bool SwapWith (NTV2Buffer & inBuffer);
6631 
6637  bool ByteSwap64 (void); // New in SDK 16.0
6638 
6644  bool ByteSwap32 (void); // New in SDK 16.0
6645 
6651  bool ByteSwap16 (void); // New in SDK 16.0
6653 
6657 
6663  std::ostream & Print (std::ostream & inOutStream) const;
6664 
6669  std::string AsString (UWord inDumpMaxBytes = 0) const;
6670 
6678  std::string AsCode (const size_t inBytesPerWord = 4, const std::string & inVarName = "", const bool inUseSTL = false, const bool inByteSwap = false) const;
6679 
6688  bool toHexString (std::string & outStr, const size_t inLineBreakInterval = 0) const;
6689 
6710  std::ostream & Dump ( std::ostream & inOutputStream = std::cout,
6711  const size_t inStartByteOffset = 0,
6712  const size_t inByteCount = 0,
6713  const size_t inRadix = 16,
6714  const size_t inBytesPerGroup = 4,
6715  const size_t inGroupsPerLine = 8,
6716  const size_t inAddressRadix = 0,
6717  const bool inShowAscii = false,
6718  const size_t inAddrOffset = 0) const;
6719 
6741  std::string & Dump ( std::string & inOutputString,
6742  const size_t inStartByteOffset = 0,
6743  const size_t inByteCount = 0,
6744  const size_t inRadix = 16,
6745  const size_t inBytesPerGroup = 4,
6746  const size_t inGroupsPerLine = 8,
6747  const size_t inAddressRadix = 0,
6748  const bool inShowAscii = false,
6749  const size_t inAddrOffset = 0) const;
6751 
6755 
6759  template<typename T> operator const T*() const {return reinterpret_cast<const T*>(GetHostPointer());} // New in SDK 16.0
6760 
6764  template<typename T> operator T*() const {return reinterpret_cast<T*>(GetHostPointer());} // New in SDK 16.0
6765 
6776  NTV2Buffer & Segment (NTV2Buffer & outPtr, const ULWord inByteOffset, const ULWord inByteCount) const;
6777 
6784  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
6785 
6792  inline uint8_t & U8 (const int inIndex) {uint8_t* pVal(*this); return pVal[inIndex < 0 ? int(GetByteCount()) + inIndex : inIndex];} // New in SDK 16.0
6793 
6794  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
6795  inline int8_t & I8 (const int inIndex) {int8_t* pVal(*this); return pVal[inIndex < 0 ? int(GetByteCount()) + inIndex : inIndex];} // New in SDK 16.0
6796  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
6797  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
6798  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
6799  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
6800  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
6801  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
6802  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
6803  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
6804  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
6805  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
6806  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
6807  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
6808  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
6809  inline float & FL (const int inIndex) {float* pVal(*this); return pVal[inIndex < 0 ? int(GetByteCount()/sizeof(float)) + inIndex : inIndex];} // New in SDK 16.0
6810  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
6811  inline double & DBL (const int inIndex) {double* pVal(*this); return pVal[inIndex < 0 ? int(GetByteCount()/sizeof(double)) + inIndex : inIndex];} // New in SDK 16.0
6813 
6817 
6832  bool GetU64s (ULWord64Sequence & outU64s, const size_t inU64Offset = 0, const size_t inMaxSize = 16, const bool inByteSwap = false) const;
6833 
6846  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;}
6847 
6862  bool GetU32s (ULWordSequence & outU32s, const size_t inU32Offset = 0, const size_t inMaxSize = 32, const bool inByteSwap = false) const;
6863 
6876  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;}
6877 
6892  bool GetU16s (UWordSequence & outU16s, const size_t inU16Offset = 0, const size_t inMaxSize = 64, const bool inByteSwap = false) const;
6893 
6906  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;}
6907 
6918  bool GetU8s (UByteSequence & outU8s, const size_t inU8Offset = 0, const size_t inMaxSize = 128) const;
6919 
6928  inline UByteSequence GetU8s (const size_t inU8Offset = 0, const size_t inMaxSize = 128) const {UByteSequence result; GetU8s(result, inU8Offset, inMaxSize); return result;}
6929 
6935  bool AppendU8s (UByteSequence & outU8s) const;
6936 
6948  bool GetString (std::string & outString, const size_t inU8Offset = 0, const size_t inMaxSize = 128) const;
6949 
6959  inline std::string GetString (const size_t inU8Offset = 0, const size_t inMaxSize = 128) const {std::string result; GetString(result, inU8Offset, inMaxSize); return result;}
6960 
6970  bool PutU64s (const ULWord64Sequence & inU64s, const size_t inU64Offset = 0, const bool inByteSwap = false);
6971 
6981  bool PutU32s (const ULWordSequence & inU32s, const size_t inU32Offset = 0, const bool inByteSwap = false);
6982 
6992  bool PutU16s (const UWordSequence & inU16s, const size_t inU16Offset = 0, const bool inByteSwap = false);
6993 
7001  bool PutU8s (const UByteSequence & inU8s, const size_t inU8Offset = 0);
7003 
7004  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
7005 
7006  private:
7007  inline uint8_t flags (void) const {return uint8_t(fFlags);}
7008 
7009  public:
7013 
7017  static size_t DefaultPageSize (void);
7018 
7024  static bool SetDefaultPageSize (const size_t inNewSize);
7025 
7029  static size_t HostPageSize (void); // New in SDK 16.3
7031 
7033  #endif // user-space clients only
7035 
7036  #if !defined(NTV2_DEPRECATE_17_0)
7037  typedef NTV2Buffer NTV2_POINTER; // Renamed in SDK 17.0
7038  #endif // !defined(NTV2_DEPRECATE_17_0
7039 
7040 
7045  ULWord fDBB;
7046  ULWord fLo;
7047  ULWord fHi;
7048 
7049  #if defined (NTV2_BUILDING_DRIVER)
7050  #define NTV2_RP188_from_RP188_STRUCT(_n_,_r_) { (_n_).fDBB = (_r_).DBB; \
7051  (_n_).fLo = (_r_).Low; \
7052  (_n_).fHi = (_r_).High; }
7053 
7054  #define NTV2_RP188P_from_RP188_STRUCT(_np_,_r_) { (_np_)->fDBB = (_r_).DBB; \
7055  (_np_)->fLo = (_r_).Low; \
7056  (_np_)->fHi = (_r_).High; }
7057 
7058  #define RP188_STRUCT_from_NTV2_RP188(_r_,_n_) { (_r_).DBB = (_n_).fDBB; \
7059  (_r_).Low = (_n_).fLo; \
7060  (_r_).High = (_n_).fHi; }
7061 
7062  #define RP188_STRUCT_from_NTV2_RP188P(_r_,_np_) { (_r_).DBB = (_np_)->fDBB; \
7063  (_r_).Low = (_np_)->fLo; \
7064  (_r_).High = (_np_)->fHi; }
7065 
7066  #define NTV2_RP188_IS_VALID(_n_) ((_n_).fDBB != 0xFFFFFFFF || (_n_).fLo != 0xFFFFFFFF || (_n_).fHi != 0xFFFFFFFF)
7067  #else
7068 
7075  inline explicit NTV2_RP188 (const ULWord inDBB = 0xFFFFFFFF, const ULWord inLow = 0xFFFFFFFF, const ULWord inHigh = 0xFFFFFFFF) : fDBB (inDBB), fLo (inLow), fHi (inHigh) {}
7076 
7081  inline explicit NTV2_RP188 (const RP188_STRUCT & inOldRP188) : fDBB (inOldRP188.DBB), fLo (inOldRP188.Low), fHi (inOldRP188.High) {}
7082 
7086  inline bool IsValid (void) const {return fDBB != 0xFFFFFFFF || fLo != 0xFFFFFFFF || fHi != 0xFFFFFFFF;}
7087 
7093  inline NTV2_RP188 & operator = (const RP188_STRUCT & inRHS) {fDBB = inRHS.DBB; fLo = inRHS.Low; fHi = inRHS.High; return *this;}
7094 
7099  inline bool operator != (const RP188_STRUCT & inRHS) const {return fDBB != inRHS.DBB || fLo != inRHS.Low || fHi != inRHS.High;}
7100 
7107  inline void Set (const ULWord inDBB = 0xFFFFFFFF, const ULWord inLow = 0xFFFFFFFF, const ULWord inHigh = 0xFFFFFFFF) {fDBB = inDBB; fLo = inLow; fHi = inHigh;}
7108 
7113  inline operator RP188_STRUCT () const {RP188_STRUCT result; result.DBB = fDBB; result.Low = fLo; result.High = fHi; return result;}
7114 
7118  inline operator bool () const {return IsValid();}
7119 
7121  #endif // user-space clients only
7123 
7124  #if !defined (NTV2_BUILDING_DRIVER)
7125  typedef std::vector <NTV2_RP188> NTV2TimeCodeList;
7126  typedef NTV2TimeCodeList::const_iterator NTV2TimeCodeListConstIter;
7129  //typedef NTV2TimeCodeList::iterator NTV2TimeCodeListIter;
7130  typedef std::map <NTV2TCIndex, NTV2_RP188> NTV2TimeCodes;
7131  typedef NTV2TimeCodes::const_iterator NTV2TimeCodesConstIter;
7132 
7133  typedef std::set <NTV2TCIndex> NTV2TCIndexes, NTV2TCIndexSet;
7134  typedef NTV2TCIndexes::const_iterator NTV2TCIndexesConstIter, NTV2TCIndexSetConstIter;
7135 
7142  NTV2TimeCodeList & operator << (NTV2TimeCodeList & inOutList, const NTV2_RP188 & inRP188);
7143  #endif // !defined (NTV2_BUILDING_DRIVER)
7144 
7145 
7151  UWord mCRCTallyA;
7152  UWord mCRCTallyB;
7154  ULWord mUnlockTally;
7156  //ULWord64 mFrameTally; ///< @brief The number of frames that have been detected on the SDI input since this tally was last reset.
7157  ULWord64 mFrameRefClockCount;
7158  ULWord64 mGlobalClockCount;
7159  bool mFrameTRSError;
7160  bool mLocked;
7162  bool mVPIDValidA;
7164  bool mVPIDValidB;
7165  #if !defined (NTV2_BUILDING_DRIVER)
7166 
7169  explicit NTV2SDIInputStatus ();
7170 
7174  void Clear (void);
7175 
7181  std::ostream & Print (std::ostream & inOutStream) const;
7182  #endif // !defined (NTV2_BUILDING_DRIVER)
7184 
7185 
7186 
7192  bool mEnabled;
7193  bool mPixel420;
7194  NTV2HDMIColorSpace mColorSpace;
7195  NTV2HDMIRange mRGBRange;
7196  NTV2HDMIProtocol mProtocol;
7197  NTV2Standard mVideoStandard;
7198  NTV2FrameRate mVideoRate;
7199  NTV2HDMIBitDepth mVideoBitDepth;
7200  NTV2AudioFormat mAudioFormat;
7201  NTV2AudioRate mAudioRate;
7202  NTV2HDMIAudioChannels mAudioChannels;
7203  #if !defined (NTV2_BUILDING_DRIVER)
7204 
7207  explicit NTV2HDMIOutputStatus () {Clear();}
7208 
7213  explicit NTV2HDMIOutputStatus (const ULWord inData) {Clear(); SetFromRegValue(inData);}
7214 
7215  void Clear (void);
7216 
7222  bool SetFromRegValue (const ULWord inData);
7223 
7229  std::ostream & Print (std::ostream & inOutStream) const;
7230  #endif // !defined (NTV2_BUILDING_DRIVER)
7231  NTV2_STRUCT_END (NTV2HMDIOutputStatus)
7232 
7233 
7234 
7240  ULWord fHeaderTag;
7241  ULWord fType;
7242  ULWord fHeaderVersion;
7243  ULWord fVersion;
7244  ULWord fSizeInBytes;
7245  ULWord fPointerSize;
7246  ULWord fOperation;
7247  ULWord fResultStatus;
7249 
7250  #if !defined (NTV2_BUILDING_DRIVER)
7251 
7256  explicit NTV2_HEADER (const ULWord inStructureType, const ULWord inSizeInBytes);
7257 
7258  inline ULWord GetSizeInBytes (void) const {return fSizeInBytes;}
7259  inline ULWord GetTag (void) const {return fHeaderTag;} // New in SDK 16.3
7260  inline ULWord GetType (void) const {return fType;} // New in SDK 16.3
7261  inline ULWord GetHeaderVersion (void) const {return fHeaderVersion;} // New in SDK 16.3
7262  inline ULWord GetVersion (void) const {return fVersion;} // New in SDK 16.3
7263  inline ULWord GetPointerSize (void) const {return fPointerSize;} // New in SDK 16.3
7264  inline ULWord GetConnectionID (void) const {return fOperation;} // New in SDK 16.3
7265  inline void SetConnectionID (const ULWord inValue) {fOperation = inValue;} // New in SDK 16.3
7266  inline ULWord GetResultStatus (void) const {return fResultStatus;} // New in SDK 17.5
7267 
7273  std::ostream & Print (std::ostream & inOutStream) const;
7274 
7278  inline bool IsValid (void) const {return NTV2_IS_VALID_HEADER_TAG(fHeaderTag) && NTV2_IS_VALID_STRUCT_TYPE(fType);}
7279 
7280  inline void ClearResultStatus (void) {fResultStatus = 0;} // New in SDK 17.5
7281 
7282  static std::string FourCCToString (const ULWord in4CC, const char nonPrintable = '?');
7283 
7285  #endif // user-space clients only
7287 
7288 
7289 
7294  ULWord fTrailerVersion;
7295  ULWord fTrailerTag;
7296 
7297  #if !defined (NTV2_BUILDING_DRIVER)
7298  explicit NTV2_TRAILER ();
7299 
7303  inline bool IsValid (void) const {return NTV2_IS_VALID_TRAILER_TAG (fTrailerTag);}
7304 
7306  #endif // user-space clients only
7308 
7309 
7310 
7334  ULWord acNumSegments;
7335  ULWord acNumActiveBytesPerRow;
7337  ULWord acSegmentHostPitch;
7338  ULWord acSegmentDevicePitch;
7340 
7342  #if !defined (NTV2_BUILDING_DRIVER)
7343 
7346  explicit NTV2SegmentedDMAInfo ();
7347 
7355  explicit NTV2SegmentedDMAInfo (const ULWord inNumSegments, const ULWord inNumActiveBytesPerRow, const ULWord inHostBytesPerRow, const ULWord inDeviceBytesPerRow);
7356 
7365  void Set (const ULWord inNumSegments, const ULWord inNumActiveBytesPerRow, const ULWord inHostBytesPerRow, const ULWord inDeviceBytesPerRow);
7366 
7370  void Reset (void);
7371 
7375  inline ULWord GetSegmentCount (void) const {return acNumSegments;}
7376 
7380  inline bool IsSegmented (void) const {return GetSegmentCount() > 1;}
7381 
7383  #endif // user-space clients only
7385 
7386 
7387 
7393  ULWord ccSaturationValue;
7394 
7400  NTV2Buffer ccLookupTables;
7401 
7402  #if !defined (NTV2_BUILDING_DRIVER)
7403 
7406  explicit NTV2ColorCorrectionData ();
7407 
7412 
7416  void Clear (void);
7417 
7421  inline bool IsActive (void) const {return NTV2_IS_ACTIVE_COLOR_CORRECTION_MODE (ccMode) && ccLookupTables.GetHostPointer ();}
7422 
7431  bool Set (const NTV2ColorCorrectionMode inMode, const ULWord inSaturation, const void * pInTableData);
7432 
7434 
7436  inline explicit NTV2ColorCorrectionData (const NTV2ColorCorrectionData & inObj) : ccLookupTables (0) {(void) inObj;}
7437  inline NTV2ColorCorrectionData & operator = (const NTV2ColorCorrectionData & inRHS) {(void) inRHS; return *this;}
7439  #endif // user-space clients only
7441 
7442 
7443 
7448  NTV2_HEADER acHeader;
7449  NTV2Crosspoint acCrosspoint;
7451  LWord acStartFrame;
7452  LWord acEndFrame;
7453  LWord acActiveFrame;
7454  ULWord64 acRDTSCStartTime;
7455  ULWord64 acAudioClockStartTime;
7456  ULWord64 acRDTSCCurrentTime;
7457  ULWord64 acAudioClockCurrentTime;
7458  ULWord acFramesProcessed;
7459  ULWord acFramesDropped;
7460  ULWord acBufferLevel;
7461  ULWord acOptionFlags;
7462  NTV2AudioSystem acAudioSystem;
7463  NTV2_TRAILER acTrailer;
7464 
7465  #if !defined (NTV2_BUILDING_DRIVER)
7466 
7469  explicit AUTOCIRCULATE_STATUS (const NTV2Crosspoint inCrosspoint = NTV2CROSSPOINT_CHANNEL1);
7470 
7476  bool CopyTo (AUTOCIRCULATE_STATUS_STRUCT & outOldStruct);
7477 
7483  bool CopyFrom (const AUTOCIRCULATE_STATUS_STRUCT & inOldStruct);
7484 
7488  void Clear (void);
7489 
7493  inline ULWord GetFrameCount (void) const {return IsStopped() ? 0 : ULWord (acEndFrame - acStartFrame + 1);}
7494 
7498  inline ULWord GetDroppedFrameCount (void) const {return acFramesDropped;}
7499 
7503  inline ULWord GetProcessedFrameCount (void) const {return acFramesProcessed;}
7504 
7508  inline ULWord GetBufferLevel (void) const {return acBufferLevel;}
7509 
7513  inline ULWord GetNumAvailableOutputFrames (void) const {return GetFrameCount () > GetBufferLevel() ? GetFrameCount () - GetBufferLevel() : 0;}
7514 
7518  inline bool CanAcceptMoreOutputFrames (void) const {return GetNumAvailableOutputFrames () > 1;}
7519 
7557  inline bool HasAvailableInputFrame (void) const {return GetBufferLevel() > 1;}
7558 
7562  inline LWord GetActiveFrame (void) const {return acActiveFrame;}
7563 
7567  inline uint16_t GetStartFrame (void) const {return uint16_t(acStartFrame);}
7568 
7572  inline uint16_t GetEndFrame (void) const {return uint16_t(acEndFrame);}
7573 
7577  inline NTV2AutoCirculateState GetState (void) const {return acState;}
7578 
7582  inline NTV2AudioSystem GetAudioSystem (void) const {return acAudioSystem;}
7583 
7587  inline bool IsRunning (void) const {return GetState () == NTV2_AUTOCIRCULATE_RUNNING;}
7588 
7592  inline bool IsStarting (void) const {return GetState () == NTV2_AUTOCIRCULATE_STARTING || GetState () == NTV2_AUTOCIRCULATE_STARTING_AT_TIME;}
7593 
7597  inline bool IsStopped (void) const {return GetState () == NTV2_AUTOCIRCULATE_DISABLED;}
7598 
7602  inline bool IsStopping (void) const {return GetState () == NTV2_AUTOCIRCULATE_STOPPING;}
7603 
7607  inline bool IsPaused (void) const {return GetState () == NTV2_AUTOCIRCULATE_PAUSED;}
7608 
7612  inline bool WithAudio (void) const {return NTV2_IS_VALID_AUDIO_SYSTEM (GetAudioSystem ());}
7613 
7617  inline ULWord OptionFlags (void) const {return acOptionFlags;} // New in SDK 16.0
7618 
7622  inline bool WithCustomAnc (void) const {return OptionFlags() & AUTOCIRCULATE_WITH_ANC;} // New in SDK 16.0
7623 
7627  inline bool WithRP188 (void) const {return OptionFlags() & AUTOCIRCULATE_WITH_RP188;} // New in SDK 16.0
7628 
7632  inline bool WithLTC (void) const {return OptionFlags() & AUTOCIRCULATE_WITH_LTC;} // New in SDK 16.0
7633 
7637  inline bool WithFBFChange (void) const {return OptionFlags() & AUTOCIRCULATE_WITH_FBFCHANGE;} // New in SDK 16.0
7638 
7642  inline bool WithFBOChange (void) const {return OptionFlags() & AUTOCIRCULATE_WITH_FBOCHANGE;} // New in SDK 16.0
7643 
7647  inline bool WithColorCorrect (void) const {return OptionFlags() & AUTOCIRCULATE_WITH_COLORCORRECT;} // New in SDK 16.0
7648 
7652  inline bool WithVidProc (void) const {return OptionFlags() & AUTOCIRCULATE_WITH_VIDPROC;} // New in SDK 16.0
7653 
7657  inline bool IsFieldMode (void) const {return OptionFlags() & AUTOCIRCULATE_WITH_FIELDS;} // New in SDK 16.0
7658 
7662  inline bool WithHDMIAuxData (void) const {return OptionFlags() & AUTOCIRCULATE_WITH_HDMIAUX;} // New in SDK 16.0
7663 
7667  inline bool IsInput (void) const {return NTV2_IS_INPUT_CROSSPOINT(acCrosspoint);}
7668 
7672  inline bool IsOutput (void) const {return NTV2_IS_OUTPUT_CROSSPOINT(acCrosspoint);}
7673 
7677  inline NTV2Mode GetMode (void) const {return IsStopped() ? NTV2_MODE_INVALID : (IsInput() ? NTV2_MODE_INPUT : NTV2_MODE_OUTPUT);} // New in SDK 15.5
7678 
7682  NTV2Channel GetChannel (void) const;
7683 
7688  std::string operator [] (const unsigned inIndexNum) const;
7689 
7693  inline operator NTV2_HEADER*() {return reinterpret_cast<NTV2_HEADER*>(this);} // New in SDK 16.3
7694 
7696  NTV2_IS_STRUCT_VALID_IMPL(acHeader,acTrailer)
7697  #endif // user-space clients only
7699 
7700 
7701  #if !defined (NTV2_BUILDING_DRIVER)
7706 
7712 
7719  NTV2RegisterNumberSet & operator << (NTV2RegisterNumberSet & inOutSet, const ULWord inRegisterNumber);
7720 
7721  typedef std::map <ULWord, ULWord> NTV2RegisterValueMap;
7722  typedef NTV2RegisterValueMap::const_iterator NTV2RegValueMapConstIter;
7723  typedef NTV2RegisterValueMap::iterator NTV2RegValueMapIter;
7724  #endif // !defined (NTV2_BUILDING_DRIVER)
7725 
7726 
7732  NTV2_STRUCT_BEGIN (NTV2GetRegisters) // NTV2_TYPE_GETREGS
7734  NTV2_HEADER mHeader;
7735  ULWord mInNumRegisters;
7736  NTV2Buffer mInRegisters;
7737  ULWord mOutNumRegisters;
7738  NTV2Buffer mOutGoodRegisters;
7739  NTV2Buffer mOutValues;
7740  NTV2_TRAILER mTrailer;
7742 
7743  #if !defined (NTV2_BUILDING_DRIVER)
7744 
7749  explicit NTV2GetRegisters (const NTV2RegNumSet & inRegisterNumbers = NTV2RegNumSet());
7750 
7755  explicit NTV2GetRegisters (NTV2RegisterReads & inRegReads);
7756 
7761  bool ResetUsing (const NTV2RegNumSet & inRegisterNumbers);
7762 
7768  inline bool ResetUsing (const NTV2RegisterReads & inRegReads) {return ResetUsing(::GetRegisterNumbers(inRegReads));}
7769 
7775  bool GetGoodRegisters (NTV2RegNumSet & outGoodRegNums) const;
7776 
7782  bool GetRegisterValues (NTV2RegisterValueMap & outValues) const;
7783 
7791  bool GetRegisterValues (NTV2RegisterReads & inOutValues) const;
7792 
7798  bool GetRequestedRegisterNumbers (NTV2RegNumSet & outRegNums) const; // New in SDK 16.3
7799 
7805  bool GetBadRegisters (NTV2RegNumSet & outBadRegNums) const; // New in SDK 16.3
7806 
7813  bool PatchRegister (const ULWord inRegNum, const ULWord inValue); // New in SDK 17.0
7814 
7820  std::ostream & Print (std::ostream & inOutStream) const;
7821 
7825  inline operator NTV2_HEADER*() {return reinterpret_cast<NTV2_HEADER*>(this);} // New in SDK 16.3
7826 
7827  inline ULWord numRegisters (void) const {return mInNumRegisters;} // New in SDK 18.0
7828  inline const NTV2Buffer & requestedRegisterNumbers (void) const {return mInRegisters;} // New in SDK 18.0
7829  inline ULWord & outNumRegisters (void) {return mOutNumRegisters;} // New in SDK 18.0
7830  inline NTV2Buffer & outGoodRegisterNumbers (void) {return mOutGoodRegisters;} // New in SDK 18.0
7831  inline NTV2Buffer & outRegisterValues (void) {return mOutValues;} // New in SDK 18.0
7832 
7834  NTV2_IS_STRUCT_VALID_IMPL(mHeader,mTrailer)
7835 
7837  inline explicit NTV2GetRegisters (const NTV2GetRegisters & inObj) : mHeader(0xFEFEFEFE, 0), mInRegisters(0), mOutGoodRegisters(0), mOutValues(0)
7838  {(void) inObj;}
7839  inline NTV2GetRegisters & operator = (const NTV2GetRegisters & inRHS) {(void) inRHS; return *this;}
7841 
7842  #endif // !defined (NTV2_BUILDING_DRIVER)
7844 
7845 
7846 
7851  NTV2_STRUCT_BEGIN (NTV2SetRegisters) // NTV2_TYPE_SETREGS
7852  NTV2_HEADER mHeader;
7853  ULWord mInNumRegisters;
7854  NTV2Buffer mInRegInfos;
7855  ULWord mOutNumFailures;
7856  NTV2Buffer mOutBadRegIndexes;
7857  NTV2_TRAILER mTrailer;
7858 
7859  #if !defined (NTV2_BUILDING_DRIVER)
7860 
7865  NTV2SetRegisters (const NTV2RegWrites & inRegWrites = NTV2RegWrites());
7866 
7872  bool ResetUsing (const NTV2RegWrites & inRegWrites);
7873 
7879  bool GetFailedRegisterWrites (NTV2RegWrites & outFailedRegWrites) const;
7880 
7884  inline operator NTV2_HEADER*() {return reinterpret_cast<NTV2_HEADER*>(this);} // New in SDK 16.3
7885 
7886  inline ULWord GetRequestedRegisterCount (void) const {return mInNumRegisters;} // New in SDK 16.3
7887  bool GetRequestedRegisterWrites (NTV2RegWrites & outRegWrites) const; // New in SDK 16.3
7888  inline ULWord GetNumFailedWrites (void) const {return mOutNumFailures;} // New in SDK 16.3
7889 
7895  std::ostream & Print (std::ostream & inOutStream) const;
7896 
7897  inline const NTV2Buffer & regInfos (void) const {return mInRegInfos;} // New in SDK 18.0
7898  inline ULWord & outNumFailures (void) {return mOutNumFailures;} // New in SDK 18.0
7899  inline NTV2Buffer & outBadRegIndexes (void) {return mOutBadRegIndexes;} // New in SDK 18.0
7900 
7902  NTV2_IS_STRUCT_VALID_IMPL(mHeader,mTrailer)
7903 
7905  inline explicit NTV2SetRegisters (const NTV2SetRegisters & inObj) : mHeader(0xFEFEFEFE, 0), mInNumRegisters(0), mInRegInfos(0), mOutNumFailures(0), mOutBadRegIndexes(0)
7906  {(void) inObj;}
7907  inline NTV2SetRegisters & operator = (const NTV2SetRegisters & inRHS) {(void) inRHS; return *this;}
7909 
7910  #endif // !defined (NTV2_BUILDING_DRIVER)
7912 
7913 
7914 
7918  NTV2_STRUCT_BEGIN (NTV2BankSelGetSetRegs) // NTV2_TYPE_BANKGETSET
7919  NTV2_HEADER mHeader;
7920  ULWord mIsWriting;
7921  NTV2Buffer mInBankInfos;
7922  NTV2Buffer mInRegInfos;
7923  NTV2_TRAILER mTrailer;
7924 
7925  #if !defined (NTV2_BUILDING_DRIVER)
7926 
7932  explicit NTV2BankSelGetSetRegs (const NTV2RegInfo & inBankSelect, const NTV2RegInfo & inRegInfo, const bool inDoWrite = false);
7933 
7938  NTV2RegInfo GetRegInfo (const UWord inIndex0 = 0) const;
7939 
7945  std::ostream & Print (std::ostream & inOutStream) const;
7946 
7950  inline operator NTV2_HEADER*() {return reinterpret_cast<NTV2_HEADER*>(this);} // New in SDK 16.3
7951 
7953  NTV2_IS_STRUCT_VALID_IMPL(mHeader,mTrailer)
7954 
7956  inline explicit NTV2BankSelGetSetRegs (const NTV2BankSelGetSetRegs & inObj) : mHeader(0xFEFEFEFE, 0), mIsWriting(false), mInBankInfos(0), mInRegInfos(0)
7957  {(void) inObj;}
7958  inline NTV2BankSelGetSetRegs & operator = (const NTV2BankSelGetSetRegs & inRHS) {(void) inRHS; return *this;}
7960  #endif // !defined (NTV2_BUILDING_DRIVER)
7962 
7963 
7964 
7968  NTV2_STRUCT_BEGIN (NTV2VirtualData) // NTV2_TYPE_VIRTUAL_DATA_RW
7969  NTV2_HEADER mHeader;
7970  ULWord mTag;
7971  ULWord mIsWriting;
7972  NTV2Buffer mVirtualData;
7973  NTV2_TRAILER mTrailer;
7974 
7975  #if !defined (NTV2_BUILDING_DRIVER)
7976 
7983  explicit NTV2VirtualData (const ULWord inTag, const void* inVirtualData, const size_t inVirtualDataSize, const bool inDoWrite = false);
7984 
7990  std::ostream & Print (std::ostream & inOutStream) const;
7991 
7995  inline operator NTV2_HEADER*() {return reinterpret_cast<NTV2_HEADER*>(this);} // New in SDK 16.3
7996 
7998  NTV2_IS_STRUCT_VALID_IMPL(mHeader,mTrailer)
7999 
8000  #endif // !defined (NTV2_BUILDING_DRIVER)
8002 
8003 
8004 
8009  #define NTV2_MESSAGE_DATA_RW BIT(0)
8010 
8011  NTV2_STRUCT_BEGIN (NTV2MessageData) // NTV2_TYPE_MESSAGE_DATA
8012  NTV2_HEADER mHeader;
8013  NTV2Buffer mMessage;
8014  ULWord mFlags;
8015  ULWord mStatus;
8016  NTV2_TRAILER mTrailer;
8017 
8018  #if !defined (NTV2_BUILDING_DRIVER)
8019 
8025  explicit NTV2MessageData (const void* inMessage, const size_t inMessageSize, const ULWord inFlags);
8026 
8030  ULWord GetStatus (void) { return mStatus; }
8031 
8037  std::ostream & Print (std::ostream & inOutStream) const;
8038 
8042  inline operator NTV2_HEADER*() {return reinterpret_cast<NTV2_HEADER*>(this);} // New in SDK 16.3
8043 
8045  NTV2_IS_STRUCT_VALID_IMPL(mHeader,mTrailer)
8046 
8047  #endif // !defined (NTV2_BUILDING_DRIVER)
8049 
8050 
8051 
8056  NTV2_STRUCT_BEGIN (NTV2SDIInStatistics) // NTV2_TYPE_SDISTATS
8058  NTV2_HEADER mHeader;
8059  NTV2Buffer mInStatistics;
8060  NTV2_TRAILER mTrailer;
8062 
8063  #if !defined (NTV2_BUILDING_DRIVER)
8064 
8068 
8072  void Clear (void);
8073 
8080  bool GetSDIInputStatus (NTV2SDIInputStatus & outStatus, const UWord inSDIInputIndex0 = 0);
8081 
8086  NTV2SDIInputStatus & operator [] (const size_t inSDIInputIndex0); // New in SDK 16.0
8087 
8093  std::ostream & Print (std::ostream & inOutStream) const;
8094 
8096  NTV2_IS_STRUCT_VALID_IMPL(mHeader,mTrailer)
8097  #endif // !defined (NTV2_BUILDING_DRIVER)
8099 
8100 
8101 
8114  NTV2_STRUCT_BEGIN (FRAME_STAMP) // NTV2_TYPE_ACFRAMESTAMP
8115  NTV2_HEADER acHeader;
8116 
8119  LWord64 acFrameTime;
8121  ULWord acRequestedFrame;
8125  ULWord64 acAudioClockTimeStamp;
8128  ULWord acAudioExpectedAddress;
8134  ULWord acAudioInStartAddress;
8135  ULWord acAudioInStopAddress;
8137  ULWord acAudioOutStopAddress;
8139  ULWord acAudioOutStartAddress;
8141  ULWord acTotalBytesTransferred;
8143  ULWord acStartSample;
8144 
8156  NTV2Buffer acTimeCodes;
8158  LWord64 acCurrentTime;
8168  ULWord acCurrentFrame;
8173  LWord64 acCurrentFrameTime;
8174  ULWord64 acAudioClockCurrentTime;
8178  ULWord acCurrentAudioExpectedAddress; // FIXFIXFIX Document What is this?!
8185  ULWord acCurrentAudioStartAddress;
8186  ULWord acCurrentFieldCount;
8187  ULWord acCurrentLineCount;
8188  ULWord acCurrentReps;
8189  ULWord64 acCurrentUserCookie;
8190  ULWord acFrame;
8195  NTV2_TRAILER acTrailer;
8197 
8198  #if !defined (NTV2_BUILDING_DRIVER)
8199 
8202  explicit FRAME_STAMP ();
8203 
8208  FRAME_STAMP (const FRAME_STAMP & inObj);
8209 
8213  ~FRAME_STAMP ();
8214 
8219  bool SetFrom (const FRAME_STAMP_STRUCT & inOldStruct);
8220 
8225  bool CopyTo (FRAME_STAMP_STRUCT & outOldStruct) const;
8226 
8233  bool GetInputTimeCodes (NTV2TimeCodeList & outValues) const;
8234 
8244  bool GetInputTimeCodes (NTV2TimeCodes & outTimeCodes, const NTV2Channel inSDIInput, const bool inValidOnly = true) const;
8245 
8254  bool GetInputTimeCode (NTV2_RP188 & outTimeCode, const NTV2TCIndex inTCIndex = NTV2_TCINDEX_SDI1) const;
8255 
8262  bool GetSDIInputStatus (NTV2SDIInputStatus & outStatus, const UWord inSDIInputIndex0 = 0) const;
8263 
8271  bool SetInputTimecode (const NTV2TCIndex inTCNdx, const NTV2_RP188 & inTimecode);
8272 
8277  FRAME_STAMP & operator = (const FRAME_STAMP & inRHS);
8278 
8283  std::string operator [] (const unsigned inIndexNum) const;
8284 
8288  inline operator NTV2_HEADER*() {return reinterpret_cast<NTV2_HEADER*>(this);} // New in SDK 16.3
8289 
8291  NTV2_IS_STRUCT_VALID_IMPL(acHeader,acTrailer)
8292 
8293  #endif // !defined (NTV2_BUILDING_DRIVER)
8295 
8296 
8297 
8303  NTV2_HEADER acHeader;
8305  LWord acTransferFrame;
8306  ULWord acBufferLevel;
8307  ULWord acFramesProcessed;
8308  ULWord acFramesDropped;
8309  FRAME_STAMP acFrameStamp;
8310  ULWord acAudioTransferSize;
8311  ULWord acAudioStartSample;
8312  ULWord acAncTransferSize;
8313  ULWord acAncField2TransferSize;
8314  NTV2_TRAILER acTrailer;
8315 
8316  #if !defined (NTV2_BUILDING_DRIVER)
8317 
8320  explicit AUTOCIRCULATE_TRANSFER_STATUS ();
8321 
8325  inline const FRAME_STAMP & GetFrameStamp (void) const {return acFrameStamp;}
8326 
8330  inline LWord GetTransferFrame (void) const {return acTransferFrame;}
8331 
8335  inline NTV2AutoCirculateState GetState (void) const {return acState;}
8336 
8340  inline ULWord GetBufferLevel (void) const {return acBufferLevel;}
8341 
8345  inline ULWord GetProcessedFrameCount (void) const {return acFramesProcessed;}
8346 
8350  inline ULWord GetDroppedFrameCount (void) const {return acFramesDropped;}
8351 
8357  inline ULWord GetCapturedAudioByteCount (void) const {return acAudioTransferSize;}
8358 
8365  inline ULWord GetCapturedAncByteCount (const bool inField2 = false) const {return inField2 ? acAncField2TransferSize : acAncTransferSize;}
8366 
8373  inline ULWord GetCapturedAuxByteCount (const bool inField2 = false) const {return GetCapturedAncByteCount(inField2);}
8374 
8376  NTV2_IS_STRUCT_VALID_IMPL(acHeader,acTrailer)
8377 
8379  inline explicit AUTOCIRCULATE_TRANSFER_STATUS (const AUTOCIRCULATE_TRANSFER_STATUS & inObj) : acHeader(0xFEFEFEFE, 0) {(void) inObj;}
8380  inline AUTOCIRCULATE_TRANSFER_STATUS & operator = (const AUTOCIRCULATE_TRANSFER_STATUS & inRHS) {(void) inRHS; return *this;}
8382  #endif // !defined (NTV2_BUILDING_DRIVER)
8384 
8385 
8386 
8392  NTV2_HEADER acHeader;
8393 
8399  NTV2Buffer acVideoBuffer;
8400 
8406  NTV2Buffer acAudioBuffer;
8407 
8417  NTV2Buffer acANCBuffer;
8418 
8428  NTV2Buffer acANCField2Buffer;
8429 
8436  NTV2Buffer acOutputTimeCodes;
8437 
8444 
8450  ULWord64 acInUserCookie;
8451 
8458  ULWord acInVideoDMAOffset;
8459 
8460  NTV2SegmentedDMAInfo acInSegmentedDMAInfo;
8461  NTV2ColorCorrectionData acColorCorrection;
8462  NTV2FrameBufferFormat acFrameBufferFormat;
8463  NTV2FBOrientation acFrameBufferOrientation;
8464  AutoCircVidProcInfo acVidProcInfo;
8465  NTV2QuarterSizeExpandMode acVideoQuarterSizeExpand;
8466 
8467  NTV2Buffer acHDMIAuxData;
8468 
8472  ULWord acPeerToPeerFlags;
8474  ULWord acFrameRepeatCount;
8475  LWord acDesiredFrame;
8478  NTV2_TRAILER acTrailer;
8480 
8481  #if !defined (NTV2_BUILDING_DRIVER)
8482 
8485  explicit AUTOCIRCULATE_TRANSFER ();
8488 
8512  explicit AUTOCIRCULATE_TRANSFER (ULWord * pInVideoBuffer, const ULWord inVideoByteCount, ULWord * pInAudioBuffer = AJA_NULL,
8513  const ULWord inAudioByteCount = 0, ULWord * pInANCBuffer = AJA_NULL, const ULWord inANCByteCount = 0,
8514  ULWord * pInANCF2Buffer = AJA_NULL, const ULWord inANCF2ByteCount = 0);
8519  void Clear (void);
8520 
8522  inline explicit AUTOCIRCULATE_TRANSFER (const AUTOCIRCULATE_TRANSFER & inObj)
8523  : acHeader(0xFEFEFEFE, 0), acVideoBuffer(0), acAudioBuffer(0),
8524  acANCBuffer(0), acANCField2Buffer(0), acOutputTimeCodes(0), acHDMIAuxData(0)
8525  {(void) inObj;}
8526  inline AUTOCIRCULATE_TRANSFER & operator = (const AUTOCIRCULATE_TRANSFER & inRHS) {(void) inRHS; return *this;}
8529 
8533 
8559  bool SetBuffers (ULWord * pInVideoBuffer, const ULWord inVideoByteCount,
8560  ULWord * pInAudioBuffer, const ULWord inAudioByteCount,
8561  ULWord * pInANCBuffer, const ULWord inANCByteCount,
8562  ULWord * pInANCF2Buffer = AJA_NULL, const ULWord inANCF2ByteCount = 0);
8563 
8575  bool SetVideoBuffer (ULWord * pInVideoBuffer, const ULWord inVideoByteCount);
8576 
8587  bool SetAudioBuffer (ULWord * pInAudioBuffer, const ULWord inAudioByteCount);
8588 
8610  bool SetAncBuffers (ULWord * pInANCBuffer, const ULWord inANCByteCount,
8611  ULWord * pInANCF2Buffer = AJA_NULL, const ULWord inANCF2ByteCount = 0);
8615  inline const NTV2Buffer & GetVideoBuffer (void) const {return acVideoBuffer;}
8616 
8620  inline const NTV2Buffer & GetAudioBuffer (void) const {return acAudioBuffer;}
8621 
8626  inline const NTV2Buffer & GetAncBuffer (const bool inField2 = false) const {return inField2 ? acANCField2Buffer : acANCBuffer;}
8628 
8632 
8642  bool SetOutputTimeCodes (const NTV2TimeCodes & inValues);
8643 
8654  bool SetOutputTimeCode (const NTV2_RP188 & inTimecode, const NTV2TCIndex inTCIndex = NTV2_TCINDEX_SDI1);
8655 
8664  bool SetAllOutputTimeCodes (const NTV2_RP188 & inTimecode, const bool inIncludeF2 = true);
8665 
8673  bool GetInputTimeCodes (NTV2TimeCodeList & outValues) const;
8674 
8685  bool GetInputTimeCode (NTV2_RP188 & outTimeCode, const NTV2TCIndex inTCIndex = NTV2_TCINDEX_SDI1) const;
8686 
8699  bool GetInputTimeCodes (NTV2TimeCodes & outTimeCodes, const NTV2Channel inSDIInput = NTV2_CHANNEL1, const bool inValidOnly = true) const;
8701 
8705 
8716  inline bool SetFrameUserCookie (const ULWord64 & inUserCookie) {acInUserCookie = inUserCookie; return true;}
8717 
8725  bool SetFrameBufferFormat (const NTV2FrameBufferFormat inNewFormat);
8726 
8730  inline void EnableQuarterSizeExpandMode (void) {acVideoQuarterSizeExpand = NTV2_QuarterSizeExpandOn;}
8731 
8735  inline void DisableQuarterSizeExpandMode (void) {acVideoQuarterSizeExpand = NTV2_QuarterSizeExpandOff;}
8736 
8740  inline bool IsQuarterSizeExpandModeEnabled (void) const {return acVideoQuarterSizeExpand == NTV2_QuarterSizeExpandOn;}
8741 
8746  inline const AUTOCIRCULATE_TRANSFER_STATUS & GetTransferStatus (void) const {return acTransferStatus;}
8747 
8752  inline const FRAME_STAMP & GetFrameInfo (void) const {return acTransferStatus.acFrameStamp;}
8753 
8758  inline ULWord GetCapturedAudioByteCount (void) const {return acTransferStatus.GetCapturedAudioByteCount();}
8759 
8760  inline NTV2_DEPRECATED_f(ULWord GetAudioByteCount (void) const) {return GetCapturedAudioByteCount ();}
8761 
8768  inline ULWord GetCapturedAncByteCount (const bool inField2 = false) const {return acTransferStatus.GetCapturedAncByteCount(inField2);}
8769  inline NTV2_SHOULD_BE_DEPRECATED(ULWord GetAncByteCount (const bool inField2 = false) const) {return GetCapturedAncByteCount(inField2);}
8770 
8774  inline NTV2FrameBufferFormat GetFrameBufferFormat (void) const {return acFrameBufferFormat;}
8775 
8779  inline LWord GetTransferFrameNumber (void) const {return acTransferStatus.GetTransferFrame();}
8781 
8785 
8799  bool EnableSegmentedDMAs (const ULWord inNumSegments, const ULWord inNumActiveBytesPerLine,
8800  const ULWord inHostBytesPerLine, const ULWord inDeviceBytesPerLine);
8805  bool DisableSegmentedDMAs (void);
8806 
8810  bool SegmentedDMAsEnabled (void) const;
8812 
8816  inline operator NTV2_HEADER*() {return reinterpret_cast<NTV2_HEADER*>(this);} // New in SDK 16.3
8817 
8819  NTV2_IS_STRUCT_VALID_IMPL(acHeader,acTrailer)
8820  #endif // user-space clients only
8822 
8823 
8824 
8829  NTV2_HEADER mHeader;
8830  NTV2Buffer mSharedMemory;
8831  // and its length. The AJADebug logging facility owns and manages this memory.
8832  // If NULL or zero length, debug logging will be disabled in the driver.
8833  // If non-NULL and zero length, debug logging will be enabled in the driver.
8834  ULWord mReserved[32];
8835  NTV2_TRAILER mTrailer;
8836 
8837  #if !defined (NTV2_BUILDING_DRIVER)
8838 
8842  explicit NTV2DebugLogging (const bool inEnable = false);
8843 
8849  std::ostream & Print (std::ostream & inOutStream) const;
8850 
8851  NTV2_IS_STRUCT_VALID_IMPL(mHeader, mTrailer)
8852 
8853  #endif // !defined (NTV2_BUILDING_DRIVER)
8855 
8856 
8857 
8865  NTV2_HEADER mHeader;
8866  NTV2Buffer mBuffer;
8867  // A NULL buffer (or zero length) releases all locked buffers.
8868  ULWord mFlags;
8869  ULWord64 mMaxLockSize;
8870  ULWord mReserved[30];
8871  NTV2_TRAILER mTrailer;
8872 
8873  #if !defined (NTV2_BUILDING_DRIVER)
8874 
8877  explicit NTV2BufferLock ();
8879  inline ~NTV2BufferLock () {}
8880 
8886  explicit NTV2BufferLock (const NTV2Buffer & inBuffer, const ULWord inFlags);
8887 
8894  explicit NTV2BufferLock (const ULWord * pInBuffer, const ULWord inByteCount, const ULWord inFlags);
8895 
8901  explicit NTV2BufferLock (const ULWord64 inMaxLockSize, const ULWord inFlags); // New in SDK 16.0
8903 
8907 
8913  bool SetBuffer (const NTV2Buffer & inBuffer);
8914 
8921  inline bool SetBuffer (const ULWord * pInBuffer, const ULWord inByteCount)
8922  {
8923  return SetBuffer(NTV2Buffer(pInBuffer, inByteCount));
8924  }
8925 
8930  inline void SetFlags (const ULWord inFlags) {NTV2_ASSERT_STRUCT_VALID; mFlags = inFlags;}
8931 
8936  inline void SetMaxLockSize (const ULWord64 inNumBytes) {NTV2_ASSERT_STRUCT_VALID; mMaxLockSize = inNumBytes;} // New in SDK 16.0
8937 
8942  inline void Clear (void)
8943  {
8944  SetBuffer(NTV2Buffer());
8945  SetFlags(0);
8946  SetMaxLockSize(0);
8947  }
8949 
8955  std::ostream & Print (std::ostream & inOutStream) const;
8956 
8957  NTV2_IS_STRUCT_VALID_IMPL(mHeader, mTrailer)
8958 
8959  #endif // !defined (NTV2_BUILDING_DRIVER)
8961 
8962 
8963 
8969  NTV2_HEADER mHeader;
8970  NTV2Buffer mBuffer;
8971  ULWord mFlags;
8972  ULWord mStatus;
8973  ULWord mRegisters[16];
8974  ULWord mReserved[32];
8975  NTV2_TRAILER mTrailer;
8976 
8977  #if !defined (NTV2_BUILDING_DRIVER)
8978 
8981  explicit NTV2Bitstream ();
8983  inline ~NTV2Bitstream () {}
8984 
8990  explicit NTV2Bitstream (const NTV2Buffer & inBuffer, const ULWord inFlags);
8991 
8998  explicit NTV2Bitstream (const ULWord * pInBuffer, const ULWord inByteCount, const ULWord inFlags);
9000 
9004 
9010  bool SetBuffer (const NTV2Buffer & inBuffer);
9011 
9018  inline bool SetBuffer (const ULWord * pInBuffer, const ULWord inByteCount) {return SetBuffer(NTV2Buffer(pInBuffer, inByteCount));}
9019 
9024  inline void SetFlags (const ULWord inFlags) {NTV2_ASSERT_STRUCT_VALID; mFlags = inFlags;}
9025 
9029  inline void Clear (void) {SetBuffer(NTV2Buffer());}
9031 
9037  std::ostream & Print (std::ostream & inOutStream) const;
9038 
9042  inline operator NTV2_HEADER*() {return reinterpret_cast<NTV2_HEADER*>(this);} // New in SDK 16.3
9043 
9045  NTV2_IS_STRUCT_VALID_IMPL(mHeader, mTrailer)
9046 
9047  #endif // !defined (NTV2_BUILDING_DRIVER)
9049 
9050 
9051  // Stream channel action flags
9052  #define NTV2_STREAM_CHANNEL_INITIALIZE BIT(0)
9053  #define NTV2_STREAM_CHANNEL_RELEASE BIT(1)
9054  #define NTV2_STREAM_CHANNEL_START BIT(2)
9055  #define NTV2_STREAM_CHANNEL_STOP BIT(3)
9056  #define NTV2_STREAM_CHANNEL_FLUSH BIT(4)
9057  #define NTV2_STREAM_CHANNEL_STATUS BIT(5)
9058  #define NTV2_STREAM_CHANNEL_WAIT BIT(6)
9059 
9060  // Stream channel state flags
9061  #define NTV2_STREAM_CHANNEL_STATE_DISABLED BIT(0)
9062  #define NTV2_STREAM_CHANNEL_STATE_INITIALIZED BIT(1)
9063  #define NTV2_STREAM_CHANNEL_STATE_RELEASED BIT(2)
9064  #define NTV2_STREAM_CHANNEL_STATE_IDLE BIT(3)
9065  #define NTV2_STREAM_CHANNEL_STATE_ACTIVE BIT(4)
9066  #define NTV2_STREAM_CHANNEL_STATE_ERROR BIT(5)
9067 
9068  // Stream buffer action flags
9069  #define NTV2_STREAM_BUFFER_QUEUE BIT(1)
9070  #define NTV2_STREAM_BUFFER_RELEASE BIT(2)
9071  #define NTV2_STREAM_BUFFER_STATUS BIT(3)
9072 
9073  // Stream buffer state flags
9074  #define NTV2_STREAM_BUFFER_STATE_QUEUED BIT(0)
9075  #define NTV2_STREAM_BUFFER_STATE_LINKED BIT(1)
9076  #define NTV2_STREAM_BUFFER_STATE_COMPLETED BIT(2)
9077  #define NTV2_STREAM_BUFFER_STATE_FLUSHED BIT(3)
9078  #define NTV2_STREAM_BUFFER_STATE_RELEASED BIT(4)
9079  #define NTV2_STREAM_BUFFER_STATE_ERROR BIT(5)
9080 
9081  // Stream action status flags
9082  #define NTV2_STREAM_STATUS_SUCCESS BIT(0)
9083  #define NTV2_STREAM_STATUS_FAIL BIT(1)
9084  #define NTV2_STREAM_STATUS_STATE BIT(2)
9085  #define NTV2_STREAM_STATUS_MESSAGE BIT(3)
9086  #define NTV2_STREAM_STATUS_INVALID BIT(4)
9087  #define NTV2_STREAM_STATUS_TIMEOUT BIT(5)
9088  #define NTV2_STREAM_STATUS_RESOURCE BIT(6)
9089  #define NTV2_STREAM_STATUS_OWNER BIT(7)
9090 
9092  NTV2_HEADER mHeader;
9093  NTV2Channel mChannel;
9094  ULWord mFlags;
9095  ULWord mStatus;
9096  ULWord mStreamState;
9097  ULWord64 mBufferCookie;
9098  LWord64 mStartTime;
9099  LWord64 mStopTime;
9100  ULWord64 mQueueCount;
9101  ULWord64 mReleaseCount;
9102  ULWord64 mActiveCount;
9103  ULWord64 mRepeatCount;
9104  ULWord64 mIdleCount;
9105  ULWord mReserved[32];
9106  NTV2_TRAILER mTrailer;
9107 
9108  #if !defined (NTV2_BUILDING_DRIVER)
9109 
9112  explicit NTV2StreamChannel ();
9114  inline ~NTV2StreamChannel () {}
9115 
9117  inline operator NTV2_HEADER*() {return reinterpret_cast<NTV2_HEADER*>(this);} // New in SDK 16.3
9118 
9123  inline ULWord GetQueueDepth (void) {return (ULWord)(mQueueCount - mReleaseCount);}
9124 
9129  inline bool IsIdle (void) {return ((mStreamState & NTV2_STREAM_CHANNEL_STATE_IDLE) != 0);}
9130 
9135  inline bool IsActive (void) {return ((mStreamState & NTV2_STREAM_CHANNEL_STATE_ACTIVE) != 0);}
9136 
9141  inline bool HasError (void) {return ((mStreamState & NTV2_STREAM_CHANNEL_STATE_ERROR) != 0);}
9142 
9143  std::ostream & Print (std::ostream & inOutStream) const;
9144 
9145  NTV2_IS_STRUCT_VALID_IMPL(mHeader, mTrailer)
9146 
9147  #endif // !defined (NTV2_BUILDING_DRIVER)
9148 
9150 
9152  NTV2_HEADER mHeader;
9153  NTV2Channel mChannel;
9154  ULWord mFlags;
9155  ULWord mStatus;
9156  NTV2Buffer mBuffer;
9157  ULWord mSegmentSize;
9158  LWord mSegmentPitch;
9159  ULWord mNumSegments;
9160  ULWord64 mBufferCookie;
9161  ULWord mBufferState;
9162  LWord64 mQueueTime;
9163  LWord64 mActiveTime;
9164  LWord64 mCompleteTime;
9165  LWord64 mFlushTime;
9166  ULWord64 mTransferCount;
9167  ULWord mReserved[32];
9168  NTV2_TRAILER mTrailer;
9169 
9170  #if !defined (NTV2_BUILDING_DRIVER)
9171 
9174  explicit NTV2StreamBuffer ();
9176  inline ~NTV2StreamBuffer () {}
9177 
9179  inline operator NTV2_HEADER*() {return reinterpret_cast<NTV2_HEADER*>(this);} // New in SDK 16.3
9180 
9181  std::ostream & Print (std::ostream & inOutStream) const;
9182 
9183  NTV2_IS_STRUCT_VALID_IMPL(mHeader, mTrailer)
9184 
9185  #endif // !defined (NTV2_BUILDING_DRIVER)
9186 
9188 
9189  // Mail buffer action flags
9190  #define NTV2_MAIL_BUFFER_SEND BIT(0)
9191  #define NTV2_MAIL_BUFFER_RECEIVE BIT(1)
9192 
9193  // Mail buffer status flags
9194  #define NTV2_MAIL_BUFFER_SUCCESS BIT(0)
9195  #define NTV2_MAIL_BUFFER_FAIL BIT(1)
9196  #define NTV2_MAIL_BUFFER_OVERFLOW BIT(2)
9197  #define NTV2_MAIL_BUFFER_TIMEOUT BIT(3)
9198  #define NTV2_MAIL_BUFFER_TRYAGAIN BIT(4)
9199 
9200  // Mail buffer maximum size
9201  #define NTV2_MAIL_BUFFER_MAX 4096
9202 
9204  NTV2_HEADER mHeader;
9205  NTV2Channel mChannel;
9206  NTV2Buffer mBuffer;
9207  ULWord mDataSize;
9208  ULWord mFlags;
9209  ULWord mDelay;
9210  ULWord mTimeout;
9211  ULWord mStatus;
9212  ULWord mReserved[32];
9213  NTV2_TRAILER mTrailer;
9214 
9215  #if !defined (NTV2_BUILDING_DRIVER)
9216 
9219  explicit NTV2MailBuffer ();
9221  inline ~NTV2MailBuffer () {}
9222 
9224  inline operator NTV2_HEADER*() {return reinterpret_cast<NTV2_HEADER*>(this);} // New in SDK 16.3
9225 
9226  std::ostream & Print (std::ostream & inOutStream) const;
9227 
9228  NTV2_IS_STRUCT_VALID_IMPL(mHeader, mTrailer)
9229 
9230  #endif // !defined (NTV2_BUILDING_DRIVER)
9231 
9233 
9234  #if !defined (NTV2_BUILDING_DRIVER)
9235  typedef std::set <NTV2VideoFormat> NTV2VideoFormatSet;
9236  typedef NTV2VideoFormatSet::const_iterator NTV2VideoFormatSetConstIter;
9237 
9238  typedef std::set <NTV2FrameBufferFormat> NTV2FrameBufferFormatSet;
9239  typedef NTV2FrameBufferFormatSet::const_iterator NTV2FrameBufferFormatSetConstIter;
9240  typedef NTV2FrameBufferFormatSet NTV2PixelFormats; // New in SDK 17.0
9242 
9243  typedef std::set <NTV2FrameGeometry> NTV2GeometrySet;
9244  typedef NTV2GeometrySet::const_iterator NTV2GeometrySetConstIter;
9245 
9246  typedef std::set <NTV2Standard> NTV2StandardSet;
9247  typedef NTV2StandardSet::const_iterator NTV2StandardSetConstIter;
9248 
9249  typedef std::set <NTV2InputSource> NTV2InputSourceSet;
9250  typedef NTV2InputSourceSet::const_iterator NTV2InputSourceSetConstIter;
9251 
9252  typedef std::set <NTV2OutputDestination> NTV2OutputDestinations;
9253  typedef NTV2OutputDestinations::const_iterator NTV2OutputDestinationsConstIter;
9254 
9255  typedef std::set <NTV2FrameRate> NTV2FrameRateSet;
9256  typedef NTV2FrameRateSet::const_iterator NTV2FrameRateSetConstIter;
9257 
9258  typedef std::set <NTV2AudioRate> NTV2AudioRateSet;
9259  typedef NTV2AudioRateSet::const_iterator NTV2AudioRateSetConstIter;
9260 
9267  AJAExport std::ostream & operator << (std::ostream & inOutStream, const UWordSequence & inData);
9268 
9275  AJAExport std::ostream & operator << (std::ostream & inOutStream, const ULWordSequence & inData);
9276 
9283  AJAExport std::ostream & operator << (std::ostream & inOutStream, const ULWord64Sequence & inData);
9284 
9290 
9299  AJAExport bool NTV2DeviceGetSupportedVideoFormats (const NTV2DeviceID inDeviceID, NTV2VideoFormatSet & outFormats);
9300 
9308 
9315  AJAExport std::ostream & operator << (std::ostream & inOStream, const NTV2VideoFormatSet & inFormats);
9316 
9324  AJAExport bool NTV2DeviceGetSupportedPixelFormats (const NTV2DeviceID inDeviceID, NTV2PixelFormats & outFormats);
9325 
9331  AJAExport bool NTV2GetSupportedPixelFormats (NTV2PixelFormats & outFormats); // New in SDK 17.0
9332 
9338  AJAExport bool NTV2GetUnsupportedPixelFormats (NTV2PixelFormats & outFormats); // New in SDK 17.0
9339 
9345  AJAExport bool NTV2GetSupportedStandards (NTV2StandardSet & outStandards); // New in SDK 17.0
9346 
9352  AJAExport bool NTV2GetUnsupportedStandards (NTV2StandardSet & outStandards); // New in SDK 17.0
9353 
9360  AJAExport std::ostream & operator << (std::ostream & inOStream, const NTV2PixelFormats & inFormats);
9361 
9369 
9377  AJAExport bool NTV2DeviceGetSupportedStandards (const NTV2DeviceID inDeviceID, NTV2StandardSet & outStandards);
9378 
9385  AJAExport std::ostream & operator << (std::ostream & inOStream, const NTV2StandardSet & inStandards);
9386 
9394 
9402  AJAExport bool NTV2DeviceGetSupportedGeometries (const NTV2DeviceID inDeviceID, NTV2GeometrySet & outGeometries);
9403 
9410  AJAExport std::ostream & operator << (std::ostream & inOStream, const NTV2GeometrySet & inGeometries);
9411 
9419 
9426  AJAExport std::ostream & operator << (std::ostream & inOStream, const NTV2InputSourceSet & inSet);
9427 
9435 
9445  AJAExport bool NTV2DeviceGetSupportedInputSources (const NTV2DeviceID inDeviceID, NTV2InputSourceSet & outInputSources, const NTV2IOKinds inKinds = NTV2_IOKINDS_ALL); // New in SDK 16.3
9446 
9453  AJAExport std::ostream & operator << (std::ostream & inOStream, const NTV2OutputDestinations & inSet); // New in SDK 16.0
9454 
9461  AJAExport NTV2OutputDestinations & operator += (NTV2OutputDestinations & inOutSet, const NTV2OutputDestinations & inSet); // New in SDK 16.0
9462 
9472  AJAExport bool NTV2DeviceGetSupportedOutputDests (const NTV2DeviceID inDeviceID, NTV2OutputDestinations & outOutputDests, const NTV2IOKinds inKinds = NTV2_IOKINDS_ALL); // New in SDK 16.3
9473 
9480  AJAExport std::ostream & operator << (std::ostream & inOStream, const NTV2FrameRateSet & inSet); // New in SDK 17.0
9481 
9488  AJAExport NTV2FrameRateSet & operator += (NTV2FrameRateSet & inOutSet, const NTV2FrameRateSet & inSet); // New in SDK 17.0
9489 
9498  AJAExport bool NTV2DeviceGetSupportedFrameRates (const NTV2DeviceID inDeviceID, NTV2FrameRateSet & outRates); // New in SDK 17.0
9499 
9500 
9507  AJAExport std::ostream & operator << (std::ostream & inOutStream, const NTV2_HEADER & inObj);
9508 
9515  AJAExport std::ostream & operator << (std::ostream & inOutStream, const NTV2_TRAILER & inObj);
9516 
9523  AJAExport std::ostream & operator << (std::ostream & inOutStream, const NTV2Buffer & inObj);
9524 
9531  AJAExport std::ostream & operator << (std::ostream & inOutStream, const NTV2_RP188 & inObj);
9532 
9539  AJAExport std::ostream & operator << (std::ostream & inOutStream, const NTV2TimeCodeList & inObj);
9540 
9547  AJAExport std::ostream & operator << (std::ostream & inOutStream, const NTV2TimeCodes & inObj);
9548 
9555  AJAExport std::ostream & operator << (std::ostream & inOutStream, const NTV2TCIndexes & inObj);
9556 
9563  AJAExport NTV2TCIndexes & operator += (NTV2TCIndexes & inOutSet, const NTV2TCIndexes & inSet);
9564 
9571  AJAExport std::ostream & operator << (std::ostream & inOutStream, const FRAME_STAMP & inObj);
9572 
9579  AJAExport std::ostream & operator << (std::ostream & inOutStream, const AUTOCIRCULATE_STATUS & inObj);
9580 
9587  AJAExport std::ostream & operator << (std::ostream & inOutStream, const NTV2SegmentedDMAInfo & inObj);
9588 
9595  AJAExport std::ostream & operator << (std::ostream & inOutStream, const AUTOCIRCULATE_TRANSFER & inObj);
9596 
9603  AJAExport std::ostream & operator << (std::ostream & inOutStream, const FRAME_STAMP & inObj);
9604 
9611  AJAExport std::ostream & operator << (std::ostream & inOutStream, const AUTOCIRCULATE_TRANSFER_STATUS & inObj);
9612 
9619  AJAExport std::ostream & operator << (std::ostream & inOutStream, const NTV2RegisterNumberSet & inObj);
9620 
9627  AJAExport std::ostream & operator << (std::ostream & inOutStream, const NTV2RegisterValueMap & inObj);
9628 
9635  AJAExport std::ostream & operator << (std::ostream & inOutStream, const AutoCircVidProcInfo & inObj);
9636 
9643  AJAExport std::ostream & operator << (std::ostream & inOutStream, const NTV2ColorCorrectionData & inObj);
9644 
9651  AJAExport inline std::ostream & operator << (std::ostream & inOutStream, const NTV2GetRegisters & inObj) {return inObj.Print (inOutStream);}
9652 
9659  AJAExport inline std::ostream & operator << (std::ostream & inOutStream, const NTV2SetRegisters & inObj) {return inObj.Print (inOutStream);}
9660 
9667  AJAExport inline std::ostream & operator << (std::ostream & inOutStream, const NTV2BankSelGetSetRegs & inObj) {return inObj.Print (inOutStream);}
9668 
9675  AJAExport inline std::ostream & operator << (std::ostream & inOutStream, const NTV2SDIInStatistics & inObj) {return inObj.Print (inOutStream);}
9676 
9683  AJAExport inline std::ostream & operator << (std::ostream & inOutStream, const NTV2SDIInputStatus & inObj) {return inObj.Print (inOutStream);}
9684 
9691  AJAExport std::ostream & operator << (std::ostream & inOutStrm, const NTV2SegmentedXferInfo & inXferInfo);
9692 
9699  AJAExport inline std::ostream & operator << (std::ostream & inOutStream, const NTV2DebugLogging & inObj) {return inObj.Print (inOutStream);}
9700 
9707  AJAExport inline std::ostream & operator << (std::ostream & inOutStream, const NTV2BufferLock & inObj) {return inObj.Print (inOutStream);}
9708  #endif // !defined (NTV2_BUILDING_DRIVER)
9709 
9710  #if defined (AJAMac)
9711  #pragma pack (pop)
9712  #endif // defined (AJAMac)
9713 
9715 #if !defined(NTV2_DEPRECATE_17_6)
9716 
9718  // maximum number of hevc streams
9719  #define HEVC_STREAM_MAX 4
9720 
9721  // maximum number of gpio ports
9722  #define HEVC_GPIO_MAX 64
9723 
9724  // version string maximum size (bytes)
9725  #define HEVC_VERSION_STRING_SIZE 64
9726 
9727  // picture and encoded information additional data size (bytes)
9728  #define HEVC_ADDITIONAL_DATA_SIZE ((4 + 4 + 256) * 16)
9729 
9730  // codec state flags
9731  #define HEVC_STATE_FLAG_VIDEO_STARTED 0x00000001U // codec video input capture started
9732 
9733  // transfer flags
9734  #define HEVC_TRANSFER_FLAG_IS_LAST_FRAME 0x00000001U // last stream frame
9735 
9736  // driver io status codes
9737  #define HEVC_STATUS_SUCCESS 0x00000001U
9738 
9739  // fatal error registers
9740  #define HEVC_FATAL_ERROR_INFO_REG 0x08000100U // codec error register base
9741  #define HEVC_FATAL_ERROR_INFO_COUNT 64 // number of codec error registers
9742 
9743  // driver debug register output enable bits
9744  #define HEVC_DEBUG_DRIVER_REGISTER 0x080000FCU // register address of debug bits
9745  #define HEVC_DEBUG_MASK_INFO 0x00000001 // general probe and cleanup
9746  #define HEVC_DEBUG_MASK_WARNING 0x00000002 // general warinings
9747  #define HEVC_DEBUG_MASK_ERROR 0x00000004 // general erros
9748  #define HEVC_DEBUG_MASK_INT_PRIMARY 0x00000008 // primary interrupt info
9749  #define HEVC_DEBUG_MASK_INT_COMMAND 0x00000010 // command tasklet info
9750  #define HEVC_DEBUG_MASK_INT_VEI 0x00000020 // raw stream tasklet info
9751  #define HEVC_DEBUG_MASK_INT_SEO 0x00000040 // encoded stream tasklet info
9752  #define HEVC_DEBUG_MASK_INT_ERROR 0x00000080 // interrupt errors
9753  #define HEVC_DEBUG_MASK_REGISTER_INFO 0x00000100 // register read/write info
9754  #define HEVC_DEBUG_MASK_REGISTER_STATE 0x00000200 // detailed register access info
9755  #define HEVC_DEBUG_MASK_REGISTER_ERROR 0x00000400 // register access errors
9756  #define HEVC_DEBUG_MASK_COMMAND_INFO 0x00000800 // command queue info
9757  #define HEVC_DEBUG_MASK_COMMAND_STATE 0x00001000 // detailed command processing info
9758  #define HEVC_DEBUG_MASK_COMMAND_ERROR 0x00002000 // command queue errors
9759  #define HEVC_DEBUG_MASK_STREAM_INFO 0x00004000 // stream (dma) queue info
9760  #define HEVC_DEBUG_MASK_STREAM_STATE 0x00008000 // detailed stream processing info
9761  #define HEVC_DEBUG_MASK_STREAM_COPY 0x00010000 // stream data copy info
9762  #define HEVC_DEBUG_MASK_STREAM_SEGMENT 0x00020000 // stream data segment info
9763  #define HEVC_DEBUG_MASK_STREAM_FRAME 0x00040000 // stream vif frame info
9764  #define HEVC_DEBUG_MASK_STREAM_ERROR 0x00080000 // stream queue errors
9765  #define HEVC_DEBUG_MASK_MEMORY_ALLOC 0x00100000 // buffer memory allocation info
9766  #define HEVC_DEBUG_MASK_MEMORY_ERROR 0x00200000 // buffer memory allocation errors
9767  #define HEVC_DEBUG_MASK_DMA_INFO 0x00400000 // dma send info
9768  #define HEVC_DEBUG_MASK_DMA_DESCRIPTOR 0x00800000 // dma descriptor dump
9769  #define HEVC_DEBUG_MASK_DMA_ERROR 0x01000000 // dma errors
9770  #define HEVC_DEBUG_MASK_STATUS_INFO 0x02000000 // status info requests
9771  #define HEVC_DEBUG_MASK_RESERVED_0 0x04000000
9772  #define HEVC_DEBUG_MASK_RESERVED_1 0x08000000
9773  #define HEVC_DEBUG_MASK_RESERVED_2 0x10000000
9774  #define HEVC_DEBUG_MASK_RESERVED_3 0x20000000
9775  #define HEVC_DEBUG_MASK_RESERVED_4 0x40000000
9776  #define HEVC_DEBUG_MASK_RESERVED_5 0x80000000
9777 
9778  // ntv2 gpio input registers
9779  #define HEVC_NTV2_GPIO_REGISTER_LOW 510
9780  #define HEVC_NTV2_GPIO_REGISTER_HIGH 511
9781 
9782 
9783  // hevc version information
9784  typedef struct HevcVersion
9785  {
9790  } HevcVersion;
9791 
9792  // pci id information
9793  typedef struct HevcPciId
9794  {
9799  } HevcPciId;
9800 
9801  // hevc device mode
9802  typedef enum HevcDeviceMode
9803  {
9805  Hevc_DeviceMode_Codec, // codec mode
9806  Hevc_DeviceMode_Maintenance, // maintenance mode
9808  } HevcDeviceMode;
9809 
9810  // hevc device information message
9811  typedef struct HevcDeviceInfo
9812  {
9813  HevcVersion driverVersion; // driver version
9814  HevcVersion mcpuVersion; // firmware versions
9820  HevcPciId pciId; // pci ids
9821  HevcDeviceMode deviceMode; // hardware device mode
9822  bool mcpuVersionCheck; // mcpu version supported
9823  bool systemVersionCheck; // system version supported
9824  bool standardSingleCheck; // standard firmware single version supported
9825  bool standardMultipleCheck; // standard fimwrare multiple version supported
9826  bool pciIdCheck; // pci id supported
9827  } HevcDeviceInfo;
9828 
9829  // hevc register
9830  typedef struct HevcDeviceRegister
9831  {
9832  ULWord address; // register address
9833  ULWord writeValue; // register write value
9834  ULWord readValue; // register read value
9835  ULWord mask; // register value mask
9836  ULWord shift; // register value shift
9837  bool write; // write flag
9838  bool read; // read flag
9839  bool forceBar4; // force bar4 access
9841 
9842  // hevc main state
9843  typedef enum HevcMainState
9844  {
9846  Hevc_MainState_Boot, // codec has booted
9847  Hevc_MainState_Init, // initialize codec
9848  Hevc_MainState_Encode, // configure encoding (load firmware?)
9849  Hevc_MainState_Error, // codec must be reset
9851  } HevcMainState;
9852 
9853  // encoder mode
9854  typedef enum HevcEncodeMode
9855  {
9857  Hevc_EncodeMode_Single, // encode a sigle stream
9858  Hevc_EncodeMode_Multiple, // encode multiple streams
9860  } HevcEncodeMode;
9861 
9862  // encoder firmware type
9863  typedef enum HevcFirmwareType
9864  {
9866  Hevc_FirmwareType_Standard, // encode firmware standard
9867  Hevc_FirmwareType_User, // encode firmware user
9869  } HevcFirmwareType;
9870 
9871  // hevc video interface state
9872  typedef enum HevcVifState
9873  {
9875  Hevc_VifState_Stop, // video interface stop
9876  Hevc_VifState_Start, // video interface start
9878  } HevcVifState;
9879 
9880  // hevc video input state
9881  typedef enum HevcVinState
9882  {
9884  Hevc_VinState_Stop, // video input stop
9885  Hevc_VinState_Start, // video input start
9887  } HevcVinState;
9888 
9889  // hevc encoder state
9890  typedef enum HevcEhState
9891  {
9893  Hevc_EhState_Stop, // encoder stop
9894  Hevc_EhState_Start, // encoder start
9895  Hevc_EhState_ReadyToStop, // encoder ready to stop
9897  } HevcEhState;
9898 
9899  // hevc gpio control
9900  typedef enum HevcGpioControl
9901  {
9903  Hevc_GpioControl_Function, // configure gpio port function
9904  Hevc_GpioControl_Direction, // configure gpio port direction
9905  Hevc_GpioControl_Set, // set gpio port value
9906  Hevc_GpioControl_Get, // get pgio port value
9908  } HevcGpioControl;
9909 
9910  // hevc gpio function
9911  typedef enum HevcGpioFunction
9912  {
9914  Hevc_GpioFunction_Gpio, // gpio function is gpio
9915  Hevc_GpioFunction_Peripheral, // gpio function is peripheral
9917  } HevcGpioFunction;
9918 
9919  // hevc gpio direction
9920  typedef enum HevcGpioDirection
9921  {
9923  Hevc_GpioDirection_Input, // gpio direction is input
9924  Hevc_GpioDirection_Output, // gpio direction is output
9927 
9928  // hevc gpio value
9929  typedef enum HevcGpioValue
9930  {
9932  Hevc_GpioValue_Low, // gpio direction is input
9933  Hevc_GpioValue_High, // gpio direction is output
9935  } HevcGpioValue;
9936 
9937  typedef enum HevcChangeSequence
9938  {
9944 
9945  // hevc change param target
9946  #define Hevc_ParamTarget_None 0x00000000
9947  #define Hevc_ParamTarget_Vbr 0x00000001 // change variable bitrate
9948  #define Hevc_ParamTarget_Cbr 0x00000002 // change constant bitrate
9949  #define Hevc_ParamTarget_Resolution 0x00000004 // change size, crop, pan, etc.
9950  #define Hevc_ParamTarget_Frame_Rate 0x00000008 // change frame rate
9951  #define Hevc_ParamTarget_All 0x0000000f
9952 
9953  // hevc commands
9954  typedef enum HevcCommand
9955  {
9957  Hevc_Command_MainState, // set main state
9958  Hevc_Command_VinState, // set video input state
9959  Hevc_Command_EhState, // set encoder state
9960  Hevc_Command_Gpio, // control gpio
9961  Hevc_Command_Reset, // reset codec
9962  Hevc_Command_ChangeParam, // change dynamic params during encode
9963  Hevc_Command_ChangePicture, // change picture type
9965  } HevcCommand;
9966 
9967  // hevc command information
9968  typedef struct HevcDeviceCommand
9969  {
9970  HevcCommand command; // command type
9971  // main state command info
9972  HevcMainState mainState; // set main state
9973  HevcEncodeMode encodeMode; // set encoder mode
9974  HevcFirmwareType firmwareType; // set encode firmware type
9975  // vin/eh state command info
9976  HevcVinState vinState; // set video input state
9977  HevcEhState ehState; // set encoder state
9978  ULWord streamBits; // command applies to each stream bit
9979  // gpio command info
9980  HevcGpioControl gpioControl; // gpio control type
9981  ULWord gpioNumber; // gpio port number (function, direction, set, get)
9982  HevcGpioFunction gpioFunction; // gpio port function (function)
9983  HevcGpioDirection gpioDirection; // gpio port direction (direction)
9984  HevcGpioValue gpioValue; // gpio port value (set, get)
9985  // change encode params
9986  ULWord paramTarget; // parameters to change
9987  ULWord paramStreamId; // stream id
9988  HevcChangeSequence changeSequence; // start new sequence (vbr)
9989  ULWord maxBitRate; // maximum bitrate (vbr)
9990  ULWord aveBitRate; // average bitrate (vbr and cbr)
9991  ULWord minBitRate; // minimum bitrate (vbr)
9992  ULWord seqEndPicNumber; // last picture number of sequence (resolution and frame rate)
9993  ULWord hSizeEh; // resolution parameters
10013  ULWord frameRateCode; // frame rate parameter
10014  // change picture type
10015  ULWord picType; // picture type
10016  ULWord picStreamId; // stream id
10017  ULWord gopEndPicNumber; // last picture number of gop
10018  // general command flags
10019  ULWord flags; // command flags
10021 
10022  // hevc stream types
10023  typedef enum HevcStream
10024  {
10026  Hevc_Stream_VideoRaw, // raw data stream
10027  Hevc_Stream_VideoEnc, // encoded data stream
10029  } HevcStream;
10030 
10031  // hevc picture data (raw streams)
10032  typedef struct HevcPictureData
10033  {
10034  ULWord serialNumber; // serial number (application data)
10035  ULWord ptsValueLow; // presentation time stamp (90kHz)
10036  ULWord ptsValueHigh; // pts high bit only (33 bit roll over)
10037  ULWord pictureNumber; // start with 1 and increment for each picture
10038  ULWord numAdditionalData; // number of additional data entries
10039  } HevcPictureData;
10040 
10041  // hevc picture information (raw streams)
10042  typedef struct HevcPictureInfo
10043  {
10044  HevcPictureData pictureData; // raw stream picture data
10045  //
10046  // additional data format
10047  // u32 additional_data_type
10048  // u32 additional_data_size (256 bytes max)
10049  // u8... additional_data_payload
10050  // ... more additional data
10051  //
10052  // additional data types
10053  // 1 = sei data
10054  // 2 = passthrough data (to encoded additional data of encoded frame)
10055  // 4 = cancel sei on every gop (set additional size to 0)
10056  //
10057  // sei data format
10058  // u8 user_sei_location
10059  // u8 user_sei_type
10060  // u8 user_sei_length
10061  // u8... user_sei_payload
10062  //
10063  // user sei location
10064  // 2 = every gop head picture
10065  // 3 = this picture only
10066  //
10067  // passthrough data format
10068  // u8... passthrough_data_payload
10069  //
10071  } HevcPictureInfo;
10072 
10073  // hevc encoded stream data (encoded streams)
10074  typedef struct HevcEncodedData
10075  {
10076  ULWord serialNumber; // serial number (from picture information)
10077  ULWord esOffsetLow; // encoded stream frame location (?)
10078  ULWord esOffsetHigh; // es frame location high 32 bits
10079  ULWord esSize; // encoded stream frame size (?)
10080  ULWord ptsValueLow; // presentation time stamp (picture information)
10081  ULWord ptsValueHigh; // pts high bit (33 bit roll over)
10082  ULWord dtsValueLow; // decoding time stamp (90 kHz)
10083  ULWord dtsValueHigh; // dts high bit (33 bit roll over)
10084  ULWord itcValueLow; // internal time clock (90 kHz)
10085  ULWord itcValueHigh; // itc high bit (33 bit roll over)
10086  ULWord itcExtension; // internal time extension (27 MHz)
10087  ULWord temporalId; // temporal ID
10088  ULWord esIdrType; // 0 = not IDR, 1 = IDR, 3 = IDR command
10089  ULWord pictureType; // 0 = I-frame, 1 = P-frame, 2 = B-frame
10090  ULWord nalOffset; // offset to the nal top of the idr/i picture
10091  ULWord cpbValue; // codec picture buffer occupancy value
10092  ULWord esHSize; // horizontal resolution
10093  ULWord esVSize; // vertical resolution
10094  ULWord esUnitsInTick; // frame duration (2x eh param value for half rate)
10095  ULWord esBitRate; // bit rate (Kbps)
10096  ULWord esEndFlag; // 0 = not end of sequence, 1 = end of sequence
10097  ULWord esLastFrame; // 0xffffffff = last frame
10106  ULWord numAdditionalData; // number of additional data entries
10107  } HevcEncodedData;
10108 
10109  // hevc encode stream information (encoded streams)
10110  typedef struct HevcEncodedInfo
10111  {
10112  HevcEncodedData encodedData; // encoded stream data
10114  } HevcEncodedInfo;
10115 
10116  // hevc stream transfer information
10117  typedef struct HevcDeviceTransfer
10118  {
10119  HevcStream streamType; // transfer stream type
10120  ULWord streamId; // transfer stream id
10121 
10122  UByte* pVideoBuffer; // video buffer
10123  ULWord videoBufferSize; // total video buffer size
10124  ULWord videoDataSize; // video data size in buffer
10125 
10126  ULWord segVideoPitch; // video segment pitch
10127  ULWord segCodecPitch; // codec segment pitch
10128  ULWord segSize; // segment size
10129  ULWord segCount; // number of segments
10130 
10131  UByte* pInfoBuffer; // information buffer (picture or encoded)
10132  ULWord infoBufferSize; // total information buffer size
10133  ULWord infoDataSize; // information size in buffer
10134 
10135  LWord64 encodeTime; // frame encode time (100ns host system clock)
10136  ULWord flags; // transfer flags (see above for last frame flag)
10138 
10139  // hevc gpio port status
10140  typedef struct hevc_gpio_state
10141  {
10142  HevcGpioFunction function; // gpio last set port function
10143  HevcGpioDirection direction; // gpio last set port direction
10144  HevcGpioValue setValue; // gpio last set value
10145  HevcGpioValue getValue; // gpio last get value
10146  } HevcGpioState;
10147 
10148  // hevc stream statistics (nsec, bytes)
10149  typedef struct hevc_stream_statistics
10150  {
10151  LWord64 transferCount; // number of transfers queued
10152  LWord64 minTransferTime; // minimum time between transfers
10153  LWord64 avrTransferTime; // average time between transfers
10154  LWord64 maxTransferTime; // maximum time between transfers
10155  LWord64 minTransferSize; // minimum transfer size
10156  LWord64 maxTransferSize; // maximum transfer size
10157  LWord64 avrTransferSize; // average transfer size
10158  LWord64 minCopyDuration; // time for io thread to copy frames
10159  LWord64 maxCopyDuration; // to/from bounce buffer
10161  LWord64 minEnqueueDuration; // time from io thread enqueue
10162  LWord64 maxEnqueueDuration; // to send to codec
10164  LWord64 minSendDuration; // time from send to codec
10165  LWord64 maxSendDuration; // to codec acknowledge
10167  LWord64 minDmaDuration; // time from codec acknowledge
10168  LWord64 maxDmaDuration; // to codec dma completion
10170  LWord64 minDequeueDuration; // time from io thread enqueue
10171  LWord64 maxDequeueDuration; // to io thread dequeue
10174 
10175  // hevc status information
10176  typedef struct HevcDeviceStatus
10177  {
10178  HevcMainState mainState; // codec main state
10179  HevcEncodeMode encodeMode; // codec encode mode
10180  HevcFirmwareType firmwareType; // codec firmware type
10181 
10182  HevcVifState vifState[HEVC_STREAM_MAX]; // video interface state
10183  HevcVinState vinState[HEVC_STREAM_MAX]; // video input state
10186 
10187  LWord64 commandCount; // number of commands processed
10188  LWord64 rawTransferCount; // number of raw transfers processed
10189  LWord64 encTransferCount; // number of encoded transfers processed
10190 
10191  ULWord commandQueueLevel; // number of commands in command queue
10192  ULWord rawTransferQueueLevel; // number of transfers in raw transfer queue
10193  ULWord encTransferQueueLevel; // number of transfers in encoded transfer queue
10194  } HevcDeviceStatus;
10195 
10196  // hevc debug information
10197  typedef struct HevcDeviceDebug
10198  {
10199  HevcDeviceStatus deviceStatus; // device status structure
10200 
10201  HevcStreamStatistics rawStats[HEVC_STREAM_MAX]; // raw stream statistics
10202  HevcStreamStatistics encStats[HEVC_STREAM_MAX]; // encoded stream statistics
10203  ULWord queueLevel[HEVC_STREAM_MAX]; // stream queue level
10204  ULWord clearRawStatsBits; // stream bits to clear raw stream statistics
10205  ULWord clearEncStatsBits; // stream bits to clear encodec stream statistics
10206 
10207  ULWord cmdContCount; // codec command continuity count
10208  ULWord cmdAckContCount; // codec command acknowledge count
10209  ULWord cmdMsgContCount; // codec command message count
10210  ULWord rawContCount; // raw dma continuity count
10211  ULWord rawAckContCount; // raw dma acknowledge count
10212  ULWord rawMsgContCount; // raw dma message count
10213  ULWord encContCount; // encoded dma continuity count
10214  ULWord encAckContCount; // encoded dma acnowledge count
10215  ULWord encMsgContCount; // encoded dma message count
10216  } HevcDeviceDebug;
10217 
10218  // hevc driver ioctl message types
10219  typedef enum HevcMessageId
10220  {
10222  Hevc_MessageId_Info, // get device information
10223  Hevc_MessageId_Register, // write/read codec register
10224  Hevc_MessageId_Command, // send a codec command
10225  Hevc_MessageId_Transfer, // transfer codec stream data
10226  Hevc_MessageId_Status, // get codec status
10227  Hevc_MessageId_Debug, // get debug information
10229  } HevcMessageId;
10230 
10231  // hevc common driver ioctl message header
10232  typedef struct hevcMessageHeader
10233  {
10241 
10242  // hevc stream transfer data
10243  typedef struct HevcTransferData
10244  {
10259  } HevcTransferData;
10260 
10261  // hevc driver device information message
10262  typedef struct HevcMessageInfo
10263  {
10266  } HevcMessageInfo;
10267 
10268  // hevc driver register message
10269  typedef struct HevcMessageRegister
10270  {
10274 
10275  // hevc driver command message
10276  typedef struct HevcMessageCommand
10277  {
10281 
10282  // hevc driver transfer message
10283  typedef struct HevcMessageTransfer
10284  {
10288 
10289  // hevc driver status message
10290  typedef struct HevcMessageStatus
10291  {
10295 
10296  // hevc driver debug message
10297  typedef struct HevcMessageDebug
10298  {
10301  } HevcMessageDebug;
10302 #endif
10303 
10304 typedef struct HDRRegValues
10305 {
10306  uint16_t greenPrimaryX;
10307  uint16_t greenPrimaryY;
10308  uint16_t bluePrimaryX;
10309  uint16_t bluePrimaryY;
10310  uint16_t redPrimaryX;
10311  uint16_t redPrimaryY;
10312  uint16_t whitePointX;
10313  uint16_t whitePointY;
10320 
10321  #if !defined(NTV2_BUILDING_DRIVER)
10325  inline bool validPrimariesAndWhitePoint (void) const { const uint16_t kMax(0xC350);
10326  return greenPrimaryX <= kMax || greenPrimaryY <= kMax ||
10327  bluePrimaryX <= kMax || bluePrimaryY <= kMax ||
10328  redPrimaryX <= kMax || redPrimaryY <= kMax ||
10329  whitePointX <= kMax || whitePointY <= kMax; }
10330  inline HDRRegValues & setBT2020 (void) { greenPrimaryX = 0x2134; greenPrimaryY = 0x9BAA; bluePrimaryX = 0x1996; bluePrimaryY = 0x08FC;
10331  redPrimaryX = 0x8A48; redPrimaryY = 0x3908; whitePointX = 0x3D13; whitePointY = 0x4042;
10332  maxMasteringLuminance = 0x2710; minMasteringLuminance = 0x0032;
10334  electroOpticalTransferFunction = 0x02; staticMetadataDescriptorID = 0x00; return *this; }
10335  inline HDRRegValues & setDCIP3 (void) { greenPrimaryX = 0x33C2; greenPrimaryY = 0x86C4; bluePrimaryX = 0x1D4C; bluePrimaryY = 0x0BB8;
10336  redPrimaryX = 0x84D0; redPrimaryY = 0x3E80; whitePointX = 0x3D13; whitePointY = 0x4042;
10337  maxMasteringLuminance = 0x02E8; minMasteringLuminance = 0x0032;
10339  electroOpticalTransferFunction = 0x02; staticMetadataDescriptorID = 0x00; return *this; }
10340  #endif // !defined(NTV2_BUILDING_DRIVER)
10341 } HDRRegValues;
10342 
10343 typedef struct HDRFloatValues
10344 {
10359 
10360  #if !defined(NTV2_BUILDING_DRIVER)
10364 
10365  inline bool validPrimariesAndWhitePoint (void) const { return greenPrimaryX >= 0.0f || greenPrimaryX <= float(1.0f) ||
10366  greenPrimaryY >= 0.0f || greenPrimaryY <= float(1.0f) ||
10367  bluePrimaryX >= 0.0f || bluePrimaryX <= float(1.0f) ||
10368  bluePrimaryY >= 0.0f || bluePrimaryY <= float(1.0f) ||
10369  redPrimaryX >= 0.0f || redPrimaryX <= float(1.0f) ||
10370  redPrimaryY >= 0.0f || redPrimaryY <= float(1.0f) ||
10371  whitePointX >= 0.0f || whitePointX <= float(1.0f) ||
10372  whitePointY >= 0.0f || whitePointY <= float(1.0f) ||
10373  minMasteringLuminance >= 0 || minMasteringLuminance <= float(6.5535f); }
10374 
10375  inline bool setFromRegValues (const HDRRegValues & inRegValues) { if (!inRegValues.validPrimariesAndWhitePoint())
10376  return false;
10377  const float kMult(0.00002f), kMultLum(0.0001f);
10378  greenPrimaryX = float(inRegValues.greenPrimaryX * kMult);
10379  greenPrimaryY = float(inRegValues.greenPrimaryY * kMult);
10380  bluePrimaryX = float(inRegValues.bluePrimaryX * kMult);
10381  bluePrimaryY = float(inRegValues.bluePrimaryY * kMult);
10382  redPrimaryX = float(inRegValues.redPrimaryX * kMult);
10383  redPrimaryY = float(inRegValues.redPrimaryY * kMult);
10384  whitePointX = float(inRegValues.whitePointX * kMult);
10385  whitePointY = float(inRegValues.whitePointY * kMult);
10386  minMasteringLuminance = float(inRegValues.minMasteringLuminance * kMultLum);
10392  return true; }
10393 
10394  inline bool toRegValues (HDRRegValues & outVals) const { if (!validPrimariesAndWhitePoint())
10395  return false;
10396  outVals.greenPrimaryX = uint16_t(greenPrimaryX / float(0.00002f));
10397  outVals.greenPrimaryY = uint16_t(greenPrimaryY / float(0.00002f));
10398  outVals.bluePrimaryX = uint16_t(bluePrimaryX / float(0.00002f));
10399  outVals.bluePrimaryY = uint16_t(bluePrimaryY / float(0.00002f));
10400  outVals.redPrimaryX = uint16_t(redPrimaryX / float(0.00002f));
10401  outVals.redPrimaryY = uint16_t(redPrimaryY / float(0.00002f));
10402  outVals.whitePointX = uint16_t(whitePointX / float(0.00002f));
10403  outVals.whitePointY = uint16_t(whitePointY / float(0.00002f));
10404  outVals.minMasteringLuminance = uint16_t(minMasteringLuminance / float(0.0001f));
10410  return true; }
10411  #endif // !defined(NTV2_BUILDING_DRIVER)
10412 } HDRFloatValues;
10413 
10414 typedef struct HDRDriverValues{
10415  uint16_t greenPrimaryX;
10416  uint16_t greenPrimaryY;
10417  uint16_t bluePrimaryX;
10418  uint16_t bluePrimaryY;
10419  uint16_t redPrimaryX;
10420  uint16_t redPrimaryY;
10421  uint16_t whitePointX;
10422  uint16_t whitePointY;
10429  uint8_t luminance;
10431 
10432 #define NTV2_IS_VALID_HDR_PRIMARY(__val__) ((__val__) <= 0x0000C350)
10433 #define NTV2_IS_VALID_HDR_MASTERING_LUMINENCE(__val__) (true)
10434 #define NTV2_IS_VALID_HDR_LIGHT_LEVEL(__val__) (true)
10435 
10436 #if 0 && defined(_DEBUG)
10437  // One-stop-shop for pretend/fake device swap (AJA internal use only)
10438  #define NTV2_PRETEND_DEVICE
10439  #define NTV2_PRETEND_DEVICE_FROM DEVICE_ID_IOX3
10440  #define NTV2_PRETEND_DEVICE_TO DEVICE_ID_KONAHDMI
10441 #endif // _DEBUG
10442 #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: NTV2 Device Sharing.
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