AJA NTV2 SDK  18.0.0.2122
NTV2 SDK 18.0.0.2122
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::set <NTV2AudioChannelPair> NTV2AudioChannelPairs;
59  typedef NTV2AudioChannelPairs::const_iterator NTV2AudioChannelPairsConstIter;
60  AJAExport std::ostream & operator << (std::ostream & inOutStr, const NTV2AudioChannelPairs & inSet);
61 
62  typedef std::set <NTV2AudioChannelQuad> NTV2AudioChannelQuads;
63  typedef NTV2AudioChannelQuads::const_iterator NTV2AudioChannelQuadsConstIter;
64  AJAExport std::ostream & operator << (std::ostream & inOutStr, const NTV2AudioChannelQuads & inSet);
65 
66  typedef std::set <NTV2AudioChannelOctet> NTV2AudioChannelOctets;
67  typedef NTV2AudioChannelOctets::const_iterator NTV2AudioChannelOctetsConstIter;
68  AJAExport std::ostream & operator << (std::ostream & inOutStr, const NTV2AudioChannelOctets & inSet);
69 
70  typedef std::vector <double> NTV2DoubleArray;
71  typedef NTV2DoubleArray::iterator NTV2DoubleArrayIter;
72  typedef NTV2DoubleArray::const_iterator NTV2DoubleArrayConstIter;
73  AJAExport std::ostream & operator << (std::ostream & inOutStr, const NTV2DoubleArray & inVector);
74 
75  typedef UByte NTV2DID;
76  typedef std::set <UByte> NTV2DIDSet;
77  typedef NTV2DIDSet::iterator NTV2DIDSetIter;
78  typedef NTV2DIDSet::const_iterator NTV2DIDSetConstIter;
79  AJAExport std::ostream & operator << (std::ostream & inOutStr, const NTV2DIDSet & inDIDs);
80 
81  typedef std::bitset<16> NTV2AudioChannelsMuted16;
85 #endif // NTV2_BUILDING_DRIVER
86 
87 
88 #if !defined (NTV2_BUILDING_DRIVER)
90  #define NTV2_RPC_ENCODE_DECL bool RPCEncode (NTV2_RPC_BLOB_TYPE & outBlob);
91  #define NTV2_RPC_DECODE_DECL bool RPCDecode (const NTV2_RPC_BLOB_TYPE & inBlob, size_t & inOutIndex);
92  #define NTV2_RPC_DECODECLIENT_DECL bool RPCDecodeClient (const NTV2_RPC_BLOB_TYPE & inBlob, size_t & inOutIndex);
93  #define NTV2_RPC_ENCODECLIENT_DECL bool RPCEncodeClient (NTV2_RPC_BLOB_TYPE & inBlob);
94  #define NTV2_RPC_DECODESERVER_DECL bool RPCDecodeServer (const NTV2_RPC_BLOB_TYPE & inBlob, size_t & inOutIndex);
95  #define NTV2_RPC_ENCODESERVER_DECL bool RPCEncodeServer (NTV2_RPC_BLOB_TYPE & inBlob);
96 
97  #define NTV2_RPC_CODEC_DECLS NTV2_RPC_ENCODE_DECL \
98  NTV2_RPC_DECODE_DECL \
99  NTV2_RPC_DECODECLIENT_DECL \
100  NTV2_RPC_ENCODECLIENT_DECL \
101  NTV2_RPC_DECODESERVER_DECL \
102  NTV2_RPC_ENCODESERVER_DECL
103 
104  // NTV2Buffer has it's own RPC encode / decode methods
105  #define NTV2_RPC_BUFFER_ENCODE_DECL bool RPCEncode (NTV2_RPC_BLOB_TYPE & outBlob, bool fillBuffer=true);
106  #define NTV2_RPC_BUFFER_DECODE_DECL bool RPCDecode (const NTV2_RPC_BLOB_TYPE & inBlob, size_t & inOutIndex, bool fillBuffer=true);
107  #define NTV2_RPC_BUFFER_DECODE2_DECL bool RPCDecodeNoAllocate (const NTV2_RPC_BLOB_TYPE & inBlob, size_t & inOutIndex);
108  #define NTV2_RPC_BUFFER_CODEC_DECLS NTV2_RPC_BUFFER_ENCODE_DECL \
109  NTV2_RPC_BUFFER_DECODE_DECL \
110  NTV2_RPC_BUFFER_DECODE2_DECL
111 
112 #else
113  #define NTV2_RPC_CODEC_DECLS
114  #define NTV2_RPC_BUFFER_CODEC_DECLS
115 #endif // NTV2_BUILDING_DRIVER
116 
117 
118 typedef enum
119 {
139  kRegOutputTimingFinePhase, // 19 (was kRegReserved3)
142  kRegStatus, // 21
171  kRegBoardID, // 50
188  kRegCanDoStatus, // 67 SDK 15.6 and later
189  kRegCh1ColorCorrectionControl, // 68 CamelCase fix in SDK 16.0
190  kRegCh2ColorCorrectionControl, // 69 CamelCase fix SDK 16.0
202 
213 
224 
233 
235  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
240 
245 
252 
263 
276 
282 
288 
289  kRegField1Line21CaptionDecode, // 152 // OBSOLETE
290  kRegField2Line21CaptionDecode, // 153 // OBSOLETE
291  kRegField1Line21CaptionEncode, // 154 // OBSOLETE
292  kRegField2Line21CaptionEncode, // 155 // OBSOLETE
293  kRegVANCGrabberSetup, // 156 // OBSOLETE
294  kRegVANCGrabberStatus1, // 157 // OBSOLETE
295  kRegVANCGrabberStatus2, // 158 // OBSOLETE
296  kRegVANCGrabberDataBuffer, // 159 // OBSOLETE
297  kRegVANCInserterSetup1, // 160 // OBSOLETE
298  kRegVANCInserterSetup2, // 161 // OBSOLETE
299  kRegVANCInserterDataBuffer, // 162 // OBSOLETE
300 
311  kRegAudioChannelMappingCh1, // 173 // OBSOLETE
314  kRegAudioChannelMappingCh4, // 176 // OBSOLETE
315  kRegAudioChannelMappingCh5, // 177 // OBSOLETE
316  kRegAudioChannelMappingCh6, // 178 // OBSOLETE
317  kRegAudioChannelMappingCh7, // 179 // OBSOLETE
318  kRegAudioChannelMappingCh8, // 180 // OBSOLETE
319 
406  kRegStatus2, // 265
432 
438 
444 
448 
451 
456 
463 
466 
469 
479 
481 
482  //HDMI HDR Registers
490 
494 
498 
500 
503 
505 
511 
513 
515 
516  kRegDC1, // 354
517  kRegDC2, // 355
519 
522 
523  //HDMI V2 In Registers
541 
543 
544  //Scott: New Dax/Multi-channel Registers
552 
557 
562 
567 
572 
583 
586 
596 
606 
616 
618 
623 
628 
633 
638 
640 
642 
645 
651 
657 
663 
667 
675 
679 
683 
685 
690 
693 
708 
711 
713 
714 #define kRegCh1ColorCorrectioncontrol kRegCh1ColorCorrectionControl // CamelCase fixed in SDK 16.0
715 #define kRegCh2ColorCorrectioncontrol kRegCh2ColorCorrectionControl // CamelCase fixed in SDK 16.0
716 
717 // Discontinuous block of registers used for monitoring the incoming SDI signals
719 {
720  kRegRXSDI1Status = 2048, // 2048
728 
737 
746 
755 
764 
773 
782 
791 
794 
795  kRegNumRXSDIRegisters = 2113 - 2048 + 1
797 
798 typedef enum
799 {
800  kReg1DLUTLoadControl1 = 2200, //2200
809 
810 typedef enum
811 {
843 
844 // Discontinuous block of registers used for detecting non-PCM embedded audio.
846 {
858 
859 // New in SDK 15.6:
860 // Some boards have new firmware that implements a "valid route" bitmap ROM accessed by a contiguous block of registers:
862 {
863  kRegFirstValidXptROMRegister = 3072, // Starts at reg 3072
864  kRegNumValidXptROMRegisters = 1024, // It's 4096 bytes long
868 
869 // Discontinuous block of registers used to control the enhanced color space converters
870 typedef enum
871 {
872  kRegEnhancedCSC1Mode = 5120, // 5120
889 
890  kRegNumEnhancedCSCRegisters = 5136 - 5120 + 1,
891 
892  kRegEnhancedCSC2Mode = 5184, // 5184
909 
910  kRegEnhancedCSC3Mode = 5248, // 5248
927 
928  kRegEnhancedCSC4Mode = 5312, // 5312
945 
946  kRegEnhancedCSC5Mode = 5376, // 5376
963 
964  kRegEnhancedCSC6Mode = 5440, // 5440 or fight
981 
982  kRegEnhancedCSC7Mode = 5504, // 5504
999 
1000  kRegEnhancedCSC8Mode = 5568, // 5568
1017 
1019 
1020 typedef enum _NTV2OERegisters
1021 {
1022  kRegOEData1 = 0x1700,
1023  kRegOEData256 = 0x173F
1024 } NTV2OERegisters;
1025 
1026 typedef enum
1027 {
1030 
1032 {
1047 
1049 {
1055  kRegMRSupport = 0x1747
1057 
1058 typedef enum
1059 {
1062 
1063 typedef enum
1064 {
1065  kRegIDSwitch = 0x40020
1067 
1068 typedef enum
1069 {
1073 
1074 typedef enum
1075 {
1076  kRegBOBStatus = 0x3680,
1082 
1083 typedef enum
1084 {
1094 
1095 typedef enum
1096 {
1097  kRegCMWControl = 0x36c0,
1104 
1105 typedef enum
1106 {
1107  kRegLPRJ45IP = 14080, // External IP Address
1108  kRegLPTunnelIP = 14081, // ajatun IP Address
1109  kRegLPSFP1IP = 14082, // SFP 1 IP Address
1110  kRegLPSFP2IP = 14083, // SFP 1 IP Address
1111  kRegLPIPVidStatus = 14084, // Video Enabled/Active Statuses : 0-7: Input enabled
1112  kRegLPIPAudStatus = 14085, // Audio Enabled/Active Statuses : 16-23: Output enabled
1113  kRegLPIPAncStatus = 14086, // Anc Enabled/Active Statuses : 24-31: Output Active
1114  kRegLPIPOut1Config = 14087, // Stuff beyond VPID definition Out 1
1115  kRegLPIPOut2Config = 14088, // " Out 2
1116  kRegLPIPOut3Config = 14089, // " Out 3
1117  kRegLPIPOut4Config = 14090, // " Out 4
1118  kRegLPPTPSFPStatus = 14091, // Which SFP is PTP locked to
1119  //14092 - 14093 Available
1120  kRegLPHeartBeat = 14094, // Local Proc isAlive counter
1121  kRegLPFrameTask = 14095 // Used to report OEM/Retail configuration
1123 
1124 typedef enum
1125 {
1138 
1141 
1142 typedef enum
1143 {
1156 
1159 
1160 
1161 
1162 #define NTV2_HDMIAuxMaxFrames 8
1163 #define NTV2_HDMIAuxDataSize 32
1164 
1165 // Virtual registers
1166 #include "ntv2virtualregisters.h"
1167 
1168 typedef struct
1169 {
1174  ULWord CbOffset; // Not user controllable
1175  ULWord CrOffset; // Not user controllable
1179 
1180 typedef struct
1181 {
1185 
1186 // These have a nice mapping to the virtual registers
1187 typedef struct
1188 {
1192  UByte CbOffset; // Not user controllable
1193  UByte CrOffset; // Not user controllable
1196 } ADV7189BProcAmpRegisters; // Works for SD portion of ADV7402A also
1197 
1198 // These do not have a nice mapping to the virtual registers
1199 // All are 10-bit registers spread out over two I2C addresses.
1200 typedef struct
1201 {
1202  UByte hex73; // [7:6] set, [5:0] upper bits contrast
1203  UByte hex74; // [7:4] lower bits contrast, [3:0] upper bits saturation Cb
1204  UByte hex75; // [7:2] lower bits saturation Cb, [1:0] upper bits saturation Cr
1205  UByte hex76; // [7:0] lower bits saturation Cr
1206  UByte hex77; // [7:6] clear, [5:0] upper bits brightness.
1207  UByte hex78; // [7:4] lower bits brightness, [3:0] high bits Cb offset
1208  UByte hex79; // [7:2] lower bits Cb offset, [1:0] high bits Cr offset
1209  UByte hex7A; // [7:0] lower bits Cr offset
1211 
1212 // Kind of a hack
1213 // This will have to be a union or something if/when we add another proc amp processor
1214 typedef struct
1215 {
1216  ADV7189BProcAmpRegisters SD; // Works for SD portion of ADV7402A also
1219 
1220 // SD procamp regs
1221 typedef enum
1222 {
1230 } ADV7189BRegisterNum; // Works for SD portion of ADV7402A also
1231 
1232 typedef enum
1233 {
1234  // Global Control
1235  kRegMaskFrameRate = BIT(0) + BIT(1) + BIT(2),
1237  kRegMaskGeometry = BIT(3) + BIT(4) + BIT(5) + BIT(6),
1238  kRegMaskStandard = BIT(7) + BIT(8) + BIT(9),
1239  kRegMaskRefSource = BIT(10) + BIT(11) + BIT(12),
1240  kRegMaskRefInputVoltage = BIT(12), // DEPRECATED! - Now part of kRegMaskRefSource - do not use on new boards
1242  kRegMaskLED = BIT(16) + BIT(17) + BIT(18) + BIT(19),
1251 
1252  // Global Control 2
1282 
1283  // kRegGlobalControl3 (reg 108)
1292  kRegMaskFramePulseRefSelect = BIT(8) + BIT(9) + BIT(10) + BIT(11),
1293 
1294  // Audio Control 2
1303 
1304  // Channel Control - kRegCh1Control, kRegCh2Control, kRegCh3Control, kRegCh4Control
1306  kRegMaskFrameFormat = BIT(1) + BIT(2) + BIT(3) + BIT(4),
1323  kRegMaskQuality2 = BIT(25) + BIT(26),
1324  kRegCh1BlackOutputMask = BIT(27), // KiPro black output bit
1328 
1329  // Video Crosspoint Control
1332  kRegMaskVidXptFGKey = BIT(8) + BIT(9) + BIT(10),
1333  kRegMaskVidXptBGKey = BIT(12) + BIT(13) + BIT(14),
1334  kRegMaskVidXptSecVideo = BIT(16) + BIT(17) + BIT(18),
1335 
1336  // Video Processing Control
1341  kRegMaskVidProcMux5 = BIT(8) + BIT(9) + BIT(10),
1352  kRegMaskVidProcSplitStd = BIT(28) + BIT(29) + BIT(30),
1354 
1355  // kRegStatus
1356  kRegMaskHardwareVersion = BIT(0) + BIT(1) + BIT(2) + BIT(3),
1357  kRegMaskFPGAVersion = BIT(4)+BIT(5)+BIT(6)+BIT(7)+BIT(8)+BIT(9)+BIT(10)+BIT(11),
1359 
1360  // Video Interrupt Control
1361  kRegMaskIntEnableMask = BIT(5) + BIT(4) + BIT(3) + BIT(2) + BIT(1) + BIT(0),
1362 
1363  // Audio Control
1365  kRegMaskNumBits = BIT(1), // shouldn't this be BIT(2)?
1372  kRegMaskInputStartAtVBI = BIT(10), // New in 15.6
1374  kRegMaskEmbeddedOutputMuteCh1 = BIT(12), // added for FS1
1375  kRegMaskEmbeddedOutputSupressCh1 = BIT(13), // added for FS1 but available on other boards
1376  kRegMaskOutputStartAtVBI = BIT(14), // New in 15.6
1377  kRegMaskEmbeddedOutputSupressCh2 = BIT(15), // added for FS1 but available on other boards
1379  kRegMaskEmbeddedOutputMuteCh2 = BIT(17), // added for FS1
1381  kRegMaskEncodedAudioMode = BIT(19), // addded for FS1 but available on other boards
1393  kK2RegMaskAverageAudioLevel = 0xFFFFffff, // read the entire register
1394 
1397  // FS1 output control "Freeze (last good frame) On Input Loss"
1399 
1400  // Audio Source Select
1401  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),
1410 
1411  // Input Status
1429 
1430  // RP-188 Source
1431  kRegMaskRP188SourceSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1432  kRegMaskRP188DBB = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7),
1433 
1434  // DMA Control
1437  kRegMaskFirmWareRev = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1439 
1440  // Color Correction Control - kRegCh1ColorCorrectionControl (68), kRegCh2ColorCorrectionControl (69)
1441  kRegMaskSaturationValue = BIT(0)+BIT(1)+BIT(2)+BIT(3)+BIT(4)+BIT(5)+BIT(6)+BIT(7)+BIT(8)+BIT(9),
1450 
1451  // kRegCanDoStatus
1455 
1456  // kRegLUTV2Control
1483 
1484 
1485  // RS422 Control
1497  kRegMaskRS422ParitySense = BIT(12), // 0 = Odd, 1 = Even
1498  kRegMaskRS422ParityDisable = BIT(13), // 0 = Use bit 12 setting, 1 = No parity
1500 
1501 
1502  // FS1 ProcAmp Control
1503  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),
1504  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),
1505  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),
1506  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),
1507  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),
1508  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),
1509 
1510 
1511  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),
1512  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),
1513 
1514  // FS1 Audio Delay
1515  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),
1516 
1517  // Borg Audio Delay
1518  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),
1519  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),
1520 
1521 
1522  // kRegOutputTimingControl
1523  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),
1524  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),
1525 
1526 
1527  // FS1 I2C
1536 
1537  kFS1RegMaskI2CAddress = BIT(0)+BIT(1)+BIT(2)+BIT(3)+BIT(4) + BIT(5)+BIT(6)+BIT(7),
1538  kFS1RegMaskI2CSubAddress = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1539  kFS1RegMaskI2CWriteData = BIT(0)+BIT(1)+BIT(2)+BIT(3)+BIT(4) + BIT(5)+BIT(6)+BIT(7),
1540  kFS1RegMaskI2CReadData = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1541 
1542  // kRegFS1ReferenceSelect (in Reg 95)
1550  kFS1RegMaskProcAmpInputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1551  kFS1RegMaskSecondAnalogOutInputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1552 
1553  // FS1 AFD Mode
1563 
1564  // FS1 AFD Inserter
1568  kFS1RegMaskAFDVANCInserter_Line = BIT(26)+BIT(25)+BIT(24)+BIT(23)+BIT(22)+BIT(21)+BIT(20)+BIT(19)+BIT(18)+BIT(17)+BIT(16),
1569 
1570  // FS1 Audio Channel Mapping
1571  kFS1RegMaskAudioChannelMapping_Gain = BIT(0)+BIT(1)+BIT(2)+BIT(3)+BIT(4) + BIT(5)+BIT(6)+BIT(7)+BIT(8)+BIT(9),
1575 
1576  // FS1 Output Timing Fine Phase Adjust
1577  kRegMaskOutputTimingFinePhase = BIT(0)+BIT(1)+BIT(2)+BIT(3)+BIT(4) + BIT(5)+BIT(6)+BIT(7)+BIT(8),
1578 
1579  //kRegAnalogInputStatus
1584 
1585  //kRegAnalogInputControl (Note - on some boards, ADC mode is set in Reg 128, kK2RegAnalogOutControl!)
1587 
1588  //kRegHDMIOut3DControl
1591 
1592  //kRegHDMIOutControl
1613 
1614  //kRegHDMIInputStatus
1615  kRegMaskInputStatusLock = BIT(0), // rename to kRegMaskAnalogInputStatusLock
1630  kRegMaskInputStatusFPS = BIT(28)+BIT(29)+BIT(30)+BIT(31),
1631 
1632  //kRegHDMIInputControl
1650 
1651  //kRegHDMIInputControl / kRegHDMIOutControl
1653  kRegMaskHDMIPolarity = BIT(16)+BIT(17)+BIT(18)+BIT(19),
1654 
1655  //kK2RegAnalogOutControl - (controls Analog Inputs also, for some boards)
1659  kLSRegMaskVideoADCMode = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20),
1661  kLHIRegMaskVideoDACSetup = BIT(21), // bitwise interpretation of kLHIRegMaskVideoDACMode
1662  kLHIRegMaskVideoDACJapan = BIT(22), // bitwise interpretation of kLHIRegMaskVideoDACMode
1663  kLHIRegMaskVideoDACRGB = BIT(23), // bitwise interpretation of kLHIRegMaskVideoDACMode
1664  kLHIRegMaskVideoDACComponent = BIT(24), // bitwise interpretation of kLHIRegMaskVideoDACMode
1665  kK2RegMaskOutHTiming = BIT(31)+BIT(30)+BIT(29)+BIT(28)+BIT(27)+BIT(26)+BIT(25)+BIT(24),
1666 
1667  //kK2RegSDIOut1Control + kK2RegSDIOut2Control + kK2RegSDIOut3Control + kK2RegSDIOut4Control + kK2RegAnalogOutControl
1689 
1690 
1691  //kK2RegConversionControl and kK2Reg2ndConversionControl,
1703 
1704  //kK2RegFrameSync1Control and kK2RegFrameSync2Control
1709 
1710  //kK2RegXptSelectGroup1
1711  kK2RegMaskCompressionModInputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1712  kK2RegMaskConversionModInputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1714  kK2RegMaskXptLUTInputSelect = BIT(0)+BIT(1)+BIT(2)+BIT(3)+BIT(4)+BIT(5)+BIT(6)+BIT(7),
1715 
1716  //kK2RegXptSelectGroup2
1717  kK2RegMaskDuallinkOutInputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1718  kK2RegMaskFrameSync2InputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1719  kK2RegMaskFrameSync1InputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1721 
1722  //kK2RegXptSelectGroup3
1723  kK2RegMaskCSC1KeyInputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1724  kK2RegMaskSDIOut2InputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1725  kK2RegMaskSDIOut1InputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1727 
1728  //kK2RegXptSelectGroup4
1729  kK2RegMaskMixerBGKeyInputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1730  kK2RegMaskMixerBGVidInputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1731  kK2RegMaskMixerFGKeyInputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1733 
1734  //kK2RegXptSelectGroup5
1735  kK2RegMaskCSC2KeyInputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1736  kK2RegMaskCSC2VidInputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1737  kK2RegMaskXptLUT2InputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1739 
1740  //kK2RegXptSelectGroup6
1742  kK2RegMaskIICTInputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1743  kK2RegMaskHDMIOutInputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1744  kK2RegMaskSecondConverterInputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1745 
1746  //kK2RegXptSelectGroup7
1748  kK2RegMaskIICT2InputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1749  kK2RegMaskDuallinkOut2InputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1750 
1751  //kK2RegXptSelectGroup8
1752  kK2RegMaskSDIOut3InputSelect = BIT(0)+BIT(1)+BIT(2)+BIT(3)+BIT(4)+BIT(5)+BIT(6)+BIT(7),
1753  kK2RegMaskSDIOut4InputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1754  kK2RegMaskSDIOut5InputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1755 
1756  //kRegCh1ControlExtended
1757  //kRegCh2ControlExtended
1759 
1760  //kK2RegXptSelectGroup9
1762  kK2RegMaskMixer2FGKeyInputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1763  kK2RegMaskMixer2BGVidInputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1764  kK2RegMaskMixer2BGKeyInputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1765 
1766  //kK2RegXptSelectGroup10
1768  kK2RegMaskSDIOut2DS2InputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1769 
1770  //kK2RegXptSelectGroup11
1772  kK2RegMaskDuallinkIn1DSInputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1773  kK2RegMaskDuallinkIn2InputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1774  kK2RegMaskDuallinkIn2DSInputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1775 
1776  //kK2RegXptSelectGroup12
1777  kK2RegMaskXptLUT3InputSelect = BIT(0)+BIT(1)+BIT(2)+BIT(3)+BIT(4)+BIT(5)+BIT(6)+BIT(7),
1778  kK2RegMaskXptLUT4InputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1779  kK2RegMaskXptLUT5InputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1780  kK2RegMaskXpt3DLUT1InputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1781 
1782  //kK2RegXptSelectGroup13
1784  kK2RegMaskFrameBuffer4InputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1785 
1786  //kK2RegXptSelectGroup14
1787  kK2RegMaskSDIOut3DS2InputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1788  kK2RegMaskSDIOut5DS2InputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1789  kK2RegMaskSDIOut4DS2InputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1790 
1791  //kRegXptSelectGroup15
1793  kK2RegMaskDuallinkIn3DSInputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1794  kK2RegMaskDuallinkIn4InputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1795  kK2RegMaskDuallinkIn4DSInputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1796 
1797  //kRegXptSelectGroup16
1799  kK2RegMaskDuallinkOut4InputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1800  kK2RegMaskDuallinkOut5InputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1801 
1802  //kK2RegXptSelectGroup17
1803  kK2RegMaskCSC3VidInputSelect = BIT(0)+BIT(1)+BIT(2)+BIT(3)+BIT(4)+BIT(5)+BIT(6)+BIT(7),
1804  kK2RegMaskCSC3KeyInputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1805  kK2RegMaskCSC4VidInputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1806  kK2RegMaskCSC4KeyInputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1807 
1808  //kRegXptSelectGroup18
1809  kK2RegMaskCSC5VidInputSelect = BIT(0)+BIT(1)+BIT(2)+BIT(3)+BIT(4)+BIT(5)+BIT(6)+BIT(7),
1810  kK2RegMaskCSC5KeyInputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1811 
1812  //kRegXptSelectGroup19
1813  kK2RegMask4KDCQ1InputSelect = BIT(0)+BIT(1)+BIT(2)+BIT(3)+BIT(4)+BIT(5)+BIT(6)+BIT(7),
1814  kK2RegMask4KDCQ2InputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1815  kK2RegMask4KDCQ3InputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1816  kK2RegMask4KDCQ4InputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1817 
1818  //kRegXptSelectGroup20
1820  kK2RegMaskHDMIOutV2Q2InputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1821  kK2RegMaskHDMIOutV2Q3InputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1822  kK2RegMaskHDMIOutV2Q4InputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1823 
1824  //kRegXptSelectGroup21
1826  kK2RegMaskFrameBuffer6InputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1827  kK2RegMaskFrameBuffer7InputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1828  kK2RegMaskFrameBuffer8InputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1829 
1830  //kRegXptSelectGroup22
1831  kK2RegMaskSDIOut6InputSelect = BIT(0)+BIT(1)+BIT(2)+BIT(3)+BIT(4)+BIT(5)+BIT(6)+BIT(7),
1832  kK2RegMaskSDIOut6DS2InputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1833  kK2RegMaskSDIOut7InputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1834  kK2RegMaskSDIOut7DS2InputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1835 
1836  //kRegXptSelectGroup23
1837  kK2RegMaskCSC7VidInputSelect = BIT(0)+BIT(1)+BIT(2)+BIT(3)+BIT(4)+BIT(5)+BIT(6)+BIT(7),
1838  kK2RegMaskCSC7KeyInputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1839  kK2RegMaskCSC8VidInputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1840  kK2RegMaskCSC8KeyInputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1841 
1842  //kRegXptSelectGroup24
1843  kK2RegMaskXptLUT6InputSelect = BIT(0)+BIT(1)+BIT(2)+BIT(3)+BIT(4)+BIT(5)+BIT(6)+BIT(7),
1844  kK2RegMaskXptLUT7InputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1845  kK2RegMaskXptLUT8InputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1846 
1847  //kRegXptSelectGroup25
1849  kK2RegMaskDuallinkIn5DSInputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1850  kK2RegMaskDuallinkIn6InputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1851  kK2RegMaskDuallinkIn6DSInputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1852 
1853  //kRegXptSelectGroup26
1855  kK2RegMaskDuallinkIn7DSInputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1856  kK2RegMaskDuallinkIn8InputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1857  kK2RegMaskDuallinkIn8DSInputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1858 
1859  //kRegXptSelectGroup27
1861  kK2RegMaskDuallinkOut7InputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1862  kK2RegMaskDuallinkOut8InputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1863 
1864  //kRegXptSelectGroup28
1866  kK2RegMaskMixer3FGKeyInputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1867  kK2RegMaskMixer3BGVidInputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1868  kK2RegMaskMixer3BGKeyInputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1869 
1870  //kRegXptSelectGroup29
1872  kK2RegMaskMixer4FGKeyInputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1873  kK2RegMaskMixer4BGVidInputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1874  kK2RegMaskMixer4BGKeyInputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1875 
1876  //kRegXptSelectGroup30
1877  kK2RegMaskSDIOut8InputSelect = BIT(0)+BIT(1)+BIT(2)+BIT(3)+BIT(4)+BIT(5)+BIT(6)+BIT(7),
1878  kK2RegMaskSDIOut8DS2InputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1879  kK2RegMaskCSC6VidInputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1880  kK2RegMaskCSC6KeyInputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1881 
1882  //kRegXptSelectGroup32
1884  kK2RegMask425Mux1BInputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1885  kK2RegMask425Mux2AInputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1886  kK2RegMask425Mux2BInputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1887 
1888  //kRegXptSelectGroup33
1890  kK2RegMask425Mux3BInputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1891  kK2RegMask425Mux4AInputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1892  kK2RegMask425Mux4BInputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1893 
1894  //kRegXptSelectGroup34
1896  kK2RegMaskFrameBuffer2BInputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1897  kK2RegMaskFrameBuffer3BInputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1898  kK2RegMaskFrameBuffer4BInputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1899 
1900  //kRegXptSelectGroup35
1902  kK2RegMaskFrameBuffer6BInputSelect = BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15),
1903  kK2RegMaskFrameBuffer7BInputSelect = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23),
1904  kK2RegMaskFrameBuffer8BInputSelect = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
1905 
1906  //kRegXptSelectGroup36
1909 
1910  //kK2RegCSCoefficients1_2
1911  //kK2RegCSC2oefficients1_2,
1912  //kK2RegCSC3oefficients1_2,
1913  //kK2RegCSC4oefficients1_2,
1914  //kK2RegCSC5Coefficients1_2,
1915  //kK2RegCSC6Coefficients1_2,
1916  //kK2RegCSC7Coefficients1_2,
1917  //kK2RegCSC8Coefficients1_2,
1922 
1923  //kRegCSCoefficients3_4,
1924  //kRegCS2Coefficients3_4,
1925  //kRegCS3Coefficients3_4,
1926  //kRegCS4Coefficients3_4,
1927  //kRegCS5Coefficients3_4,
1928  //kRegCS6Coefficients3_4,
1929  //kRegCS7Coefficients3_4,
1930  //kRegCS8Coefficients3_4,
1932 
1933  //kK2RegCSCoefficients5_6,
1935 
1936  //kK2RegCSCoefficients5_6,
1938 
1939  //custom coefficients
1940  kK2RegMaskCustomCoefficientLow = BIT(0)+BIT(1)+BIT(2)+BIT(3)+BIT(4)+BIT(5)+BIT(6)+BIT(7)+BIT(8)+BIT(9)+BIT(10),
1941  kK2RegMaskCustomCoefficientHigh = BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23)+BIT(24)+BIT(25)+BIT(26),
1942 
1943  // Enhanced Color Space Converter contol
1950 
1953 
1954  // Xena2K and Konax video processing
1959 
1960  // 12(13 with sign) bit custom coefficients - backwards compatible with the 10(11 with sign) bit soft and hardware - jac
1961  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),
1962  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),
1963 
1964  //kRegLTCStatusControl (see register 233 -- kRegLTCStatusControl)
1969 
1970  // kRegAudioOutputSourceMap
1971  kRegMaskMonitorSource = BIT(21)+BIT(20)+BIT(19)+BIT(18)+BIT(17)+BIT(16),
1972  kRegMaskHDMIOutAudioSource = BIT(31)+BIT(30)+BIT(29)+BIT(28)+BIT(27)+BIT(26)+BIT(25)+BIT(24),
1973 
1974  // kRegSDIInput3GStatus
1990 
1991 
1992  // kRegSDIInput3GStatus2
2007 
2008  // kRegSDI5678Input3GStatus
2037 
2038  // kRegVPID
2054  kRegMaskVPIDStandard = BIT(24)+BIT(25)+BIT(26)+BIT(27)+BIT(28)+BIT(29)+BIT(30)+BIT(31),
2056 
2057  //Borg Test Pattern Generator
2058  kRegMaskTPGChromaSample = BIT(9)+BIT(8)+BIT(7)+BIT(6)+BIT(5)+BIT(4)+BIT(3)+BIT(2)+BIT(1)+BIT(0),
2060  kRegMaskTPGFrameRate = BIT(15)+BIT(14)+BIT(13)+BIT(12),
2061  kRegMaskTPGLuma = BIT(25)+BIT(24)+BIT(23)+BIT(22)+BIT(21)+BIT(20)+BIT(19)+BIT(18)+BIT(17)+BIT(16),
2064  kRegMaskTPGStandard = BIT(30) + BIT(29) + BIT(28),
2066 
2067  // Bones Actel Registers
2068  kRegMaskCFS1 = BIT(0) + BIT(1),
2069  kRegMaskCFS2 = BIT(2) + BIT(3) ,
2070 
2071  // Audio Channel Control 2 or 8 channel playback mask
2073 
2074  // Stereo Compressor Control
2082  kRegMaskStereoCompressorLeftSource = BIT(23)+BIT(22)+BIT(21)+BIT(20)+BIT(19)+BIT(18)+BIT(17)+BIT(16),
2083  kRegMaskStereoCompressorRightSource = BIT(31)+BIT(30)+BIT(29)+BIT(28)+BIT(27)+BIT(26)+BIT(25)+BIT(24),
2084 
2085  // SDI Direction Control
2094 
2095  // SDI watchdog control
2103 
2104  // 4K Down Convert
2109 
2110  // Quadrant Rasterizer Control
2115 
2116  // kRegRXSDI1Status, kRegRXSDI2Status, etc
2117  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),
2122 
2123  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),
2124  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),
2125  kRegMask2MFrameSize = BIT(4)+BIT(3)+BIT(2)+BIT(1)+BIT(0),
2126  kRegMaskChannelBar = BIT(24)+BIT(23)+BIT(22)+BIT(21)+BIT(20)+BIT(19)+BIT(18)+BIT(17)+BIT(16),
2127 
2136 
2145 
2154 
2163 
2172 
2181 
2190 
2199 
2201  kRegThermalMask = BIT(17) + BIT(18) + BIT(19),
2202 
2203  //kRegHDMIHDR.... 330-336
2204  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),
2205  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),
2206  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),
2207  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),
2208  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),
2209  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),
2210  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),
2211  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),
2212  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),
2213  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),
2214  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),
2215  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),
2216 
2220  kRegMaskElectroOpticalTransferFunction = BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23),
2221  kRegMaskHDRStaticMetadataDescriptorID = BIT(24) + BIT(25) + BIT(26) + BIT(27) + BIT(28) + BIT(29) + BIT(30) + BIT(31),
2222 
2227  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),
2247  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),
2248  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),
2249  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),
2250  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),
2251  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),
2252  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),
2253  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),
2254  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),
2255  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),
2256  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),
2257  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),
2258  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),
2259  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),
2260  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),
2261  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),
2262  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),
2263  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),
2264  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),
2265  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),
2266  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),
2267  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),
2268  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),
2269  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),
2270  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),
2271  kRegMaskAudioMixerLevelSampleCount = BIT(8) + BIT(9) + BIT(10) + BIT(11) + BIT(12) + BIT(13) + BIT(14) + BIT(15),
2272 
2273  kRegMaskRotaryEncoderValue = BIT(7)+BIT(6)+BIT(5)+BIT(4)+BIT(3)+BIT(2)+BIT(1)+BIT(0),
2274  kRegMaskRotaryEncoderGain = BIT(13)+BIT(12)+BIT(11)+BIT(10)+BIT(9)+BIT(8),
2275 
2276  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) + \
2277  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),
2279 
2280  kRegMaskMRStandard = BIT(3) + BIT(2) + BIT(1) + BIT(0),
2281  kRegMaskMRFrameLocation = BIT(15) + BIT(14) + BIT(13) + BIT(12) + BIT(11) + BIT(10) + BIT(9) + BIT(8),
2284  kRegMaskMRSupport = BIT(2) + BIT(1) + BIT(0),
2285 
2290 
2291  kRegMaskPWMFanSpeed = BIT(7)+BIT(6)+BIT(5)+BIT(4)+BIT(3)+BIT(2)+BIT(1)+BIT(0),
2293 
2296 
2300 
2304  kRegMaskBOBGPIIn4Data = BIT(15)+BIT(14)+BIT(13)+BIT(12),
2305 
2310 
2314  kRegMaskBOBGPIOut4Data = BIT(15)+BIT(14)+BIT(13)+BIT(12),
2315 
2319 
2320  kRegMaskLEDBlueControl = BIT(7)+BIT(6)+BIT(5)+BIT(4)+BIT(3)+BIT(2)+BIT(1)+BIT(0),
2321  kRegMaskLEDGreenControl = BIT(15)+BIT(14)+BIT(13)+BIT(12)+BIT(11)+BIT(10)+BIT(9)+BIT(8),
2322  kRegMaskLEDRedControl = BIT(23)+BIT(22)+BIT(21)+BIT(20)+BIT(19)+BIT(18)+BIT(17)+BIT(16),
2323 } RegisterMask;
2324 
2325 typedef enum
2326 {
2327  // Global Control
2344 
2345  // Global Control 2
2375 
2376  // kRegGlobalControl3 (reg 108)
2384 
2385  // Audio Control 2
2394 
2395  // Channel Control - kRegCh1Control, kRegCh2Control, kRegCh3Control, kRegCh4Control
2413  kRegShiftVBlankRGBRangeMode = 24, // Deprecated
2416  kRegCh1BlackOutputShift = 27, // KiPro bit set results in black output video and muted audio in capture mode, black output video in playback
2420 
2421  // Video Crosspoint Control
2427 
2428  // Video Processing Control
2446 
2447 
2448  // Note: See more bitfields for this register below, in the 'Xena2K and Konax Video Processing.' section
2449 
2450  // kRegStatus
2454 
2455  // Video Interrupt Control
2457 
2458  // Audio Control
2460  kRegShiftNumBits = 1, // shouldn't this be 2?
2467  kRegShiftInputStartAtVBI = 10, // New in 15.6
2469  kRegShiftEmbeddedOutputMuteCh1 = 12, // added for FS1
2470  kRegShiftEmbeddedOutputSupressCh1 = 13, // added for FS1 but available on other boards
2471  kRegShiftOutputStartAtVBI = 14, // New in 15.6
2472  kRegShiftEmbeddedOutputSupressCh2 = 15, // added for FS1 but available on other boards
2474  kRegShiftEmbeddedOutputMuteCh2 = 17, // added for FS1
2489 
2490  // Audio Source Select
2500 
2502 
2503  // Input Status
2521 
2522  // RP-188 Source
2525 
2526  // DMA Control
2531 
2532  // Color Correction Control
2542 
2543  // kRegCanDoStatus
2547 
2548  // kRegLUTV2Control
2575 
2576  // RS422 Control
2591 
2592 
2593  // FS1 ProcAmp Control
2600 
2603 
2604  // FS1 Audio Delay
2606 
2607  // Borg Audio Delay
2610 
2611  // kRegOutputTimingControl
2614 
2615  // FS1 I2C
2624 
2629 
2630  //kRegFS1ReferenceSelect
2640 
2641  // FS1 AFD Mode
2651 
2652  // FS1 AFD Inserter
2657 
2658  // FS1 Audio Channel Mapping
2663 
2664  // FS1 Output Timing Fine Phase Adjust
2666 
2667  //kRegAnalogInputStatus
2672 
2673  //kRegAnalogInputControl
2675 
2676  //kRegHDMIOut3DControl
2679 
2680  //kRegHDMIOutControl
2699 
2700  //kRegHDMIInputStatus
2716 
2717  //kRegHDMIInputControl
2735 
2736  //kRegHDMIInputControl / kRegHDMIOutControl ???
2739 
2740  //kK2RegAnalogOutControl,
2745  kLHIRegShiftVideoDACMode = 21, // 4 bit enum equivalent of bit 21-24
2751 
2752  //kK2RegSDIOut1Control + kRegK2SDIOut2Control + kK2RegAnalogOutControl
2768 
2769  //kK2RegConversionControl,
2782 
2783  //kK2RegFrameSync1Control and kK2RegFrameSync2Control
2788 
2789  //kK2RegXptSelectGroup1
2794 
2795  //kK2RegXptSelectGroup2
2800 
2801  //kK2RegXptSelectGroup3
2806 
2807  //kK2RegXptSelectGroup4
2812 
2813  //kK2RegXptSelectGroup5
2818 
2819  //kK2RegXptSelectGroup6
2824 
2825  //kK2RegXptSelectGroup7
2829 
2830  //kK2RegXptSelectGroup8
2834 
2835  //kRegCh1ControlExtended
2836  //kRegCh2ControlExtended
2838 
2839  //kK2RegXptSelectGroup9
2844 
2845  //kK2RegXptSelectGroup10
2848 
2849  //kK2RegXptSelectGroup11
2854 
2855  //kK2RegXptSelectGroup12
2860 
2861  //kK2RegXptSelectGroup13
2864 
2865  //kK2RegXptSelectGroup14
2869 
2870  //kRegXptSelectGroup15
2875 
2876  //kRegXptSelectGroup16
2880 
2881  //kK2RegXptSelectGroup17
2886 
2887  //kRegXptSelectGroup18
2890 
2891  //kRegXptSelectGroup19
2896 
2897  //kRegXptSelectGroup20
2902 
2903  //kK2RegXptSelectGroup21
2908 
2909  //kK2RegXptSelectGroup22
2914 
2915  //kK2RegXptSelectGroup30
2920 
2921  //kK2RegXptSelectGroup23
2926 
2927  //kK2RegXptSelectGroup24
2931 
2932  //kK2RegXptSelectGroup25
2937 
2938  //kK2RegXptSelectGroup26
2943 
2944  //kK2RegXptSelectGroup27
2948 
2949  //kK2RegXptSelectGroup28
2954 
2955  //kK2RegXptSelectGroup29
2960 
2961  //kRegXptSelectGroup31
2966 
2967  //kRegXptSelectGroup32
2972 
2973  //kRegXptSelectGroup33
2978 
2979  //kRegXptSelectGroup36
2982 
2983  //kRegXptSelectGroup34
2988 
2989  //kK2RegCSCoefficients1_2
2994  //kK2RegCSCoefficients3_4
2996 
2997  //kK2RegCSCoefficients5_6,
2999 
3000  //kK2RegCSCoefficients5_6,
3002 
3005 
3006  // Enhanced Color Space Converter contol
3013 
3016 
3017  // Xena2K and Konax Video Processing.
3023 
3024  // the newer 13(12) bit coefficients end on bit 14 unlike the
3025  // 11(10) bit ones on 16 - jac
3028 
3029  //kRegLTCStatusControl
3034 
3035  // kRegAudioOutputSourceMap
3038 
3039  // kRegSDIInput3GStatus
3055 
3056  // kRegSDIInput3GStatus2
3071 
3072  // kRegSDI5678Input3GStatus
3101 
3102  // kRegVPID
3120 
3121  // Borg Test Pattern Generator
3130 
3131  // Audio Channel Control 2 or 8 channel playback shift
3133 
3134  // Stereo Compressor control shift
3144 
3145  // SDI Direction Control Shift
3154 
3155  // SDI watchdog control
3163 
3165 
3166  // 4K Down Convert
3171 
3172  // Quadrant Rasterizer Control
3177 
3178  // kRegRXSDI1Status, kRegRXSDI2Status, etc
3186 
3189 
3198 
3207 
3216 
3225 
3234 
3243 
3252 
3261 
3264 
3265  //kRegHDMIHDR.... 330-336
3278 
3284 
3334 
3337 
3340 
3346 
3351 
3354 
3357 
3361 
3366 
3371 
3376 
3380 
3384 } RegisterShift;
3385 
3386 
3387 // NWL Registers
3388 
3389 // 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.
3390 // This is necessary since the NWL registers lives in another PCI BAR and these offsets conflict with normal VP registers. With this
3391 // offset the driver knows which mapped BAR to use. Windows maps individual registers at start so this isn't necessary for Windows.
3392 #ifdef AJAMac
3393  #define NWL_REG_START 18000
3394 #else
3395  #define NWL_REG_START 0
3396 #endif
3397 
3398 typedef enum
3399 {
3406 
3413 
3420 
3427 
3432 
3433 } NwlRegisterNum;
3434 
3435 // This is an aid for utility routines that maintain tables indexed by a register number, like spinlocks
3436 typedef enum
3437 {
3444 
3451 
3458 
3465 
3470 
3473 
3474 typedef enum
3475 {
3479  kRegMaskNwlCapabilitiesEngineNumber = (BIT(8)+BIT(9)+BIT(10)+BIT(11)+BIT(12)+BIT(13)+BIT(14)+BIT(15)),
3480  kRegMaskNwlCapabilitiesAddressSize = (BIT(16)+BIT(17)+BIT(18)+BIT(19)+BIT(20)+BIT(21)+BIT(22)+BIT(23)),
3481 
3493 
3518 
3519 } NwlRegisterMask;
3520 
3521 typedef enum
3522 {
3528 
3540 
3565 
3567 
3568 // XLNX Registers
3569 #define XLNX_MAX_CHANNELS 4
3570 #define XLNX_REG_TARGET_SIZE 0x400
3571 #define XLNX_REG_CHANNEL_SIZE 0x40
3572 #define XLNX_SUBSYSTEM_ID 0x1fc
3573 
3574 typedef enum
3575 {
3585 
3586 typedef enum
3587 {
3607 
3619 
3625 
3626 } XlnxRegisterNum;
3627 
3628 typedef enum
3629 {
3631  kRegMaskXlnxTarget = 0x000f0000,
3633  kRegMaskXlnxIdTarget = 0x00000f00,
3634  kRegMaskXlnxVersion = 0x000000ff,
3635 
3639  kRegMaskXlnxRun = 0x00000001,
3640 
3644 
3654 
3655  kRegMaskXlnxPerfRun = 0x00000004,
3657  kRegMaskXlnxPerfAuto = 0x00000001,
3658 
3661 
3664 
3667 
3669 
3670 typedef enum
3671 {
3677 
3682 
3686 
3696 
3700 
3703 
3706 
3709 
3711 
3712 // P2P Registers
3713 
3714 typedef enum
3715 {
3737 
3738 
3739 typedef enum
3740 {
3754 
3755 
3756 #define kTransferFlagVideoDMA1 (BIT(0)) // use dma channel 1 for video transfer
3757 #define kTransferFlagVideoDMA2 (BIT(1)) // use dma channel 2 for video transfer
3758 #define kTransferFlagVideoDMA3 (BIT(2)) // use dma channel 3 for video tranfer
3759 #define kTransferFlagVideoDMA4 (BIT(3)) // use dma channel 4 for video transfer
3760 #define kTransferFlagVideoDMAAny (BIT(0)+BIT(1)+BIT(2)+BIT(3))
3761 #define kTransferFlagAudioDMA1 (BIT(4)) // use dma channel 1 for audio transfer
3762 #define kTransferFlagAudioDMA2 (BIT(5)) // use dma channel 2 for audio transfer
3763 #define kTransferFlagAudioDMA3 (BIT(6)) // use dma channel 3 for audio transfer
3764 #define kTransferFlagAudioDMA4 (BIT(7)) // use dma channel 4 for audio transfer
3765 #define kTransferFlagAudioDMAAny (BIT(4)+BIT(5)+BIT(6)+BIT(7))
3766 #define kTransferFlagDMAAny (BIT(0)+BIT(1)+BIT(2)+BIT(3)+BIT(4)+BIT(5)+BIT(6)+BIT(7))
3767 #define kTransferFlagQuadFrame (BIT(8)) // transfer a quad hd or 4k frame
3768 #define kTransferFlagP2PPrepare (BIT(9)) // prepare p2p target for synchronous transfer (no message)
3769 #define kTransferFlagP2PComplete (BIT(10)) // complete synchronous p2p transfer
3770 #define kTransferFlagP2PTarget (BIT(11)) // prepare p2p target for asynchronous transfer (with message)
3771 #define kTransferFlagP2PTransfer (BIT(12)) // transfer to p2p sync or async target
3772 
3773 #define MAX_FRAMEBUFFERS 512 // Max for Corvid88
3774 
3775 #define KONAIP_REGS_START 0x40000
3776 
3778 
3779 //----------------------- AJA XENA2 ---------------------------------
3780 
3781  // Offset in Base Address 1 Space to Channel 2 Frame Buffer
3782 #define XENA2_CHANNEL2_OFFSET (0x2000000) // 32 MBytes..not applicable
3783 
3784  // Size of each frame buffer
3785 #define XENA2_FRAMEBUFFER_SIZE (0x800000) // 8 MBytes
3786 
3787  // the event name shared among all Windows NT
3788  // This name to be appended to the actual Win32Name
3789 #define XENA2_NUM_FRAMEBUFFERS (16)
3790 #define XENA2_NTV2_VERTICALINTERRUPT_GLOBAL_EVENT_NAME "_Xena2VerticalInterruptSignalEvent"
3791 
3792  // the event name shared among all Windows NT
3793  // This name to be appended to the actual Win32Name
3794 #define KHD_NTV2_CHANGE_GLOBAL_EVENT_NAME "_HDChangeSignalEvent"
3795 
3796 
3797 //
3798 // Special defines
3799 //
3800 #define NTV2_MIN_FRAMEBUFFERSIZE KSD_FRAMEBUFFER_SIZE
3801 #define NTV2_MAX_FRAMEBUFFERSIZE KHD_FRAMEBUFFER_SIZE
3802 #define NTV2_MIN_FRAMEBUFFERS HDNTV_NUM_FRAMEBUFFERS
3803 #if defined(XENA2)
3804 #define NTV2_MAX_FRAMEBUFFERS MAX_FRAMEBUFFERS
3805 #else
3806 #define NTV2_MAX_FRAMEBUFFERS BONES_NUM_FRAMEBUFFERS
3807 #endif
3808 
3809 #define NTV2_UART_FIFO_SIZE (127)
3810 
3811 #define NTV2_PROGRAM_READY_BIT ( BIT_8 )
3812 #define NTV2_PROGRAM_DONE_BIT ( BIT_9 )
3813 #define NTV2_PROGRAM_RESET_BIT ( BIT_10 )
3814 
3815 /* PORT C(7) is output (default) */
3816 #define NTV2_FS1_FALLBACK_MODE_BIT ( BIT_11 )
3817 
3818 /* PORT C(7) is input/3-state */
3819 #define NTV2_FS1_CPLD_ENH_MODE_BIT ( BIT_12 )
3820 
3822 // Enums used to specify Property actions with interrupts
3824 
3825 typedef enum _INTERRUPT_ENUMS_
3826 {
3830  eInput1, // 2
3831  eInput2, // 3
3832  eAudio, // 4
3835  eDMA1, // 7
3836  eDMA2, // 8
3837  eDMA3, // 9
3838  eDMA4, // 10
3841  eWrapRate, // 13
3842  eUartTx, // 14
3844  eUartRx, // 15
3848  eLowPower, // 18
3851  eTemp1High, // 21
3852  eTemp2High, // 22
3854  eInput3, // 24
3855  eInput4, // 25
3856  eUartTx2, // 26
3858  eUartRx2, // 27
3861  eInput5, // 29
3862  eInput6, // 30
3863  eInput7, // 31
3864  eInput8, // 32
3866  eOutput2, // 34
3867  eOutput3, // 35
3868  eOutput4, // 36
3869  eOutput5, // 37
3870  eOutput6, // 38
3871  eOutput7, // 39
3872  eOutput8, // 40
3873  eNumInterruptTypes // This must be last // 41
3874 } INTERRUPT_ENUMS;
3875 
3876 
3877 #define MAX_NUM_EVENT_CODES (eNumInterruptTypes)
3878 #define NTV2_IS_VALID_INTERRUPT_ENUM(__e__) ((__e__) >= eOutput1 && (__e__) < eNumInterruptTypes)
3879 #define NTV2_IS_INPUT_INTERRUPT(__e__) ( (__e__) == eInput1 \
3880  || (__e__) == eInput2 \
3881  || (__e__) == eInput3 \
3882  || (__e__) == eInput4 \
3883  || (__e__) == eInput5 \
3884  || (__e__) == eInput6 \
3885  || (__e__) == eInput7 \
3886  || (__e__) == eInput8 )
3887 
3888 #define NTV2_IS_OUTPUT_INTERRUPT(__e__) ( (__e__) == eOutput1 \
3889  || (__e__) == eOutput2 \
3890  || (__e__) == eOutput3 \
3891  || (__e__) == eOutput4 \
3892  || (__e__) == eOutput5 \
3893  || (__e__) == eOutput6 \
3894  || (__e__) == eOutput7 \
3895  || (__e__) == eOutput8 )
3896 
3897 
3898 // Some Mac only ENUMS that had to be moved over to get Win/Linux code to compile,
3899 // so these are only used by the Mac.
3900 typedef enum
3901 {
3905 } ReferenceSelect;
3906 
3907 
3908 #if !defined (NTV2_BUILDING_DRIVER)
3909  typedef std::vector <ULWord> NTV2ULWordVector;
3910 
3917  AJAExport std::ostream & NTV2PrintULWordVector (const NTV2ULWordVector & inObj, std::ostream & inOutStream = std::cout); // New in SDK 16.0
3918 
3919  typedef std::vector <NTV2Channel> NTV2ChannelList;
3920  typedef NTV2ChannelList::const_iterator NTV2ChannelListConstIter;
3921 
3929  AJAExport std::ostream & NTV2PrintChannelList (const NTV2ChannelList & inObj, const bool inCompact = true, std::ostream & inOutStream = std::cout); // New in SDK 16.0
3930 
3936  AJAExport std::string NTV2ChannelListToStr (const NTV2ChannelList & inObj, const bool inCompact = true); // New in SDK 16.0
3937 
3938  typedef std::set <NTV2Channel> NTV2ChannelSet;
3939  typedef NTV2ChannelSet::const_iterator NTV2ChannelSetConstIter;
3940 
3948  AJAExport std::ostream & NTV2PrintChannelSet (const NTV2ChannelSet & inObj, const bool inCompact = true, std::ostream & inOutStream = std::cout); // New in SDK 16.0
3949 
3955  AJAExport std::string NTV2ChannelSetToStr (const NTV2ChannelSet & inObj, const bool inCompact = true); // New in SDK 16.0
3956 
3962  AJAExport NTV2ChannelSet NTV2MakeChannelSet (const NTV2Channel inFirstChannel, const UWord inNumChannels = 1); // New in SDK 16.0
3963 
3968  AJAExport NTV2ChannelSet NTV2MakeChannelSet (const NTV2ChannelList inChannels); // New in SDK 16.0
3969 
3975  AJAExport NTV2ChannelList NTV2MakeChannelList (const NTV2Channel inFirstChannel, const UWord inNumChannels = 1); // New in SDK 16.0
3976 
3981  AJAExport NTV2ChannelList NTV2MakeChannelList (const NTV2ChannelSet inChannels); // New in SDK 16.0
3982 
3983 
3984  typedef std::set <NTV2AudioSystem> NTV2AudioSystemSet;
3985  typedef NTV2AudioSystemSet::const_iterator NTV2AudioSystemSetConstIter;
3986 
3994  AJAExport std::ostream & NTV2PrintAudioSystemSet (const NTV2AudioSystemSet & inObj, const bool inCompact = true, std::ostream & inOutStream = std::cout); // New in SDK 16.2
3995 
4001  AJAExport std::string NTV2AudioSystemSetToStr (const NTV2AudioSystemSet & inObj, const bool inCompact = true); // New in SDK 16.2
4002 
4008  AJAExport NTV2AudioSystemSet NTV2MakeAudioSystemSet (const NTV2AudioSystem inFirstAudioSystem, const UWord inCount = 1); // New in SDK 16.2
4009 
4010 
4017  #define NTV2_STRUCT_BEGIN(__struct_name__) class AJAExport __struct_name__ {public:
4018  #define NTV2_STRUCT_END(__struct_name__) };
4019  #define NTV2_BEGIN_PRIVATE private:
4020  #define NTV2_END_PRIVATE public:
4021  #define NTV2_BEGIN_PROTECTED protected:
4022  #define NTV2_END_PROTECTED public:
4023 
4024  #if defined (_DEBUG)
4025  #define NTV2_IS_STRUCT_VALID_IMPL(__hr__,__tr__) bool NTV2_IS_STRUCT_VALID (void) const {return __hr__.IsValid() && __tr__.IsValid();}
4026  #define NTV2_ASSERT_STRUCT_VALID do {NTV2_ASSERT (NTV2_IS_STRUCT_VALID ());} while (false)
4027  #else
4028  #define NTV2_IS_STRUCT_VALID_IMPL(__hr__,__tr__)
4029  #define NTV2_ASSERT_STRUCT_VALID
4030  #endif
4031 #else // defined (NTV2_BUILDING_DRIVER)
4032  #define NTV2_STRUCT_BEGIN(__struct_name__) typedef struct __struct_name__ {
4033  #define NTV2_STRUCT_END(__struct_name__) } __struct_name__;
4034  #define NTV2_BEGIN_PRIVATE
4035  #define NTV2_END_PRIVATE
4036  #define NTV2_BEGIN_PROTECTED
4037  #define NTV2_END_PROTECTED
4038  #define NTV2_IS_STRUCT_VALID_IMPL(__hr__,__tr__)
4039  #define NTV2_ASSERT_STRUCT_VALID
4040 #endif // !defined (NTV2_BUILDING_DRIVER)
4041 
4042 
4047  ULWord registerNumber;
4048  ULWord registerValue;
4049  ULWord registerMask;
4050  ULWord registerShift;
4051 
4052  #if !defined(NTV2_BUILDING_DRIVER)
4053 
4060  NTV2RegInfo (const ULWord inRegNum = 0, const ULWord inValue = 0, const ULWord inMask = 0xFFFFFFFF, const ULWord inShift = 0)
4061  : registerNumber (inRegNum),
4062  registerValue (inValue),
4063  registerMask (inMask),
4064  registerShift (inShift)
4065  {
4066  }
4067 
4075  inline void Set (const ULWord inRegNum, const ULWord inValue,
4076  const ULWord inMask = 0xFFFFFFFF, const ULWord inShift = 0)
4077  {setRegNum(inRegNum).setValue(inValue).setMask(inMask).setShift(inShift);}
4081  inline void MakeInvalid (void)
4082  {registerNumber = registerValue = registerMask = registerShift = 0xFFFFFFFF;}
4083 
4088  inline bool IsValid (void) const {return !(regNum() == 0xFFFFFFFF && value() == 0xFFFFFFFF && mask() == 0xFFFFFFFF && shift() == 0xFFFFFFFF)
4089  && mask() && shift() < 32;}
4090 
4097  inline bool operator == (const NTV2RegInfo & inRHS) const {return regNum() == inRHS.regNum() && value() == inRHS.value()
4098  && mask() == inRHS.mask() && shift() == inRHS.shift();}
4104  bool operator < (const NTV2RegInfo & inRHS) const;
4105 
4113  std::ostream & Print (std::ostream & outputStream, const bool inAsCode = false) const;
4114 
4122  std::ostream & PrintCode (std::ostream & outputStream, const int inRadix = 16, const NTV2DeviceID inDeviceID = DEVICE_ID_INVALID) const; // New in SDK 16.0, added inDeviceID in 16.2
4123 
4124  inline ULWord regNum (void) const {return registerNumber;} // New in SDK 17.5
4125  inline ULWord value (void) const {return registerValue;} // New in SDK 17.5
4126  inline ULWord mask (void) const {return registerMask;} // New in SDK 17.5
4127  inline ULWord shift (void) const {return registerShift;} // New in SDK 17.5
4128  inline NTV2RegInfo & setRegNum (const ULWord val){registerNumber = val; return *this;} // New in SDK 17.5
4129  inline NTV2RegInfo & setValue (const ULWord val) {registerShift = val; return *this;} // New in SDK 17.5
4130  inline NTV2RegInfo & setMask (const ULWord val) {registerMask = val; return *this;} // New in SDK 17.5
4131  inline NTV2RegInfo & setShift (const ULWord val) {if (val < 32) registerShift = val; return *this;} // New in SDK 17.5
4132  #endif // !defined(NTV2_BUILDING_DRIVER)
4134 
4136 
4137 #if !defined (NTV2_BUILDING_DRIVER)
4138  typedef std::vector <NTV2RegInfo> NTV2RegisterWrites, NTV2RegWrites;
4139  typedef NTV2RegWrites::const_iterator NTV2RegisterWritesConstIter, NTV2RegWritesConstIter;
4140  typedef NTV2RegWrites::iterator NTV2RegisterWritesIter, NTV2RegWritesIter;
4144 
4151  AJAExport NTV2RegReadsConstIter FindFirstMatchingRegisterNumber (const uint32_t inRegNum, const NTV2RegReads & inRegInfos);
4152 
4159  AJAExport std::ostream & operator << (std::ostream & inOutStream, const NTV2RegInfo & inObj);
4160 
4167  AJAExport std::ostream & operator << (std::ostream & inOutStream, const NTV2RegisterWrites & inObj);
4168 #endif // !defined (NTV2_BUILDING_DRIVER)
4169 
4170 
4171 typedef struct NTV2RoutingEntry
4172 {
4177  #if !defined (NTV2_BUILDING_DRIVER)
4178  NTV2RoutingEntry & operator = (const NTV2RegInfo & inRHS);
4179  #endif // !defined (NTV2_BUILDING_DRIVER)
4180 } NTV2RoutingEntry;
4181 
4182 #define MAX_ROUTING_ENTRIES 32
4183 
4184 typedef struct
4185 {
4188 } NTV2RoutingTable;
4189 
4190 
4191 // Color Space Convert Custom Coefficients
4192 typedef struct
4193 {
4205 
4207 // RP188 data structure used in AutoCirculate
4209 
4210 typedef struct RP188_STRUCT {
4212  ULWord Low; // | BG 4 | Secs10 | BG 3 | Secs 1 | BG 2 | Frms10 | BG 1 | Frms 1 |
4213  ULWord High; // | BG 8 | Hrs 10 | BG 7 | Hrs 1 | BG 6 | Mins10 | BG 5 | Mins 1 |
4214  #if !defined(NTV2_BUILDING_DRIVER)
4215  public:
4217  #endif // user-space clients only
4218 } RP188_STRUCT;
4219 
4220 
4221 #define RP188_STRUCT_SET(_struct_,_dbb_,_lo_,_hi_) do \
4222  { \
4223  (_struct_).DBB = (_dbb_); \
4224  (_struct_).Low = (_lo_); \
4225  (_struct_).High = (_hi_); \
4226  } while (false)
4227 
4228 #define RP188_PSTRUCT_SET(_pStruct_,_dbb_,_lo_,_hi_) do \
4229  { \
4230  (_pStruct_)->DBB = (_dbb_); \
4231  (_pStruct_)->Low = (_lo_); \
4232  (_pStruct_)->High = (_hi_); \
4233  } while (false)
4234 
4235  // convenience masks to extract fields in .Low and .High words
4236 #define RP188_FRAMEUNITS_MASK 0x0000000F // Frames (units digit) in bits 3- 0 of .Low word
4237 #define RP188_FRAMETENS_MASK 0x00000300 // Frames (tens digit) in bits 9- 8 of .Low word
4238 #define RP188_SECONDUNITS_MASK 0x000F0000 // Seconds (units digit) in bits 19-16 of .Low word
4239 #define RP188_SECONDTENS_MASK 0x07000000 // Seconds (tens digit) in bits 26-24 of .Low word
4240 #define RP188_LOW_TIME_MASK (RP188_FRAMEUNITS_MASK | RP188_FRAMETENS_MASK | RP188_SECONDUNITS_MASK | RP188_SECONDTENS_MASK)
4241 
4242 #define RP188_MINUTESUNITS_MASK 0x0000000F // Minutes (units digit) in bits 3- 0 of .High word
4243 #define RP188_MINUTESTENS_MASK 0x00000700 // Minutes (tens digit) in bits 10- 8 of .High word
4244 #define RP188_HOURUNITS_MASK 0x000F0000 // Hours (units digit) in bits 19-16 of .High word
4245 #define RP188_HOURTENS_MASK 0x03000000 // Hours (tens digit) in bits 25-24 of .High word
4246 #define RP188_HIGH_TIME_MASK (RP188_MINUTESUNITS_MASK | RP188_MINUTESTENS_MASK | RP188_HOURUNITS_MASK | RP188_HOURTENS_MASK)
4247 
4248  // private bit flags added to the RP188 DBB word
4249 #define NEW_RP188_RCVD 0x00010000 // new RP188 data was received on ANY of the channels (LTC, VITC, etc.) (capture only)
4250 #define NEW_SELECT_RP188_RCVD 0x00020000 // new RP188 data was received on the selected channel (capture only)
4251 #define RP188_720P_FRAMEID 0x00400000 // 720p FrameID (capture only - set by driver software)
4252 #define RP188_CHANGED_FLAG 0x00800000 // RP188 data changed compared to last frame (capture only - set by driver software)
4253 
4254 
4256 // Color Correction data structure used in AutoCirculate
4258 // Color Corrector has 3 tables(usually R, G and B). Each table has 1024 entries
4259 // with 2 entries per 32 bit word....therefore 512 32 bit words per table.
4260 #define NTV2_COLORCORRECTOR_WORDSPERTABLE (512) // number of ULONG words in EACH color table
4261 #define NTV2_COLORCORRECTOR_TOTALWORDS (NTV2_COLORCORRECTOR_WORDSPERTABLE * 3) // total number of ULONG words in all 3 tables
4262 #define NTV2_COLORCORRECTOR_TABLESIZE (NTV2_COLORCORRECTOR_TOTALWORDS * 4) // total length in bytes of all 3 tables: numWords * numColors * bytes/word
4263 
4264 // 12 bit Color Corrector has 3 tables(usually R, G and B). Each table has 4096 entries
4265 // with 2 entries per 32 bit word....therefore 2048 32 bit words per table.
4266 #define NTV2_12BIT_COLORCORRECTOR_WORDSPERTABLE (2048) // number of ULONG words in EACH color table
4267 #define NTV2_12BIT_COLORCORRECTOR_TOTALWORDS (NTV2_12BIT_COLORCORRECTOR_WORDSPERTABLE * 3) // total number of ULONG words in all 3 tables
4268 #define NTV2_12BIT_COLORCORRECTOR_TABLESIZE (NTV2_12BIT_COLORCORRECTOR_TOTALWORDS * 4) // total length in bytes of all 3 tables: numWords * numColors * bytes/word
4269 
4270 
4277 
4278 
4279 typedef struct {
4285 
4286 typedef struct {
4292 
4293 // within each 32-bit LUT word, bits <31:22> = LUT[2i+1], bits <15:6> = LUT[2i]
4294 #define kRegColorCorrectionLUTOddShift 22
4295 #define kRegColorCorrectionLUTEvenShift 6
4296 
4297 // the base BYTE offsets (from PCI Config Base Address 0) of the three Color Correction LUTs
4298 // Note: if using these with GetRegisterBaseAddress() be sure to divide by 4 to get WORD offset!
4299 #define kColorCorrectionLUTOffset_Red (0x0800)
4300 #define kColorCorrectionLUTOffset_Green (0x1000)
4301 #define kColorCorrectionLUTOffset_Blue (0x1800)
4302 
4303 // within each 32-bit LUT word, bits <31:22> = LUT[2i+1], bits <15:6> = LUT[2i]
4304 #define kRegColorCorrection12BitLUTOddShift 16
4305 #define kRegColorCorrection12BitLUTEvenShift 0
4306 
4307 #define kRegColorCorrection10To12BitLUTOddShift 18
4308 #define kRegColorCorrection10To12BitLUTEvenShift 2
4309 
4310 // Note: there is code that assumes that the three LUTs are contiguous. So if this relationship
4311 // changes (i.e. there are "gaps" between tables) then code will need to change!
4312 #define kColorCorrectionLUTOffset_Base (0x0800) // BYTE offset
4313 #define kColorCorrection12BitLUTOffset_Base (0xe000) // BYTE offset
4314 
4315 // cc lut v3 locations
4316 
4317 #define kColorCorrectionLUTV3WidgetOffset (0xd800) // byte offset
4318 #define kColorCorrectionLUTV3WidgetSize (16) // byte size
4319 #define kColorCorrectionLUTV3DataOffset (0xe000) // byte offset
4320 
4321 // cc lut v3 registers
4322 typedef enum
4323 {
4325  regCCLUTV3Capabilities = regCCLUTV3_FIRST, // Reg 0 - read only
4326  regCCLUTV3DmaLoad, // Reg 1 - dma load address and trigger
4327  regCCLUTV3HostLoad, // Reg 2 - host load enable and bank/plain selects
4330 
4331 typedef enum
4332 {
4333  // regCCLUTV3Capabilities
4334  maskCCLUTV3Depth12 = BIT(0), // lut supports 12/10 bits
4336  maskCCLUTV3DmaLoad = BIT(4), // lut supports dma loading
4338  maskCCLUTV3Banks2 = BIT(8), // lut supports 2 banks
4340  maskCCLUTV3HostLoad = BIT(12), // lut supports host loading
4342  // regCCLUTV3DmaLoad
4344  BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) +
4345  BIT(8) + BIT(9) + BIT(10) + BIT(11) + BIT(12) + BIT(13) + BIT(14) + BIT(15) + \
4346  BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23) +
4347  BIT(24) + BIT(25) + BIT(26) + BIT(27) + BIT(28) + BIT(29),
4351  // regCCLUTV3HostLoad
4361 
4362 
4364 // VidProc data structure used in AutoCirculate
4366 
4367 typedef enum
4368 {
4375 
4376 #define NTV2_IS_VALID_AUTOCIRCVIDPROCMODE(__m__) ((__m__) >= AUTOCIRCVIDPROCMODE_MIX && (__m__) < AUTOCIRCVIDPROCMODE_INVALID)
4377 
4378 
4379 
4380 typedef struct AutoCircVidProcInfo
4381 {
4389 
4390  #if !defined (NTV2_BUILDING_DRIVER)
4391  public:
4392  AJAExport explicit AutoCircVidProcInfo ();
4394  #endif // user-space clients only
4396 
4397 
4399 // CustomAncData data structure used in AutoCirculate
4401 typedef struct
4402 {
4408 
4409 #define OBSOLETE_ANC_STRUCT CUSTOM_ANC_STRUCT
4410 
4411 
4413 // Control
4415 
4416 typedef enum _AutoCircCommand_
4417 {
4437 
4438 #define NTV2_IS_AUTO_CIRC_XFER_CMD(__m__) ((__m__) == eTransferAutoCirculate && (__m__) == eTransferAutoCirculateEx && (__m__) == eTransferAutoCirculateEx2)
4439 
4440 
4444 typedef enum
4445 {
4455 
4456 #define NTV2_IS_VALID_AUTO_CIRC_STATE(__m__) ((__m__) >= NTV2_AUTOCIRCULATE_DISABLED && (__m__) < NTV2_AUTOCIRCULATE_INVALID)
4457 
4458 
4462 typedef enum
4463 {
4468 } NTV2TaskMode;
4469 
4470 #if !defined(NTV2_DEPRECATE_18_0)
4472 #endif // !defined(NTV2_DEPRECATE_18_0)
4473 
4474 #define NTV2_IS_VALID_TASK_MODE(__m__) ((__m__) == NTV2_DISABLE_TASKS || (__m__) == NTV2_STANDARD_TASKS || (__m__) == NTV2_OEM_TASKS)
4475 #define NTV2_IS_STANDARD_TASKS(__m__) ((__m__) == NTV2_STANDARD_TASKS)
4476 #define NTV2_IS_DRIVER_ACTIVE_TASKS(__m__) ((__m__) == NTV2_STANDARD_TASKS || (__m__) == NTV2_OEM_TASKS)
4477 
4478 
4479 typedef enum
4480 {
4483 } NTV2DebugReg;
4484 
4485 
4486 #ifdef AJAMac
4487  #pragma pack(4) // removes 64 bit alignment on non-64 bit fields
4488 #endif
4489 
4490 // Structure used for GetAutoCirculate
4492 {
4493  NTV2Crosspoint channelSpec; // Not used by Windows.
4497  LWord activeFrame; // Current Frame# actually being output (or input), -1, if not active
4498  ULWord64 rdtscStartTime; // Performance Counter at start
4499  ULWord64 audioClockStartTime; // Register 28 with Wrap Logic
4500  ULWord64 rdtscCurrentTime; // Performance Counter at time of call
4501  ULWord64 audioClockCurrentTime; // Register 28 with Wrap Logic
4504  ULWord bufferLevel; // how many buffers ready to record or playback in driver
4512  #if !defined (NTV2_BUILDING_DRIVER)
4514  #endif // !defined (NTV2_BUILDING_DRIVER)
4516 
4517 
4518 typedef struct
4519 {
4522 
4529 
4538 
4543 
4545 
4546 
4547 typedef struct AUTOCIRCULATE_DATA
4548 {
4551 
4558 
4567 
4568  void* pvVal1;
4569  void* pvVal2;
4570  void* pvVal3;
4571  void* pvVal4;
4572 
4573  #if !defined (NTV2_BUILDING_DRIVER)
4574  public:
4576  AJAExport std::ostream & Print (std::ostream & oss) const;
4578  #endif // user-space clients only
4580 
4581 
4582 typedef struct
4583 {
4586 
4593 
4602 
4607 
4609 
4610 
4612 // GetFrameStamp
4614 
4615 typedef struct FRAME_STAMP_STRUCT
4616 {
4617  NTV2Crosspoint channelSpec; // Ignored in Windows
4618 
4619  //
4620  // Information from the requested frame (#FRAMESTAMP_CONTROL_STRUCT:frameNum
4621  //
4622 
4623  // Clock (System PerformanceCounter under Windows) at time of play or record.
4624  // audioClockTimeStamp is preferred, but not available on all boards. (See comments below at 'currentTime' member.)
4626 
4629 
4631  ULWord64 audioClockTimeStamp; // Register 28 with Wrap Logic
4632 
4635 
4637  ULWord audioInStartAddress; // AudioInAddress at the time this Frame was stamped.
4638 
4640  ULWord audioInStopAddress; // AudioInAddress at the Frame AFTER this Frame was stamped.
4641 
4643  ULWord audioOutStopAddress; // AudioOutAddress at the time this Frame was stamped.
4644 
4646  ULWord audioOutStartAddress; // AudioOutAddress at the Frame AFTER this Frame was stamped.
4647 
4650 
4660 
4661  //
4662  // Information from the current (active) frame
4663  //
4664 
4666  // This is the finest-grained counter available from the OS.
4667  // The granularity of this counter can vary depending on the PC's HAL.
4668  // audioClockCurrentTime is the recommended time-stamp to use instead of this (but is not available on all boards)!
4671 
4673  RP188_STRUCT currentRP188; // ignored if withRP188 is false
4674 
4677 
4679  ULWord64 audioClockCurrentTime; // Register 28 with Wrap Logic
4680  // audioClockCurrentTime (from 48 kHz on-board clock) is consistent and accurate!
4681  // but is not available on the XenaSD-22.
4682 
4685 
4688 
4694  #if !defined (NTV2_BUILDING_DRIVER)
4695  public:
4697  #endif // user-space clients only
4699 
4700 
4701 typedef struct
4702 {
4703  NTV2Crosspoint channelSpec; // specify Input or Output channel for desired Frame
4704  NTV2AutoCirculateState state; // current state
4705  LWord transferFrame; // framebuffer number the frame transferred to, -1 on error
4706  ULWord bufferLevel; // how many buffers ready to record or playback
4709  FRAME_STAMP_STRUCT frameStamp; // record. framestramp for that frame,playback
4713 
4714 
4715 typedef struct
4716 {
4717  NTV2Crosspoint channelSpec; // Specify Input or Output channel for desired Frame
4718  Pointer64 videoBuffer; // Keep 64 bit aligned for performance reasons
4720  ULWord videoDmaOffset; // Must be initialized, 64 bit aligned
4721  Pointer64 audioBuffer; // Keep 64 bit aligned for performance reasons
4723  ULWord audioStartSample; // To ensure correct alignment in audio buffer .. NOT USED in Windows... audio now always starts at sample zero.
4724  ULWord audioNumChannels; // 1-6 NOTE!!! only 6 supported at this time
4725  ULWord frameRepeatCount; // NOTE!!! not supported yet.
4726  RP188_STRUCT rp188; // Ignored if withRP188 is false
4727  LWord desiredFrame; // -1 if you want driver to find next available
4728  ULWord hUser; // A user cookie returned by frame stamp
4729  ULWord transferFlags; // disableAudioDMA is no longer used
4730  BOOL_ bDisableExtraAudioInfo; // No 24 byte 0 at front or size info in buffer
4731  NTV2FrameBufferFormat frameBufferFormat; // Should be initialized, but can be overridden
4736  // The following params are for cases when you need to DMA multiple discontiguous "segments" of a video frame. One example
4737  // would be when a frame in Host memory is not "packed", i.e. there are extra "padding" bytes at the end of each row.
4738  // In this case you would set videoBufferSize to the number of active bytes per row, videoNumSegments to the number of rows,
4739  // and videoSegmentHostPitch to the number of bytes from the beginning of one row to the next. In this example,
4740  // videoSegmentCardPitch would be equal to videoBufferSize (i.e. the frame is packed in board memory).
4741  // Another example would be DMAing a sub-section of a frame. In this case set videoBufferSize to the number of bytes in
4742  // one row of the subsection, videoNumSegments to the number of rows in the subsection, videoSegmentHostPitch to the rowBytes
4743  // of the entire frame in Host Memory, and videoSegmentCardPitch to the rowBytes of the entire frame in board memory.
4744  // Note: setting videoNumSegments to 0 or 1 defaults to original behavior (i.e. DMA one complete packed frame)
4745  ULWord videoNumSegments; // Number of segments of size videoBufferSize to DMA (i.e. numLines)
4746  ULWord videoSegmentHostPitch; // Offset (in bytes) between the beginning of one host segment and the beginning of the next host segment (i.e. host rowBytes)
4747  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)
4748  NTV2QuarterSizeExpandMode videoQuarterSizeExpand; // Turns on the "quarter-size expand" (2x H + 2x V) hardware
4750 
4751 
4753 {
4754  NTV2Crosspoint channelSpec; // specify Input or Output channel for desired Frame
4755  ULWord * videoBuffer; // Keep 64 bit aligned for performance reasons
4757  ULWord videoDmaOffset; // must be initialized, 64 bit aligned
4758  ULWord * 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
4786 
4787  #if !defined (NTV2_BUILDING_DRIVER)
4788  public:
4790  #endif // user-space clients only
4792 
4793 
4794 typedef struct
4795 {
4796  NTV2Crosspoint channelSpec; // Specify Input or Output channel for desired Frame
4797  ULWord * POINTER_32 videoBuffer; // Keep 64 bit aligned for performance reasons
4799  ULWord videoDmaOffset; // Must be initialized, 64 bit aligned
4800  ULWord * POINTER_32 audioBuffer; // Keep 64 bit aligned for performance reasons
4802  ULWord audioStartSample; // To ensure correct alignment in audio buffer .. NOT USED in Windows... audio now always starts at sample zero.
4803  ULWord audioNumChannels; // 1-6 NOTE!!! only 6 supported at this time
4804  ULWord frameRepeatCount; // NOTE!!! not supported yet.
4805  RP188_STRUCT rp188; // Ignored if withRP188 is false
4806  LWord desiredFrame; // -1 if you want driver to find next available
4807  ULWord hUser; // A user cookie returned by frame stamp
4808  ULWord transferFlags; // disableAudioDMA is no longer used
4809  BOOL_ bDisableExtraAudioInfo; // No 24 byte 0 at front or size info in buffer .. NOT USED in Windows, extra audio no longer supported
4810  NTV2FrameBufferFormat frameBufferFormat; // Should be initialized, but can be overridden
4815  // The following params are for cases when you need to DMA multiple discontiguous "segments" of a video frame. One example
4816  // would be when a frame in Host memory is not "packed", i.e. there are extra "padding" bytes at the end of each row.
4817  // In this case you would set videoBufferSize to the number of active bytes per row, videoNumSegments to the number of rows,
4818  // and videoSegmentHostPitch to the number of bytes from the beginning of one row to the next. In this example,
4819  // videoSegmentCardPitch would be equal to videoBufferSize (i.e. the frame is packed in board memory).
4820  // Another example would be DMAing a sub-section of a frame. In this case set videoBufferSize to the number of bytes in
4821  // one row of the subsection, videoNumSegments to the number of rows in the subsection, videoSegmentHostPitch to the rowBytes
4822  // of the entire frame in Host Memory, and videoSegmentCardPitch to the rowBytes of the entire frame in board memory.
4823  // Note: setting videoNumSegments to 0 or 1 defaults to original behavior (i.e. DMA one complete packed frame)
4824  ULWord videoNumSegments; // Number of segments of size videoBufferSize to DMA (i.e. numLines)
4825  ULWord videoSegmentHostPitch; // Offset (in bytes) between the beginning of one host segment and the beginning of the next host segment (i.e. host rowBytes)
4826  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)
4827  NTV2QuarterSizeExpandMode videoQuarterSizeExpand; // Turns on the "quarter-size expand" (2x H + 2x V) hardware
4829 
4830 
4831 // Structure for autocirculate peer to peer transfers. For p2p target specify kTransferFlagP2PPrepare
4832 // for completion using kTransferFlagP2PComplete or kTransferFlagP2PTarget for completion with message transfer.
4833 // Autocirculate will write an AUTOCIRCULATE_P2P_STRUCT to the video buffer specified to the target. Pass this
4834 // buffer as the video buffer to the autocirculate p2p source (kTransferFlagP2PTransfer) to do the p2p transfer.
4835 // For completion with kTransferFlagP2PComplete specify the transferFrame from the kTransferFlagP2PPrepare.
4836 typedef struct
4837 {
4838  ULWord p2pSize; // size of p2p structure
4839  ULWord p2pflags; // p2p transfer flags
4840  ULWord64 videoBusAddress; // frame buffer bus address
4841  ULWord64 messageBusAddress; // message register bus address (0 if not required)
4842  ULWord videoBusSize; // size of the video aperture (bytes)
4843  ULWord messageData; // message data (write to message bus address to complete video transfer)
4845 
4846 
4847 #define AUTOCIRCULATE_TASK_VERSION 0x00000001
4848 #define AUTOCIRCULATE_TASK_MAX_TASKS 128
4849 
4853 typedef enum
4854 {
4856  eAutoCircTaskRegisterWrite, // AutoCircRegisterTask
4857  eAutoCircTaskRegisterRead, // AutoCircRegisterTask
4858  eAutoCircTaskTimeCodeWrite, // AutoCircTimeCodeTask
4859  eAutoCircTaskTimeCodeRead, // AutoCircTimeCodeTask
4862 
4863 
4864 #define NTV2_IS_VALID_TASK_TYPE(_x_) ((_x_) > eAutoCircTaskNone && (_x_) < MAX_NUM_AutoCircTaskTypes)
4865 
4866 #define NTV2_IS_REGISTER_READ_TASK(_x_) ((_x_) == eAutoCircTaskRegisterRead)
4867 #define NTV2_IS_REGISTER_WRITE_TASK(_x_) ((_x_) == eAutoCircTaskRegisterWrite)
4868 #define NTV2_IS_REGISTER_TASK(_x_) (NTV2_IS_REGISTER_WRITE_TASK (_x_) || NTV2_IS_REGISTER_READ_TASK (_x_))
4869 
4870 #define NTV2_IS_TIMECODE_READ_TASK(_x_) ((_x_) == eAutoCircTaskTimeCodeRead)
4871 #define NTV2_IS_TIMECODE_WRITE_TASK(_x_) ((_x_) == eAutoCircTaskTimeCodeWrite)
4872 #define NTV2_IS_TIMECODE_TASK(_x_) (NTV2_IS_TIMECODE_WRITE_TASK (_x_) || NTV2_IS_TIMECODE_READ_TASK (_x_))
4873 
4874 
4875 typedef struct
4876 {
4882 
4883 typedef struct
4884 {
4904 
4905 typedef struct AutoCircGenericTask
4906 {
4908  union
4909  {
4912  } u;
4913 
4914  #if !defined (NTV2_BUILDING_DRIVER)
4915  public:
4916  AJAExport explicit AutoCircGenericTask () {u.registerTask.regNum = u.registerTask.mask = u.registerTask.shift = u.registerTask.value = 0;}
4918  #endif // user-space clients only
4920 
4921 typedef struct
4922 {
4933 
4935 {
4945  #if !defined (NTV2_BUILDING_DRIVER)
4946  public:
4948  #endif // user-space clients only
4950 
4951 typedef struct
4952 {
4963 
4964 
4965 // Information about the currently programmed Xilinx .bit file
4966 #define NTV2_BITFILE_DATETIME_STRINGLENGTH (16)
4967 #define NTV2_BITFILE_DESIGNNAME_STRINGLENGTH (100)
4968 #define NTV2_BITFILE_PARTNAME_STRINGLENGTH (16)
4969 // Increment this when you change the bitfile information structure
4970 // And be sure to update the driver so it can handle the new version.
4971 #define NTV2_BITFILE_STRUCT_VERSION (4)
4972 
4973 // There is room for up to 4kbytes after the audio in the last frame,
4974 // but a 4KB data struct overflows the stack in the ioctl routine in
4975 // the driver under Linux.
4976 //#define NTV2_BITFILE_RESERVED_ULWORDS (244)
4977 //#define NTV2_BITFILE_RESERVED_ULWORDS (243) // added bitFileType
4978 //#define NTV2_BITFILE_RESERVED_ULWORDS (239) // added designName
4979 //#define NTV2_BITFILE_RESERVED_ULWORDS (235) // added partName
4980 #define NTV2_BITFILE_RESERVED_ULWORDS (234) // added whichFPGA
4981 
4982 typedef struct {
4983  ULWord checksum; // Platform-dependent. Deprecated on Linux.
4984  ULWord structVersion; // Version of this structure
4985  ULWord structSize; // Total size of this structure
4986 
4987  ULWord numBytes; // Xilinx bitfile bytecount
4988  char dateStr[NTV2_BITFILE_DATETIME_STRINGLENGTH]; // Date Xilinx bitfile compiled
4989  char timeStr[NTV2_BITFILE_DATETIME_STRINGLENGTH]; // Time Xilinx bitfile compiled
4991 
4992  ULWord bitFileType; // NTV2BitfileType
4993 
4994  char partNameStr[NTV2_BITFILE_PARTNAME_STRINGLENGTH]; // Part name (v4)
4996 
4998 
5000 
5001 
5002 typedef struct {
5004  ULWord dmaFlags; // flags passed into DMA currently bit 1 is set for to indicate weird 4096 10bit YUV 4K frame
5005 
5006  Pointer64 dmaHostBuffer; // vitrual address of host buffer
5007  ULWord dmaSize; // number of bytes to DMA
5008  ULWord dmaCardFrameNumber; // card frame number
5009  ULWord dmaCardFrameOffset; // offset (in bytes) into card frame to begin DMA
5010  ULWord dmaNumberOfSegments; // number of segments of size videoBufferSize to DMA
5011  ULWord dmaSegmentSize; // size of each segment (if videoNumSegments > 1)
5012  ULWord dmaSegmentHostPitch; // offset (in bytes) between the beginning of one host-memory segment and the beginning of the next host-memory segment
5013  ULWord dmaSegmentCardPitch; // offset (in bytes) between the beginning of one Kona-memory segment and the beginning of the next Kona-memory segment
5014 
5015  BOOL_ dmaToCard; // direction of DMA transfer
5016 
5018 
5019 
5020 // NOTE: Max bitfilestruct size was NTV2_AUDIO_READBUFFEROFFSET - NTV2_AUDIO_WRAPADDRESS
5021 // but is now practically unlimited.
5022 
5023 // The following structure is used to retrieve the timestamp values of the last video
5024 // interrupts. Use GetInterruptTimeStamps(&
5025 typedef struct {
5030 
5031 // System status calls and structs associated with specific opcodes
5032 
5033 typedef enum
5034 {
5035  SSC_GetFirmwareProgress, // return firmware progress informaiton
5036  SSC_End // end of list
5038 
5039 typedef enum
5040 {
5057 } ProgramState;
5058 
5059 typedef enum {
5069 } ProgramCommand;
5070 
5071 typedef struct {
5076 
5077 // System control calls and structs associated with specific opcodes
5078 
5079 typedef enum
5080 {
5081  SCC_Test, // just a test for now
5082  SCC_End // end of list
5084 
5085 typedef struct {
5086  ULWord param1; // test parameter 1
5087  ULWord param2; // test parameter 2
5088 } SCC_TEST_STRUCT;
5089 
5090 
5091 // Build information
5092 #define NTV2_BUILD_STRINGLENGTH (1024)
5093 #define NTV2_BUILD_STRUCT_VERSION (0)
5094 
5095 #define NTV2_BUILD_RESERVED_BYTES (1016)
5096 
5097 typedef struct {
5098  ULWord structVersion; // Version of this structure
5099  ULWord structSize; // Total size of this structure
5100 
5101  char buildStr[NTV2_BUILD_STRINGLENGTH]; // User-defined build string
5102  unsigned char reserved[NTV2_BUILD_RESERVED_BYTES];
5103 
5105 
5106 
5107 #ifdef AJAMac
5108 #pragma options align=reset
5109 #endif
5110 
5111  // used to filter the vout menu display
5112 typedef enum
5113 {
5114  kUndefinedFilterFormats = 0, // Undefined
5115  kDropFrameFormats = BIT(0), // 23.98 / 29.97 / 59.94
5116  kNonDropFrameFormats = BIT(1), // 24 / 30 / 60
5117  kEuropeanFormats = BIT(2), // 25 / 50
5118  k1080ProgressiveFormats = BIT(3), // 1080p 23.98/24/29.97/30 (exclude 1080psf)
5119  kREDFormats = BIT(4), // RED's odd geometries
5120  k2KFormats = BIT(5), // 2K formats
5121  k4KFormats = BIT(6) // 4K formats
5122 
5124 
5125 // STUFF moved from ntv2macinterface.h that is now common
5127 {
5128  kDesktopFBIniting = 0, // waiting for Finder? Window Mgr? to discover us
5129  kDesktopFBOff = 1, // Running - not in use
5130  kDesktopFBOn = 2 // Running - in-use as Mac Desktop
5131 
5133 
5134 
5136 {
5139 
5141 
5142 
5143 #if !defined(R2_DEPRECATED)
5144 
5145 typedef enum TimelapseUnits
5146 {
5147  kTimelapseFrames = 0, // frames
5148  kTimelapseSeconds = 1, // seconds
5149  kTimelapseMinutes = 2, // minutes
5150  kTimelapseHours = 3 // hours
5151 
5152 } TimelapseUnits;
5153 
5154 typedef enum
5155 {
5156  kDefaultModeDesktop, // deprecated
5158  kDefaultModeBlack, // deprecated
5163 
5164 typedef enum
5165 {
5171  kHDMIOutCSCYCbCr8bit, // deprecated
5174 
5175 typedef enum
5176 {
5182 
5183 typedef enum
5184 {
5190 
5192 
5194 {
5201 };
5202 
5203 // deprecated - NTV2TestPatternSelect
5204 // note: this order mimics (somewhat) that of NTV2TestPatternSelect in "ntv2testpatterngen.h"
5205 typedef enum
5206 {
5210  kTestPatternMultiburst, // Mulitburst
5211  kTestPatternLinesweep, // Line Sweep
5212  kTestPatternPathological, // Pathological
5213  kTestPatternFlatField, // Flat Field (50%)
5214  kTestPatternMultiPattern, // a swath of everything
5217  kTestPatternCustom // Custom ("Load File...")
5218 
5220 
5221 
5222 #endif //R2_DEPRECATED
5223 
5224 
5225 
5226 typedef enum
5227 {
5228  kRP188SourceEmbeddedLTC = 0x0, // NOTE these values are same as RP188 DBB channel select
5233 
5234 
5235 // Masks
5236 enum
5237 {
5238  // kRegUserState1
5239  kMaskInputFormatSelect = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7),
5240  kMaskPrimaryFormatSelect = BIT(8) + BIT(9) + BIT(10) + BIT(11) + BIT(12) + BIT(13) + BIT(14) + BIT(15),
5241  kMaskSecondaryFormatSelect = BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23),
5243  kMaskAnalogInputType = BIT(28) + BIT(29) + BIT(30) + BIT(31),
5244 
5245  //kRegIoHDGlobalStatus
5247 
5248  // kRegIoHDGlobalControl
5249  kMaskStandAloneMode = BIT(0) + BIT(1) + BIT(2),
5250  kMaskDisplayMode = BIT(4) + BIT(5) + BIT(6) + BIT(7),
5251  kMaskDisplayModeTCType = BIT(8) + BIT(9) + BIT(10) + BIT(11), // TimecodeFormat - when set to zero, Timecode type follows primary format
5252 
5253  // kVRegStartupStatusFlags
5257 };
5258 
5259 // isoch streams (channels)
5261 {
5262  kStartPhase1 = 1, // These start out at 1 because they become a bit setting
5264 };
5265 
5266 typedef enum
5267 {
5270 } IoHDDisplayMode;
5271 
5272 #define KONA_DEBUGFILTER_STRINGLENGTH 128
5273 typedef struct
5274 {
5275  char includeString[KONA_DEBUGFILTER_STRINGLENGTH];
5276  char excludeString[KONA_DEBUGFILTER_STRINGLENGTH];
5278 
5279 
5280 typedef enum
5281 {
5292  maskSyncro = BIT(24) + BIT(25),
5300  maskField1CutoffLine = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) + BIT(8) + BIT(9) + BIT(10),
5302  maskField2CutoffLine = BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23) + BIT(24) + BIT(25) + BIT(26),
5304  maskTotalBytesIn = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) +
5305  BIT(8) + BIT(9) + BIT(10) + BIT(11) + BIT(12) + BIT(13) + BIT(14) + BIT(15) +
5306  BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23),
5310  maskField1BytesIn = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) +
5311  BIT(8) + BIT(9) + BIT(10) + BIT(11) + BIT(12) + BIT(13) + BIT(14) + BIT(15) +
5312  BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23),
5316  maskField2BytesIn = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) +
5317  BIT(8) + BIT(9) + BIT(10) + BIT(11) + BIT(12) + BIT(13) + BIT(14) + BIT(15) +
5318  BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23),
5322  maskField1StartLine = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) + BIT(8) + BIT(9) + BIT(10),
5324  maskField2StartLine = BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23) + BIT(24) + BIT(25) + BIT(26),
5326  maskTotalFrameLines = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) + BIT(8) + BIT(9) + BIT(10),
5328  maskFIDHi = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) + BIT(8) + BIT(9) + BIT(10),
5330  maskFIDLow = BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23) + BIT(24) + BIT(25) + BIT(26),
5332  maskPktIgnore_1_5_9_13_17 = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7),
5334  maskPktIgnore_2_6_10_14_18 = BIT(8) + BIT(9) + BIT(10) + BIT(11) + BIT(12) + BIT(13) + BIT(14) + BIT(15),
5336  maskPktIgnore_3_7_11_15_19 = BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23),
5338  maskPktIgnore_4_8_12_16_20 = BIT(24) + BIT(25) + BIT(26) + BIT(27) + BIT(28) + BIT(29) + BIT(30) + BIT(31),
5340  maskField1AnalogStartLine = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) + BIT(8) + BIT(9) + BIT(10),
5342  maskField2AnalogStartLine = BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23) + BIT(24) + BIT(25) + BIT(26),
5344 } ANCExtMaskShift;
5345 
5346 typedef enum
5347 {
5349  regAncExtControl = regAncExt_FIRST, // Reg 0 - Control register
5350  regAncExtField1StartAddress, // Reg 1 - f1_start_address[31:0]
5351  regAncExtField1EndAddress, // Reg 2 - f1_end_address[31:0]
5352  regAncExtField2StartAddress, // Reg 3 - f2_start_addr[31:0]
5353  regAncExtField2EndAddress, // Reg 4 - f2_end_address[31:0]
5354  regAncExtFieldCutoffLine, // Reg 5 - f2_cutoff_line[10:0], f1_cutoff_line[10:0]
5355  regAncExtTotalStatus, // Reg 6 - mem_sz_overrun, total_bytes[15:0]
5356  regAncExtField1Status, // Reg 7 - mem_sz_overrun_f1, total_bytes_f1[15:0]
5357  regAncExtField2Status, // Reg 8 - mem_sz_overrun_f2, total_bytes_f2[15:0]
5358  regAncExtFieldVBLStartLine, // Reg 9 - f2_vbl_start[10:0], f1_vbl_start[10:0]
5359  regAncExtTotalFrameLines, // Reg 10 - total_lines[10:0]
5360  regAncExtFID, // Reg 11 - fid_low[10:0], fid_hi[10:0]
5361  regAncExtIgnorePacketReg_1_2_3_4, // Reg 12 - Packet Ignore bytes
5363  regAncExtIgnorePacketReg_5_6_7_8, // Reg 13 - Packet Ignore bytes
5364  regAncExtIgnorePacketReg_9_10_11_12, // Reg 14 - Packet Ignore bytes
5365  regAncExtIgnorePacketReg_13_14_15_16, // Reg 15 - Packet Ignore bytes
5366  regAncExtIgnorePacketReg_17_18_19_20, // Reg 16 - Packet Ignore bytes
5368  regAncExtAnalogStartLine, // Reg 17 - analog_start_line[10:0]
5369  regAncExtField1AnalogYFilter, // Reg 18 - analog_line_y_f1[31:0] - one bit per F1 line past analog_start_line, 1=captureAnalogY, 0=normal
5370  regAncExtField2AnalogYFilter, // Reg 19 - analog_line_y_f2[31:0] - one bit per F2 line past analog_start_line, 1=captureAnalogY, 0=normal
5371  regAncExtField1AnalogCFilter, // Reg 20 - analog_line_c_f1[31:0] - one bit per F1 line past analog_start_line, 1=captureAnalogC, 0=normal
5372  regAncExtField2AnalogCFilter, // Reg 21 - analog_line_c_f2[31:0] - one bit per F2 line past analog_start_line, 1=captureAnalogC, 0=normal
5373  regAncExtTwoFrameCadenceDetect, // Reg 22 - not used in NTV2
5374  regAncExtRP188Type, // Reg 23 - not used in NTV2
5375  regAncExtTimecodeStatus0_31, // Reg 24 - not used in NTV2
5376  regAncExtTimecodeStatus32_63, // Reg 25 - not used in NTV2
5377  regAncExtTimecodeStatusDBB, // Reg 26 - not used in NTV2
5378  regAncExtAnalogActiveLineLength, // Reg 27 - analog active line length
5380 } ANCExtRegisters;
5381 
5382 typedef enum
5383 {
5405 } ANCInsRegisters;
5406 
5407 typedef enum
5408 {
5409  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),
5411  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),
5429  maskInsHancDelay = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) + BIT(8) + BIT(9),
5431  maskInsVancDelay = BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23) + BIT(24) + BIT(25) + BIT(26),
5433  maskInsField1FirstActive = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) + BIT(8) + BIT(9) + BIT(10),
5435  maskInsField2FirstActive = BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23) + BIT(24) + BIT(25) + BIT(26),
5437  maskInsActivePixelsInLine = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) + BIT(8) + BIT(9) + BIT(10),
5439  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),
5441  maskInsTotalLinesPerFrame = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) + BIT(8) + BIT(9) + BIT(10),
5443  maskInsFieldIDHigh = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) + BIT(8) + BIT(9) + BIT(10),
5445  maskInsFieldIDLow = BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23) + BIT(24) + BIT(25) + BIT(26),
5447 
5448 } ANCInsMaskShift;
5449 
5450 // HDMI AUX extractor registers
5451 typedef enum
5452 {
5454  regAuxExtControl = regAuxExt_FIRST, // Reg 0 - filter_inv[29], dis_mem_wr[28], syncro[25:24], prog[16]
5455  regAuxExtField1StartAddress, // Reg 1 - f1_start_address[31:0]
5456  regAuxExtField1EndAddress, // Reg 2 - f1_end_address[31:0]
5457  regAuxExtField2StartAddress, // Reg 3 - f2_start_addr[31:0]
5458  regAuxExt4, // Reg 4
5459  regAuxExt5, // Reg 5
5460  regAuxExtTotalStatus, // Reg 6 - mem_sz_overrun[28], total_bytes[23:0]
5461  regAuxExtField1Status, // Reg 7 - mem_sz_overrun_f1[28], total_bytes_f1[23:0]
5462  regAuxExtField2Status, // Reg 8 - mem_sz_overrun_f2[28], total_bytes_f2[23:0]
5463  regAuxExtFieldVBLStartLine, // Reg 9 - f2_vbl_start[27:16], f1_vbl_start[11:0]
5464  regAuxExtTotalFrameLines, // Reg 10 - total_lines[11:0]
5465  regAuxExtFID, // Reg 11 - fid_low[27:16], fid_hi[11:0]
5466  regAuxExtPacketMask0, // Reg 12 - Packet Ignore bytes
5468  regAuxExtPacketMask1, // Reg 13 - Packet Ignore bytes
5469  regAuxExtPacketMask2, // Reg 14 - Packet Ignore bytes
5470  regAuxExtPacketMask3, // Reg 15 - Packet Ignore bytes
5472  regAuxExtFillData, // Reg 16 - Buffer fill data
5474 } AUXExtRegisters;
5475 
5476 typedef enum
5477 {
5478  // regAuxExtControl
5481  maskAuxSyncro = BIT(24) + BIT(25),
5487  // regAuxExtField1StartAddress, regAuxExtField1EndAddress, regAuxExtField2StartAddress
5488  maskAuxTotalBytesIn = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) +
5489  BIT(8) + BIT(9) + BIT(10) + BIT(11) + BIT(12) + BIT(13) + BIT(14) + BIT(15) +
5490  BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23),
5492  // regAuxExtTotalStatus
5495  // regAuxExtField1Status, regAuxExtField2Status
5496  maskAuxFieldBytesIn = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7) +
5497  BIT(8) + BIT(9) + BIT(10) + BIT(11) + BIT(12) + BIT(13) + BIT(14) + BIT(15) +
5498  BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23),
5502  // regAuxExtFieldVBLStartLine
5503  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),
5505  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),
5507  // regAuxExtTotalFrameLines
5508  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),
5510  // regAuxExtFID
5511  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),
5513  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),
5515  // regAuxExtPacketMask0, regAuxExtPacketMask1, regAuxExtPacketMask2, regAuxExtPacketMask3
5516  maskAuxPacket0 = BIT(0) + BIT(1) + BIT(2) + BIT(3) + BIT(4) + BIT(5) + BIT(6) + BIT(7),
5518  maskAuxPacket1 = BIT(8) + BIT(9) + BIT(10) + BIT(11) + BIT(12) + BIT(13) + BIT(14) + BIT(15),
5520  maskAuxPacket2 = BIT(16) + BIT(17) + BIT(18) + BIT(19) + BIT(20) + BIT(21) + BIT(22) + BIT(23),
5522  maskAuxPacket3 = BIT(24) + BIT(25) + BIT(26) + BIT(27) + BIT(28) + BIT(29) + BIT(30) + BIT(31),
5524 } AUXExtMaskShift;
5525 
5526 
5527 // Driver Version ULWord encode/decode macros
5528 // Introduced in SDK 15.0
5529 // Common ULWord format on all platforms:
5530 //
5531 // 3 2 1
5532 // 10987654321098765432109876543210
5533 // TTXMMMMMMMmmmmmmPPPPPPbbbbbbbbbb
5534 //
5535 // MMMMMMM: [28:22] major version number (7 bits, 0-127)
5536 // mmmmmm: [21:16] minor version number (6 bits, 0-63)
5537 // PPPPPP: [15:10] point release number (6 bits, 0-63)
5538 // bbbbbbbbbb: [9:0] build number (10 bits, 0-1023)
5539 // TT: [31:30] build type (0=release, 1=beta, 2=alpha, 3=dev)
5540 #if defined(__CPLUSPLUS__) || defined(__cplusplus)
5541  #define NTV2DriverVersionEncode(__maj__, __min__, __pt__, __bld__) ((ULWord(__maj__) & 0x0000007F) << 22) \
5542  | ((ULWord(__min__) & 0x0000003F) << 16) \
5543  | ((ULWord(__pt__ ) & 0x0000003F) << 10) \
5544  | ((ULWord(__bld__) & 0x000003FF) << 0)
5545  #define NTV2DriverVersionDecode_Major(__vers__) ((ULWord(__vers__) >> 22) & 0x0000007F)
5546  #define NTV2DriverVersionDecode_Minor(__vers__) ((ULWord(__vers__) >> 16) & 0x0000003F)
5547  #define NTV2DriverVersionDecode_Point(__vers__) ((ULWord(__vers__) >> 10) & 0x0000003F)
5548  #define NTV2DriverVersionDecode_Build(__vers__) ((ULWord(__vers__) >> 0) & 0x000003FF)
5549 #else
5550  #define NTV2DriverVersionEncode(__maj__, __min__, __pt__, __bld__) (((ULWord)(__maj__) & 0x0000007F) << 22) \
5551  | (((ULWord)(__min__) & 0x0000003F) << 16) \
5552  | (((ULWord)(__pt__ ) & 0x0000003F) << 10) \
5553  | (((ULWord)(__bld__) & 0x000003FF) << 0)
5554  #define NTV2DriverVersionDecode_Major(__vers__) (((ULWord)(__vers__) >> 22) & 0x0000007F)
5555  #define NTV2DriverVersionDecode_Minor(__vers__) (((ULWord)(__vers__) >> 16) & 0x0000003F)
5556  #define NTV2DriverVersionDecode_Point(__vers__) (((ULWord)(__vers__) >> 10) & 0x0000003F)
5557  #define NTV2DriverVersionDecode_Build(__vers__) (((ULWord)(__vers__) >> 0) & 0x000003FF)
5558 #endif
5559 #define NTV2DriverVersionBuildTypeToOrdinal(__ch__) ((__ch__) == 'd' ? 3UL : ((__ch__) == 'a' ? 2UL : ((__ch__) == 'b' ? 1UL : 0UL)))
5560 #define NTV2DriverVersionEncodedBuildType (NTV2DriverVersionBuildTypeToOrdinal(AJA_NTV2_SDK_BUILD_TYPE[0]) << 30)
5561 
5562 // Pack/Unpack SDK version in & out of ULWord:
5563 #define NTV2SDKVersionEncode NTV2DriverVersionEncode
5564 #define NTV2SDKVersionDecode_Major NTV2DriverVersionDecode_Major
5565 #define NTV2SDKVersionDecode_Minor NTV2DriverVersionDecode_Minor
5566 #define NTV2SDKVersionDecode_Point NTV2DriverVersionDecode_Point
5567 #define NTV2SDKVersionDecode_Build NTV2DriverVersionDecode_Build
5568 
5569 
5571 
5572  #if AJATargetBigEndian
5573  #if defined(__CPLUSPLUS__) || defined(__cplusplus)
5574  #define NTV2_4CC(_str_) ( (uint32_t((UByte*(_str_))[0]) << 0) | \
5575  (uint32_t((UByte*(_str_))[1]) << 8) | \
5576  (uint32_t((UByte*(_str_))[2]) << 16) | \
5577  (uint32_t((UByte*(_str_))[3]) << 24))
5578 
5579  #define NTV2_FOURCC(_a_,_b_,_c_,_d_) ( ((uint32_t(_a_)) << 0) | \
5580  ((uint32_t(_b_)) << 8) | \
5581  ((uint32_t(_c_)) << 16) | \
5582  ((uint32_t(_d_)) << 24))
5583  #if !defined (NTV2_BUILDING_DRIVER)
5584  #define NTV2_4CC_AS_STRING(_x_) std::string (1, ((_x_) & 0x000000FF) >> 0) + \
5585  std::string (1, ((_x_) & 0x0000FF00) >> 8) + \
5586  std::string (1, ((_x_) & 0x00FF0000) >> 16) + \
5587  std::string (1, ((_x_) & 0xFF000000) >> 24)
5588  #endif // !defined (NTV2_BUILDING_DRIVER)
5589  #else
5590  #define NTV2_4CC(_str_) ( ((uint32_t)(((UByte *)(_str_))[0]) << 0) | \
5591  ((uint32_t)(((UByte *)(_str_))[1]) << 8) | \
5592  ((uint32_t)(((UByte *)(_str_))[2]) << 16) | \
5593  ((uint32_t)(((UByte *)(_str_))[3]) << 24))
5594 
5595  #define NTV2_FOURCC(_a_,_b_,_c_,_d_) ( (((uint32_t)(_a_)) << 0) | \
5596  (((uint32_t)(_b_)) << 8) | \
5597  (((uint32_t)(_c_)) << 16) | \
5598  (((uint32_t)(_d_)) << 24))
5599  #endif // C
5600  #else
5601  #if defined(__CPLUSPLUS__) || defined(__cplusplus)
5602  #define NTV2_4CC(_str_) ( (uint32_t((UByte*(_str_))[3]) << 0) | \
5603  (uint32_t((UByte*(_str_))[2]) << 8) | \
5604  (uint32_t((UByte*(_str_))[1]) << 16) | \
5605  (uint32_t((UByte*(_str_))[0]) << 24))
5606 
5607  #define NTV2_FOURCC(_a_,_b_,_c_,_d_) ( ((uint32_t(_a_)) << 24) | \
5608  ((uint32_t(_b_)) << 16) | \
5609  ((uint32_t(_c_)) << 8) | \
5610  ((uint32_t(_d_)) << 0) )
5611  #if !defined (NTV2_BUILDING_DRIVER)
5612  #define NTV2_4CC_AS_STRING(_x_) std::string(1, char((uint32_t(_x_) & 0xFF000000) >> 24)) + \
5613  std::string(1, char((uint32_t(_x_) & 0x00FF0000) >> 16)) + \
5614  std::string(1, char((uint32_t(_x_) & 0x0000FF00) >> 8)) + \
5615  std::string(1, char((uint32_t(_x_) & 0x000000FF) >> 0))
5616  #endif // !defined (NTV2_BUILDING_DRIVER)
5617  #else
5618  #define NTV2_4CC(_str_) ( ((uint32_t)(((UByte *)(_str_))[3]) << 0) | \
5619  ((uint32_t)(((UByte *)(_str_))[2]) << 8) | \
5620  ((uint32_t)(((UByte *)(_str_))[1]) << 16) | \
5621  ((uint32_t)(((UByte *)(_str_))[0]) << 24))
5622 
5623  #define NTV2_FOURCC(_a_,_b_,_c_,_d_) ( (((uint32_t)(_a_)) << 24) | \
5624  (((uint32_t)(_b_)) << 16) | \
5625  (((uint32_t)(_c_)) << 8) | \
5626  (((uint32_t)(_d_)) << 0) )
5627  #endif // C
5628  #endif // else Little-Endian
5629 
5630 
5631  #define NTV2_CURRENT_HEADER_VERSION 0
5632  #define NTV2_CURRENT_TRAILER_VERSION 0
5633 
5634  #define AUTOCIRCULATE_STRUCT_VERSION 0
5635 
5636  #define NTV2_HEADER_TAG NTV2_FOURCC ('N', 'T', 'V', '2')
5637  #define NTV2_TRAILER_TAG NTV2_FOURCC ('n', 't', 'v', '2')
5638 
5639  #define NTV2_IS_VALID_HEADER_TAG(_x_) ((_x_) == NTV2_HEADER_TAG)
5640  #define NTV2_IS_VALID_TRAILER_TAG(_x_) ((_x_) == NTV2_TRAILER_TAG)
5641 
5642  #define NTV2_TYPE_VIRTUAL_DATA_RW NTV2_FOURCC ('v', 'd', 'a', 't')
5643  #define NTV2_TYPE_BANKGETSET NTV2_FOURCC ('b', 'n', 'k', 'S')
5644  #define NTV2_TYPE_ACCONTROL NTV2_FOURCC ('c', 'o', 'n', 't')
5645  #define NTV2_TYPE_ACSTATUS NTV2_FOURCC ('s', 't', 'a', 't')
5646  #define NTV2_TYPE_ACXFER NTV2_FOURCC ('x', 'f', 'e', 'r')
5647  #define NTV2_TYPE_ACXFERSTATUS NTV2_FOURCC ('x', 'f', 's', 't')
5648  #define NTV2_TYPE_ACTASK NTV2_FOURCC ('t', 'a', 's', 'k')
5649  #define NTV2_TYPE_ACFRAMESTAMP NTV2_FOURCC ('s', 't', 'm', 'p')
5650  #define NTV2_TYPE_GETREGS NTV2_FOURCC ('r', 'e', 'g', 'R')
5651  #define NTV2_TYPE_SETREGS NTV2_FOURCC ('r', 'e', 'g', 'W')
5652  #define NTV2_TYPE_SDISTATS NTV2_FOURCC ('s', 'd', 'i', 'S')
5653  #define NTV2_TYPE_AJADEBUGLOGGING NTV2_FOURCC ('d', 'b', 'l', 'g')
5654  #define NTV2_TYPE_AJABUFFERLOCK NTV2_FOURCC ('b', 'f', 'l', 'k')
5655  #define NTV2_TYPE_AJABITSTREAM NTV2_FOURCC ('b', 't', 's', 't')
5656  #define NTV2_TYPE_AJASTREAMCHANNEL NTV2_FOURCC ('s', 't', 'c', 'h')
5657  #define NTV2_TYPE_AJASTREAMBUFFER NTV2_FOURCC ('s', 't', 'b', 'u')
5658  #define NTV2_TYPE_AJAMAILBUFFER NTV2_FOURCC ('m', 'a', 'i', 'l')
5659  #if defined(NTV2_DEPRECATE_16_3)
5660  #define AUTOCIRCULATE_TYPE_STATUS NTV2_TYPE_ACSTATUS
5661  #define AUTOCIRCULATE_TYPE_XFER NTV2_TYPE_ACXFER
5662  #define AUTOCIRCULATE_TYPE_XFERSTATUS NTV2_TYPE_ACXFERSTATUS
5663  #define AUTOCIRCULATE_TYPE_TASK NTV2_TYPE_ACTASK
5664  #define AUTOCIRCULATE_TYPE_FRAMESTAMP NTV2_TYPE_ACFRAMESTAMP
5665  #define AUTOCIRCULATE_TYPE_GETREGS NTV2_TYPE_GETREGS
5666  #define AUTOCIRCULATE_TYPE_SETREGS NTV2_TYPE_SETREGS
5667  #define AUTOCIRCULATE_TYPE_SDISTATS NTV2_TYPE_SDISTATS
5668  #endif // defined(NTV2_DEPRECATE_16_3)
5669 
5670  #define NTV2_IS_VALID_STRUCT_TYPE(_x_) ( (_x_) == NTV2_TYPE_ACSTATUS || \
5671  (_x_) == NTV2_TYPE_ACXFER || \
5672  (_x_) == NTV2_TYPE_ACXFERSTATUS || \
5673  (_x_) == NTV2_TYPE_ACTASK || \
5674  (_x_) == NTV2_TYPE_ACFRAMESTAMP || \
5675  (_x_) == NTV2_TYPE_GETREGS || \
5676  (_x_) == NTV2_TYPE_SETREGS || \
5677  (_x_) == NTV2_TYPE_SDISTATS || \
5678  (_x_) == NTV2_TYPE_BANKGETSET || \
5679  (_x_) == NTV2_TYPE_VIRTUAL_DATA_RW || \
5680  (_x_) == NTV2_TYPE_AJADEBUGLOGGING || \
5681  (_x_) == NTV2_TYPE_AJABUFFERLOCK || \
5682  (_x_) == NTV2_TYPE_AJABITSTREAM || \
5683  (_x_) == NTV2_TYPE_AJASTREAMCHANNEL || \
5684  (_x_) == NTV2_TYPE_AJASTREAMBUFFER || \
5685  (_x_) == NTV2_TYPE_AJAMAILBUFFER)
5686 
5687  // NTV2Buffer FLAGS
5688  #define NTV2Buffer_ALLOCATED BIT(0)
5689  #define NTV2Buffer_PAGE_ALIGNED BIT(1)
5690  #define NTV2Buffer_SHARED BIT(2)
5691  #define NTV2Buffer_SHARED_GLOBAL BIT(4)
5692 
5694  #define NTV2Buffer_TO_ULWORD64(__p__) ((sizeof(int*) == 4) ? (ULWord64(ULWord64(__p__) << 32) | 0x00000000BAADF00D) : ULWord64(__p__))
5695  #if !defined(NTV2_DEPRECATE_17_0)
5696  #define NTV2_POINTER_ALLOCATED NTV2Buffer_ALLOCATED
5697  #define NTV2_POINTER_PAGE_ALIGNED NTV2Buffer_PAGE_ALIGNED
5698  #define NTV2_POINTER_TO_ULWORD64(_p_) NTV2Buffer_TO_ULWORD64(_p_)
5699  #endif // defined(NTV2_DEPRECATE_17_0)
5700 
5701 
5702  // AUTOCIRCULATE OPTION FLAGS
5703  #define AUTOCIRCULATE_WITH_RP188 BIT(0)
5704  #define AUTOCIRCULATE_WITH_LTC BIT(1)
5705  #define AUTOCIRCULATE_WITH_FBFCHANGE BIT(2)
5706  #define AUTOCIRCULATE_WITH_FBOCHANGE BIT(3)
5707  #define AUTOCIRCULATE_WITH_COLORCORRECT BIT(4)
5708  #define AUTOCIRCULATE_WITH_VIDPROC BIT(5)
5709  #define AUTOCIRCULATE_WITH_ANC BIT(6)
5710  #define AUTOCIRCULATE_WITH_AUDIO_CONTROL BIT(7)
5711  #define AUTOCIRCULATE_WITH_FIELDS BIT(8)
5712  #define AUTOCIRCULATE_WITH_HDMIAUX BIT(9)
5713  #define AUTOCIRCULATE_WITH_MULTILINK_AUDIO1 BIT(10)
5714  #define AUTOCIRCULATE_WITH_MULTILINK_AUDIO2 BIT(11)
5715  #define AUTOCIRCULATE_WITH_MULTILINK_AUDIO3 BIT(12)
5716 
5717  #define AUTOCIRCULATE_FRAME_FULL BIT(20)
5718  #define AUTOCIRCULATE_FRAME_FIELD0 BIT(21)
5719  #define AUTOCIRCULATE_FRAME_FIELD1 BIT(22)
5720 
5721  #define AUTOCIRCULATE_P2P_PREPARE BIT(28)
5722  #define AUTOCIRCULATE_P2P_COMPLETE BIT(29)
5723  #define AUTOCIRCULATE_P2P_TARGET BIT(30)
5724  #define AUTOCIRCULATE_P2P_TRANSFER BIT(31)
5725 
5726  #define DMABUFFERLOCK_LOCK BIT(0)
5727  #define DMABUFFERLOCK_UNLOCK_ALL BIT(1)
5728  #define DMABUFFERLOCK_MAP BIT(2)
5729  #define DMABUFFERLOCK_UNLOCK BIT(3)
5730  #define DMABUFFERLOCK_AUTO BIT(4)
5731  #define DMABUFFERLOCK_MANUAL BIT(5)
5732  #define DMABUFFERLOCK_MAX_SIZE BIT(6)
5733  #define DMABUFFERLOCK_RDMA BIT(7)
5734 
5735  // Bitstream flags
5736  #define BITSTREAM_WRITE BIT(0)
5737  #define BITSTREAM_FRAGMENT BIT(1)
5738  #define BITSTREAM_SWAP BIT(2)
5739  #define BITSTREAM_RESET_CONFIG BIT(3)
5740  #define BITSTREAM_RESET_MODULE BIT(4)
5741  #define BITSTREAM_READ_REGISTERS BIT(5)
5742  #define BITSTREAM_SUSPEND BIT(6)
5743  #define BITSTREAM_RESUME BIT(7)
5744 
5745  // Bitstream registers
5746  #define BITSTREAM_EXT_CAP 0
5747  #define BITSTREAM_VENDOR_HEADER 1
5748  #define BITSTREAM_JTAG_ID 2
5749  #define BITSTREAM_VERSION 3
5750  #define BITSTREAM_MCAP_STATUS 4
5751  #define BITSTREAM_MCAP_CONTROL 5
5752  #define BITSTREAM_MCAP_DATA 6
5753  #define BITSTREAM_NUM_REGISTERS 7
5754 
5755  #if !defined (NTV2_BUILDING_DRIVER)
5756  // Convenience macros for compactly formatting ostream output...
5757  #define Hex(__x__) std::hex << (__x__) << std::dec
5758  #define xHex(__x__) "0x" << Hex(__x__)
5759  #define HexN(__x__,__n__) std::hex << std::setw(int(__n__)) << (__x__) << std::dec
5760  #define xHexN(__x__,__n__) "0x" << HexN((__x__),(__n__))
5761  #define Hex0N(__x__,__n__) std::hex << std::setw(int(__n__)) << std::setfill('0') << (__x__) << std::dec << std::setfill(' ')
5762  #define xHex0N(__x__,__n__) "0x" << Hex0N((__x__),(__n__))
5763  #define HEX(__x__) std::hex << std::uppercase << (__x__) << std::dec << std::nouppercase
5764  #define xHEX(__x__) "0x" << HEX(__x__)
5765  #define HEXN(__x__,__n__) std::hex << std::uppercase << std::setw(int(__n__)) << (__x__) << std::dec << std::nouppercase
5766  #define xHEXN(__x__,__n__) "0x" << HEXN((__x__),(__n__))
5767  #define HEX0N(__x__,__n__) std::hex << std::uppercase << std::setw(int(__n__)) << std::setfill('0') << (__x__) << std::dec << std::setfill(' ') << std::nouppercase
5768  #define xHEX0N(__x__,__n__) "0x" << HEX0N((__x__),(__n__))
5769  #define DEC(__x__) std::dec << std::right << (int(__x__))
5770  #define DECN(__x__,__n__) std::dec << std::setw(int(__n__)) << std::right << (__x__)
5771  #define DEC0N(__x__,__n__) std::dec << std::setw(int(__n__)) << std::setfill('0') << std::right << (__x__) << std::dec << std::setfill(' ')
5772  #define OCT(__x__) std::oct << (__x__) << std::dec
5773  #define OCT0N(__x__,__n__) std::oct << std::setw(int(__n__)) << std::setfill('0') << (__x__) << std::dec << std::setfill(' ')
5774  #define oOCT(__x__) "o" << std::oct << (__x__) << std::dec
5775  #define oOCT0N(__x__,__n__) "o" << std::oct << std::setw(int(__n__)) << std::setfill('0') << (__x__) << std::dec << std::setfill(' ')
5776  #define BIN064(__x__) std::bitset<8>((uint64_t(__x__)&0xFF00000000000000)>>56) << "." \
5777  << std::bitset<8>((uint64_t(__x__)&0x00FF000000000000)>>48) << "." \
5778  << std::bitset<8>((uint64_t(__x__)&0x0000FF0000000000)>>40) << "." \
5779  << std::bitset<8>((uint64_t(__x__)&0x000000FF00000000)>>32) << "." \
5780  << std::bitset<8>((uint64_t(__x__)&0x00000000FF000000)>>24) << "." \
5781  << std::bitset<8>((uint64_t(__x__)&0x0000000000FF0000)>>16) << "." \
5782  << std::bitset<8>((uint64_t(__x__)&0x000000000000FF00)>>8) << "." \
5783  << std::bitset<8>( uint64_t(__x__)&0x00000000000000FF)
5784  #define BIN032(__x__) std::bitset<8>((uint32_t(__x__)&0xFF000000)>>24) << "." \
5785  << std::bitset<8>((uint32_t(__x__)&0x00FF0000)>>16) << "." \
5786  << std::bitset<8>((uint32_t(__x__)&0x0000FF00)>>8) << "." \
5787  << std::bitset<8>( uint32_t(__x__)&0x000000FF)
5788  #define BIN016(__x__) std::bitset<8>((uint16_t(__x__)&0xFF00)>>8) << "." \
5789  << std::bitset<8>( uint16_t(__x__)&0x00FF)
5790  #define BIN012(__x__) std::bitset<12>((uint16_t(__x__)&0x0FFF))
5791  #define BIN010(__x__) std::bitset<10>((uint16_t(__x__)&0x03FF))
5792  #define BIN08(__x__) std::bitset<8>(uint8_t(__x__))
5793  #define BIN04(__x__) std::bitset<4>(uint8_t(__x__))
5794  #define BIN0N(__x__,__n__) std::bitset<__n__>(uint8_t(__x__))
5795  #define bBIN064(__x__) "b" << BIN064(__x__)
5796  #define bBIN032(__x__) "b" << BIN032(__x__)
5797  #define bBIN016(__x__) "b" << BIN016(__x__)
5798  #define bBIN012(__x__) "b" << BIN012(__x__)
5799  #define bBIN010(__x__) "b" << BIN010(__x__)
5800  #define bBIN08(__x__) "b" << BIN08(__x__)
5801  #define bBIN04(__x__) "b" << BIN04(__x__)
5802  #define bBIN0N(__x__,__n__) "b" << BIN0N(__x__,__n__)
5803  #define fDEC(__x__,__w__,__p__) std::dec << std::fixed << std::setw(__w__) << std::setprecision(__p__) << (__x__)
5804  #endif // !defined (NTV2_BUILDING_DRIVER)
5805 
5806 
5807  #if defined (AJAMac)
5808  #pragma pack (push, 4)
5809  #endif // defined (AJAMac)
5810 
5811 
5817  #if !defined (NTV2_BUILDING_DRIVER)
5818  // Member Functions
5819 
5825  explicit inline NTV2FrameSize (const ULWord inWidth = 0, const ULWord inHeight = 0) {set (inWidth, inHeight);}
5826  explicit inline NTV2FrameSize (const NTV2FrameGeometry inFG) {set(FGWidth(inFG), FGHeight(inFG));}
5827  inline ULWord width (void) const {return mWidth;}
5828  inline ULWord height (void) const {return mHeight;}
5829  inline bool isValid (void) const {return magnitude() > 0;}
5830  inline bool operator == (const NTV2FrameSize & rhs) const {return magnitude() == rhs.magnitude();}
5831  inline bool operator < (const NTV2FrameSize & rhs) const {return magnitude() < rhs.magnitude();}
5832  inline operator bool() const {return isValid();}
5833  operator NTV2FrameGeometry() const;
5834 
5840  inline NTV2FrameSize & setWidth (const ULWord inValue) {mWidth = inValue; return *this;}
5841 
5847  inline NTV2FrameSize & setHeight (const ULWord inValue) {mHeight = inValue; return *this;}
5848 
5855  inline NTV2FrameSize & set (const ULWord inWidth, const ULWord inHeight) {return setWidth(inWidth).setHeight(inHeight);}
5856 
5862  inline NTV2FrameSize & operator = (const NTV2FrameGeometry & rhs) {return set(FGWidth(rhs), FGHeight(rhs));}
5863 
5868  inline NTV2FrameSize & reset (void) {return set (0, 0);}
5869 
5874  inline NTV2FrameSize & swap (void) {return set (height(), width());}
5875 
5876  #if !defined(NTV2_DEPRECATE_17_5)
5877  inline ULWord NTV2_DEPRECATED_17_5(GetWidth (void) const) {return width();}
5878  inline ULWord NTV2_DEPRECATED_17_5(GetHeight (void) const) {return height();}
5879  inline ULWord NTV2_DEPRECATED_17_5(Width (void) const) {return width();}
5880  inline ULWord NTV2_DEPRECATED_17_5(Height (void) const) {return height();}
5881  inline bool NTV2_DEPRECATED_17_5(IsValid (void) const) {return isValid();}
5882  inline NTV2FrameSize & NTV2_DEPRECATED_17_5(SetWidth (const ULWord v)) {return setWidth(v);}
5883  inline NTV2FrameSize & NTV2_DEPRECATED_17_5(SetHeight (const ULWord v)) {return setHeight(v);}
5884  inline NTV2FrameSize & NTV2_DEPRECATED_17_5(Set (const ULWord w, const ULWord h)) {return set(w,h);}
5885  inline NTV2FrameSize & NTV2_DEPRECATED_17_5(Reset (void)) {return reset();}
5886  #endif // !defined(NTV2_DEPRECATE_17_5)
5887 
5888  static ULWord FGWidth (const NTV2FrameGeometry fg);
5889  static ULWord FGHeight (const NTV2FrameGeometry fg);
5890 
5892  inline uint64_t magnitude(void) const {return (uint64_t(width()) << 32) | uint64_t(height());}
5893  typedef std::map<NTV2FrameGeometry, ULWord> FGSizesMap;
5894  typedef FGSizesMap::const_iterator FGSizesMapCI;
5896  #endif // !defined (NTV2_BUILDING_DRIVER)
5897 
5899  ULWord mWidth;
5900  ULWord mHeight;
5903  #if !defined(NTV2_DEPRECATE_17_5)
5905  #endif // !defined(NTV2_DEPRECATE_17_5)
5906 
5927  #if !defined (NTV2_BUILDING_DRIVER)
5928 
5932  : mFlags (0),
5933  mNumSegments (0),
5934  mElementsPerSegment (0),
5935  mInitialSrcOffset (0),
5936  mInitialDstOffset (0),
5937  mSrcElementsPerRow (0),
5938  mDstElementsPerRow (0) {setElementLength(1);}
5939 
5943  inline bool isValid (void) const {return getSegmentCount() && getSegmentLength() ? true : false;}
5945  inline ULWord getSegmentCount (void) const {return mNumSegments;}
5946  inline ULWord getSegmentLength (void) const {return mElementsPerSegment;}
5947  inline ULWord getSourceOffset (void) const {return mInitialSrcOffset;}
5948  inline ULWord getDestOffset (void) const {return mInitialDstOffset;}
5949  inline ULWord getSourcePitch (void) const {return mSrcElementsPerRow;}
5950  inline ULWord getDestPitch (void) const {return mDstElementsPerRow;}
5951 
5956  inline ULWord getElementLength (void) const {return ULWord(1 << (mFlags & 3));}
5958  inline bool isSourceBottomUp (void) const {return mFlags & BIT(8) ? true : false;}
5959  inline bool isSourceTopDown (void) const {return mFlags & BIT(8) ? false : true;}
5960  inline bool isDestBottomUp (void) const {return mFlags & BIT(9) ? true : false;}
5961  inline bool isDestTopDown (void) const {return mFlags & BIT(9) ? false : true;}
5962  inline ULWord getTotalElements (void) const {return getSegmentCount() * getSegmentLength();}
5963  inline ULWord getTotalBytes (void) const {return getTotalElements() * getElementLength();}
5964 
5968  inline ULWord getSourceEndOffset (void) const // New in SDK 16.0
5969  {return getSourceOffset() + getSourcePitch() * getSegmentCount() + getSegmentLength();}
5970 
5974  inline ULWord getDestEndOffset (void) const // New in SDK 16.0
5975  {return getDestOffset() + getDestPitch() * getSegmentCount() + getSegmentLength();}
5976 
5983  std::ostream & Print (std::ostream & inStrm, const bool inDumpSegments = false) const;
5984 
5990  std::string getSourceCode (const bool inInclDecl = true) const; // New in SDK 16.0
5991 
5996  bool containsElementAtOffset (const ULWord inElementOffset) const; // New in SDK 16.0
5997 
6003  bool operator != (const NTV2SegmentedXferInfo & inRHS) const; // New in SDK 16.0
6004 
6010  inline bool operator == (const NTV2SegmentedXferInfo & inRHS) const {return !(*this != inRHS);} // New in SDK 16.0
6012 
6016 
6018  NTV2SegmentedXferInfo & reset (void);
6019 
6026  inline NTV2SegmentedXferInfo & setSegmentInfo (const ULWord inNumSegs, const ULWord inSegLength)
6027  {return setSegmentCount(inNumSegs).setSegmentLength(inSegLength);}
6028 
6034  inline NTV2SegmentedXferInfo & setSegmentCount (const ULWord inNumSegments)
6035  {mNumSegments = inNumSegments; return *this;}
6036 
6042  inline NTV2SegmentedXferInfo & setSegmentLength (const ULWord inNumElements)
6043  {mElementsPerSegment = inNumElements; return *this;}
6044 
6051  inline NTV2SegmentedXferInfo & setSourceInfo (const ULWord inOffset, const ULWord inPitch)
6052  {return setSourceOffset(inOffset).setSourcePitch(inPitch);}
6053 
6060  {mInitialSrcOffset = inOffset; return *this;}
6061 
6068  {mSrcElementsPerRow = inPitch; return *this;}
6069 
6076  inline NTV2SegmentedXferInfo & setSourceDirection (const bool inTopDown)
6077  { mFlags &= ~(BIT(8)); // set top-down
6078  if (!inTopDown)
6079  mFlags |= BIT(8); // set bottom-up
6080  return *this;
6081  }
6088  inline NTV2SegmentedXferInfo & setSourceFlipped (const bool inFlipped = Direction_Flipped) {return setSourceDirection(inFlipped);}
6089 
6096  inline NTV2SegmentedXferInfo & setDestInfo (const ULWord inOffset, const ULWord inPitch)
6097  {return setDestOffset(inOffset).setDestPitch(inPitch);}
6098 
6104  inline NTV2SegmentedXferInfo & setDestOffset (const ULWord inOffset) {mInitialDstOffset = inOffset; return *this;}
6105 
6111  inline NTV2SegmentedXferInfo & setDestPitch (const ULWord inPitch) {mDstElementsPerRow = inPitch; return *this;}
6112 
6119  inline NTV2SegmentedXferInfo & setDestDirection (const bool inTopDown)
6120  { mFlags &= ~(BIT(9)); // set top-down
6121  if (!inTopDown)
6122  mFlags |= BIT(9); // set bottom-up
6123  return *this;
6124  }
6131  inline NTV2SegmentedXferInfo & setDestFlipped (const bool inFlipped = Direction_Flipped) {return setDestDirection(inFlipped);}
6132 
6139  inline NTV2SegmentedXferInfo & setElementLength (const ULWord inBytesPerElement)
6140  {
6141  if (inBytesPerElement && inBytesPerElement < 9)
6142  if (!(inBytesPerElement & (inBytesPerElement - 1))) // Power of 2?
6143  {
6144  ULWord num(inBytesPerElement), lengthBits(0);
6145  while (num >>= 1)
6146  lengthBits++;
6147  mFlags = (mFlags & ~3UL) | (lengthBits & 3UL);
6148  }
6149  return *this;
6150  }
6155  NTV2SegmentedXferInfo & swapSourceAndDestination (void); // New in SDK 16.0
6157 
6161  static const bool Direction_TopToBottom = true;
6163  static const bool Direction_TopDown = true;
6164  static const bool Direction_Normal = true;
6165  static const bool Direction_BottomToTop = false;
6166  static const bool Direction_BottomUp = false;
6167  static const bool Direction_Flipped = false;
6168  #endif // !defined (NTV2_BUILDING_DRIVER)
6170 
6172  ULWord mFlags;
6173  ULWord mNumSegments;
6174  ULWord mElementsPerSegment;
6175  ULWord mInitialSrcOffset;
6176  ULWord mInitialDstOffset;
6177  ULWord mSrcElementsPerRow;
6178  ULWord mDstElementsPerRow;
6181 
6182 
6220  ULWord64 fUserSpacePtr;
6221  ULWord fByteCount;
6222  ULWord fFlags;
6224  #if defined (AJAMac)
6225  ULWord64 fKernelSpacePtr;
6226  ULWord64 fIOMemoryDesc;
6227  ULWord64 fIOMemoryMap;
6228  #else
6229  //ULWord64 fKernelSpacePtr; ///< @brief Reserved -- New in SDK 17.5
6230  ULWord64 fKernelHandle;
6231  #endif
6233 
6234  #if !defined (NTV2_BUILDING_DRIVER)
6235 
6238 
6245  explicit NTV2Buffer (const void * pInUserPointer, const size_t inByteCount);
6246 
6254  NTV2Buffer (const size_t inByteCount = 0);
6255 
6260  explicit NTV2Buffer (const NTV2Buffer & inObj);
6261 
6265  ~NTV2Buffer ();
6267 
6271 
6275  inline void * GetHostPointer (void) const
6276  {
6277  if (sizeof(int*) == 4)
6278  return reinterpret_cast <void*>((fUserSpacePtr & 0xFFFFFFFF00000000) >> 32);
6279  else
6280  return reinterpret_cast <void*>(fUserSpacePtr);
6281  }
6282 
6287  inline ULWord64 GetRawHostPointer (void) const {return fUserSpacePtr;}
6288 
6292  inline ULWord GetByteCount (void) const {return fByteCount;}
6293 
6298  inline bool IsAllocatedBySDK (void) const {return fFlags & NTV2Buffer_ALLOCATED ? true : false;}
6299 
6304  inline bool IsProvidedByClient (void) const {return fFlags & NTV2Buffer_ALLOCATED ? false : true;}
6305 
6309  inline bool IsPageAligned (void) const {return fFlags & NTV2Buffer_PAGE_ALIGNED ? true : false;} // New in SDK 17.0
6310 
6314  inline bool IsNULL (void) const {return GetHostPointer() == AJA_NULL || GetByteCount() == 0;}
6315 
6319  inline operator bool() const {return !IsNULL();}
6320 
6324  inline operator size_t() const {return size_t(GetByteCount());} // New in SDK 16.0
6325 
6333  void * GetHostAddress (const ULWord inByteOffset, const bool inFromEnd = false) const;
6334 
6344  template<typename T> bool Find (const T & inValue, int & inOutIndex) const // New in SDK 16.0
6345  {
6346  const bool isAscending(inOutIndex >= 0);
6347  const int maxNdx(int(GetByteCount()) / sizeof(T));
6348  if (isAscending && inOutIndex >= maxNdx)
6349  return false; // Past end
6350  if (!isAscending && (1 - inOutIndex) >= maxNdx)
6351  return false; // Before start
6352  const T * pValues(*this);
6353  if (isAscending)
6354  {
6355  for (int ndx(inOutIndex); ndx < maxNdx; ndx++)
6356  if (pValues[ndx] == inValue)
6357  {inOutIndex = ndx; return true;}
6358  }
6359  else
6360  {
6361  const int minNdx(0 - maxNdx);
6362  for (int ndx(inOutIndex); ndx >= minNdx; ndx++)
6363  if (pValues[maxNdx + ndx] == inValue)
6364  {inOutIndex = ndx; return true;}
6365  }
6366  inOutIndex = 0;
6367  return false; // Not found
6368  }
6369 
6375  ULWordSet & FindAll (ULWordSet & outOffsets, const NTV2Buffer & inValue) const; // New in SDK 16.3
6376 
6383  bool IsContentEqual (const NTV2Buffer & inBuffer, const ULWord inByteOffset = 0, const ULWord inByteCount = 0xFFFFFFFF) const;
6384 
6393  bool NextDifference (const NTV2Buffer & inBuffer, ULWord & byteOffset) const;
6394 
6414  bool GetRingChangedByteRange (const NTV2Buffer & inBuffer, ULWord & outByteOffsetFirst, ULWord & outByteOffsetLast) const;
6416 
6420 
6431  bool Allocate (const size_t inByteCount, const bool inPageAligned = false);
6432 
6437  bool Deallocate (void);
6438 
6444  template<typename T> bool Fill (const T & inValue)
6445  {
6446  T* pT = reinterpret_cast<T*>(GetHostPointer());
6447  if (!pT) {
6448  return false;
6449  }
6450 
6451  size_t bufferSize = GetByteCount() / sizeof(T);
6452  if (bufferSize == 0) {
6453  return false;
6454  }
6455 
6456  for (size_t i = 0; i < bufferSize; ++i) {
6457  pT[i] = inValue;
6458  }
6459 
6460  return true;
6461  }
6462 
6470  template<typename T> bool Fill (const T & inValue, const NTV2SegmentedXferInfo & inXferInfo)
6471  {
6472  if (!inXferInfo.isValid())
6473  return false;
6474  // Fill a temporary buffer to hold all the segment data...
6475  NTV2Buffer segData(inXferInfo.getElementLength() * inXferInfo.getSegmentCount() * inXferInfo.getSegmentLength());
6476  if (!segData.Fill(inValue))
6477  return false; // Fill failed
6478 
6479  // Copy the segment data into me...
6480  ULWord srcOffset (0);
6481  ULWord dstOffset (inXferInfo.getDestOffset() * inXferInfo.getElementLength());
6482  const ULWord dstPitch (inXferInfo.getDestPitch() * inXferInfo.getElementLength());
6483  const ULWord bytesPerSeg (inXferInfo.getSegmentLength() * inXferInfo.getElementLength());
6484  for (ULWord segNdx(0); segNdx < inXferInfo.getSegmentCount(); segNdx++)
6485  {
6486  const void * pSrc (segData.GetHostAddress(srcOffset));
6487  void * pDst (GetHostAddress(dstOffset));
6488  if (!pSrc) return false;
6489  if (!pDst) return false;
6490  if (dstOffset + bytesPerSeg > GetByteCount())
6491  return false; // memcpy will write past end
6492  ::memcpy (pDst, pSrc, bytesPerSeg);
6493  srcOffset += bytesPerSeg; // Bump src offset
6494  dstOffset += dstPitch; // Bump dst offset
6495  } // for each segment
6496  return true;
6497  }
6498 
6505  bool Truncate (const size_t inByteCount);
6506 
6511  NTV2Buffer & operator = (const NTV2Buffer & inRHS);
6512 
6523  bool Set (const void * pInUserPointer, const size_t inByteCount);
6524 
6536  bool SetAndFill (const void * pInUserPointer, const size_t inByteCount, const UByte inValue);
6537 
6545  bool SetFrom (const NTV2Buffer & inBuffer);
6546 
6556  bool SetFromHexString (const std::string & inStr);
6557 
6564  bool CopyFrom (const void * pInSrcBuffer, const ULWord inByteCount);
6565 
6576  bool CopyFrom (const NTV2Buffer & inSrcBuffer, const ULWord inSrcByteOffset, const ULWord inDstByteOffset, const ULWord inByteCount);
6577 
6585  bool CopyFrom (const NTV2Buffer & inSrcBuffer, const NTV2SegmentedXferInfo & inXferInfo);
6586 
6596  bool SwapWith (NTV2Buffer & inBuffer);
6597 
6603  bool ByteSwap64 (void); // New in SDK 16.0
6604 
6610  bool ByteSwap32 (void); // New in SDK 16.0
6611 
6617  bool ByteSwap16 (void); // New in SDK 16.0
6619 
6623 
6629  std::ostream & Print (std::ostream & inOutStream) const;
6630 
6635  std::string AsString (UWord inDumpMaxBytes = 0) const;
6636 
6644  std::string AsCode (const size_t inBytesPerWord = 4, const std::string & inVarName = "", const bool inUseSTL = false, const bool inByteSwap = false) const;
6645 
6654  bool toHexString (std::string & outStr, const size_t inLineBreakInterval = 0) const;
6655 
6676  std::ostream & Dump ( std::ostream & inOutputStream = std::cout,
6677  const size_t inStartByteOffset = 0,
6678  const size_t inByteCount = 0,
6679  const size_t inRadix = 16,
6680  const size_t inBytesPerGroup = 4,
6681  const size_t inGroupsPerLine = 8,
6682  const size_t inAddressRadix = 0,
6683  const bool inShowAscii = false,
6684  const size_t inAddrOffset = 0) const;
6685 
6707  std::string & Dump ( std::string & inOutputString,
6708  const size_t inStartByteOffset = 0,
6709  const size_t inByteCount = 0,
6710  const size_t inRadix = 16,
6711  const size_t inBytesPerGroup = 4,
6712  const size_t inGroupsPerLine = 8,
6713  const size_t inAddressRadix = 0,
6714  const bool inShowAscii = false,
6715  const size_t inAddrOffset = 0) const;
6717 
6721 
6725  template<typename T> operator const T*() const {return reinterpret_cast<const T*>(GetHostPointer());} // New in SDK 16.0
6726 
6730  template<typename T> operator T*() const {return reinterpret_cast<T*>(GetHostPointer());} // New in SDK 16.0
6731 
6742  NTV2Buffer & Segment (NTV2Buffer & outPtr, const ULWord inByteOffset, const ULWord inByteCount) const;
6743 
6750  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
6751 
6758  inline uint8_t & U8 (const int inIndex) {uint8_t* pVal(*this); return pVal[inIndex < 0 ? int(GetByteCount()) + inIndex : inIndex];} // New in SDK 16.0
6759 
6760  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
6761  inline int8_t & I8 (const int inIndex) {int8_t* pVal(*this); return pVal[inIndex < 0 ? int(GetByteCount()) + inIndex : inIndex];} // New in SDK 16.0
6762  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
6763  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
6764  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
6765  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
6766  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
6767  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
6768  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
6769  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
6770  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
6771  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
6772  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
6773  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
6774  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
6775  inline float & FL (const int inIndex) {float* pVal(*this); return pVal[inIndex < 0 ? int(GetByteCount()/sizeof(float)) + inIndex : inIndex];} // New in SDK 16.0
6776  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
6777  inline double & DBL (const int inIndex) {double* pVal(*this); return pVal[inIndex < 0 ? int(GetByteCount()/sizeof(double)) + inIndex : inIndex];} // New in SDK 16.0
6779 
6783 
6798  bool GetU64s (ULWord64Sequence & outU64s, const size_t inU64Offset = 0, const size_t inMaxSize = 16, const bool inByteSwap = false) const;
6799 
6812  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;}
6813 
6828  bool GetU32s (ULWordSequence & outU32s, const size_t inU32Offset = 0, const size_t inMaxSize = 32, const bool inByteSwap = false) const;
6829 
6842  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;}
6843 
6858  bool GetU16s (UWordSequence & outU16s, const size_t inU16Offset = 0, const size_t inMaxSize = 64, const bool inByteSwap = false) const;
6859 
6872  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;}
6873 
6884  bool GetU8s (UByteSequence & outU8s, const size_t inU8Offset = 0, const size_t inMaxSize = 128) const;
6885 
6894  inline UByteSequence GetU8s (const size_t inU8Offset = 0, const size_t inMaxSize = 128) const {UByteSequence result; GetU8s(result, inU8Offset, inMaxSize); return result;}
6895 
6901  bool AppendU8s (UByteSequence & outU8s) const;
6902 
6914  bool GetString (std::string & outString, const size_t inU8Offset = 0, const size_t inMaxSize = 128) const;
6915 
6925  inline std::string GetString (const size_t inU8Offset = 0, const size_t inMaxSize = 128) const {std::string result; GetString(result, inU8Offset, inMaxSize); return result;}
6926 
6936  bool PutU64s (const ULWord64Sequence & inU64s, const size_t inU64Offset = 0, const bool inByteSwap = false);
6937 
6947  bool PutU32s (const ULWordSequence & inU32s, const size_t inU32Offset = 0, const bool inByteSwap = false);
6948 
6958  bool PutU16s (const UWordSequence & inU16s, const size_t inU16Offset = 0, const bool inByteSwap = false);
6959 
6967  bool PutU8s (const UByteSequence & inU8s, const size_t inU8Offset = 0);
6969 
6973 
6977  static size_t DefaultPageSize (void);
6978 
6984  static bool SetDefaultPageSize (const size_t inNewSize);
6985 
6989  static size_t HostPageSize (void); // New in SDK 16.3
6991 
6993  #endif // user-space clients only
6995 
6996  #if !defined(NTV2_DEPRECATE_17_0)
6997  typedef NTV2Buffer NTV2_POINTER; // Renamed in SDK 17.0
6998  #endif // !defined(NTV2_DEPRECATE_17_0
6999 
7000 
7005  ULWord fDBB;
7006  ULWord fLo;
7007  ULWord fHi;
7008 
7009  #if defined (NTV2_BUILDING_DRIVER)
7010  #define NTV2_RP188_from_RP188_STRUCT(_n_,_r_) { (_n_).fDBB = (_r_).DBB; \
7011  (_n_).fLo = (_r_).Low; \
7012  (_n_).fHi = (_r_).High; }
7013 
7014  #define NTV2_RP188P_from_RP188_STRUCT(_np_,_r_) { (_np_)->fDBB = (_r_).DBB; \
7015  (_np_)->fLo = (_r_).Low; \
7016  (_np_)->fHi = (_r_).High; }
7017 
7018  #define RP188_STRUCT_from_NTV2_RP188(_r_,_n_) { (_r_).DBB = (_n_).fDBB; \
7019  (_r_).Low = (_n_).fLo; \
7020  (_r_).High = (_n_).fHi; }
7021 
7022  #define RP188_STRUCT_from_NTV2_RP188P(_r_,_np_) { (_r_).DBB = (_np_)->fDBB; \
7023  (_r_).Low = (_np_)->fLo; \
7024  (_r_).High = (_np_)->fHi; }
7025 
7026  #define NTV2_RP188_IS_VALID(_n_) ((_n_).fDBB != 0xFFFFFFFF || (_n_).fLo != 0xFFFFFFFF || (_n_).fHi != 0xFFFFFFFF)
7027  #else
7028 
7035  inline explicit NTV2_RP188 (const ULWord inDBB = 0xFFFFFFFF, const ULWord inLow = 0xFFFFFFFF, const ULWord inHigh = 0xFFFFFFFF) : fDBB (inDBB), fLo (inLow), fHi (inHigh) {}
7036 
7041  inline explicit NTV2_RP188 (const RP188_STRUCT & inOldRP188) : fDBB (inOldRP188.DBB), fLo (inOldRP188.Low), fHi (inOldRP188.High) {}
7042 
7046  inline bool IsValid (void) const {return fDBB != 0xFFFFFFFF || fLo != 0xFFFFFFFF || fHi != 0xFFFFFFFF;}
7047 
7053  inline NTV2_RP188 & operator = (const RP188_STRUCT & inRHS) {fDBB = inRHS.DBB; fLo = inRHS.Low; fHi = inRHS.High; return *this;}
7054 
7059  inline bool operator != (const RP188_STRUCT & inRHS) const {return fDBB != inRHS.DBB || fLo != inRHS.Low || fHi != inRHS.High;}
7060 
7067  inline void Set (const ULWord inDBB = 0xFFFFFFFF, const ULWord inLow = 0xFFFFFFFF, const ULWord inHigh = 0xFFFFFFFF) {fDBB = inDBB; fLo = inLow; fHi = inHigh;}
7068 
7073  inline operator RP188_STRUCT () const {RP188_STRUCT result; result.DBB = fDBB; result.Low = fLo; result.High = fHi; return result;}
7074 
7078  inline operator bool () const {return IsValid();}
7079 
7081  #endif // user-space clients only
7083 
7084  #if !defined (NTV2_BUILDING_DRIVER)
7085  typedef std::vector <NTV2_RP188> NTV2TimeCodeList;
7086  typedef NTV2TimeCodeList::const_iterator NTV2TimeCodeListConstIter;
7089  //typedef NTV2TimeCodeList::iterator NTV2TimeCodeListIter;
7090  typedef std::map <NTV2TCIndex, NTV2_RP188> NTV2TimeCodes;
7091  typedef NTV2TimeCodes::const_iterator NTV2TimeCodesConstIter;
7092 
7093  typedef std::set <NTV2TCIndex> NTV2TCIndexes, NTV2TCIndexSet;
7094  typedef NTV2TCIndexes::const_iterator NTV2TCIndexesConstIter, NTV2TCIndexSetConstIter;
7095 
7102  NTV2TimeCodeList & operator << (NTV2TimeCodeList & inOutList, const NTV2_RP188 & inRP188);
7103  #endif // !defined (NTV2_BUILDING_DRIVER)
7104 
7105 
7111  UWord mCRCTallyA;
7112  UWord mCRCTallyB;
7114  ULWord mUnlockTally;
7116  //ULWord64 mFrameTally; ///< @brief The number of frames that have been detected on the SDI input since this tally was last reset.
7117  ULWord64 mFrameRefClockCount;
7118  ULWord64 mGlobalClockCount;
7119  bool mFrameTRSError;
7120  bool mLocked;
7122  bool mVPIDValidA;
7124  bool mVPIDValidB;
7125  #if !defined (NTV2_BUILDING_DRIVER)
7126 
7129  explicit NTV2SDIInputStatus ();
7130 
7134  void Clear (void);
7135 
7141  std::ostream & Print (std::ostream & inOutStream) const;
7142  #endif // !defined (NTV2_BUILDING_DRIVER)
7144 
7145 
7146 
7152  bool mEnabled;
7153  bool mPixel420;
7154  NTV2HDMIColorSpace mColorSpace;
7155  NTV2HDMIRange mRGBRange;
7156  NTV2HDMIProtocol mProtocol;
7157  NTV2Standard mVideoStandard;
7158  NTV2FrameRate mVideoRate;
7159  NTV2HDMIBitDepth mVideoBitDepth;
7160  NTV2AudioFormat mAudioFormat;
7161  NTV2AudioRate mAudioRate;
7162  NTV2HDMIAudioChannels mAudioChannels;
7163  #if !defined (NTV2_BUILDING_DRIVER)
7164 
7167  explicit NTV2HDMIOutputStatus () {Clear();}
7168 
7173  explicit NTV2HDMIOutputStatus (const ULWord inData) {Clear(); SetFromRegValue(inData);}
7174 
7175  void Clear (void);
7176 
7182  bool SetFromRegValue (const ULWord inData);
7183 
7189  std::ostream & Print (std::ostream & inOutStream) const;
7190  #endif // !defined (NTV2_BUILDING_DRIVER)
7191  NTV2_STRUCT_END (NTV2HMDIOutputStatus)
7192 
7193 
7194 
7200  ULWord fHeaderTag;
7201  ULWord fType;
7202  ULWord fHeaderVersion;
7203  ULWord fVersion;
7204  ULWord fSizeInBytes;
7205  ULWord fPointerSize;
7206  ULWord fOperation;
7207  ULWord fResultStatus;
7209 
7210  #if !defined (NTV2_BUILDING_DRIVER)
7211 
7216  explicit NTV2_HEADER (const ULWord inStructureType, const ULWord inSizeInBytes);
7217 
7218  inline ULWord GetSizeInBytes (void) const {return fSizeInBytes;}
7219  inline ULWord GetTag (void) const {return fHeaderTag;} // New in SDK 16.3
7220  inline ULWord GetType (void) const {return fType;} // New in SDK 16.3
7221  inline ULWord GetHeaderVersion (void) const {return fHeaderVersion;} // New in SDK 16.3
7222  inline ULWord GetVersion (void) const {return fVersion;} // New in SDK 16.3
7223  inline ULWord GetPointerSize (void) const {return fPointerSize;} // New in SDK 16.3
7224  inline ULWord GetConnectionID (void) const {return fOperation;} // New in SDK 16.3
7225  inline void SetConnectionID (const ULWord inValue) {fOperation = inValue;} // New in SDK 16.3
7226  inline ULWord GetResultStatus (void) const {return fResultStatus;} // New in SDK 17.5
7227 
7233  std::ostream & Print (std::ostream & inOutStream) const;
7234 
7238  inline bool IsValid (void) const {return NTV2_IS_VALID_HEADER_TAG(fHeaderTag) && NTV2_IS_VALID_STRUCT_TYPE(fType);}
7239 
7240  inline void ClearResultStatus (void) {fResultStatus = 0;} // New in SDK 17.5
7241 
7242  static std::string FourCCToString (const ULWord in4CC);
7243 
7245  #endif // user-space clients only
7247 
7248 
7249 
7254  ULWord fTrailerVersion;
7255  ULWord fTrailerTag;
7256 
7257  #if !defined (NTV2_BUILDING_DRIVER)
7258  explicit NTV2_TRAILER ();
7259 
7263  inline bool IsValid (void) const {return NTV2_IS_VALID_TRAILER_TAG (fTrailerTag);}
7264 
7266  #endif // user-space clients only
7268 
7269 
7270 
7294  ULWord acNumSegments;
7295  ULWord acNumActiveBytesPerRow;
7297  ULWord acSegmentHostPitch;
7298  ULWord acSegmentDevicePitch;
7300 
7302  #if !defined (NTV2_BUILDING_DRIVER)
7303 
7306  explicit NTV2SegmentedDMAInfo ();
7307 
7315  explicit NTV2SegmentedDMAInfo (const ULWord inNumSegments, const ULWord inNumActiveBytesPerRow, const ULWord inHostBytesPerRow, const ULWord inDeviceBytesPerRow);
7316 
7325  void Set (const ULWord inNumSegments, const ULWord inNumActiveBytesPerRow, const ULWord inHostBytesPerRow, const ULWord inDeviceBytesPerRow);
7326 
7330  void Reset (void);
7331 
7335  inline ULWord GetSegmentCount (void) const {return acNumSegments;}
7336 
7340  inline bool IsSegmented (void) const {return GetSegmentCount() > 1;}
7341 
7343  #endif // user-space clients only
7345 
7346 
7347 
7353  ULWord ccSaturationValue;
7354 
7360  NTV2Buffer ccLookupTables;
7361 
7362  #if !defined (NTV2_BUILDING_DRIVER)
7363 
7366  explicit NTV2ColorCorrectionData ();
7367 
7372 
7376  void Clear (void);
7377 
7381  inline bool IsActive (void) const {return NTV2_IS_ACTIVE_COLOR_CORRECTION_MODE (ccMode) && ccLookupTables.GetHostPointer ();}
7382 
7391  bool Set (const NTV2ColorCorrectionMode inMode, const ULWord inSaturation, const void * pInTableData);
7392 
7394 
7396  inline explicit NTV2ColorCorrectionData (const NTV2ColorCorrectionData & inObj) : ccLookupTables (0) {(void) inObj;}
7397  inline NTV2ColorCorrectionData & operator = (const NTV2ColorCorrectionData & inRHS) {(void) inRHS; return *this;}
7399  #endif // user-space clients only
7401 
7402 
7403 
7408  NTV2_HEADER acHeader;
7409  NTV2Crosspoint acCrosspoint;
7411  LWord acStartFrame;
7412  LWord acEndFrame;
7413  LWord acActiveFrame;
7414  ULWord64 acRDTSCStartTime;
7415  ULWord64 acAudioClockStartTime;
7416  ULWord64 acRDTSCCurrentTime;
7417  ULWord64 acAudioClockCurrentTime;
7418  ULWord acFramesProcessed;
7419  ULWord acFramesDropped;
7420  ULWord acBufferLevel;
7421  ULWord acOptionFlags;
7422  NTV2AudioSystem acAudioSystem;
7423  NTV2_TRAILER acTrailer;
7424 
7425  #if !defined (NTV2_BUILDING_DRIVER)
7426 
7429  explicit AUTOCIRCULATE_STATUS (const NTV2Crosspoint inCrosspoint = NTV2CROSSPOINT_CHANNEL1);
7430 
7436  bool CopyTo (AUTOCIRCULATE_STATUS_STRUCT & outOldStruct);
7437 
7443  bool CopyFrom (const AUTOCIRCULATE_STATUS_STRUCT & inOldStruct);
7444 
7448  void Clear (void);
7449 
7453  inline ULWord GetFrameCount (void) const {return IsStopped() ? 0 : ULWord (acEndFrame - acStartFrame + 1);}
7454 
7458  inline ULWord GetDroppedFrameCount (void) const {return acFramesDropped;}
7459 
7463  inline ULWord GetProcessedFrameCount (void) const {return acFramesProcessed;}
7464 
7468  inline ULWord GetBufferLevel (void) const {return acBufferLevel;}
7469 
7473  inline ULWord GetNumAvailableOutputFrames (void) const {return GetFrameCount () > GetBufferLevel() ? GetFrameCount () - GetBufferLevel() : 0;}
7474 
7478  inline bool CanAcceptMoreOutputFrames (void) const {return GetNumAvailableOutputFrames () > 1;}
7479 
7517  inline bool HasAvailableInputFrame (void) const {return GetBufferLevel() > 1;}
7518 
7522  inline LWord GetActiveFrame (void) const {return acActiveFrame;}
7523 
7527  inline uint16_t GetStartFrame (void) const {return uint16_t(acStartFrame);}
7528 
7532  inline uint16_t GetEndFrame (void) const {return uint16_t(acEndFrame);}
7533 
7537  inline NTV2AutoCirculateState GetState (void) const {return acState;}
7538 
7542  inline NTV2AudioSystem GetAudioSystem (void) const {return acAudioSystem;}
7543 
7547  inline bool IsRunning (void) const {return GetState () == NTV2_AUTOCIRCULATE_RUNNING;}
7548 
7552  inline bool IsStarting (void) const {return GetState () == NTV2_AUTOCIRCULATE_STARTING || GetState () == NTV2_AUTOCIRCULATE_STARTING_AT_TIME;}
7553 
7557  inline bool IsStopped (void) const {return GetState () == NTV2_AUTOCIRCULATE_DISABLED;}
7558 
7562  inline bool IsStopping (void) const {return GetState () == NTV2_AUTOCIRCULATE_STOPPING;}
7563 
7567  inline bool IsPaused (void) const {return GetState () == NTV2_AUTOCIRCULATE_PAUSED;}
7568 
7572  inline bool WithAudio (void) const {return NTV2_IS_VALID_AUDIO_SYSTEM (GetAudioSystem ());}
7573 
7577  inline ULWord OptionFlags (void) const {return acOptionFlags;} // New in SDK 16.0
7578 
7582  inline bool WithCustomAnc (void) const {return OptionFlags() & AUTOCIRCULATE_WITH_ANC;} // New in SDK 16.0
7583 
7587  inline bool WithRP188 (void) const {return OptionFlags() & AUTOCIRCULATE_WITH_RP188;} // New in SDK 16.0
7588 
7592  inline bool WithLTC (void) const {return OptionFlags() & AUTOCIRCULATE_WITH_LTC;} // New in SDK 16.0
7593 
7597  inline bool WithFBFChange (void) const {return OptionFlags() & AUTOCIRCULATE_WITH_FBFCHANGE;} // New in SDK 16.0
7598 
7602  inline bool WithFBOChange (void) const {return OptionFlags() & AUTOCIRCULATE_WITH_FBOCHANGE;} // New in SDK 16.0
7603 
7607  inline bool WithColorCorrect (void) const {return OptionFlags() & AUTOCIRCULATE_WITH_COLORCORRECT;} // New in SDK 16.0
7608 
7612  inline bool WithVidProc (void) const {return OptionFlags() & AUTOCIRCULATE_WITH_VIDPROC;} // New in SDK 16.0
7613 
7617  inline bool IsFieldMode (void) const {return OptionFlags() & AUTOCIRCULATE_WITH_FIELDS;} // New in SDK 16.0
7618 
7622  inline bool WithHDMIAuxData (void) const {return OptionFlags() & AUTOCIRCULATE_WITH_HDMIAUX;} // New in SDK 16.0
7623 
7627  inline bool IsInput (void) const {return NTV2_IS_INPUT_CROSSPOINT(acCrosspoint);}
7628 
7632  inline bool IsOutput (void) const {return NTV2_IS_OUTPUT_CROSSPOINT(acCrosspoint);}
7633 
7637  inline NTV2Mode GetMode (void) const {return IsStopped() ? NTV2_MODE_INVALID : (IsInput() ? NTV2_MODE_INPUT : NTV2_MODE_OUTPUT);} // New in SDK 15.5
7638 
7642  NTV2Channel GetChannel (void) const;
7643 
7648  std::string operator [] (const unsigned inIndexNum) const;
7649 
7653  inline operator NTV2_HEADER*() {return reinterpret_cast<NTV2_HEADER*>(this);} // New in SDK 16.3
7654 
7656  NTV2_IS_STRUCT_VALID_IMPL(acHeader,acTrailer)
7657  #endif // user-space clients only
7659 
7660 
7661  #if !defined (NTV2_BUILDING_DRIVER)
7666 
7672 
7679  NTV2RegisterNumberSet & operator << (NTV2RegisterNumberSet & inOutSet, const ULWord inRegisterNumber);
7680 
7681  typedef std::map <ULWord, ULWord> NTV2RegisterValueMap;
7682  typedef NTV2RegisterValueMap::const_iterator NTV2RegValueMapConstIter;
7683  typedef NTV2RegisterValueMap::iterator NTV2RegValueMapIter;
7684  #endif // !defined (NTV2_BUILDING_DRIVER)
7685 
7686 
7692  NTV2_STRUCT_BEGIN (NTV2GetRegisters) // NTV2_TYPE_GETREGS
7694  NTV2_HEADER mHeader;
7695  ULWord mInNumRegisters;
7696  NTV2Buffer mInRegisters;
7697  ULWord mOutNumRegisters;
7698  NTV2Buffer mOutGoodRegisters;
7699  NTV2Buffer mOutValues;
7700  NTV2_TRAILER mTrailer;
7702 
7703  #if !defined (NTV2_BUILDING_DRIVER)
7704 
7709  explicit NTV2GetRegisters (const NTV2RegNumSet & inRegisterNumbers = NTV2RegNumSet());
7710 
7715  explicit NTV2GetRegisters (NTV2RegisterReads & inRegReads);
7716 
7721  bool ResetUsing (const NTV2RegNumSet & inRegisterNumbers);
7722 
7728  inline bool ResetUsing (const NTV2RegisterReads & inRegReads) {return ResetUsing(::GetRegisterNumbers(inRegReads));}
7729 
7735  bool GetGoodRegisters (NTV2RegNumSet & outGoodRegNums) const;
7736 
7742  bool GetRegisterValues (NTV2RegisterValueMap & outValues) const;
7743 
7751  bool GetRegisterValues (NTV2RegisterReads & inOutValues) const;
7752 
7758  bool GetRequestedRegisterNumbers (NTV2RegNumSet & outRegNums) const; // New in SDK 16.3
7759 
7765  bool GetBadRegisters (NTV2RegNumSet & outBadRegNums) const; // New in SDK 16.3
7766 
7773  bool PatchRegister (const ULWord inRegNum, const ULWord inValue); // New in SDK 17.0
7774 
7780  std::ostream & Print (std::ostream & inOutStream) const;
7781 
7785  inline operator NTV2_HEADER*() {return reinterpret_cast<NTV2_HEADER*>(this);} // New in SDK 16.3
7786 
7787  inline ULWord numRegisters (void) const {return mInNumRegisters;} // New in SDK 18.0
7788  inline const NTV2Buffer & requestedRegisterNumbers (void) const {return mInRegisters;} // New in SDK 18.0
7789  inline ULWord & outNumRegisters (void) {return mOutNumRegisters;} // New in SDK 18.0
7790  inline NTV2Buffer & outGoodRegisterNumbers (void) {return mOutGoodRegisters;} // New in SDK 18.0
7791  inline NTV2Buffer & outRegisterValues (void) {return mOutValues;} // New in SDK 18.0
7792 
7794  NTV2_IS_STRUCT_VALID_IMPL(mHeader,mTrailer)
7795 
7797  inline explicit NTV2GetRegisters (const NTV2GetRegisters & inObj) : mHeader(0xFEFEFEFE, 0), mInRegisters(0), mOutGoodRegisters(0), mOutValues(0)
7798  {(void) inObj;}
7799  inline NTV2GetRegisters & operator = (const NTV2GetRegisters & inRHS) {(void) inRHS; return *this;}
7801 
7802  #endif // !defined (NTV2_BUILDING_DRIVER)
7804 
7805 
7806 
7811  NTV2_STRUCT_BEGIN (NTV2SetRegisters) // NTV2_TYPE_SETREGS
7812  NTV2_HEADER mHeader;
7813  ULWord mInNumRegisters;
7814  NTV2Buffer mInRegInfos;
7815  ULWord mOutNumFailures;
7816  NTV2Buffer mOutBadRegIndexes;
7817  NTV2_TRAILER mTrailer;
7818 
7819  #if !defined (NTV2_BUILDING_DRIVER)
7820 
7825  NTV2SetRegisters (const NTV2RegWrites & inRegWrites = NTV2RegWrites());
7826 
7832  bool ResetUsing (const NTV2RegWrites & inRegWrites);
7833 
7839  bool GetFailedRegisterWrites (NTV2RegWrites & outFailedRegWrites) const;
7840 
7844  inline operator NTV2_HEADER*() {return reinterpret_cast<NTV2_HEADER*>(this);} // New in SDK 16.3
7845 
7846  inline ULWord GetRequestedRegisterCount (void) const {return mInNumRegisters;} // New in SDK 16.3
7847  bool GetRequestedRegisterWrites (NTV2RegWrites & outRegWrites) const; // New in SDK 16.3
7848  inline ULWord GetNumFailedWrites (void) const {return mOutNumFailures;} // New in SDK 16.3
7849 
7855  std::ostream & Print (std::ostream & inOutStream) const;
7856 
7857  inline const NTV2Buffer & regInfos (void) const {return mInRegInfos;} // New in SDK 18.0
7858  inline ULWord & outNumFailures (void) {return mOutNumFailures;} // New in SDK 18.0
7859  inline NTV2Buffer & outBadRegIndexes (void) {return mOutBadRegIndexes;} // New in SDK 18.0
7860 
7862  NTV2_IS_STRUCT_VALID_IMPL(mHeader,mTrailer)
7863 
7865  inline explicit NTV2SetRegisters (const NTV2SetRegisters & inObj) : mHeader(0xFEFEFEFE, 0), mInNumRegisters(0), mInRegInfos(0), mOutNumFailures(0), mOutBadRegIndexes(0)
7866  {(void) inObj;}
7867  inline NTV2SetRegisters & operator = (const NTV2SetRegisters & inRHS) {(void) inRHS; return *this;}
7869 
7870  #endif // !defined (NTV2_BUILDING_DRIVER)
7872 
7873 
7874 
7878  NTV2_STRUCT_BEGIN (NTV2BankSelGetSetRegs) // NTV2_TYPE_BANKGETSET
7879  NTV2_HEADER mHeader;
7880  ULWord mIsWriting;
7881  NTV2Buffer mInBankInfos;
7882  NTV2Buffer mInRegInfos;
7883  NTV2_TRAILER mTrailer;
7884 
7885  #if !defined (NTV2_BUILDING_DRIVER)
7886 
7892  explicit NTV2BankSelGetSetRegs (const NTV2RegInfo & inBankSelect, const NTV2RegInfo & inRegInfo, const bool inDoWrite = false);
7893 
7898  NTV2RegInfo GetRegInfo (const UWord inIndex0 = 0) const;
7899 
7905  std::ostream & Print (std::ostream & inOutStream) const;
7906 
7910  inline operator NTV2_HEADER*() {return reinterpret_cast<NTV2_HEADER*>(this);} // New in SDK 16.3
7911 
7913  NTV2_IS_STRUCT_VALID_IMPL(mHeader,mTrailer)
7914 
7916  inline explicit NTV2BankSelGetSetRegs (const NTV2BankSelGetSetRegs & inObj) : mHeader(0xFEFEFEFE, 0), mIsWriting(false), mInBankInfos(0), mInRegInfos(0)
7917  {(void) inObj;}
7918  inline NTV2BankSelGetSetRegs & operator = (const NTV2BankSelGetSetRegs & inRHS) {(void) inRHS; return *this;}
7920  #endif // !defined (NTV2_BUILDING_DRIVER)
7922 
7923 
7924 
7928  NTV2_STRUCT_BEGIN (NTV2VirtualData) // NTV2_TYPE_VIRTUAL_DATA_RW
7929  NTV2_HEADER mHeader;
7930  ULWord mTag;
7931  ULWord mIsWriting;
7932  NTV2Buffer mVirtualData;
7933  NTV2_TRAILER mTrailer;
7934 
7935  #if !defined (NTV2_BUILDING_DRIVER)
7936 
7943  explicit NTV2VirtualData (const ULWord inTag, const void* inVirtualData, const size_t inVirtualDataSize, const bool inDoWrite = false);
7944 
7950  std::ostream & Print (std::ostream & inOutStream) const;
7951 
7955  inline operator NTV2_HEADER*() {return reinterpret_cast<NTV2_HEADER*>(this);} // New in SDK 16.3
7956 
7958  NTV2_IS_STRUCT_VALID_IMPL(mHeader,mTrailer)
7959 
7960  #endif // !defined (NTV2_BUILDING_DRIVER)
7962 
7963 
7964 
7969  NTV2_STRUCT_BEGIN (NTV2SDIInStatistics) // NTV2_TYPE_SDISTATS
7971  NTV2_HEADER mHeader;
7972  NTV2Buffer mInStatistics;
7973  NTV2_TRAILER mTrailer;
7975 
7976  #if !defined (NTV2_BUILDING_DRIVER)
7977 
7981 
7985  void Clear (void);
7986 
7993  bool GetSDIInputStatus (NTV2SDIInputStatus & outStatus, const UWord inSDIInputIndex0 = 0);
7994 
7999  NTV2SDIInputStatus & operator [] (const size_t inSDIInputIndex0); // New in SDK 16.0
8000 
8006  std::ostream & Print (std::ostream & inOutStream) const;
8007 
8009  NTV2_IS_STRUCT_VALID_IMPL(mHeader,mTrailer)
8010  #endif // !defined (NTV2_BUILDING_DRIVER)
8012 
8013 
8014 
8027  NTV2_STRUCT_BEGIN (FRAME_STAMP) // NTV2_TYPE_ACFRAMESTAMP
8028  NTV2_HEADER acHeader;
8029 
8032  LWord64 acFrameTime;
8034  ULWord acRequestedFrame;
8038  ULWord64 acAudioClockTimeStamp;
8041  ULWord acAudioExpectedAddress;
8047  ULWord acAudioInStartAddress;
8048  ULWord acAudioInStopAddress;
8050  ULWord acAudioOutStopAddress;
8052  ULWord acAudioOutStartAddress;
8054  ULWord acTotalBytesTransferred;
8056  ULWord acStartSample;
8057 
8069  NTV2Buffer acTimeCodes;
8071  LWord64 acCurrentTime;
8081  ULWord acCurrentFrame;
8086  LWord64 acCurrentFrameTime;
8087  ULWord64 acAudioClockCurrentTime;
8091  ULWord acCurrentAudioExpectedAddress; // FIXFIXFIX Document What is this?!
8098  ULWord acCurrentAudioStartAddress;
8099  ULWord acCurrentFieldCount;
8100  ULWord acCurrentLineCount;
8101  ULWord acCurrentReps;
8102  ULWord64 acCurrentUserCookie;
8103  ULWord acFrame;
8108  NTV2_TRAILER acTrailer;
8110 
8111  #if !defined (NTV2_BUILDING_DRIVER)
8112 
8115  explicit FRAME_STAMP ();
8116 
8121  FRAME_STAMP (const FRAME_STAMP & inObj);
8122 
8126  ~FRAME_STAMP ();
8127 
8132  bool SetFrom (const FRAME_STAMP_STRUCT & inOldStruct);
8133 
8138  bool CopyTo (FRAME_STAMP_STRUCT & outOldStruct) const;
8139 
8146  bool GetInputTimeCodes (NTV2TimeCodeList & outValues) const;
8147 
8157  bool GetInputTimeCodes (NTV2TimeCodes & outTimeCodes, const NTV2Channel inSDIInput, const bool inValidOnly = true) const;
8158 
8167  bool GetInputTimeCode (NTV2_RP188 & outTimeCode, const NTV2TCIndex inTCIndex = NTV2_TCINDEX_SDI1) const;
8168 
8175  bool GetSDIInputStatus (NTV2SDIInputStatus & outStatus, const UWord inSDIInputIndex0 = 0) const;
8176 
8184  bool SetInputTimecode (const NTV2TCIndex inTCNdx, const NTV2_RP188 & inTimecode);
8185 
8190  FRAME_STAMP & operator = (const FRAME_STAMP & inRHS);
8191 
8196  std::string operator [] (const unsigned inIndexNum) const;
8197 
8201  inline operator NTV2_HEADER*() {return reinterpret_cast<NTV2_HEADER*>(this);} // New in SDK 16.3
8202 
8204  NTV2_IS_STRUCT_VALID_IMPL(acHeader,acTrailer)
8205 
8206  #endif // !defined (NTV2_BUILDING_DRIVER)
8208 
8209 
8210 
8216  NTV2_HEADER acHeader;
8218  LWord acTransferFrame;
8219  ULWord acBufferLevel;
8220  ULWord acFramesProcessed;
8221  ULWord acFramesDropped;
8222  FRAME_STAMP acFrameStamp;
8223  ULWord acAudioTransferSize;
8224  ULWord acAudioStartSample;
8225  ULWord acAncTransferSize;
8226  ULWord acAncField2TransferSize;
8227  NTV2_TRAILER acTrailer;
8228 
8229  #if !defined (NTV2_BUILDING_DRIVER)
8230 
8233  explicit AUTOCIRCULATE_TRANSFER_STATUS ();
8234 
8238  inline const FRAME_STAMP & GetFrameStamp (void) const {return acFrameStamp;}
8239 
8243  inline LWord GetTransferFrame (void) const {return acTransferFrame;}
8244 
8248  inline NTV2AutoCirculateState GetState (void) const {return acState;}
8249 
8253  inline ULWord GetBufferLevel (void) const {return acBufferLevel;}
8254 
8258  inline ULWord GetProcessedFrameCount (void) const {return acFramesProcessed;}
8259 
8263  inline ULWord GetDroppedFrameCount (void) const {return acFramesDropped;}
8264 
8270  inline ULWord GetCapturedAudioByteCount (void) const {return acAudioTransferSize;}
8271 
8278  inline ULWord GetCapturedAncByteCount (const bool inField2 = false) const {return inField2 ? acAncField2TransferSize : acAncTransferSize;}
8279 
8286  inline ULWord GetCapturedAuxByteCount (const bool inField2 = false) const {return GetCapturedAncByteCount(inField2);}
8287 
8289  NTV2_IS_STRUCT_VALID_IMPL(acHeader,acTrailer)
8290 
8292  inline explicit AUTOCIRCULATE_TRANSFER_STATUS (const AUTOCIRCULATE_TRANSFER_STATUS & inObj) : acHeader(0xFEFEFEFE, 0) {(void) inObj;}
8293  inline AUTOCIRCULATE_TRANSFER_STATUS & operator = (const AUTOCIRCULATE_TRANSFER_STATUS & inRHS) {(void) inRHS; return *this;}
8295  #endif // !defined (NTV2_BUILDING_DRIVER)
8297 
8298 
8299 
8305  NTV2_HEADER acHeader;
8306 
8312  NTV2Buffer acVideoBuffer;
8313 
8319  NTV2Buffer acAudioBuffer;
8320 
8330  NTV2Buffer acANCBuffer;
8331 
8341  NTV2Buffer acANCField2Buffer;
8342 
8349  NTV2Buffer acOutputTimeCodes;
8350 
8357 
8363  ULWord64 acInUserCookie;
8364 
8371  ULWord acInVideoDMAOffset;
8372 
8373  NTV2SegmentedDMAInfo acInSegmentedDMAInfo;
8374  NTV2ColorCorrectionData acColorCorrection;
8375  NTV2FrameBufferFormat acFrameBufferFormat;
8376  NTV2FBOrientation acFrameBufferOrientation;
8377  AutoCircVidProcInfo acVidProcInfo;
8378  NTV2QuarterSizeExpandMode acVideoQuarterSizeExpand;
8379 
8380  NTV2Buffer acHDMIAuxData;
8381 
8385  ULWord acPeerToPeerFlags;
8387  ULWord acFrameRepeatCount;
8388  LWord acDesiredFrame;
8391  NTV2_TRAILER acTrailer;
8393 
8394  #if !defined (NTV2_BUILDING_DRIVER)
8395 
8398  explicit AUTOCIRCULATE_TRANSFER ();
8401 
8425  explicit AUTOCIRCULATE_TRANSFER (ULWord * pInVideoBuffer, const ULWord inVideoByteCount, ULWord * pInAudioBuffer = AJA_NULL,
8426  const ULWord inAudioByteCount = 0, ULWord * pInANCBuffer = AJA_NULL, const ULWord inANCByteCount = 0,
8427  ULWord * pInANCF2Buffer = AJA_NULL, const ULWord inANCF2ByteCount = 0);
8432  void Clear (void);
8433 
8435  inline explicit AUTOCIRCULATE_TRANSFER (const AUTOCIRCULATE_TRANSFER & inObj)
8436  : acHeader(0xFEFEFEFE, 0), acVideoBuffer(0), acAudioBuffer(0),
8437  acANCBuffer(0), acANCField2Buffer(0), acOutputTimeCodes(0), acHDMIAuxData(0)
8438  {(void) inObj;}
8439  inline AUTOCIRCULATE_TRANSFER & operator = (const AUTOCIRCULATE_TRANSFER & inRHS) {(void) inRHS; return *this;}
8442 
8446 
8472  bool SetBuffers (ULWord * pInVideoBuffer, const ULWord inVideoByteCount,
8473  ULWord * pInAudioBuffer, const ULWord inAudioByteCount,
8474  ULWord * pInANCBuffer, const ULWord inANCByteCount,
8475  ULWord * pInANCF2Buffer = AJA_NULL, const ULWord inANCF2ByteCount = 0);
8476 
8488  bool SetVideoBuffer (ULWord * pInVideoBuffer, const ULWord inVideoByteCount);
8489 
8500  bool SetAudioBuffer (ULWord * pInAudioBuffer, const ULWord inAudioByteCount);
8501 
8523  bool SetAncBuffers (ULWord * pInANCBuffer, const ULWord inANCByteCount,
8524  ULWord * pInANCF2Buffer = AJA_NULL, const ULWord inANCF2ByteCount = 0);
8528  inline const NTV2Buffer & GetVideoBuffer (void) const {return acVideoBuffer;}
8529 
8533  inline const NTV2Buffer & GetAudioBuffer (void) const {return acAudioBuffer;}
8534 
8539  inline const NTV2Buffer & GetAncBuffer (const bool inField2 = false) const {return inField2 ? acANCField2Buffer : acANCBuffer;}
8541 
8545 
8555  bool SetOutputTimeCodes (const NTV2TimeCodes & inValues);
8556 
8567  bool SetOutputTimeCode (const NTV2_RP188 & inTimecode, const NTV2TCIndex inTCIndex = NTV2_TCINDEX_SDI1);
8568 
8577  bool SetAllOutputTimeCodes (const NTV2_RP188 & inTimecode, const bool inIncludeF2 = true);
8578 
8586  bool GetInputTimeCodes (NTV2TimeCodeList & outValues) const;
8587 
8598  bool GetInputTimeCode (NTV2_RP188 & outTimeCode, const NTV2TCIndex inTCIndex = NTV2_TCINDEX_SDI1) const;
8599 
8612  bool GetInputTimeCodes (NTV2TimeCodes & outTimeCodes, const NTV2Channel inSDIInput = NTV2_CHANNEL1, const bool inValidOnly = true) const;
8614 
8618 
8629  inline bool SetFrameUserCookie (const ULWord64 & inUserCookie) {acInUserCookie = inUserCookie; return true;}
8630 
8638  bool SetFrameBufferFormat (const NTV2FrameBufferFormat inNewFormat);
8639 
8643  inline void EnableQuarterSizeExpandMode (void) {acVideoQuarterSizeExpand = NTV2_QuarterSizeExpandOn;}
8644 
8648  inline void DisableQuarterSizeExpandMode (void) {acVideoQuarterSizeExpand = NTV2_QuarterSizeExpandOff;}
8649 
8653  inline bool IsQuarterSizeExpandModeEnabled (void) const {return acVideoQuarterSizeExpand == NTV2_QuarterSizeExpandOn;}
8654 
8659  inline const AUTOCIRCULATE_TRANSFER_STATUS & GetTransferStatus (void) const {return acTransferStatus;}
8660 
8665  inline const FRAME_STAMP & GetFrameInfo (void) const {return acTransferStatus.acFrameStamp;}
8666 
8671  inline ULWord GetCapturedAudioByteCount (void) const {return acTransferStatus.GetCapturedAudioByteCount();}
8672 
8673  inline NTV2_DEPRECATED_f(ULWord GetAudioByteCount (void) const) {return GetCapturedAudioByteCount ();}
8674 
8681  inline ULWord GetCapturedAncByteCount (const bool inField2 = false) const {return acTransferStatus.GetCapturedAncByteCount(inField2);}
8682  inline NTV2_SHOULD_BE_DEPRECATED(ULWord GetAncByteCount (const bool inField2 = false) const) {return GetCapturedAncByteCount(inField2);}
8683 
8687  inline NTV2FrameBufferFormat GetFrameBufferFormat (void) const {return acFrameBufferFormat;}
8688 
8692  inline LWord GetTransferFrameNumber (void) const {return acTransferStatus.GetTransferFrame();}
8694 
8698 
8712  bool EnableSegmentedDMAs (const ULWord inNumSegments, const ULWord inNumActiveBytesPerLine,
8713  const ULWord inHostBytesPerLine, const ULWord inDeviceBytesPerLine);
8718  bool DisableSegmentedDMAs (void);
8719 
8723  bool SegmentedDMAsEnabled (void) const;
8725 
8729  inline operator NTV2_HEADER*() {return reinterpret_cast<NTV2_HEADER*>(this);} // New in SDK 16.3
8730 
8732  NTV2_IS_STRUCT_VALID_IMPL(acHeader,acTrailer)
8733  #endif // user-space clients only
8735 
8736 
8737 
8742  NTV2_HEADER mHeader;
8743  NTV2Buffer mSharedMemory;
8744  // and its length. The AJADebug logging facility owns and manages this memory.
8745  // If NULL or zero length, debug logging will be disabled in the driver.
8746  // If non-NULL and zero length, debug logging will be enabled in the driver.
8747  ULWord mReserved[32];
8748  NTV2_TRAILER mTrailer;
8749 
8750  #if !defined (NTV2_BUILDING_DRIVER)
8751 
8755  explicit NTV2DebugLogging (const bool inEnable = false);
8756 
8762  std::ostream & Print (std::ostream & inOutStream) const;
8763 
8764  NTV2_IS_STRUCT_VALID_IMPL(mHeader, mTrailer)
8765 
8766  #endif // !defined (NTV2_BUILDING_DRIVER)
8768 
8769 
8770 
8778  NTV2_HEADER mHeader;
8779  NTV2Buffer mBuffer;
8780  // A NULL buffer (or zero length) releases all locked buffers.
8781  ULWord mFlags;
8782  ULWord64 mMaxLockSize;
8783  ULWord mReserved[30];
8784  NTV2_TRAILER mTrailer;
8785 
8786  #if !defined (NTV2_BUILDING_DRIVER)
8787 
8790  explicit NTV2BufferLock ();
8792  inline ~NTV2BufferLock () {}
8793 
8799  explicit NTV2BufferLock (const NTV2Buffer & inBuffer, const ULWord inFlags);
8800 
8807  explicit NTV2BufferLock (const ULWord * pInBuffer, const ULWord inByteCount, const ULWord inFlags);
8808 
8814  explicit NTV2BufferLock (const ULWord64 inMaxLockSize, const ULWord inFlags); // New in SDK 16.0
8816 
8820 
8826  bool SetBuffer (const NTV2Buffer & inBuffer);
8827 
8834  inline bool SetBuffer (const ULWord * pInBuffer, const ULWord inByteCount)
8835  {
8836  return SetBuffer(NTV2Buffer(pInBuffer, inByteCount));
8837  }
8838 
8843  inline void SetFlags (const ULWord inFlags) {NTV2_ASSERT_STRUCT_VALID; mFlags = inFlags;}
8844 
8849  inline void SetMaxLockSize (const ULWord64 inNumBytes) {NTV2_ASSERT_STRUCT_VALID; mMaxLockSize = inNumBytes;} // New in SDK 16.0
8850 
8855  inline void Clear (void)
8856  {
8857  SetBuffer(NTV2Buffer());
8858  SetFlags(0);
8859  SetMaxLockSize(0);
8860  }
8862 
8868  std::ostream & Print (std::ostream & inOutStream) const;
8869 
8870  NTV2_IS_STRUCT_VALID_IMPL(mHeader, mTrailer)
8871 
8872  #endif // !defined (NTV2_BUILDING_DRIVER)
8874 
8875 
8876 
8882  NTV2_HEADER mHeader;
8883  NTV2Buffer mBuffer;
8884  ULWord mFlags;
8885  ULWord mStatus;
8886  ULWord mRegisters[16];
8887  ULWord mReserved[32];
8888  NTV2_TRAILER mTrailer;
8889 
8890  #if !defined (NTV2_BUILDING_DRIVER)
8891 
8894  explicit NTV2Bitstream ();
8896  inline ~NTV2Bitstream () {}
8897 
8903  explicit NTV2Bitstream (const NTV2Buffer & inBuffer, const ULWord inFlags);
8904 
8911  explicit NTV2Bitstream (const ULWord * pInBuffer, const ULWord inByteCount, const ULWord inFlags);
8913 
8917 
8923  bool SetBuffer (const NTV2Buffer & inBuffer);
8924 
8931  inline bool SetBuffer (const ULWord * pInBuffer, const ULWord inByteCount) {return SetBuffer(NTV2Buffer(pInBuffer, inByteCount));}
8932 
8937  inline void SetFlags (const ULWord inFlags) {NTV2_ASSERT_STRUCT_VALID; mFlags = inFlags;}
8938 
8942  inline void Clear (void) {SetBuffer(NTV2Buffer());}
8944 
8950  std::ostream & Print (std::ostream & inOutStream) const;
8951 
8955  inline operator NTV2_HEADER*() {return reinterpret_cast<NTV2_HEADER*>(this);} // New in SDK 16.3
8956 
8958  NTV2_IS_STRUCT_VALID_IMPL(mHeader, mTrailer)
8959 
8960  #endif // !defined (NTV2_BUILDING_DRIVER)
8962 
8963 
8964  // Stream channel action flags
8965  #define NTV2_STREAM_CHANNEL_INITIALIZE BIT(0)
8966  #define NTV2_STREAM_CHANNEL_RELEASE BIT(1)
8967  #define NTV2_STREAM_CHANNEL_START BIT(2)
8968  #define NTV2_STREAM_CHANNEL_STOP BIT(3)
8969  #define NTV2_STREAM_CHANNEL_FLUSH BIT(4)
8970  #define NTV2_STREAM_CHANNEL_STATUS BIT(5)
8971  #define NTV2_STREAM_CHANNEL_WAIT BIT(6)
8972 
8973  // Stream channel state flags
8974  #define NTV2_STREAM_CHANNEL_STATE_DISABLED BIT(0)
8975  #define NTV2_STREAM_CHANNEL_STATE_INITIALIZED BIT(1)
8976  #define NTV2_STREAM_CHANNEL_STATE_RELEASED BIT(2)
8977  #define NTV2_STREAM_CHANNEL_STATE_IDLE BIT(3)
8978  #define NTV2_STREAM_CHANNEL_STATE_ACTIVE BIT(4)
8979  #define NTV2_STREAM_CHANNEL_STATE_ERROR BIT(5)
8980 
8981  // Stream buffer action flags
8982  #define NTV2_STREAM_BUFFER_QUEUE BIT(1)
8983  #define NTV2_STREAM_BUFFER_RELEASE BIT(2)
8984  #define NTV2_STREAM_BUFFER_STATUS BIT(3)
8985 
8986  // Stream buffer state flags
8987  #define NTV2_STREAM_BUFFER_STATE_QUEUED BIT(0)
8988  #define NTV2_STREAM_BUFFER_STATE_LINKED BIT(1)
8989  #define NTV2_STREAM_BUFFER_STATE_COMPLETED BIT(2)
8990  #define NTV2_STREAM_BUFFER_STATE_FLUSHED BIT(3)
8991  #define NTV2_STREAM_BUFFER_STATE_RELEASED BIT(4)
8992  #define NTV2_STREAM_BUFFER_STATE_ERROR BIT(5)
8993 
8994  // Stream action status flags
8995  #define NTV2_STREAM_STATUS_SUCCESS BIT(0)
8996  #define NTV2_STREAM_STATUS_FAIL BIT(1)
8997  #define NTV2_STREAM_STATUS_STATE BIT(2)
8998  #define NTV2_STREAM_STATUS_MESSAGE BIT(3)
8999  #define NTV2_STREAM_STATUS_INVALID BIT(4)
9000  #define NTV2_STREAM_STATUS_TIMEOUT BIT(5)
9001  #define NTV2_STREAM_STATUS_RESOURCE BIT(6)
9002  #define NTV2_STREAM_STATUS_OWNER BIT(7)
9003 
9005  NTV2_HEADER mHeader;
9006  NTV2Channel mChannel;
9007  ULWord mFlags;
9008  ULWord mStatus;
9009  ULWord mStreamState;
9010  ULWord64 mBufferCookie;
9011  LWord64 mStartTime;
9012  LWord64 mStopTime;
9013  ULWord64 mQueueCount;
9014  ULWord64 mReleaseCount;
9015  ULWord64 mActiveCount;
9016  ULWord64 mRepeatCount;
9017  ULWord64 mIdleCount;
9018  ULWord mReserved[32];
9019  NTV2_TRAILER mTrailer;
9020 
9021  #if !defined (NTV2_BUILDING_DRIVER)
9022 
9025  explicit NTV2StreamChannel ();
9027  inline ~NTV2StreamChannel () {}
9028 
9030  inline operator NTV2_HEADER*() {return reinterpret_cast<NTV2_HEADER*>(this);} // New in SDK 16.3
9031 
9036  inline ULWord GetQueueDepth (void) {return (ULWord)(mQueueCount - mReleaseCount);}
9037 
9042  inline bool IsIdle (void) {return ((mStreamState & NTV2_STREAM_CHANNEL_STATE_IDLE) != 0);}
9043 
9048  inline bool IsActive (void) {return ((mStreamState & NTV2_STREAM_CHANNEL_STATE_ACTIVE) != 0);}
9049 
9054  inline bool HasError (void) {return ((mStreamState & NTV2_STREAM_CHANNEL_STATE_ERROR) != 0);}
9055 
9056  std::ostream & Print (std::ostream & inOutStream) const;
9057 
9058  NTV2_IS_STRUCT_VALID_IMPL(mHeader, mTrailer)
9059 
9060  #endif // !defined (NTV2_BUILDING_DRIVER)
9061 
9063 
9065  NTV2_HEADER mHeader;
9066  NTV2Channel mChannel;
9067  ULWord mFlags;
9068  ULWord mStatus;
9069  NTV2Buffer mBuffer;
9070  ULWord mSegmentSize;
9071  LWord mSegmentPitch;
9072  ULWord mNumSegments;
9073  ULWord64 mBufferCookie;
9074  ULWord mBufferState;
9075  LWord64 mQueueTime;
9076  LWord64 mActiveTime;
9077  LWord64 mCompleteTime;
9078  LWord64 mFlushTime;
9079  ULWord64 mTransferCount;
9080  ULWord mReserved[32];
9081  NTV2_TRAILER mTrailer;
9082 
9083  #if !defined (NTV2_BUILDING_DRIVER)
9084 
9087  explicit NTV2StreamBuffer ();
9089  inline ~NTV2StreamBuffer () {}
9090 
9092  inline operator NTV2_HEADER*() {return reinterpret_cast<NTV2_HEADER*>(this);} // New in SDK 16.3
9093 
9094  std::ostream & Print (std::ostream & inOutStream) const;
9095 
9096  NTV2_IS_STRUCT_VALID_IMPL(mHeader, mTrailer)
9097 
9098  #endif // !defined (NTV2_BUILDING_DRIVER)
9099 
9101 
9102  // Mail buffer action flags
9103  #define NTV2_MAIL_BUFFER_SEND BIT(0)
9104  #define NTV2_MAIL_BUFFER_RECEIVE BIT(1)
9105 
9106  // Mail buffer status flags
9107  #define NTV2_MAIL_BUFFER_SUCCESS BIT(0)
9108  #define NTV2_MAIL_BUFFER_FAIL BIT(1)
9109  #define NTV2_MAIL_BUFFER_OVERFLOW BIT(2)
9110  #define NTV2_MAIL_BUFFER_TIMEOUT BIT(3)
9111  #define NTV2_MAIL_BUFFER_TRYAGAIN BIT(4)
9112 
9113  // Mail buffer maximum size
9114  #define NTV2_MAIL_BUFFER_MAX 4096
9115 
9117  NTV2_HEADER mHeader;
9118  NTV2Channel mChannel;
9119  NTV2Buffer mBuffer;
9120  ULWord mDataSize;
9121  ULWord mFlags;
9122  ULWord mDelay;
9123  ULWord mTimeout;
9124  ULWord mStatus;
9125  ULWord mReserved[32];
9126  NTV2_TRAILER mTrailer;
9127 
9128  #if !defined (NTV2_BUILDING_DRIVER)
9129 
9132  explicit NTV2MailBuffer ();
9134  inline ~NTV2MailBuffer () {}
9135 
9137  inline operator NTV2_HEADER*() {return reinterpret_cast<NTV2_HEADER*>(this);} // New in SDK 16.3
9138 
9139  std::ostream & Print (std::ostream & inOutStream) const;
9140 
9141  NTV2_IS_STRUCT_VALID_IMPL(mHeader, mTrailer)
9142 
9143  #endif // !defined (NTV2_BUILDING_DRIVER)
9144 
9146 
9147  #if !defined (NTV2_BUILDING_DRIVER)
9148  typedef std::set <NTV2VideoFormat> NTV2VideoFormatSet;
9149  typedef NTV2VideoFormatSet::const_iterator NTV2VideoFormatSetConstIter;
9150 
9151  typedef std::set <NTV2FrameBufferFormat> NTV2FrameBufferFormatSet;
9152  typedef NTV2FrameBufferFormatSet::const_iterator NTV2FrameBufferFormatSetConstIter;
9153  typedef NTV2FrameBufferFormatSet NTV2PixelFormats; // New in SDK 17.0
9155 
9156  typedef std::set <NTV2FrameGeometry> NTV2GeometrySet;
9157  typedef NTV2GeometrySet::const_iterator NTV2GeometrySetConstIter;
9158 
9159  typedef std::set <NTV2Standard> NTV2StandardSet;
9160  typedef NTV2StandardSet::const_iterator NTV2StandardSetConstIter;
9161 
9162  typedef std::set <NTV2InputSource> NTV2InputSourceSet;
9163  typedef NTV2InputSourceSet::const_iterator NTV2InputSourceSetConstIter;
9164 
9165  typedef std::set <NTV2OutputDestination> NTV2OutputDestinations;
9166  typedef NTV2OutputDestinations::const_iterator NTV2OutputDestinationsConstIter;
9167 
9168  typedef std::set <NTV2FrameRate> NTV2FrameRateSet;
9169  typedef NTV2FrameRateSet::const_iterator NTV2FrameRateSetConstIter;
9170 
9171  typedef std::set <NTV2AudioRate> NTV2AudioRateSet;
9172  typedef NTV2AudioRateSet::const_iterator NTV2AudioRateSetConstIter;
9173 
9180  AJAExport std::ostream & operator << (std::ostream & inOutStream, const UWordSequence & inData);
9181 
9188  AJAExport std::ostream & operator << (std::ostream & inOutStream, const ULWordSequence & inData);
9189 
9196  AJAExport std::ostream & operator << (std::ostream & inOutStream, const ULWord64Sequence & inData);
9197 
9203 
9212  AJAExport bool NTV2DeviceGetSupportedVideoFormats (const NTV2DeviceID inDeviceID, NTV2VideoFormatSet & outFormats);
9213 
9221 
9228  AJAExport std::ostream & operator << (std::ostream & inOStream, const NTV2VideoFormatSet & inFormats);
9229 
9237  AJAExport bool NTV2DeviceGetSupportedPixelFormats (const NTV2DeviceID inDeviceID, NTV2PixelFormats & outFormats);
9238 
9244  AJAExport bool NTV2GetSupportedPixelFormats (NTV2PixelFormats & outFormats); // New in SDK 17.0
9245 
9251  AJAExport bool NTV2GetUnsupportedPixelFormats (NTV2PixelFormats & outFormats); // New in SDK 17.0
9252 
9258  AJAExport bool NTV2GetSupportedStandards (NTV2StandardSet & outStandards); // New in SDK 17.0
9259 
9265  AJAExport bool NTV2GetUnsupportedStandards (NTV2StandardSet & outStandards); // New in SDK 17.0
9266 
9273  AJAExport std::ostream & operator << (std::ostream & inOStream, const NTV2PixelFormats & inFormats);
9274 
9282 
9290  AJAExport bool NTV2DeviceGetSupportedStandards (const NTV2DeviceID inDeviceID, NTV2StandardSet & outStandards);
9291 
9298  AJAExport std::ostream & operator << (std::ostream & inOStream, const NTV2StandardSet & inStandards);
9299 
9307 
9315  AJAExport bool NTV2DeviceGetSupportedGeometries (const NTV2DeviceID inDeviceID, NTV2GeometrySet & outGeometries);
9316 
9323  AJAExport std::ostream & operator << (std::ostream & inOStream, const NTV2GeometrySet & inGeometries);
9324 
9332 
9339  AJAExport std::ostream & operator << (std::ostream & inOStream, const NTV2InputSourceSet & inSet);
9340 
9348 
9358  AJAExport bool NTV2DeviceGetSupportedInputSources (const NTV2DeviceID inDeviceID, NTV2InputSourceSet & outInputSources, const NTV2IOKinds inKinds = NTV2_IOKINDS_ALL); // New in SDK 16.3
9359 
9366  AJAExport std::ostream & operator << (std::ostream & inOStream, const NTV2OutputDestinations & inSet); // New in SDK 16.0
9367 
9374  AJAExport NTV2OutputDestinations & operator += (NTV2OutputDestinations & inOutSet, const NTV2OutputDestinations & inSet); // New in SDK 16.0
9375 
9385  AJAExport bool NTV2DeviceGetSupportedOutputDests (const NTV2DeviceID inDeviceID, NTV2OutputDestinations & outOutputDests, const NTV2IOKinds inKinds = NTV2_IOKINDS_ALL); // New in SDK 16.3
9386 
9393  AJAExport std::ostream & operator << (std::ostream & inOStream, const NTV2FrameRateSet & inSet); // New in SDK 17.0
9394 
9401  AJAExport NTV2FrameRateSet & operator += (NTV2FrameRateSet & inOutSet, const NTV2FrameRateSet & inSet); // New in SDK 17.0
9402 
9411  AJAExport bool NTV2DeviceGetSupportedFrameRates (const NTV2DeviceID inDeviceID, NTV2FrameRateSet & outRates); // New in SDK 17.0
9412 
9413 
9420  AJAExport std::ostream & operator << (std::ostream & inOutStream, const NTV2_HEADER & inObj);
9421 
9428  AJAExport std::ostream & operator << (std::ostream & inOutStream, const NTV2_TRAILER & inObj);
9429 
9436  AJAExport std::ostream & operator << (std::ostream & inOutStream, const NTV2Buffer & inObj);
9437 
9444  AJAExport std::ostream & operator << (std::ostream & inOutStream, const NTV2_RP188 & inObj);
9445 
9452  AJAExport std::ostream & operator << (std::ostream & inOutStream, const NTV2TimeCodeList & inObj);
9453 
9460  AJAExport std::ostream & operator << (std::ostream & inOutStream, const NTV2TimeCodes & inObj);
9461 
9468  AJAExport std::ostream & operator << (std::ostream & inOutStream, const NTV2TCIndexes & inObj);
9469 
9476  AJAExport NTV2TCIndexes & operator += (NTV2TCIndexes & inOutSet, const NTV2TCIndexes & inSet);
9477 
9484  AJAExport std::ostream & operator << (std::ostream & inOutStream, const FRAME_STAMP & inObj);
9485 
9492  AJAExport std::ostream & operator << (std::ostream & inOutStream, const AUTOCIRCULATE_STATUS & inObj);
9493 
9500  AJAExport std::ostream & operator << (std::ostream & inOutStream, const NTV2SegmentedDMAInfo & inObj);
9501 
9508  AJAExport std::ostream & operator << (std::ostream & inOutStream, const AUTOCIRCULATE_TRANSFER & inObj);
9509 
9516  AJAExport std::ostream & operator << (std::ostream & inOutStream, const FRAME_STAMP & inObj);
9517 
9524  AJAExport std::ostream & operator << (std::ostream & inOutStream, const AUTOCIRCULATE_TRANSFER_STATUS & inObj);
9525 
9532  AJAExport std::ostream & operator << (std::ostream & inOutStream, const NTV2RegisterNumberSet & inObj);
9533 
9540  AJAExport std::ostream & operator << (std::ostream & inOutStream, const NTV2RegisterValueMap & inObj);
9541 
9548  AJAExport std::ostream & operator << (std::ostream & inOutStream, const AutoCircVidProcInfo & inObj);
9549 
9556  AJAExport std::ostream & operator << (std::ostream & inOutStream, const NTV2ColorCorrectionData & inObj);
9557 
9564  AJAExport inline std::ostream & operator << (std::ostream & inOutStream, const NTV2GetRegisters & inObj) {return inObj.Print (inOutStream);}
9565 
9572  AJAExport inline std::ostream & operator << (std::ostream & inOutStream, const NTV2SetRegisters & inObj) {return inObj.Print (inOutStream);}
9573 
9580  AJAExport inline std::ostream & operator << (std::ostream & inOutStream, const NTV2BankSelGetSetRegs & inObj) {return inObj.Print (inOutStream);}
9581 
9588  AJAExport inline std::ostream & operator << (std::ostream & inOutStream, const NTV2SDIInStatistics & inObj) {return inObj.Print (inOutStream);}
9589 
9596  AJAExport inline std::ostream & operator << (std::ostream & inOutStream, const NTV2SDIInputStatus & inObj) {return inObj.Print (inOutStream);}
9597 
9604  AJAExport std::ostream & operator << (std::ostream & inOutStrm, const NTV2SegmentedXferInfo & inXferInfo);
9605 
9612  AJAExport inline std::ostream & operator << (std::ostream & inOutStream, const NTV2DebugLogging & inObj) {return inObj.Print (inOutStream);}
9613 
9620  AJAExport inline std::ostream & operator << (std::ostream & inOutStream, const NTV2BufferLock & inObj) {return inObj.Print (inOutStream);}
9621  #endif // !defined (NTV2_BUILDING_DRIVER)
9622 
9623  #if defined (AJAMac)
9624  #pragma pack (pop)
9625  #endif // defined (AJAMac)
9626 
9628 #if !defined(NTV2_DEPRECATE_17_6)
9629 
9631  // maximum number of hevc streams
9632  #define HEVC_STREAM_MAX 4
9633 
9634  // maximum number of gpio ports
9635  #define HEVC_GPIO_MAX 64
9636 
9637  // version string maximum size (bytes)
9638  #define HEVC_VERSION_STRING_SIZE 64
9639 
9640  // picture and encoded information additional data size (bytes)
9641  #define HEVC_ADDITIONAL_DATA_SIZE ((4 + 4 + 256) * 16)
9642 
9643  // codec state flags
9644  #define HEVC_STATE_FLAG_VIDEO_STARTED 0x00000001U // codec video input capture started
9645 
9646  // transfer flags
9647  #define HEVC_TRANSFER_FLAG_IS_LAST_FRAME 0x00000001U // last stream frame
9648 
9649  // driver io status codes
9650  #define HEVC_STATUS_SUCCESS 0x00000001U
9651 
9652  // fatal error registers
9653  #define HEVC_FATAL_ERROR_INFO_REG 0x08000100U // codec error register base
9654  #define HEVC_FATAL_ERROR_INFO_COUNT 64 // number of codec error registers
9655 
9656  // driver debug register output enable bits
9657  #define HEVC_DEBUG_DRIVER_REGISTER 0x080000FCU // register address of debug bits
9658  #define HEVC_DEBUG_MASK_INFO 0x00000001 // general probe and cleanup
9659  #define HEVC_DEBUG_MASK_WARNING 0x00000002 // general warinings
9660  #define HEVC_DEBUG_MASK_ERROR 0x00000004 // general erros
9661  #define HEVC_DEBUG_MASK_INT_PRIMARY 0x00000008 // primary interrupt info
9662  #define HEVC_DEBUG_MASK_INT_COMMAND 0x00000010 // command tasklet info
9663  #define HEVC_DEBUG_MASK_INT_VEI 0x00000020 // raw stream tasklet info
9664  #define HEVC_DEBUG_MASK_INT_SEO 0x00000040 // encoded stream tasklet info
9665  #define HEVC_DEBUG_MASK_INT_ERROR 0x00000080 // interrupt errors
9666  #define HEVC_DEBUG_MASK_REGISTER_INFO 0x00000100 // register read/write info
9667  #define HEVC_DEBUG_MASK_REGISTER_STATE 0x00000200 // detailed register access info
9668  #define HEVC_DEBUG_MASK_REGISTER_ERROR 0x00000400 // register access errors
9669  #define HEVC_DEBUG_MASK_COMMAND_INFO 0x00000800 // command queue info
9670  #define HEVC_DEBUG_MASK_COMMAND_STATE 0x00001000 // detailed command processing info
9671  #define HEVC_DEBUG_MASK_COMMAND_ERROR 0x00002000 // command queue errors
9672  #define HEVC_DEBUG_MASK_STREAM_INFO 0x00004000 // stream (dma) queue info
9673  #define HEVC_DEBUG_MASK_STREAM_STATE 0x00008000 // detailed stream processing info
9674  #define HEVC_DEBUG_MASK_STREAM_COPY 0x00010000 // stream data copy info
9675  #define HEVC_DEBUG_MASK_STREAM_SEGMENT 0x00020000 // stream data segment info
9676  #define HEVC_DEBUG_MASK_STREAM_FRAME 0x00040000 // stream vif frame info
9677  #define HEVC_DEBUG_MASK_STREAM_ERROR 0x00080000 // stream queue errors
9678  #define HEVC_DEBUG_MASK_MEMORY_ALLOC 0x00100000 // buffer memory allocation info
9679  #define HEVC_DEBUG_MASK_MEMORY_ERROR 0x00200000 // buffer memory allocation errors
9680  #define HEVC_DEBUG_MASK_DMA_INFO 0x00400000 // dma send info
9681  #define HEVC_DEBUG_MASK_DMA_DESCRIPTOR 0x00800000 // dma descriptor dump
9682  #define HEVC_DEBUG_MASK_DMA_ERROR 0x01000000 // dma errors
9683  #define HEVC_DEBUG_MASK_STATUS_INFO 0x02000000 // status info requests
9684  #define HEVC_DEBUG_MASK_RESERVED_0 0x04000000
9685  #define HEVC_DEBUG_MASK_RESERVED_1 0x08000000
9686  #define HEVC_DEBUG_MASK_RESERVED_2 0x10000000
9687  #define HEVC_DEBUG_MASK_RESERVED_3 0x20000000
9688  #define HEVC_DEBUG_MASK_RESERVED_4 0x40000000
9689  #define HEVC_DEBUG_MASK_RESERVED_5 0x80000000
9690 
9691  // ntv2 gpio input registers
9692  #define HEVC_NTV2_GPIO_REGISTER_LOW 510
9693  #define HEVC_NTV2_GPIO_REGISTER_HIGH 511
9694 
9695 
9696  // hevc version information
9697  typedef struct HevcVersion
9698  {
9703  } HevcVersion;
9704 
9705  // pci id information
9706  typedef struct HevcPciId
9707  {
9712  } HevcPciId;
9713 
9714  // hevc device mode
9715  typedef enum HevcDeviceMode
9716  {
9718  Hevc_DeviceMode_Codec, // codec mode
9719  Hevc_DeviceMode_Maintenance, // maintenance mode
9721  } HevcDeviceMode;
9722 
9723  // hevc device information message
9724  typedef struct HevcDeviceInfo
9725  {
9726  HevcVersion driverVersion; // driver version
9727  HevcVersion mcpuVersion; // firmware versions
9733  HevcPciId pciId; // pci ids
9734  HevcDeviceMode deviceMode; // hardware device mode
9735  bool mcpuVersionCheck; // mcpu version supported
9736  bool systemVersionCheck; // system version supported
9737  bool standardSingleCheck; // standard firmware single version supported
9738  bool standardMultipleCheck; // standard fimwrare multiple version supported
9739  bool pciIdCheck; // pci id supported
9740  } HevcDeviceInfo;
9741 
9742  // hevc register
9743  typedef struct HevcDeviceRegister
9744  {
9745  ULWord address; // register address
9746  ULWord writeValue; // register write value
9747  ULWord readValue; // register read value
9748  ULWord mask; // register value mask
9749  ULWord shift; // register value shift
9750  bool write; // write flag
9751  bool read; // read flag
9752  bool forceBar4; // force bar4 access
9754 
9755  // hevc main state
9756  typedef enum HevcMainState
9757  {
9759  Hevc_MainState_Boot, // codec has booted
9760  Hevc_MainState_Init, // initialize codec
9761  Hevc_MainState_Encode, // configure encoding (load firmware?)
9762  Hevc_MainState_Error, // codec must be reset
9764  } HevcMainState;
9765 
9766  // encoder mode
9767  typedef enum HevcEncodeMode
9768  {
9770  Hevc_EncodeMode_Single, // encode a sigle stream
9771  Hevc_EncodeMode_Multiple, // encode multiple streams
9773  } HevcEncodeMode;
9774 
9775  // encoder firmware type
9776  typedef enum HevcFirmwareType
9777  {
9779  Hevc_FirmwareType_Standard, // encode firmware standard
9780  Hevc_FirmwareType_User, // encode firmware user
9782  } HevcFirmwareType;
9783 
9784  // hevc video interface state
9785  typedef enum HevcVifState
9786  {
9788  Hevc_VifState_Stop, // video interface stop
9789  Hevc_VifState_Start, // video interface start
9791  } HevcVifState;
9792 
9793  // hevc video input state
9794  typedef enum HevcVinState
9795  {
9797  Hevc_VinState_Stop, // video input stop
9798  Hevc_VinState_Start, // video input start
9800  } HevcVinState;
9801 
9802  // hevc encoder state
9803  typedef enum HevcEhState
9804  {
9806  Hevc_EhState_Stop, // encoder stop
9807  Hevc_EhState_Start, // encoder start
9808  Hevc_EhState_ReadyToStop, // encoder ready to stop
9810  } HevcEhState;
9811 
9812  // hevc gpio control
9813  typedef enum HevcGpioControl
9814  {
9816  Hevc_GpioControl_Function, // configure gpio port function
9817  Hevc_GpioControl_Direction, // configure gpio port direction
9818  Hevc_GpioControl_Set, // set gpio port value
9819  Hevc_GpioControl_Get, // get pgio port value
9821  } HevcGpioControl;
9822 
9823  // hevc gpio function
9824  typedef enum HevcGpioFunction
9825  {
9827  Hevc_GpioFunction_Gpio, // gpio function is gpio
9828  Hevc_GpioFunction_Peripheral, // gpio function is peripheral
9830  } HevcGpioFunction;
9831 
9832  // hevc gpio direction
9833  typedef enum HevcGpioDirection
9834  {
9836  Hevc_GpioDirection_Input, // gpio direction is input
9837  Hevc_GpioDirection_Output, // gpio direction is output
9840 
9841  // hevc gpio value
9842  typedef enum HevcGpioValue
9843  {
9845  Hevc_GpioValue_Low, // gpio direction is input
9846  Hevc_GpioValue_High, // gpio direction is output
9848  } HevcGpioValue;
9849 
9850  typedef enum HevcChangeSequence
9851  {
9857 
9858  // hevc change param target
9859  #define Hevc_ParamTarget_None 0x00000000
9860  #define Hevc_ParamTarget_Vbr 0x00000001 // change variable bitrate
9861  #define Hevc_ParamTarget_Cbr 0x00000002 // change constant bitrate
9862  #define Hevc_ParamTarget_Resolution 0x00000004 // change size, crop, pan, etc.
9863  #define Hevc_ParamTarget_Frame_Rate 0x00000008 // change frame rate
9864  #define Hevc_ParamTarget_All 0x0000000f
9865 
9866  // hevc commands
9867  typedef enum HevcCommand
9868  {
9870  Hevc_Command_MainState, // set main state
9871  Hevc_Command_VinState, // set video input state
9872  Hevc_Command_EhState, // set encoder state
9873  Hevc_Command_Gpio, // control gpio
9874  Hevc_Command_Reset, // reset codec
9875  Hevc_Command_ChangeParam, // change dynamic params during encode
9876  Hevc_Command_ChangePicture, // change picture type
9878  } HevcCommand;
9879 
9880  // hevc command information
9881  typedef struct HevcDeviceCommand
9882  {
9883  HevcCommand command; // command type
9884  // main state command info
9885  HevcMainState mainState; // set main state
9886  HevcEncodeMode encodeMode; // set encoder mode
9887  HevcFirmwareType firmwareType; // set encode firmware type
9888  // vin/eh state command info
9889  HevcVinState vinState; // set video input state
9890  HevcEhState ehState; // set encoder state
9891  ULWord streamBits; // command applies to each stream bit
9892  // gpio command info
9893  HevcGpioControl gpioControl; // gpio control type
9894  ULWord gpioNumber; // gpio port number (function, direction, set, get)
9895  HevcGpioFunction gpioFunction; // gpio port function (function)
9896  HevcGpioDirection gpioDirection; // gpio port direction (direction)
9897  HevcGpioValue gpioValue; // gpio port value (set, get)
9898  // change encode params
9899  ULWord paramTarget; // parameters to change
9900  ULWord paramStreamId; // stream id
9901  HevcChangeSequence changeSequence; // start new sequence (vbr)
9902  ULWord maxBitRate; // maximum bitrate (vbr)
9903  ULWord aveBitRate; // average bitrate (vbr and cbr)
9904  ULWord minBitRate; // minimum bitrate (vbr)
9905  ULWord seqEndPicNumber; // last picture number of sequence (resolution and frame rate)
9906  ULWord hSizeEh; // resolution parameters
9926  ULWord frameRateCode; // frame rate parameter
9927  // change picture type
9928  ULWord picType; // picture type
9929  ULWord picStreamId; // stream id
9930  ULWord gopEndPicNumber; // last picture number of gop
9931  // general command flags
9932  ULWord flags; // command flags
9934 
9935  // hevc stream types
9936  typedef enum HevcStream
9937  {
9939  Hevc_Stream_VideoRaw, // raw data stream
9940  Hevc_Stream_VideoEnc, // encoded data stream
9942  } HevcStream;
9943 
9944  // hevc picture data (raw streams)
9945  typedef struct HevcPictureData
9946  {
9947  ULWord serialNumber; // serial number (application data)
9948  ULWord ptsValueLow; // presentation time stamp (90kHz)
9949  ULWord ptsValueHigh; // pts high bit only (33 bit roll over)
9950  ULWord pictureNumber; // start with 1 and increment for each picture
9951  ULWord numAdditionalData; // number of additional data entries
9952  } HevcPictureData;
9953 
9954  // hevc picture information (raw streams)
9955  typedef struct HevcPictureInfo
9956  {
9957  HevcPictureData pictureData; // raw stream picture data
9958  //
9959  // additional data format
9960  // u32 additional_data_type
9961  // u32 additional_data_size (256 bytes max)
9962  // u8... additional_data_payload
9963  // ... more additional data
9964  //
9965  // additional data types
9966  // 1 = sei data
9967  // 2 = passthrough data (to encoded additional data of encoded frame)
9968  // 4 = cancel sei on every gop (set additional size to 0)
9969  //
9970  // sei data format
9971  // u8 user_sei_location
9972  // u8 user_sei_type
9973  // u8 user_sei_length
9974  // u8... user_sei_payload
9975  //
9976  // user sei location
9977  // 2 = every gop head picture
9978  // 3 = this picture only
9979  //
9980  // passthrough data format
9981  // u8... passthrough_data_payload
9982  //
9984  } HevcPictureInfo;
9985 
9986  // hevc encoded stream data (encoded streams)
9987  typedef struct HevcEncodedData
9988  {
9989  ULWord serialNumber; // serial number (from picture information)
9990  ULWord esOffsetLow; // encoded stream frame location (?)
9991  ULWord esOffsetHigh; // es frame location high 32 bits
9992  ULWord esSize; // encoded stream frame size (?)
9993  ULWord ptsValueLow; // presentation time stamp (picture information)
9994  ULWord ptsValueHigh; // pts high bit (33 bit roll over)
9995  ULWord dtsValueLow; // decoding time stamp (90 kHz)
9996  ULWord dtsValueHigh; // dts high bit (33 bit roll over)
9997  ULWord itcValueLow; // internal time clock (90 kHz)
9998  ULWord itcValueHigh; // itc high bit (33 bit roll over)
9999  ULWord itcExtension; // internal time extension (27 MHz)
10000  ULWord temporalId; // temporal ID
10001  ULWord esIdrType; // 0 = not IDR, 1 = IDR, 3 = IDR command
10002  ULWord pictureType; // 0 = I-frame, 1 = P-frame, 2 = B-frame
10003  ULWord nalOffset; // offset to the nal top of the idr/i picture
10004  ULWord cpbValue; // codec picture buffer occupancy value
10005  ULWord esHSize; // horizontal resolution
10006  ULWord esVSize; // vertical resolution
10007  ULWord esUnitsInTick; // frame duration (2x eh param value for half rate)
10008  ULWord esBitRate; // bit rate (Kbps)
10009  ULWord esEndFlag; // 0 = not end of sequence, 1 = end of sequence
10010  ULWord esLastFrame; // 0xffffffff = last frame
10019  ULWord numAdditionalData; // number of additional data entries
10020  } HevcEncodedData;
10021 
10022  // hevc encode stream information (encoded streams)
10023  typedef struct HevcEncodedInfo
10024  {
10025  HevcEncodedData encodedData; // encoded stream data
10027  } HevcEncodedInfo;
10028 
10029  // hevc stream transfer information
10030  typedef struct HevcDeviceTransfer
10031  {
10032  HevcStream streamType; // transfer stream type
10033  ULWord streamId; // transfer stream id
10034 
10035  UByte* pVideoBuffer; // video buffer
10036  ULWord videoBufferSize; // total video buffer size
10037  ULWord videoDataSize; // video data size in buffer
10038 
10039  ULWord segVideoPitch; // video segment pitch
10040  ULWord segCodecPitch; // codec segment pitch
10041  ULWord segSize; // segment size
10042  ULWord segCount; // number of segments
10043 
10044  UByte* pInfoBuffer; // information buffer (picture or encoded)
10045  ULWord infoBufferSize; // total information buffer size
10046  ULWord infoDataSize; // information size in buffer
10047 
10048  LWord64 encodeTime; // frame encode time (100ns host system clock)
10049  ULWord flags; // transfer flags (see above for last frame flag)
10051 
10052  // hevc gpio port status
10053  typedef struct hevc_gpio_state
10054  {
10055  HevcGpioFunction function; // gpio last set port function
10056  HevcGpioDirection direction; // gpio last set port direction
10057  HevcGpioValue setValue; // gpio last set value
10058  HevcGpioValue getValue; // gpio last get value
10059  } HevcGpioState;
10060 
10061  // hevc stream statistics (nsec, bytes)
10062  typedef struct hevc_stream_statistics
10063  {
10064  LWord64 transferCount; // number of transfers queued
10065  LWord64 minTransferTime; // minimum time between transfers
10066  LWord64 avrTransferTime; // average time between transfers
10067  LWord64 maxTransferTime; // maximum time between transfers
10068  LWord64 minTransferSize; // minimum transfer size
10069  LWord64 maxTransferSize; // maximum transfer size
10070  LWord64 avrTransferSize; // average transfer size
10071  LWord64 minCopyDuration; // time for io thread to copy frames
10072  LWord64 maxCopyDuration; // to/from bounce buffer
10074  LWord64 minEnqueueDuration; // time from io thread enqueue
10075  LWord64 maxEnqueueDuration; // to send to codec
10077  LWord64 minSendDuration; // time from send to codec
10078  LWord64 maxSendDuration; // to codec acknowledge
10080  LWord64 minDmaDuration; // time from codec acknowledge
10081  LWord64 maxDmaDuration; // to codec dma completion
10083  LWord64 minDequeueDuration; // time from io thread enqueue
10084  LWord64 maxDequeueDuration; // to io thread dequeue
10087 
10088  // hevc status information
10089  typedef struct HevcDeviceStatus
10090  {
10091  HevcMainState mainState; // codec main state
10092  HevcEncodeMode encodeMode; // codec encode mode
10093  HevcFirmwareType firmwareType; // codec firmware type
10094 
10095  HevcVifState vifState[HEVC_STREAM_MAX]; // video interface state
10096  HevcVinState vinState[HEVC_STREAM_MAX]; // video input state
10099 
10100  LWord64 commandCount; // number of commands processed
10101  LWord64 rawTransferCount; // number of raw transfers processed
10102  LWord64 encTransferCount; // number of encoded transfers processed
10103 
10104  ULWord commandQueueLevel; // number of commands in command queue
10105  ULWord rawTransferQueueLevel; // number of transfers in raw transfer queue
10106  ULWord encTransferQueueLevel; // number of transfers in encoded transfer queue
10107  } HevcDeviceStatus;
10108 
10109  // hevc debug information
10110  typedef struct HevcDeviceDebug
10111  {
10112  HevcDeviceStatus deviceStatus; // device status structure
10113 
10114  HevcStreamStatistics rawStats[HEVC_STREAM_MAX]; // raw stream statistics
10115  HevcStreamStatistics encStats[HEVC_STREAM_MAX]; // encoded stream statistics
10116  ULWord queueLevel[HEVC_STREAM_MAX]; // stream queue level
10117  ULWord clearRawStatsBits; // stream bits to clear raw stream statistics
10118  ULWord clearEncStatsBits; // stream bits to clear encodec stream statistics
10119 
10120  ULWord cmdContCount; // codec command continuity count
10121  ULWord cmdAckContCount; // codec command acknowledge count
10122  ULWord cmdMsgContCount; // codec command message count
10123  ULWord rawContCount; // raw dma continuity count
10124  ULWord rawAckContCount; // raw dma acknowledge count
10125  ULWord rawMsgContCount; // raw dma message count
10126  ULWord encContCount; // encoded dma continuity count
10127  ULWord encAckContCount; // encoded dma acnowledge count
10128  ULWord encMsgContCount; // encoded dma message count
10129  } HevcDeviceDebug;
10130 
10131  // hevc driver ioctl message types
10132  typedef enum HevcMessageId
10133  {
10135  Hevc_MessageId_Info, // get device information
10136  Hevc_MessageId_Register, // write/read codec register
10137  Hevc_MessageId_Command, // send a codec command
10138  Hevc_MessageId_Transfer, // transfer codec stream data
10139  Hevc_MessageId_Status, // get codec status
10140  Hevc_MessageId_Debug, // get debug information
10142  } HevcMessageId;
10143 
10144  // hevc common driver ioctl message header
10145  typedef struct hevcMessageHeader
10146  {
10154 
10155  // hevc stream transfer data
10156  typedef struct HevcTransferData
10157  {
10172  } HevcTransferData;
10173 
10174  // hevc driver device information message
10175  typedef struct HevcMessageInfo
10176  {
10179  } HevcMessageInfo;
10180 
10181  // hevc driver register message
10182  typedef struct HevcMessageRegister
10183  {
10187 
10188  // hevc driver command message
10189  typedef struct HevcMessageCommand
10190  {
10194 
10195  // hevc driver transfer message
10196  typedef struct HevcMessageTransfer
10197  {
10201 
10202  // hevc driver status message
10203  typedef struct HevcMessageStatus
10204  {
10208 
10209  // hevc driver debug message
10210  typedef struct HevcMessageDebug
10211  {
10214  } HevcMessageDebug;
10215 #endif
10216 
10217 typedef struct HDRRegValues
10218 {
10219  uint16_t greenPrimaryX;
10220  uint16_t greenPrimaryY;
10221  uint16_t bluePrimaryX;
10222  uint16_t bluePrimaryY;
10223  uint16_t redPrimaryX;
10224  uint16_t redPrimaryY;
10225  uint16_t whitePointX;
10226  uint16_t whitePointY;
10233 
10234  #if !defined(NTV2_BUILDING_DRIVER)
10238  inline bool validPrimariesAndWhitePoint (void) const { const uint16_t kMax(0xC350);
10239  return greenPrimaryX <= kMax || greenPrimaryY <= kMax ||
10240  bluePrimaryX <= kMax || bluePrimaryY <= kMax ||
10241  redPrimaryX <= kMax || redPrimaryY <= kMax ||
10242  whitePointX <= kMax || whitePointY <= kMax; }
10243  inline HDRRegValues & setBT2020 (void) { greenPrimaryX = 0x2134; greenPrimaryY = 0x9BAA; bluePrimaryX = 0x1996; bluePrimaryY = 0x08FC;
10244  redPrimaryX = 0x8A48; redPrimaryY = 0x3908; whitePointX = 0x3D13; whitePointY = 0x4042;
10245  maxMasteringLuminance = 0x2710; minMasteringLuminance = 0x0032;
10247  electroOpticalTransferFunction = 0x02; staticMetadataDescriptorID = 0x00; return *this; }
10248  inline HDRRegValues & setDCIP3 (void) { greenPrimaryX = 0x33C2; greenPrimaryY = 0x86C4; bluePrimaryX = 0x1D4C; bluePrimaryY = 0x0BB8;
10249  redPrimaryX = 0x84D0; redPrimaryY = 0x3E80; whitePointX = 0x3D13; whitePointY = 0x4042;
10250  maxMasteringLuminance = 0x02E8; minMasteringLuminance = 0x0032;
10252  electroOpticalTransferFunction = 0x02; staticMetadataDescriptorID = 0x00; return *this; }
10253  #endif // !defined(NTV2_BUILDING_DRIVER)
10254 } HDRRegValues;
10255 
10256 typedef struct HDRFloatValues
10257 {
10272 
10273  #if !defined(NTV2_BUILDING_DRIVER)
10277 
10278  inline bool validPrimariesAndWhitePoint (void) const { return greenPrimaryX >= 0.0f || greenPrimaryX <= float(1.0f) ||
10279  greenPrimaryY >= 0.0f || greenPrimaryY <= float(1.0f) ||
10280  bluePrimaryX >= 0.0f || bluePrimaryX <= float(1.0f) ||
10281  bluePrimaryY >= 0.0f || bluePrimaryY <= float(1.0f) ||
10282  redPrimaryX >= 0.0f || redPrimaryX <= float(1.0f) ||
10283  redPrimaryY >= 0.0f || redPrimaryY <= float(1.0f) ||
10284  whitePointX >= 0.0f || whitePointX <= float(1.0f) ||
10285  whitePointY >= 0.0f || whitePointY <= float(1.0f) ||
10286  minMasteringLuminance >= 0 || minMasteringLuminance <= float(6.5535f); }
10287 
10288  inline bool setFromRegValues (const HDRRegValues & inRegValues) { if (!inRegValues.validPrimariesAndWhitePoint())
10289  return false;
10290  const float kMult(0.00002f), kMultLum(0.0001f);
10291  greenPrimaryX = float(inRegValues.greenPrimaryX * kMult);
10292  greenPrimaryY = float(inRegValues.greenPrimaryY * kMult);
10293  bluePrimaryX = float(inRegValues.bluePrimaryX * kMult);
10294  bluePrimaryY = float(inRegValues.bluePrimaryY * kMult);
10295  redPrimaryX = float(inRegValues.redPrimaryX * kMult);
10296  redPrimaryY = float(inRegValues.redPrimaryY * kMult);
10297  whitePointX = float(inRegValues.whitePointX * kMult);
10298  whitePointY = float(inRegValues.whitePointY * kMult);
10299  minMasteringLuminance = float(inRegValues.minMasteringLuminance * kMultLum);
10305  return true; }
10306 
10307  inline bool toRegValues (HDRRegValues & outVals) const { if (!validPrimariesAndWhitePoint())
10308  return false;
10309  outVals.greenPrimaryX = uint16_t(greenPrimaryX / float(0.00002f));
10310  outVals.greenPrimaryY = uint16_t(greenPrimaryY / float(0.00002f));
10311  outVals.bluePrimaryX = uint16_t(bluePrimaryX / float(0.00002f));
10312  outVals.bluePrimaryY = uint16_t(bluePrimaryY / float(0.00002f));
10313  outVals.redPrimaryX = uint16_t(redPrimaryX / float(0.00002f));
10314  outVals.redPrimaryY = uint16_t(redPrimaryY / float(0.00002f));
10315  outVals.whitePointX = uint16_t(whitePointX / float(0.00002f));
10316  outVals.whitePointY = uint16_t(whitePointY / float(0.00002f));
10317  outVals.minMasteringLuminance = uint16_t(minMasteringLuminance / float(0.0001f));
10323  return true; }
10324  #endif // !defined(NTV2_BUILDING_DRIVER)
10325 } HDRFloatValues;
10326 
10327 typedef struct HDRDriverValues{
10328  uint16_t greenPrimaryX;
10329  uint16_t greenPrimaryY;
10330  uint16_t bluePrimaryX;
10331  uint16_t bluePrimaryY;
10332  uint16_t redPrimaryX;
10333  uint16_t redPrimaryY;
10334  uint16_t whitePointX;
10335  uint16_t whitePointY;
10342  uint8_t luminance;
10344 
10345 #define NTV2_IS_VALID_HDR_PRIMARY(__val__) ((__val__) <= 0x0000C350)
10346 #define NTV2_IS_VALID_HDR_MASTERING_LUMINENCE(__val__) (true)
10347 #define NTV2_IS_VALID_HDR_LIGHT_LEVEL(__val__) (true)
10348 
10349 #if 0 && defined(_DEBUG)
10350  // One-stop-shop for pretend/fake device swap (AJA internal use only)
10351  #define NTV2_PRETEND_DEVICE
10352  #define NTV2_PRETEND_DEVICE_FROM DEVICE_ID_IOX3
10353  #define NTV2_PRETEND_DEVICE_TO DEVICE_ID_KONAHDMI
10354 #endif // _DEBUG
10355 #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:3895
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:2040
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:1700
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:3605
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 me from the given 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:219
#define BIT(_x_)
Definition: ajatypes.h:578
MessageRegisterShift
defined(NTV2_DEPRECATE_17_6)
NTV2ChannelSet::const_iterator NTV2ChannelSetConstIter
A handy const iterator into an NTV2ChannelSet.
NTV2TaskMode
Describes the task mode state. See also: Sharing AJA Devices With Other Applications.
ULWord getTotalBytes(void) const
ULWord OptionFlags(void) const
DefaultVideoOutMode
CCLUTV3Registers
#define NTV2_IS_VALID_TRAILER_TAG(_x_)
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:289
uint16_t minMasteringLuminance
struct HevcMessageRegister HevcMessageRegister
ULWord width(void) const
unsigned int BOOL_
Definition: ajatypes.h:287
ULWord GetBufferLevel(void) const
#define KONA_DEBUGFILTER_STRINGLENGTH
NTV2IDSwitchRegister
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 GetByteCount(void) const
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
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:222
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:1295
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:3667
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:3635
uint32_t ULWord
Definition: ajatypes.h:223
NTV2SegmentedXferInfo & setElementLength(const ULWord inBytesPerElement)
Sets my element length.
NTV2AudioFormat
Definition: ntv2enums.h:1951
NTV2Channel
These enum values are mostly used to identify a specific widget_framestore. They&#39;re also commonly use...
Definition: ntv2enums.h:1357
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:227
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:1242
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:3951
NTV2XilinxFPGA
Definition: ntv2enums.h:3846
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:412
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:165
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:288
struct HevcEncodedData HevcEncodedData
The invalid mode.
Definition: ntv2enums.h:1245
struct hevc_gpio_state HevcGpioState
#define NTV2_IS_ACTIVE_COLOR_CORRECTION_MODE(__x__)
Definition: ntv2enums.h:2090
bool WithHDMIAuxData(void) const
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:1856
#define AJA_NULL
Definition: ajatypes.h:167
struct HDRFloatValues HDRFloatValues
#define NWL_REG_START
#define POINTER_32
Definition: ajatypes.h:308
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:2079
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.
NTV2QuarterSizeExpandMode
Definition: ntv2enums.h:2486
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.
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:491
int64_t LWord64
Definition: ajatypes.h:225
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:1724
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:3621
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:226
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:218
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:1239
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
std::ostream & operator<<(std::ostream &inOutStr, const NTV2AudioChannelPairs &inSet)
Handy ostream writer for NTV2AudioChannelPairs.
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:348
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:1733
NTV2RegisterValueMap::const_iterator NTV2RegValueMapConstIter
A const iterator that iterates over NTV2RegisterValueMap entries.
ULWord mask
uint16_t UWord
Definition: ajatypes.h:221
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:1359
~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:3914
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:1244
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:563
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:1928
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::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:524
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:3692
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:3954
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:1310
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