26 #if !defined(AJA_WINDOWS) 33 #define LOGGING_MAPPINGS (AJADebug::IsActive(AJA_DebugUnit_Enumeration)) 34 #define HEX16(__x__) "0x" << hex << setw(16) << setfill('0') << uint64_t(__x__) << dec 35 #define INSTP(_p_) HEX16(uint64_t(_p_)) 36 #define REiFAIL(__x__) AJA_sERROR (AJA_DebugUnit_Enumeration, INSTP(this) << "::" << AJAFUNC << ": " << __x__) 37 #define REiWARN(__x__) AJA_sWARNING(AJA_DebugUnit_Enumeration, INSTP(this) << "::" << AJAFUNC << ": " << __x__) 38 #define REiNOTE(__x__) AJA_sNOTICE (AJA_DebugUnit_Enumeration, INSTP(this) << "::" << AJAFUNC << ": " << __x__) 39 #define REiINFO(__x__) AJA_sINFO (AJA_DebugUnit_Enumeration, INSTP(this) << "::" << AJAFUNC << ": " << __x__) 40 #define REiDBG(__x__) AJA_sDEBUG (AJA_DebugUnit_Enumeration, INSTP(this) << "::" << AJAFUNC << ": " << __x__) 42 #define DEF_REGNAME(_num_) DefineRegName(_num_, #_num_) 43 #define DEF_REG(_num_, _dec_, _rw_, _c1_, _c2_, _c3_) DefineRegister((_num_), #_num_, _dec_, _rw_, _c1_, _c2_, _c3_) 48 static const string sSpace(
" ");
88 "DisplayHorzPixelsPerLine",
94 "RasterVideoFill_YCb_GB",
95 "RasterVideoFill_Cr_AR",
98 "RasterOutputTimingPreset",
100 "RasterSmpteFramePulse",
101 "RasterOddLineStartAddress",
104 "RasterOffsetAlpha"};
126 static bool DisposeInstance(
void);
147 SetupMixerKeyerRegs();
155 SetupNTV4FrameStoreRegs();
160 REiDBG(
"RegsToStrsMap=" << mRegNumToStringMap.size()
161 <<
" RegsToDecodersMap=" << mRegNumToDecoderMap.size()
162 <<
" ClassToRegsMMap=" << mRegClassToRegNumMMap.size()
163 <<
" StrToRegsMMap=" << mStringToRegNumMMap.size()
164 <<
" InpXptsToXptRegInfoMap=" << mInputXpt2XptRegNumMaskIndexMap.size()
165 <<
" XptRegInfoToInpXptsMap=" << mXptRegNumMaskIndex2InputXptMap.size()
166 <<
" RegClasses=" << mAllRegClasses.size());
182 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 189 } mDefaultRegDecoder;
191 void DefineRegName(
const uint32_t regNumber,
const string & regName)
193 if (!regName.empty())
196 if (mRegNumToStringMap.find(regNumber) == mRegNumToStringMap.end())
198 mRegNumToStringMap.insert (RegNumToStringPair(regNumber, regName));
199 string lowerCaseRegName(regName);
200 mStringToRegNumMMap.insert (StringToRegNumPair(
aja::lower(lowerCaseRegName), regNumber));
204 inline void DefineRegDecoder(
const uint32_t inRegNum,
const Decoder & dec)
207 mRegNumToDecoderMap.insert (RegNumToDecoderPair(inRegNum, &dec));
209 inline void DefineRegClass (
const uint32_t inRegNum,
const string & className)
211 if (!className.empty())
214 mRegClassToRegNumMMap.insert(StringToRegNumPair(className, inRegNum));
217 void DefineRegReadWrite(
const uint32_t inRegNum,
const int rdWrt)
220 if (rdWrt == READONLY)
225 if (rdWrt == WRITEONLY)
231 void DefineRegister(
const uint32_t inRegNum,
const string & regName,
const Decoder & dec,
const int rdWrt,
const string & className1,
const string & className2,
const string & className3)
233 DefineRegName (inRegNum, regName);
234 DefineRegDecoder (inRegNum, dec);
235 DefineRegReadWrite (inRegNum, rdWrt);
236 DefineRegClass (inRegNum, className1);
237 DefineRegClass (inRegNum, className2);
238 DefineRegClass (inRegNum, className3);
244 for (
int ndx(0); ndx < 4; ndx++)
248 const XptRegNumAndMaskIndex regNumAndNdx(inRegNum, ndx);
249 if (mXptRegNumMaskIndex2InputXptMap.find(regNumAndNdx) == mXptRegNumMaskIndex2InputXptMap.end())
250 mXptRegNumMaskIndex2InputXptMap [regNumAndNdx] = indexes[ndx];
251 if (mInputXpt2XptRegNumMaskIndexMap.find(indexes[ndx]) == mInputXpt2XptRegNumMaskIndexMap.end())
252 mInputXpt2XptRegNumMaskIndexMap[indexes[ndx]] = regNumAndNdx;
256 void SetupBasicRegs(
void)
277 #if 1 // PCIAccessFrame regs are obsolete 286 #endif // PCIAccessFrame regs are obsolete 375 void SetupBOBRegs(
void)
384 void SetupLEDRegs(
void)
396 void SetupCMWRegs(
void)
406 void SetupVPIDRegs(
void)
442 void SetupTimecodeRegs(
void)
508 void SetupAudioRegs(
void)
594 void SetupMRRegs(
void)
605 void SetupDMARegs(
void)
636 void SetupXptSelect(
void)
648 if (mXptRegNumMaskIndex2InputXptMap.find (regNumAndNdx) == mXptRegNumMaskIndex2InputXptMap.end())
650 if (mInputXpt2XptRegNumMaskIndexMap.find (
NTV2_XptHDMIOutQ1Input) == mInputXpt2XptRegNumMaskIndexMap.end())
686 { ostringstream regName;
693 if (inputXptEnumName.empty())
694 regName <<
"kRegXptValid" <<
DEC0N(rawInputXpt,3) <<
"N" <<
DEC(ndx);
696 regName <<
"kRegXptValid" <<
aja::replace(inputXptEnumName,
"NTV2_Xpt",
"") <<
DEC(ndx);
699 regName <<
"kRegXptValue" <<
HEX0N(regNum,4);
704 void SetupAncInsExt(
void)
706 static const string AncExtRegNames [] = {
"Control",
"F1 Start Address",
"F1 End Address",
707 "F2 Start Address",
"F2 End Address",
"Field Cutoff Lines",
708 "Memory Total",
"F1 Memory Usage",
"F2 Memory Usage",
709 "V Blank Lines",
"Lines Per Frame",
"Field ID Lines",
710 "Ignore DID 1-4",
"Ignore DID 5-8",
"Ignore DID 9-12",
711 "Ignore DID 13-16",
"Ignore DID 17-20",
"Analog Start Line",
712 "Analog F1 Y Filter",
"Analog F2 Y Filter",
"Analog F1 C Filter",
713 "Analog F2 C Filter",
"",
"",
715 "Analog Act Line Len"};
716 static const string AncInsRegNames [] = {
"Field Bytes",
"Control",
"F1 Start Address",
717 "F2 Start Address",
"Pixel Delay",
"Active Start",
718 "Pixels Per Line",
"Lines Per Frame",
"Field ID Lines",
719 "Payload ID Control",
"Payload ID",
"Chroma Blank Lines",
720 "F1 C Blanking Mask",
"F2 C Blanking Mask",
"Field Bytes High",
721 "Reserved 15",
"RTP Payload ID",
"RTP SSRC",
723 static const uint32_t AncExtPerChlRegBase [] = { 0x1000, 0x1040, 0x1080, 0x10C0, 0x1100, 0x1140, 0x1180, 0x11C0 };
724 static const uint32_t AncInsPerChlRegBase [] = { 0x1200, 0x1240, 0x1280, 0x12C0, 0x1300, 0x1340, 0x1380, 0x13C0 };
726 NTV2_ASSERT(
sizeof(AncExtRegNames[0]) ==
sizeof(AncExtRegNames[1]));
731 for (
ULWord offsetNdx (0); offsetNdx < 8; offsetNdx++)
735 if (AncExtRegNames[reg].empty())
continue;
736 ostringstream oss; oss <<
"Extract " << (offsetNdx+1) <<
" " << AncExtRegNames[reg];
737 DefineRegName (AncExtPerChlRegBase[offsetNdx] + reg, oss.str());
741 ostringstream oss; oss <<
"Insert " << (offsetNdx+1) <<
" " << AncInsRegNames[reg];
742 DefineRegName (AncInsPerChlRegBase[offsetNdx] + reg, oss.str());
745 for (
ULWord ndx (0); ndx < 8; ndx++)
792 void SetupAuxInsExt(
void)
794 static const string AuxExtRegNames [] = {
"Control",
"F1 Start Address",
"F1 End Address",
795 "F2 Start Address",
"",
"",
796 "Memory Total",
"F1 Memory Usage",
"F2 Memory Usage",
797 "V Blank Lines",
"Lines Per Frame",
"Field ID Lines",
798 "Ignore DID 1-4",
"Ignore DID 5-8",
"Ignore DID 9-12",
799 "Ignore DID 13-16",
"Buffer Fill"};
807 static const uint32_t AuxExtPerChlRegBase [] = { 7616, 7680, 7744, 7808 };
808 static const uint32_t AuxInsPerChlRegBase [] = { 4608, 4672, 4736, 4800 };
811 NTV2_ASSERT(
sizeof(AuxExtRegNames[0]) ==
sizeof(AuxExtRegNames[1]));
816 for (
ULWord offsetNdx (0); offsetNdx < 4; offsetNdx++)
820 if (AuxExtRegNames[reg].empty())
continue;
821 ostringstream oss; oss <<
"Extract " << (offsetNdx+1) <<
" " << AuxExtRegNames[reg];
822 DefineRegName (AuxExtPerChlRegBase[offsetNdx] + reg, oss.str());
830 for (
ULWord ndx (0); ndx < 4; ndx++)
873 void SetupHDMIRegs(
void)
1101 void SetupSDIErrorRegs(
void)
1104 static const string suffixes [] = {
"Status",
"CRCErrorCount",
"FrameCountLow",
"FrameCountHigh",
"FrameRefCountLow",
"FrameRefCountHigh"};
1105 static const int perms [] = {READWRITE, READWRITE, READWRITE, READWRITE, READONLY, READONLY};
1108 for (
ULWord chan (0); chan < 8; chan++)
1109 for (
UWord ndx(0); ndx < 6; ndx++)
1111 ostringstream ossName; ossName <<
"kRegRXSDI" <<
DEC(chan+1) << suffixes[ndx];
1112 const string & regName (ossName.str());
1113 const uint32_t regNum (baseNum[chan] + ndx);
1114 const int perm (perms[ndx]);
1126 void SetupLUTRegs (
void)
1131 void SetupCSCRegs(
void)
1136 for (
unsigned num(0); num < 8; num++)
1138 ostringstream ossRegName; ossRegName <<
"kRegEnhancedCSC" << (num+1);
1139 const string & chanClass (sChan[num]);
const string rootName (ossRegName.str());
1140 const string modeName (rootName +
"Mode");
const string inOff01Name (rootName +
"InOffset0_1");
const string inOff2Name (rootName +
"InOffset2");
1141 const string coeffA0Name (rootName +
"CoeffA0");
const string coeffA1Name (rootName +
"CoeffA1");
const string coeffA2Name (rootName +
"CoeffA2");
1142 const string coeffB0Name (rootName +
"CoeffB0");
const string coeffB1Name (rootName +
"CoeffB1");
const string coeffB2Name (rootName +
"CoeffB2");
1143 const string coeffC0Name (rootName +
"CoeffC0");
const string coeffC1Name (rootName +
"CoeffC1");
const string coeffC2Name (rootName +
"CoeffC2");
1144 const string outOffABName(rootName +
"OutOffsetA_B");
const string outOffCName (rootName +
"OutOffsetC");
1145 const string keyModeName (rootName +
"KeyMode");
const string keyClipOffName (rootName +
"KeyClipOffset");
const string keyGainName (rootName +
"KeyGain");
1172 for (
unsigned chan(0); chan < 8; chan++)
1174 const string & chanClass (sChan[chan]);
1187 #if 1 // V2 tables need the appropriate Enable & Bank bits set in kRegLUTV2Control, otherwise they'll always readback zero! 1190 for (
ULWord ndx(0); ndx < 512; ndx++)
1192 ostringstream regNameR, regNameG, regNameB;
1193 regNameR <<
"kRegLUTRed" <<
DEC0N(ndx,3); regNameG <<
"kRegLUTGreen" <<
DEC0N(ndx,3); regNameB <<
"kRegLUTBlue" <<
DEC0N(ndx,3);
1201 void SetupMixerKeyerRegs(
void)
1220 void SetupNTV4FrameStoreRegs(
void)
1222 for (
ULWord fsNdx(0); fsNdx < 4; fsNdx++)
1226 ostringstream regName; regName <<
"kRegNTV4FS" <<
DEC(fsNdx+1) <<
"_";
1257 regName <<
"InputSourceSelect";
1261 regName <<
DEC(regNdx);
1269 void SetupVRegs(
void)
1794 for (
ULWord ndx(1); ndx < 1024; ndx++)
1796 ostringstream oss; oss <<
"VIRTUALREG_START+" << ndx;
1797 const string regName (oss.str());
1799 if (mRegNumToStringMap.find(regNum) == mRegNumToStringMap.end())
1801 mRegNumToStringMap.insert (RegNumToStringPair(regNum, regName));
1802 mStringToRegNumMMap.insert (StringToRegNumPair(ToLower(regName), regNum));
1804 DefineRegDecoder (regNum, mDefaultRegDecoder);
1805 DefineRegReadWrite (regNum, READWRITE);
1820 const string & label (it->first);
1821 const string & value (it->second);
1824 else if (label.at(label.length()-1) !=
' ' && label.at(label.length()-1) !=
':')
1825 oss << label <<
": " << value;
1826 else if (label.at(label.length()-1) ==
':')
1827 oss << label <<
" " << value;
1829 oss << label << value;
1830 if (++it != inLabelValuePairs.end())
1839 RegNumToStringMap::const_iterator iter (mRegNumToStringMap.find (inRegNum));
1840 if (iter != mRegNumToStringMap.end())
1841 return iter->second;
1843 ostringstream oss; oss <<
"Reg ";
1845 oss <<
DEC(inRegNum);
1846 else if (inRegNum <= 0x0000FFFF)
1847 oss <<
xHEX0N(inRegNum,4);
1849 oss <<
xHEX0N(inRegNum,8);
1856 RegNumToDecoderMap::const_iterator iter(mRegNumToDecoderMap.find(inRegNum));
1858 if (iter != mRegNumToDecoderMap.end() && iter->second)
1860 const Decoder * pDecoder (iter->second);
1861 oss << (*pDecoder)(inRegNum, inRegValue, inDeviceID);
1866 bool IsRegInClass (
const uint32_t inRegNum,
const string & inClassName)
const 1869 for (RegClassToRegNumConstIter it(mRegClassToRegNumMMap.find(inClassName)); it != mRegClassToRegNumMMap.end() && it->first == inClassName; ++it)
1870 if (it->second == inRegNum)
1881 if (mAllRegClasses.empty())
1882 for (RegClassToRegNumConstIter it(mRegClassToRegNumMMap.begin()); it != mRegClassToRegNumMMap.end(); ++it)
1883 if (mAllRegClasses.find(it->first) == mAllRegClasses.end())
1884 mAllRegClasses.insert(it->first);
1885 return mAllRegClasses;
1894 if (IsRegInClass (inRegNum, *it))
1899 if (result.find(str) == result.end())
1909 for (RegClassToRegNumConstIter it(mRegClassToRegNumMMap.find(inClassName)); it != mRegClassToRegNumMMap.end() && it->first == inClassName; ++it)
1910 if (result.find(it->second) == result.end())
1911 result.insert(it->second);
1920 for (uint32_t regNum (0); regNum <= maxRegNum; regNum++)
1921 result.insert(regNum);
1930 const UWord numSpigots(numVideoInputs > numVideoOutputs ? numVideoInputs : numVideoOutputs);
1932 for (
UWord num(0); num < numSpigots; num++)
1935 allChanRegs.insert(chRegs.begin(), chRegs.end());
1937 std::set_intersection (ancRegs.begin(), ancRegs.end(), allChanRegs.begin(), allChanRegs.end(), std::inserter(result, result.begin()));
1945 const UWord numSpigots(numVideoInputs > numVideoOutputs ? numVideoInputs : numVideoOutputs);
1947 for (
UWord num(0); num < numSpigots; num++)
1950 allChanRegs.insert(chRegs.begin(), chRegs.end());
1952 std::set_intersection (auxRegs.begin(), auxRegs.end(), allChanRegs.begin(), allChanRegs.end(), std::inserter(result, result.begin()));
1958 result.insert(sdiErrRegs.begin(), sdiErrRegs.end());
1964 result.insert(regNum);
1966 result.insert(regNum);
1978 for (
UWord num(0); num < numCSCs; num++)
1981 allChanRegs.insert(chRegs.begin(), chRegs.end());
1983 std::set_intersection (ecscRegs.begin(), ecscRegs.end(), allChanRegs.begin(), allChanRegs.end(), std::inserter(result, result.begin()));
1989 result.insert(LUTRegs.begin(), LUTRegs.end());
1994 for (
ULWord regNum = 0x1d00; regNum <= 0x1d1f; regNum++)
1995 result.insert(regNum);
1996 for (
ULWord regNum = 0x2500; regNum <= 0x251f; regNum++)
1997 result.insert(regNum);
1998 for (
ULWord regNum = 0x2c00; regNum <= 0x2c1f; regNum++)
1999 result.insert(regNum);
2000 for (
ULWord regNum = 0x3000; regNum <= 0x301f; regNum++)
2001 result.insert(regNum);
2005 for (
ULWord regNum = 0x1d00; regNum <= 0x1d1f; regNum++)
2006 result.insert(regNum);
2007 for (
ULWord regNum = 0x1d40; regNum <= 0x1d5f; regNum++)
2008 result.insert(regNum);
2009 for (
ULWord regNum = 0x3C00; regNum <= 0x3C0A; regNum++)
2010 result.insert(regNum);
2028 for (
UWord num(0); num < numFrameStores; num++)
2031 chanRegs.insert(chRegs.begin(), chRegs.end());
2033 std::set_intersection (ntv4FSRegs.begin(), ntv4FSRegs.end(), chanRegs.begin(), chanRegs.end(), std::inserter(result, result.begin()));
2081 result.insert(vRegs.begin(), vRegs.end());
2087 result.insert(xptMapRegs.begin(), xptMapRegs.end());
2096 string nameStr(inName);
2097 const size_t nameStrLen(
aja::lower(nameStr).length());
2098 StringToRegNumConstIter it;
2100 if (inMatchStyle == EXACTMATCH)
2102 it = mStringToRegNumMMap.find(nameStr);
2103 if (it != mStringToRegNumMMap.end())
2104 result.insert(it->second);
2108 for (it = mStringToRegNumMMap.begin(); it != mStringToRegNumMMap.end(); ++it)
2110 const size_t pos(it->first.find(nameStr));
2111 if (pos == string::npos)
2113 switch (inMatchStyle)
2115 case CONTAINS: result.insert(it->second);
break;
2116 case STARTSWITH:
if (pos == 0)
2117 {result.insert(it->second);}
2119 case ENDSWITH:
if (pos+nameStrLen == it->first.length())
2120 {result.insert(it->second);}
2131 outXptRegNum = 0xFFFFFFFF;
2132 outMaskIndex = 0xFFFFFFFF;
2133 InputXpt2XptRegNumMaskIndexMapConstIter iter (mInputXpt2XptRegNumMaskIndexMap.find (inInputXpt));
2134 if (iter == mInputXpt2XptRegNumMaskIndexMap.end())
2136 outXptRegNum = iter->second.first;
2137 outMaskIndex = iter->second.second;
2144 const XptRegNumAndMaskIndex key (inXptRegNum, inMaskIndex);
2145 XptRegNumMaskIndex2InputXptMapConstIter iter (mXptRegNumMaskIndex2InputXptMap.find (key));
2146 if (iter != mXptRegNumMaskIndex2InputXptMap.end())
2147 return iter->second;
2151 ostream &
Print (ostream & inOutStream)
const 2154 static const string sLineBreak (96,
'=');
2155 static const uint32_t
sMasks[4] = {0x000000FF, 0x0000FF00, 0x00FF0000, 0xFF000000};
2157 inOutStream << endl << sLineBreak << endl <<
"RegisterExpert: Dump of RegNumToStringMap: " << mRegNumToStringMap.size() <<
" mappings:" << endl << sLineBreak << endl;
2158 for (RegNumToStringMap::const_iterator it (mRegNumToStringMap.begin()); it != mRegNumToStringMap.end(); ++it)
2159 inOutStream <<
"reg " << setw(5) << it->first <<
"(" <<
HEX0N(it->first,8) << dec <<
") => '" << it->second <<
"'" << endl;
2161 inOutStream << endl << sLineBreak << endl <<
"RegisterExpert: Dump of RegNumToDecoderMap: " << mRegNumToDecoderMap.size() <<
" mappings:" << endl << sLineBreak << endl;
2162 for (RegNumToDecoderMap::const_iterator it (mRegNumToDecoderMap.begin()); it != mRegNumToDecoderMap.end(); ++it)
2163 inOutStream <<
"reg " << setw(5) << it->first <<
"(" <<
HEX0N(it->first,8) << dec <<
") => " << (it->second == &mDefaultRegDecoder ?
"(default decoder)" :
"Custom Decoder") << endl;
2165 inOutStream << endl << sLineBreak << endl <<
"RegisterExpert: Dump of RegClassToRegNumMMap: " << mRegClassToRegNumMMap.size() <<
" mappings:" << endl << sLineBreak << endl;
2166 for (RegClassToRegNumMMap::const_iterator it (mRegClassToRegNumMMap.begin()); it != mRegClassToRegNumMMap.end(); ++it)
2167 inOutStream << setw(32) << it->first <<
" => reg " << setw(5) << it->second <<
"(" <<
HEX0N(it->second,8) << dec <<
") " << RegNameToString(it->second) << endl;
2169 inOutStream << endl << sLineBreak << endl <<
"RegisterExpert: Dump of StringToRegNumMMap: " << mStringToRegNumMMap.size() <<
" mappings:" << endl << sLineBreak << endl;
2170 for (StringToRegNumMMap::const_iterator it (mStringToRegNumMMap.begin()); it != mStringToRegNumMMap.end(); ++it)
2171 inOutStream << setw(32) << it->first <<
" => reg " << setw(5) << it->second <<
"(" <<
HEX0N(it->second,8) << dec <<
") " << RegNameToString(it->second) << endl;
2173 inOutStream << endl << sLineBreak << endl <<
"RegisterExpert: Dump of InputXpt2XptRegNumMaskIndexMap: " << mInputXpt2XptRegNumMaskIndexMap.size() <<
" mappings:" << endl << sLineBreak << endl;
2174 for (InputXpt2XptRegNumMaskIndexMap::const_iterator it (mInputXpt2XptRegNumMaskIndexMap.begin()); it != mInputXpt2XptRegNumMaskIndexMap.end(); ++it)
2176 <<
") => reg " << setw(3) << it->second.first <<
"(" <<
HEX0N(it->second.first,3) << dec <<
"|" << setw(20) << RegNameToString(it->second.first)
2177 <<
") mask " << it->second.second <<
"(" <<
HEX0N(
sMasks[it->second.second],8) <<
")" << endl;
2179 inOutStream << endl << sLineBreak << endl <<
"RegisterExpert: Dump of XptRegNumMaskIndex2InputXptMap: " << mXptRegNumMaskIndex2InputXptMap.size() <<
" mappings:" << endl << sLineBreak << endl;
2180 for (XptRegNumMaskIndex2InputXptMap::const_iterator it (mXptRegNumMaskIndex2InputXptMap.begin()); it != mXptRegNumMaskIndex2InputXptMap.end(); ++it)
2181 inOutStream <<
"reg " << setw(3) << it->first.first <<
"(" <<
HEX0N(it->first.first,4) <<
"|" << setw(20) << RegNameToString(it->first.first)
2182 <<
") mask " << it->first.second <<
"(" <<
HEX0N(
sMasks[it->first.second],8) <<
") => " 2188 typedef std::map<uint32_t, string> RegNumToStringMap;
2189 typedef std::pair<uint32_t, string> RegNumToStringPair;
2191 static string ToLower (
const string & inStr)
2193 string result (inStr);
2194 std::transform (result.begin (), result.end (), result.begin (), ::tolower);
2198 struct DecodeGlobalControlReg :
public Decoder
2200 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2217 for (
int led(0); led < 4; ++led)
2218 oss << (((inRegValue &
kRegMaskLED) >> (16 + led)) ?
"*" :
".");
2223 <<
"Color Correction: " <<
"Channel: " << ((inRegValue &
BIT(31)) ?
"2" :
"1")
2224 <<
" Bank " << ((inRegValue &
BIT (30)) ?
"1" :
"0");
2227 } mDecodeGlobalControlReg;
2230 struct DecodeGlobalControl2 :
public Decoder
2232 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2249 for (
unsigned ch(0); ch < 8; ch++)
2250 oss <<
"Audio " <<
DEC(ch+1) <<
" Play/Capture Mode: " <<
OnOff(inRegValue & playCaptModes[ch]) << endl;
2251 for (
unsigned ch(2); ch < 8; ch++)
2252 oss <<
"Ch " <<
DEC(ch+1) <<
" RP188 Output: " <<
EnabDisab(inRegValue & rp188Modes[ch]) << endl;
2253 for (
unsigned ch(0); ch < 3; ch++)
2254 oss <<
"Ch " <<
DEC(2*(ch+2)) <<
" 1080p50/p60 Link-B Mode: " <<
EnabDisab(inRegValue & BLinkModes[ch]) << endl;
2255 for (
unsigned ch(0); ch < 4; ch++)
2256 oss <<
"Ch " <<
DEC(ch*2+1) <<
"/" <<
DEC(ch*2+2) <<
" 2SI Mode: " <<
EnabDisab(inRegValue & k425Masks[ch]) << endl;
2257 oss <<
"2SI Min Align Delay 1-4: " <<
EnabDisab(inRegValue &
BIT(24)) << endl
2258 <<
"2SI Min Align Delay 5-8: " <<
EnabDisab(inRegValue &
BIT(25));
2261 } mDecodeGlobalControl2;
2264 struct DecodeGlobalControl3 :
public Decoder
2266 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2273 <<
"VU Meter Audio Select: " << (inRegValue &
kRegMaskVUMeterSelect ?
"AudMixer" :
"AudSys1") << endl
2283 } mDecodeGlobalControl3;
2286 struct DecodeGlobalControlChanReg :
public Decoder
2288 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2301 } mDecodeGlobalControlChanRegs;
2304 struct DecodeChannelControlReg :
public Decoder
2306 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2313 oss <<
"Mode: " << (inRegValue &
kRegMaskMode ?
"Capture" :
"Display") << endl
2316 <<
"Viper Squeeze: " << (inRegValue &
BIT(9) ?
"Squeeze" :
"Normal") << endl
2321 <<
"Frame Size: " << (1 << (((inRegValue &
kK2RegMaskFrameSize) >> 20) + 1)) <<
" MB" << endl;
2324 oss <<
"RGB Range: " << (inRegValue &
BIT(24) ?
"Black = 0x40" :
"Black = 0") << endl
2328 } mDecodeChannelControl;
2330 struct DecodeFBControlReg :
public Decoder
2332 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2336 const bool isOn ((inRegValue & (1 << 29)) != 0);
2337 const uint16_t format ((inRegValue >> 15) & 0x1F);
2339 oss <<
OnOff(isOn) << endl
2340 <<
"Format: " <<
xHEX0N(format,4) <<
" (" <<
DEC(format) <<
")";
2343 } mDecodeFBControlReg;
2345 struct DecodeChannelControlExtReg :
public Decoder
2347 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2352 oss <<
"Input Video 2:1 Decimate: " <<
EnabDisab(inRegValue &
BIT(0)) << endl
2353 <<
"HDMI Rx Direct: " <<
EnabDisab(inRegValue &
BIT(1)) << endl
2354 <<
"3:2 Pulldown Mode: " <<
EnabDisab(inRegValue &
BIT(2));
2357 } mDecodeChannelControlExt;
2359 struct DecodeSysmonVccIntDieTemp :
public Decoder
2361 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2365 UWord rawDieTemp (0);
2366 double dieTempC (0);
2369 rawDieTemp = (inRegValue & 0x0000FFFF);
2370 dieTempC = double(rawDieTemp) / 128.0;
2374 rawDieTemp = ((inRegValue & 0x0000FFFF) >> 6);
2375 dieTempC = ((double(rawDieTemp)) * 503.975 / 1024.0 - 273.15 );
2377 const UWord rawVoltage ((inRegValue >> 22) & 0x3FF);
2378 const double dieTempF (dieTempC * 9.0 / 5.0 + 32.0);
2379 const double voltage (
double(rawVoltage)/ 1024.0 * 3.0);
2381 oss <<
"Die Temperature: " <<
fDEC(dieTempC,5,2) <<
" Celcius (" <<
fDEC(dieTempF,5,2) <<
" Fahrenheit)" << endl
2382 <<
"Core Voltage: " <<
fDEC(voltage,5,2) <<
" Volts DC";
2385 } mDecodeSysmonVccIntDieTemp;
2387 struct DecodeSDITransmitCtrl :
public Decoder
2389 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2394 const UWord numSpigots (numInputs > numOutputs ? numInputs : numOutputs);
2398 const uint32_t txEnableBits (((inRegValue & 0x0F000000) >> 20) | ((inRegValue & 0xF0000000) >> 28));
2400 for (
UWord spigot(0); spigot < numSpigots; )
2402 const uint32_t txEnabled (txEnableBits &
BIT(spigot));
2403 oss <<
"SDI " <<
DEC(++spigot) <<
": " << (txEnabled ?
"Output/Transmit" :
"Input/Receive");
2404 if (spigot < numSpigots)
2408 oss <<
"(No SDI inputs or outputs)";
2411 oss <<
"(Bi-directional SDI not supported)";
2415 } mDecodeSDITransmitCtrl;
2417 struct DecodeConversionCtrl :
public Decoder
2419 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2425 oss <<
"Bitfile ID: " <<
xHEX0N(bitfileID, 2) << endl
2426 <<
"Memory Test: Start: " <<
YesNo(inRegValue &
BIT(28)) << endl
2427 <<
"Memory Test: Done: " <<
YesNo(inRegValue &
BIT(29)) << endl
2428 <<
"Memory Test: Passed: " <<
YesNo(inRegValue &
BIT(30));
2447 <<
"Vert Filter Preload: " <<
DisabEnab(inRegValue &
BIT(7)) << endl
2454 } mConvControlRegDecoder;
2456 struct DecodeRelayCtrlStat :
public Decoder
2458 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2473 oss <<
"(SDI bypass relays not supported)";
2476 } mDecodeRelayCtrlStat;
2478 struct DecodeWatchdogTimeout :
public Decoder
2480 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2486 const uint32_t ticks8nanos (inRegValue);
2487 const double microsecs (
double(ticks8nanos) * 8.0 / 1000.0);
2488 const double millisecs (microsecs / 1000.0);
2489 oss <<
"Watchdog Timeout [8-ns ticks]: " <<
xHEX0N(ticks8nanos,8) <<
" (" <<
DEC(ticks8nanos) <<
")" << endl
2490 <<
"Watchdog Timeout [usec]: " << microsecs << endl
2491 <<
"Watchdog Timeout [msec]: " << millisecs;
2494 oss <<
"(SDI bypass relays not supported)";
2497 } mDecodeWatchdogTimeout;
2499 struct DecodeWatchdogKick :
public Decoder
2501 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2509 const uint32_t expectedValue(whichReg ? 0x01234567 : 0xA5A55A5A);
2510 oss <<
xHEX0N(inRegValue,8);
2511 if (inRegValue == expectedValue)
2514 oss <<
" (Not expected, should be " <<
xHEX0N(expectedValue,8) <<
")";
2517 oss <<
"(SDI bypass relays not supported)";
2520 } mDecodeWatchdogKick;
2522 struct DecodeInputVPID:
public Decoder
2524 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2532 PrintLabelValuePairs(oss, ntv2vpid.GetInfo(info));
2535 } mVPIDInpRegDecoder;
2537 struct DecodeOutputVPID:
public Decoder
2539 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2546 PrintLabelValuePairs(oss, ntv2vpid.GetInfo(info));
2549 } mVPIDOutRegDecoder;
2551 struct DecodeBitfileDateTime :
public Decoder
2553 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2559 const UWord yyyy ((inRegValue & 0xFFFF0000) >> 16);
2560 const UWord mm ((inRegValue & 0x0000FF00) >> 8);
2561 const UWord dd (inRegValue & 0x000000FF);
2562 if (yyyy > 0x2015 && mm > 0 && mm < 0x13 && dd > 0 && dd < 0x32)
2563 oss <<
"Bitfile Date: " <<
HEX0N(mm,2) <<
"/" <<
HEX0N(dd,2) <<
"/" <<
HEX0N(yyyy,4);
2565 oss <<
"Bitfile Date: " <<
xHEX0N(inRegValue, 8);
2569 const UWord hh ((inRegValue & 0x00FF0000) >> 16);
2570 const UWord mm ((inRegValue & 0x0000FF00) >> 8);
2571 const UWord ss (inRegValue & 0x000000FF);
2572 if (hh < 0x24 && mm < 0x60 && ss < 0x60)
2573 oss <<
"Bitfile Time: " <<
HEX0N(hh,2) <<
":" <<
HEX0N(mm,2) <<
":" <<
HEX0N(ss,2);
2575 oss <<
"Bitfile Time: " <<
xHEX0N(inRegValue, 8);
2580 } mDecodeBitfileDateTime;
2582 struct DecodeBoardID :
public Decoder
2584 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2585 { (
void) inRegNum; (
void) inDeviceID;
2590 <<
"Device Name: '" << str1 <<
"'";
2593 <<
"Retail Device Name: '" << str2 <<
"'";
2598 struct DecodeDynFWUpdateCounts :
public Decoder
2600 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2601 { (
void) inRegNum; (
void) inDeviceID;
2603 oss <<
"# attempts: " <<
DEC(inRegValue >> 16) << endl
2604 <<
"# successes: " <<
DEC(inRegValue & 0x0000FFFF);
2607 } mDecodeDynFWUpdateCounts;
2609 struct DecodeFWUserID :
public Decoder
2611 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2612 { (
void) inRegNum; (
void) inDeviceID;
2621 } mDecodeFirmwareUserID;
2623 struct DecodeCanDoStatus :
public Decoder
2625 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2626 { (
void) inRegNum; (
void) inDeviceID;
2628 oss <<
"Has CanConnect Xpt Route ROM: " <<
YesNo(inRegValue &
BIT(0)) << endl
2629 <<
"AudioSystems can start on VBI: " <<
YesNo(inRegValue &
BIT(1));
2632 } mDecodeCanDoStatus;
2634 struct DecodeVidControlReg :
public Decoder
2636 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2640 const bool is16x9 ((inRegValue &
BIT(31)) != 0);
2641 const bool isMono ((inRegValue &
BIT(30)) != 0);
2643 oss <<
"Aspect Ratio: " << (is16x9 ?
"16x9" :
"4x3") << endl
2644 <<
"Depth: " << (isMono ?
"Monochrome" :
"Color");
2647 } mDecodeVidControlReg;
2649 struct DecodeVidIntControl :
public Decoder
2651 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2656 oss <<
"Output 1 Vertical Enable: " <<
YesNo(inRegValue &
BIT(0)) << endl
2657 <<
"Input 1 Vertical Enable: " <<
YesNo(inRegValue &
BIT(1)) << endl
2658 <<
"Input 2 Vertical Enable: " <<
YesNo(inRegValue &
BIT(2)) << endl
2659 <<
"Audio Out Wrap Interrupt Enable: " <<
YesNo(inRegValue &
BIT(4)) << endl
2660 <<
"Audio In Wrap Interrupt Enable: " <<
YesNo(inRegValue &
BIT(5)) << endl
2661 <<
"Wrap Rate Interrupt Enable: " <<
YesNo(inRegValue &
BIT(6)) << endl
2662 <<
"UART Tx Interrupt Enable" <<
YesNo(inRegValue &
BIT(7)) << endl
2663 <<
"UART Rx Interrupt Enable" <<
YesNo(inRegValue &
BIT(8)) << endl
2664 <<
"UART Rx Interrupt Clear" <<
ActInact(inRegValue &
BIT(15)) << endl
2665 <<
"UART 2 Tx Interrupt Enable" <<
YesNo(inRegValue &
BIT(17)) << endl
2666 <<
"Output 2 Vertical Enable: " <<
YesNo(inRegValue &
BIT(18)) << endl
2667 <<
"Output 3 Vertical Enable: " <<
YesNo(inRegValue &
BIT(19)) << endl
2668 <<
"Output 4 Vertical Enable: " <<
YesNo(inRegValue &
BIT(20)) << endl
2669 <<
"Output 4 Vertical Clear: " <<
ActInact(inRegValue &
BIT(21)) << endl
2670 <<
"Output 3 Vertical Clear: " <<
ActInact(inRegValue &
BIT(22)) << endl
2671 <<
"Output 2 Vertical Clear: " <<
ActInact(inRegValue &
BIT(23)) << endl
2672 <<
"UART Tx Interrupt Clear" <<
ActInact(inRegValue &
BIT(24)) << endl
2673 <<
"Wrap Rate Interrupt Clear" <<
ActInact(inRegValue &
BIT(25)) << endl
2674 <<
"UART 2 Tx Interrupt Clear" <<
ActInact(inRegValue &
BIT(26)) << endl
2675 <<
"Audio Out Wrap Interrupt Clear" <<
ActInact(inRegValue &
BIT(27)) << endl
2676 <<
"Input 2 Vertical Clear: " <<
ActInact(inRegValue &
BIT(29)) << endl
2677 <<
"Input 1 Vertical Clear: " <<
ActInact(inRegValue &
BIT(30)) << endl
2678 <<
"Output 1 Vertical Clear: " <<
ActInact(inRegValue &
BIT(31));
2681 } mDecodeVidIntControl;
2683 struct DecodeVidIntControl2 :
public Decoder
2685 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2690 oss <<
"Input 3 Vertical Enable: " <<
YesNo(inRegValue &
BIT(1)) << endl
2691 <<
"Input 4 Vertical Enable: " <<
YesNo(inRegValue &
BIT(2)) << endl
2692 <<
"Input 5 Vertical Enable: " <<
YesNo(inRegValue &
BIT(8)) << endl
2693 <<
"Input 6 Vertical Enable: " <<
YesNo(inRegValue &
BIT(9)) << endl
2694 <<
"Input 7 Vertical Enable: " <<
YesNo(inRegValue &
BIT(10)) << endl
2695 <<
"Input 8 Vertical Enable: " <<
YesNo(inRegValue &
BIT(11)) << endl
2696 <<
"Output 5 Vertical Enable: " <<
YesNo(inRegValue &
BIT(12)) << endl
2697 <<
"Output 6 Vertical Enable: " <<
YesNo(inRegValue &
BIT(13)) << endl
2698 <<
"Output 7 Vertical Enable: " <<
YesNo(inRegValue &
BIT(14)) << endl
2699 <<
"Output 8 Vertical Enable: " <<
YesNo(inRegValue &
BIT(15)) << endl
2700 <<
"Output 8 Vertical Clear: " <<
ActInact(inRegValue &
BIT(16)) << endl
2701 <<
"Output 7 Vertical Clear: " <<
ActInact(inRegValue &
BIT(17)) << endl
2702 <<
"Output 6 Vertical Clear: " <<
ActInact(inRegValue &
BIT(18)) << endl
2703 <<
"Output 5 Vertical Clear: " <<
ActInact(inRegValue &
BIT(19)) << endl
2704 <<
"Input 8 Vertical Clear: " <<
ActInact(inRegValue &
BIT(25)) << endl
2705 <<
"Input 7 Vertical Clear: " <<
ActInact(inRegValue &
BIT(26)) << endl
2706 <<
"Input 6 Vertical Clear: " <<
ActInact(inRegValue &
BIT(27)) << endl
2707 <<
"Input 5 Vertical Clear: " <<
ActInact(inRegValue &
BIT(28)) << endl
2708 <<
"Input 4 Vertical Clear: " <<
ActInact(inRegValue &
BIT(29)) << endl
2709 <<
"Input 3 Vertical Clear: " <<
ActInact(inRegValue &
BIT(30));
2712 } mDecodeVidIntControl2;
2714 struct DecodeStatusReg :
public Decoder
2716 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2721 oss <<
"Input 1 Vertical Blank: " <<
ActInact(inRegValue &
BIT(20)) << endl
2722 <<
"Input 1 Field ID: " << (inRegValue &
BIT(21) ?
"1" :
"0") << endl
2723 <<
"Input 1 Vertical Interrupt: " <<
ActInact(inRegValue &
BIT(30)) << endl
2724 <<
"Input 2 Vertical Blank: " <<
ActInact(inRegValue &
BIT(18)) << endl
2725 <<
"Input 2 Field ID: " << (inRegValue &
BIT(19) ?
"1" :
"0") << endl
2726 <<
"Input 2 Vertical Interrupt: " <<
ActInact(inRegValue &
BIT(29)) << endl
2727 <<
"Output 1 Vertical Blank: " <<
ActInact(inRegValue &
BIT(22)) << endl
2728 <<
"Output 1 Field ID: " << (inRegValue &
BIT(23) ?
"1" :
"0") << endl
2729 <<
"Output 1 Vertical Interrupt: " <<
ActInact(inRegValue &
BIT(31)) << endl
2730 <<
"Output 2 Vertical Blank: " <<
ActInact(inRegValue &
BIT(4)) << endl
2731 <<
"Output 2 Field ID: " << (inRegValue &
BIT(5) ?
"1" :
"0") << endl
2732 <<
"Output 2 Vertical Interrupt: " <<
ActInact(inRegValue &
BIT(8)) << endl;
2734 oss <<
"Output 3 Vertical Blank: " <<
ActInact(inRegValue &
BIT(2)) << endl
2735 <<
"Output 3 Field ID: " << (inRegValue &
BIT(3) ?
"1" :
"0") << endl
2736 <<
"Output 3 Vertical Interrupt: " <<
ActInact(inRegValue &
BIT(7)) << endl
2737 <<
"Output 4 Vertical Blank: " <<
ActInact(inRegValue &
BIT(0)) << endl
2738 <<
"Output 4 Field ID: " << (inRegValue &
BIT(1) ?
"1" :
"0") << endl
2739 <<
"Output 4 Vertical Interrupt: " <<
ActInact(inRegValue &
BIT(6)) << endl;
2740 oss <<
"Aux Vertical Interrupt: " <<
ActInact(inRegValue &
BIT(12)) << endl
2741 <<
"I2C 1 Interrupt: " <<
ActInact(inRegValue &
BIT(14)) << endl
2742 <<
"I2C 2 Interrupt: " <<
ActInact(inRegValue &
BIT(13)) << endl
2743 <<
"Chunk Rate Interrupt: " <<
ActInact(inRegValue &
BIT(16)) << endl;
2745 oss <<
"Generic UART Interrupt: " <<
ActInact(inRegValue &
BIT(9)) << endl
2746 <<
"Uart 1 Rx Interrupt: " <<
ActInact(inRegValue &
BIT(15)) << endl
2747 <<
"Uart 1 Tx Interrupt: " <<
ActInact(inRegValue &
BIT(24)) << endl;
2749 oss <<
"Uart 2 Tx Interrupt: " <<
ActInact(inRegValue &
BIT(26)) << endl;
2751 oss <<
"LTC In 1 Present: " <<
YesNo(inRegValue &
BIT(17)) << endl;
2752 oss <<
"Wrap Rate Interrupt: " <<
ActInact(inRegValue &
BIT(25)) << endl
2753 <<
"Audio Out Wrap Interrupt: " <<
ActInact(inRegValue &
BIT(27)) << endl
2754 <<
"Audio 50Hz Interrupt: " <<
ActInact(inRegValue &
BIT(28));
2759 struct DecodeCPLDVersion :
public Decoder
2761 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2766 oss <<
"CPLD Version: " <<
DEC(inRegValue & (
BIT(0)|
BIT(1))) << endl
2767 <<
"Failsafe Bitfile Loaded: " << (inRegValue &
BIT(4) ?
"Yes" :
"No") << endl
2768 <<
"Force Reload: " <<
YesNo(inRegValue &
BIT(8));
2769 ULWord pcbRev ((inRegValue & 0xF0000000) >> 28);
2770 if (pcbRev) oss << endl
2771 <<
"PCB Version: " <<
xHEX0N(pcbRev,2);
2774 } mDecodeCPLDVersion;
2776 struct DecodeStatus2Reg :
public Decoder
2778 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2782 static const uint8_t bitNumsInputVBlank[] = {20, 18, 16, 14, 12, 10};
2783 static const uint8_t bitNumsInputFieldID[] = {21, 19, 17, 15, 13, 11};
2784 static const uint8_t bitNumsInputVertInt[] = {30, 29, 28, 27, 26, 25};
2785 static const uint8_t bitNumsOutputVBlank[] = { 8, 6, 4, 2};
2786 static const uint8_t bitNumsOutputFieldID[] = { 9, 7, 5, 3};
2787 static const uint8_t bitNumsOutputVertInt[] = {31, 24, 23, 22};
2789 for (
unsigned ndx(0); ndx < 6; ndx++)
2790 oss <<
"Input " << (ndx+3) <<
" Vertical Blank: " <<
ActInact(inRegValue &
BIT(bitNumsInputVBlank[ndx])) << endl
2791 <<
"Input " << (ndx+3) <<
" Field ID: " << (inRegValue &
BIT(bitNumsInputFieldID[ndx]) ?
"1" :
"0") << endl
2792 <<
"Input " << (ndx+3) <<
" Vertical Interrupt: " <<
ActInact(inRegValue &
BIT(bitNumsInputVertInt[ndx])) << endl;
2793 for (
unsigned ndx(0); ndx < 4; ndx++)
2794 oss <<
"Output " << (ndx+5) <<
" Vertical Blank: " <<
ActInact(inRegValue &
BIT(bitNumsOutputVBlank[ndx])) << endl
2795 <<
"Output " << (ndx+5) <<
" Field ID: " << (inRegValue &
BIT(bitNumsOutputFieldID[ndx]) ?
"1" :
"0") << endl
2796 <<
"Output " << (ndx+5) <<
" Vertical Interrupt: " <<
ActInact(inRegValue &
BIT(bitNumsOutputVertInt[ndx])) << endl;
2797 oss <<
"HDMI In Hot-Plug Detect Interrupt: " <<
ActInact(inRegValue &
BIT(0)) << endl
2798 <<
"HDMI In Chip Interrupt: " <<
ActInact(inRegValue &
BIT(1));
2801 } mDecodeStatus2Reg;
2803 struct DecodeInputStatusReg :
public Decoder
2805 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2814 <<
"Input 1 Geometry: ";
2815 if (
BIT(30) & inRegValue)
2816 switch (((
BIT(4)|
BIT(5)|
BIT(6)) & inRegValue) >> 4)
2818 case 0: oss <<
"2K x 1080";
break;
2819 case 1: oss <<
"2K x 1556";
break;
2820 default: oss <<
"Invalid HI";
break;
2823 switch (((
BIT(4)|
BIT(5)|
BIT(6)) & inRegValue) >> 4)
2825 case 0: oss <<
"Unknown";
break;
2826 case 1: oss <<
"525";
break;
2827 case 2: oss <<
"625";
break;
2828 case 3: oss <<
"750";
break;
2829 case 4: oss <<
"1125";
break;
2830 case 5: oss <<
"1250";
break;
2831 case 6:
case 7: oss <<
"Reserved";
break;
2832 default: oss <<
"Invalid LO";
break;
2835 <<
"Input 1 Scan Mode: " << ((
BIT(7) & inRegValue) ?
"Progressive" :
"Interlaced") << endl
2837 <<
"Input 2 Geometry: ";
2838 if (
BIT(31) & inRegValue)
2839 switch (((
BIT(12)|
BIT(13)|
BIT(14)) & inRegValue) >> 12)
2841 case 0: oss <<
"2K x 1080";
break;
2842 case 1: oss <<
"2K x 1556";
break;
2843 default: oss <<
"Invalid HI";
break;
2846 switch (((
BIT(12)|
BIT(13)|
BIT(14)) & inRegValue) >> 12)
2848 case 0: oss <<
"Unknown";
break;
2849 case 1: oss <<
"525";
break;
2850 case 2: oss <<
"625";
break;
2851 case 3: oss <<
"750";
break;
2852 case 4: oss <<
"1125";
break;
2853 case 5: oss <<
"1250";
break;
2854 case 6:
case 7: oss <<
"Reserved";
break;
2855 default: oss <<
"Invalid LO";
break;
2858 <<
"Input 2 Scan Mode: " << ((
BIT(15) & inRegValue) ?
"Progressive" :
"Interlaced") << endl
2860 <<
"Reference Geometry: ";
2861 switch (((
BIT(20)|
BIT(21)|
BIT(22)) & inRegValue) >> 20)
2863 case 0: oss <<
"NTV2_SG_UNKNOWN";
break;
2864 case 1: oss <<
"NTV2_SG_525";
break;
2865 case 2: oss <<
"NTV2_SG_625";
break;
2866 case 3: oss <<
"NTV2_SG_750";
break;
2867 case 4: oss <<
"NTV2_SG_1125";
break;
2868 case 5: oss <<
"NTV2_SG_1250";
break;
2869 default: oss <<
"Invalid";
break;
2872 <<
"Reference Scan Mode: " << ((
BIT(23) & inRegValue) ?
"Progressive" :
"Interlaced") << endl
2873 <<
"AES Channel 1-2: " << ((
BIT(24) & inRegValue) ?
"Invalid" :
"Valid") << endl
2874 <<
"AES Channel 3-4: " << ((
BIT(25) & inRegValue) ?
"Invalid" :
"Valid") << endl
2875 <<
"AES Channel 5-6: " << ((
BIT(26) & inRegValue) ?
"Invalid" :
"Valid") << endl
2876 <<
"AES Channel 7-8: " << ((
BIT(27) & inRegValue) ?
"Invalid" :
"Valid");
2879 } mDecodeInputStatusReg;
2881 struct DecodeSDIInputStatusReg :
public Decoder
2883 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2886 uint16_t numSpigots(0), startSpigot(0), doTsiMuxSync(0);
2897 for (uint16_t spigotNdx(0); spigotNdx < numSpigots; )
2899 const uint16_t spigotNum (spigotNdx + startSpigot);
2900 const uint8_t statusBits ((inRegValue >> (spigotNdx*8)) & 0xFF);
2901 const uint8_t speedBits (statusBits & 0xC1);
2902 ostringstream ossSpeed, ossSpigot;
2903 ossSpigot <<
"SDI In " << spigotNum <<
" ";
2904 const string spigotLabel (ossSpigot.str());
2905 if (speedBits & 0x01) ossSpeed <<
" 3G";
2908 if (speedBits & 0x40) ossSpeed <<
" 6G";
2909 if (speedBits & 0x80) ossSpeed <<
" 12G";
2911 if (speedBits == 0) ossSpeed <<
" 1.5G";
2912 oss << spigotLabel <<
"Link Speed:" << ossSpeed.str() << endl
2913 << spigotLabel <<
"SMPTE Level B: " <<
YesNo(statusBits & 0x02) << endl
2914 << spigotLabel <<
"Link A VPID Valid: " <<
YesNo(statusBits & 0x10) << endl
2915 << spigotLabel <<
"Link B VPID Valid: " <<
YesNo(statusBits & 0x20) << endl;
2917 oss << spigotLabel <<
"3Gb-to-3Ga Conversion: " <<
EnabDisab(statusBits & 0x04);
2919 oss << spigotLabel <<
"3Gb-to-3Ga Conversion: n/a";
2920 if (++spigotNdx < numSpigots)
2924 for (
UWord tsiMux(0); tsiMux < 4; ++tsiMux)
2926 <<
"TsiMux" <<
DEC(tsiMux+1) <<
" Sync Fail: " << ((inRegValue & (0x00010000UL << tsiMux)) ?
"FAILED" :
"OK");
2929 } mDecodeSDIInputStatusReg;
2931 struct DecodeSDIInputStatus2Reg :
public Decoder
2933 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2941 oss << sOdd <<
" Scan Mode: " << ((
BIT(7) & inRegValue) ?
"Progressive" :
"Interlaced") << endl
2943 << sOdd <<
" Geometry: ";
2944 if (
BIT(30) & inRegValue)
switch (((
BIT(4)|
BIT(5)|
BIT(6)) & inRegValue) >> 4)
2946 case 0: oss <<
"2K x 1080";
break;
2947 case 1: oss <<
"2K x 1556";
break;
2948 default: oss <<
"Invalid HI";
break;
2950 else switch (((
BIT(4)|
BIT(5)|
BIT(6)) & inRegValue) >> 4)
2952 case 0: oss <<
"Unknown";
break;
2953 case 1: oss <<
"525";
break;
2954 case 2: oss <<
"625";
break;
2955 case 3: oss <<
"750";
break;
2956 case 4: oss <<
"1125";
break;
2957 case 5: oss <<
"1250";
break;
2958 case 6:
case 7: oss <<
"Reserved";
break;
2959 default: oss <<
"Invalid LO";
break;
2962 << sEven <<
" Scan Mode: " << ((
BIT(15) & inRegValue) ?
"Progressive" :
"Interlaced") << endl
2964 << sEven <<
" Geometry: ";
2965 if (
BIT(31) & inRegValue)
switch (((
BIT(12)|
BIT(13)|
BIT(14)) & inRegValue) >> 12)
2967 case 0: oss <<
"2K x 1080";
break;
2968 case 1: oss <<
"2K x 1556";
break;
2969 default: oss <<
"Invalid HI";
break;
2971 else switch (((
BIT(12)|
BIT(13)|
BIT(14)) & inRegValue) >> 12)
2973 case 0: oss <<
"Unknown";
break;
2974 case 1: oss <<
"525";
break;
2975 case 2: oss <<
"625";
break;
2976 case 3: oss <<
"750";
break;
2977 case 4: oss <<
"1125";
break;
2978 case 5: oss <<
"1250";
break;
2979 case 6:
case 7: oss <<
"Reserved";
break;
2980 default: oss <<
"Invalid LO";
break;
2984 } mDecodeSDIInputStatus2Reg;
2986 struct DecodeFS1RefSelectReg :
public Decoder
2988 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2990 (
void) inDeviceID; (
void) inRegNum;
2992 oss <<
"BNC Select(LHi): " << (inRegValue & 0x00000010 ?
"LTCIn1" :
"Ref") << endl
2993 <<
"Ref BNC (Corvid): " <<
EnabDisab(inRegValue & 0x00000020) << endl
2994 <<
"LTC Present (also Reg 21): " <<
YesNo(inRegValue & 0x00000040) << endl
2995 <<
"LTC Emb Out Enable: " <<
YesNo(inRegValue & 0x00000080) << endl
2996 <<
"LTC Emb In Enable: " <<
YesNo(inRegValue & 0x00000100) << endl
2997 <<
"LTC Emb In Received: " <<
YesNo(inRegValue & 0x00000200) << endl
2998 <<
"LTC BNC Out Source: " << (inRegValue & 0x00000400 ?
"E-E" :
"Reg112/113");
3001 } mDecodeFS1RefSelectReg;
3003 struct DecodeLTCStatusControlReg :
public Decoder
3005 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3007 (
void) inDeviceID; (
void) inRegNum;
3008 const uint16_t LTC1InTimingSelect ((inRegValue >> 1) & 0x0000007);
3009 const uint16_t LTC2InTimingSelect ((inRegValue >> 9) & 0x0000007);
3010 const uint16_t LTC1OutTimingSelect ((inRegValue >> 16) & 0x0000007);
3011 const uint16_t LTC2OutTimingSelect ((inRegValue >> 20) & 0x0000007);
3013 oss <<
"LTC 1 Input Present: " <<
YesNo(inRegValue & 0x00000001) << endl
3014 <<
"LTC 1 Input FB Timing Select): " <<
xHEX0N(LTC1InTimingSelect,2) <<
" (" <<
DEC(LTC1InTimingSelect) <<
")" << endl
3015 <<
"LTC 1 Bypass: " <<
EnabDisab(inRegValue & 0x00000010) << endl
3016 <<
"LTC 1 Bypass Select: " <<
DEC(
ULWord((inRegValue >> 5) & 0x00000001)) << endl
3017 <<
"LTC 2 Input Present: " <<
YesNo(inRegValue & 0x00000100) << endl
3018 <<
"LTC 2 Input FB Timing Select): " <<
xHEX0N(LTC2InTimingSelect,2) <<
" (" <<
DEC(LTC2InTimingSelect) <<
")" << endl
3019 <<
"LTC 2 Bypass: " <<
EnabDisab(inRegValue & 0x00001000) << endl
3020 <<
"LTC 2 Bypass Select: " <<
DEC(
ULWord((inRegValue >> 13) & 0x00000001)) << endl
3021 <<
"LTC 1 Output FB Timing Select): " <<
xHEX0N(LTC1OutTimingSelect,2) <<
" (" <<
DEC(LTC1OutTimingSelect) <<
")" << endl
3022 <<
"LTC 2 Output FB Timing Select): " <<
xHEX0N(LTC2OutTimingSelect,2) <<
" (" <<
DEC(LTC2OutTimingSelect) <<
")";
3025 } mLTCStatusControlDecoder;
3027 struct DecodeAudDetectReg :
public Decoder
3029 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3037 for (uint16_t num(0); num < 8; )
3039 const uint16_t group (num / 2);
3040 const bool isChan34 (num & 1);
3041 oss <<
"Group " << group <<
" CH " << (isChan34 ?
"3-4: " :
"1-2: ") << (inRegValue &
BIT(num) ?
"Present" :
"Absent");
3052 } mDecodeAudDetectReg;
3054 struct DecodeAudControlReg :
public Decoder
3056 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3060 static const string ChStrs [] = {
"Ch 1/2",
"Ch 3/4",
"Ch 5/6",
"Ch 7/8" };
3061 uint16_t sdiOutput (0);
3071 oss <<
"Audio Capture: " <<
EnabDisab(
BIT(0) & inRegValue) << endl
3072 <<
"Audio Loopback: " <<
EnabDisab(
BIT(3) & inRegValue) << endl
3073 <<
"Audio Input: " <<
DisabEnab(
BIT(8) & inRegValue) << endl
3074 <<
"Audio Output: " <<
DisabEnab(
BIT(9) & inRegValue) << endl
3075 <<
"Output Paused: " <<
YesNo(
BIT(11) & inRegValue) << endl;
3077 oss <<
"Audio Embedder SDIOut" << sdiOutput <<
": " <<
DisabEnab(
BIT(13) & inRegValue) << endl
3078 <<
"Audio Embedder SDIOut" << (sdiOutput+1) <<
": " <<
DisabEnab(
BIT(15) & inRegValue) << endl;
3080 oss <<
"A/V Sync Mode: " <<
EnabDisab(
BIT(15) & inRegValue) << endl
3081 <<
"AES Rate Converter: " <<
DisabEnab(
BIT(19) & inRegValue) << endl
3082 <<
"Audio Buffer Format: " << (
BIT(20) & inRegValue ?
"16-Channel " : (
BIT(16) & inRegValue ?
"8-Channel " :
"6-Channel ")) << endl
3083 << (
BIT(18) & inRegValue ?
"96kHz" :
"48kHz") << endl
3084 << (
BIT(18) & inRegValue ?
"96kHz Support" :
"48kHz Support") << endl
3086 <<
"Slave Mode (64-chl): " <<
EnabDisab(
BIT(23) & inRegValue) << endl
3087 <<
"K-box, Monitor: " << ChStrs [(
BIT(24) &
BIT(25) & inRegValue) >> 24] << endl
3088 <<
"K-Box Input: " << (
BIT(26) & inRegValue ?
"XLR" :
"BNC") << endl
3089 <<
"K-Box: " << (
BIT(27) & inRegValue ?
"Present" :
"Absent") << endl
3090 <<
"Cable: " << (
BIT(28) & inRegValue ?
"XLR" :
"BNC") << endl
3091 <<
"Audio Buffer Size: " << (
BIT(31) & inRegValue ?
"4 MB" :
"1 MB");
3094 } mDecodeAudControlReg;
3096 struct DecodeAudSourceSelectReg :
public Decoder
3098 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3102 static const string SrcStrs [] = {
"AES Input",
"Embedded Groups 1 and 2",
"" };
3103 static const unsigned SrcStrMap [] = { 0, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 };
3104 const uint16_t vidInput = (inRegValue &
BIT(23) ? 2 : 0) + (inRegValue &
BIT(16) ? 1 : 0);
3107 oss <<
"Audio Source: " << SrcStrs [SrcStrMap [(
BIT(0) |
BIT(1) |
BIT(2) |
BIT(3)) & inRegValue]] << endl
3108 <<
"Embedded Source Select: Video Input " << (1 + vidInput) << endl
3109 <<
"AES Sync Mode bit (fib): " <<
EnabDisab(inRegValue &
BIT(18)) << endl
3110 <<
"PCM disabled: " <<
YesNo(inRegValue &
BIT(17)) << endl
3111 <<
"Erase head enable: " <<
YesNo(inRegValue &
BIT(19)) << endl
3112 <<
"Embedded Clock Select: " << (inRegValue &
BIT(22) ?
"Video Input" :
"Board Reference") << endl
3113 <<
"3G audio source: " << (inRegValue &
BIT(21) ?
"Data stream 2" :
"Data stream 1");
3116 } mDecodeAudSourceSelectReg;
3118 struct DecodeAudOutputSrcMap :
public Decoder
3120 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3124 static const string AESOutputStrs[] = {
"AES Outputs 1-4",
"AES Outputs 5-8",
"AES Outputs 9-12",
"AES Outputs 13-16",
""};
3125 static const string SrcStrs[] = {
"AudSys1, Audio Channels 1-4",
"AudSys1, Audio Channels 5-8",
3126 "AudSys1, Audio Channels 9-12",
"AudSys1, Audio Channels 13-16",
3127 "AudSys2, Audio Channels 1-4",
"AudSys2, Audio Channels 5-8",
3128 "AudSys2, Audio Channels 9-12",
"AudSys2, Audio Channels 13-16",
3129 "AudSys3, Audio Channels 1-4",
"AudSys3, Audio Channels 5-8",
3130 "AudSys3, Audio Channels 9-12",
"AudSys3, Audio Channels 13-16",
3131 "AudSys4, Audio Channels 1-4",
"AudSys4, Audio Channels 5-8",
3132 "AudSys4, Audio Channels 9-12",
"AudSys4, Audio Channels 13-16",
""};
3133 static const unsigned AESChlMappingShifts [4] = {0, 4, 8, 12};
3136 const uint32_t AESOutMapping (inRegValue & 0x0000FFFF);
3140 for (
unsigned AESOutputQuad(0); AESOutputQuad < 4; AESOutputQuad++)
3141 oss << AESOutputStrs[AESOutputQuad] <<
" Source: " << SrcStrs[(AESOutMapping >> AESChlMappingShifts[AESOutputQuad]) & 0x0000000F] << endl;
3154 const uint32_t HDMIMon1234Info (HDMIMonInfo & 0x0F);
3157 const uint32_t HDMIMon5678Info ((HDMIMonInfo >> 4) & 0x0F);
3165 } mDecodeAudOutputSrcMap;
3167 struct DecodePCMControlReg :
public Decoder
3169 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3174 for (uint8_t audChan (0); audChan < 4; audChan++)
3176 oss <<
"Audio System " << (startAudioSystem + audChan) <<
": ";
3177 const uint8_t pcmBits (uint32_t(inRegValue >> (audChan * 8)) & 0x000000FF);
3178 if (pcmBits == 0x00)
3182 oss <<
"non-PCM channels";
3183 for (uint8_t chanPair (0); chanPair < 8; chanPair++)
3184 if (pcmBits & (0x01 << chanPair))
3185 oss <<
" " << (chanPair*2+1) <<
"-" << (chanPair*2+2);
3192 } mDecodePCMControlReg;
3194 struct DecodeAudioMixerInputSelectReg :
public Decoder
3196 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3197 { (
void) inDeviceID; (
void) inRegNum;
3198 const UWord mainInputSrc((inRegValue ) & 0x0000000F);
3199 const UWord aux1InputSrc((inRegValue >> 4) & 0x0000000F);
3200 const UWord aux2InputSrc((inRegValue >> 8) & 0x0000000F);
3207 } mAudMxrInputSelDecoder;
3209 struct DecodeAudioMixerGainRegs :
public Decoder
3213 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3214 { (
void)inRegNum; (
void)inDeviceID;
3215 static const double kUnityGain (0x00010000);
3216 const bool atUnity (inRegValue == 0x00010000);
3219 oss <<
"Gain: 0 dB (Unity)";
3222 const double dValue (inRegValue);
3223 const bool aboveUnity (inRegValue >= 0x00010000);
3224 const string plusMinus (atUnity ?
"" : (aboveUnity ?
"+" :
"-"));
3225 const string aboveBelow (atUnity ?
"at" : (aboveUnity ?
"above" :
"below"));
3226 const uint32_t unityDiff (aboveUnity ? inRegValue - 0x00010000 : 0x00010000 - inRegValue);
3227 const double dB (
double(20.0) * ::log10(dValue/kUnityGain));
3228 oss <<
"Gain: " << dB <<
" dB, " << plusMinus <<
xHEX0N(unityDiff,6)
3229 <<
" (" << plusMinus <<
DEC(unityDiff) <<
") " << aboveBelow <<
" unity gain";
3233 } mAudMxrGainDecoder;
3235 struct DecodeAudioMixerChannelSelectReg :
public Decoder
3237 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3238 { (
void) inRegNum; (
void) inDeviceID;
3243 <<
"Level Measurement Sample Count: " <<
DEC(
ULWord(1 << powerOfTwo)) <<
" (bits 8-15)";
3246 } mAudMxrChanSelDecoder;
3249 struct DecodeAudioMixerMutesReg :
public Decoder
3252 typedef std::bitset<16> AudioChannelSet16;
3253 typedef std::bitset<2> AudioChannelSet2;
3256 outSet.clear(); outClear.clear();
3257 for (
size_t ndx(0); ndx < 16; ndx++)
3258 { ostringstream oss; oss <<
DEC(ndx+1);
3259 if (inChSet.test(ndx))
3260 outSet.push_back(oss.str());
3262 outClear.push_back(oss.str());
3264 if (outSet.empty()) outSet.push_back(
"<none>");
3265 if (outClear.empty()) outClear.push_back(
"<none>");
3269 outSet.clear(); outClear.clear();
static const string LR[] = {
"L",
"R"};
3270 for (
size_t ndx(0); ndx < 2; ndx++)
3271 if (inChSet.test(ndx))
3272 outSet.push_back(LR[ndx]);
3274 outClear.push_back(LR[ndx]);
3275 if (outSet.empty()) outSet.push_back(
"<none>");
3276 if (outClear.empty()) outClear.push_back(
"<none>");
3279 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3280 { (
void) inRegNum; (
void) inDeviceID;
3286 NTV2StringList mutedMainOut, unmutedMainOut, mutedMain, unmutedMain, mutedAux1, unmutedAux1, mutedAux2, unmutedAux2;
3287 SplitAudioChannelSet16(AudioChannelSet16(mainOutputMuteBits), mutedMainOut, unmutedMainOut);
3288 SplitAudioChannelSet2(AudioChannelSet2(mainInputMuteBits), mutedMain, unmutedMain);
3289 SplitAudioChannelSet2(AudioChannelSet2(aux1InputMuteBits), mutedAux1, unmutedAux1);
3290 SplitAudioChannelSet2(AudioChannelSet2(aux2InputMuteBits), mutedAux2, unmutedAux2);
3291 oss <<
"Main Output Muted/Disabled Channels: " << mutedMainOut << endl
3292 <<
"Main Output Unmuted/Enabled Channels: " << unmutedMainOut << endl;
3293 oss <<
"Main Input Muted/Disabled Channels: " << mutedMain << endl
3294 <<
"Main Input Unmuted/Enabled Channels: " << unmutedMain << endl;
3295 oss <<
"Aux Input 1 Muted/Disabled Channels: " << mutedAux1 << endl
3296 <<
"Aux Input 1 Unmuted/Enabled Channels: " << unmutedAux1 << endl;
3297 oss <<
"Aux Input 2 Muted/Disabled Channels: " << mutedAux2 << endl
3298 <<
"Aux Input 2 Unmuted/Enabled Channels: " << unmutedAux2;
3301 } mAudMxrMutesDecoder;
3303 struct DecodeAudioMixerLevelsReg :
public Decoder
3307 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3308 { (
void) inDeviceID;
3309 static const string sLabels[] = {
"Aux Input 1",
"Aux Input 2",
"Main Input Audio Channels 1|2",
"Main Input Audio Channels 3|4",
3310 "Main Input Audio Channels 5|6",
"Main Input Audio Channels 7|8",
"Main Input Audio Channels 9|10",
3311 "Main Input Audio Channels 11|12",
"Main Input Audio Channels 13|14",
"Main Input Audio Channels 15|16",
3312 "Main Output Audio Channels 1|2",
"Main Output Audio Channels 3|4",
"Main Output Audio Channels 5|6",
3313 "Main Output Audio Channels 7|8",
"Main Output Audio Channels 9|10",
"Main Output Audio Channels 11|12",
3314 "Main Output Audio Channels 13|14",
"Main Output Audio Channels 15|16"};
3318 const string & label(sLabels[labelOffset]);
3322 oss << label <<
" Left Level:" <<
xHEX0N(leftLevel, 4) <<
" (" <<
DEC(leftLevel) <<
")" << endl
3323 << label <<
" Right Level:" <<
xHEX0N(rightLevel,4) <<
" (" <<
DEC(rightLevel) <<
")";
3326 } mAudMxrLevelDecoder;
3328 struct DecodeAncExtControlReg :
public Decoder
3330 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3335 static const string SyncStrs [] = {
"field",
"frame",
"immediate",
"unknown" };
3336 oss <<
"HANC Y enable: " <<
YesNo(inRegValue &
BIT( 0)) << endl
3337 <<
"VANC Y enable: " <<
YesNo(inRegValue &
BIT( 4)) << endl
3338 <<
"HANC C enable: " <<
YesNo(inRegValue &
BIT( 8)) << endl
3339 <<
"VANC C enable: " <<
YesNo(inRegValue &
BIT(12)) << endl
3340 <<
"Progressive video: " <<
YesNo(inRegValue &
BIT(16)) << endl
3341 <<
"Synchronize: " << SyncStrs [(inRegValue & (
BIT(24) |
BIT(25))) >> 24] << endl
3342 <<
"Memory writes: " <<
EnabDisab(!(inRegValue &
BIT(28))) << endl
3343 <<
"SD Y+C Demux: " <<
EnabDisab(inRegValue &
BIT(30)) << endl
3344 <<
"Metadata from: " << (inRegValue &
BIT(31) ?
"LSBs" :
"MSBs");
3347 } mDecodeAncExtControlReg;
3349 struct DecodeAuxExtControlReg :
public Decoder
3351 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3356 static const string SyncStrs [] = {
"field",
"frame",
"immediate",
"unknown" };
3357 oss <<
"Progressive video: " <<
YesNo(inRegValue &
BIT(16)) << endl
3358 <<
"Synchronize: " << SyncStrs [(inRegValue & (
BIT(24) |
BIT(25))) >> 24] << endl
3359 <<
"Memory writes: " <<
EnabDisab(!(inRegValue &
BIT(28))) << endl
3360 <<
"Filter inclusion: " <<
EnabDisab(inRegValue &
BIT(29));
3363 } mDecodeAuxExtControlReg;
3366 struct DecodeAncExtFieldLinesReg :
public Decoder
3368 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3372 const uint32_t which (inRegNum & 0x1F);
3373 const uint32_t valueLow (inRegValue & 0xFFF);
3374 const uint32_t valueHigh ((inRegValue >> 16) & 0xFFF);
3377 case 5: oss <<
"F1 cutoff line: " << valueLow << endl
3378 <<
"F2 cutoff line: " << valueHigh;
3380 case 9: oss <<
"F1 VBL start line: " << valueLow << endl
3381 <<
"F2 VBL start line: " << valueHigh;
3383 case 11: oss <<
"Field ID high on line: " << valueLow << endl
3384 <<
"Field ID low on line: " << valueHigh;
3386 case 17: oss <<
"F1 analog start line: " << valueLow << endl
3387 <<
"F2 analog start line: " << valueHigh;
3390 oss <<
"Invalid register type";
3395 } mDecodeAncExtFieldLines;
3398 struct DecodeAncExtStatusReg :
public Decoder
3400 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3404 const uint32_t which (inRegNum & 0x1F);
3405 const uint32_t byteTotal (inRegValue & 0xFFFFFF);
3406 const bool overrun ((inRegValue &
BIT(28)) ?
true :
false);
3409 case 6: oss <<
"Total bytes: ";
break;
3410 case 7: oss <<
"Total F1 bytes: ";
break;
3411 case 8: oss <<
"Total F2 bytes: ";
break;
3412 default: oss <<
"Invalid register type";
break;
3414 oss <<
DEC(byteTotal) << endl
3415 <<
"Overrun: " <<
YesNo(overrun);
3418 } mDecodeAncExtStatus;
3421 struct DecodeAncExtIgnoreDIDReg :
public Decoder
3423 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3428 oss <<
"Ignoring DIDs " <<
HEX0N((inRegValue >> 0) & 0xFF, 2)
3429 <<
", " <<
HEX0N((inRegValue >> 8) & 0xFF, 2)
3430 <<
", " <<
HEX0N((inRegValue >> 16) & 0xFF, 2)
3431 <<
", " <<
HEX0N((inRegValue >> 24) & 0xFF, 2);
3434 } mDecodeAncExtIgnoreDIDs;
3436 struct DecodeAncExtAnalogFilterReg :
public Decoder
3438 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3443 uint32_t which (inRegNum & 0x1F);
3444 oss <<
"Each 1 bit specifies capturing ";
3447 case 18: oss <<
"F1 Y";
break;
3448 case 19: oss <<
"F2 Y";
break;
3449 case 20: oss <<
"F1 C";
break;
3450 case 21: oss <<
"F2 C";
break;
3451 default:
return "Invalid register type";
3453 oss <<
" line as analog, else digital";
3456 } mDecodeAncExtAnalogFilter;
3458 struct DecodeAncInsValuePairReg :
public Decoder
3460 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3464 const uint32_t which (inRegNum & 0x1F);
3465 const uint32_t valueLow (inRegValue & 0xFFFF);
3466 const uint32_t valueHigh ((inRegValue >> 16) & 0xFFFF);
3470 case 0: oss <<
"F1 byte count low: " << valueLow << endl
3471 <<
"F2 byte count low: " << valueHigh;
3473 case 4: oss <<
"HANC pixel delay: " << (valueLow & 0x3FF) << endl
3474 <<
"VANC pixel delay: " << (valueHigh & 0x7FF);
3476 case 5: oss <<
"F1 first active line: " << (valueLow & 0x7FF) << endl
3477 <<
"F2 first active line: " << (valueHigh & 0x7FF);
3479 case 6: oss <<
"Active line length: " << (valueLow & 0x7FF) << endl
3480 <<
"Total line length: " << (valueHigh & 0xFFF);
3482 case 8: oss <<
"Field ID high on line: " << (valueLow & 0x7FF) << endl
3483 <<
"Field ID low on line: " << (valueHigh & 0x7FF);
3485 case 11: oss <<
"F1 chroma blnk start line: " << (valueLow & 0x7FF) << endl
3486 <<
"F2 chroma blnk start line: " << (valueHigh & 0x7FF);
3488 case 14: oss <<
"F1 byte count high: " << valueLow << endl
3489 <<
"F2 byte count high: " << valueHigh;
3491 default:
return "Invalid register type";
3495 } mDecodeAncInsValuePairReg;
3497 struct DecodeAncInsControlReg :
public Decoder
3499 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3504 oss <<
"HANC Y enable: " <<
YesNo(inRegValue &
BIT( 0)) << endl
3505 <<
"VANC Y enable: " <<
YesNo(inRegValue &
BIT( 4)) << endl
3506 <<
"HANC C enable: " <<
YesNo(inRegValue &
BIT( 8)) << endl
3507 <<
"VANC C enable: " <<
YesNo(inRegValue &
BIT(12)) << endl
3508 <<
"Payload Y insert: " <<
YesNo(inRegValue &
BIT(16)) << endl
3509 <<
"Payload C insert: " <<
YesNo(inRegValue &
BIT(17)) << endl
3510 <<
"Payload F1 insert: " <<
YesNo(inRegValue &
BIT(20)) << endl
3511 <<
"Payload F2 insert: " <<
YesNo(inRegValue &
BIT(21)) << endl
3512 <<
"Progressive video: " <<
YesNo(inRegValue &
BIT(24)) << endl
3513 <<
"Memory reads: " <<
EnabDisab(!(inRegValue &
BIT(28))) << endl
3514 <<
"SD Packet Split: " <<
EnabDisab(inRegValue &
BIT(31));
3517 } mDecodeAncInsControlReg;
3519 struct DecodeAncInsChromaBlankReg :
public Decoder
3521 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3526 uint32_t which (inRegNum & 0x1F);
3528 oss <<
"Each 1 bit specifies if chroma in ";
3531 case 12: oss <<
"F1";
break;
3532 case 13: oss <<
"F2";
break;
3533 default:
return "Invalid register type";
3535 oss <<
" should be blanked or passed thru";
3538 } mDecodeAncInsChromaBlankReg;
3540 struct DecodeXptGroupReg :
public Decoder
3542 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3544 static unsigned sShifts[4] = {0, 8, 16, 24};
3546 for (
unsigned ndx(0); ndx < 4; ndx++)
3564 strs.push_back(oss.str());
3570 } mDecodeXptGroupReg;
3572 struct DecodeXptValidReg :
public Decoder
3574 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3591 ss <<
xHEX0N(outputXpt,2) <<
"(" <<
DEC(outputXpt) <<
")";
3593 ss <<
"'" << name <<
"'";
3594 outputXptNames.push_back(ss.str());
3596 if (!outputXptNames.empty())
3597 oss <<
"Valid Xpts: " << outputXptNames;
3601 return Decoder::operator()(inRegNum, inRegValue, inDeviceID);
3603 } mDecodeXptValidReg;
3605 struct DecodeNTV4FSReg :
public Decoder
3607 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3608 { (
void) inDeviceID;
3609 static const string sPixClkSelects[] = {
"27",
"74.1758",
"74.25",
"148.3516",
"148.5",
"inv5",
"inv6",
"inv7"};
3610 static const string sSyncs[] = {
"Sync to Frame",
"Sync to Field",
"Immediate",
"Sync to External"};
3616 {
const ULWord disabled (inRegValue &
BIT(1));
3617 const ULWord sync ((inRegValue & (
BIT(20)|
BIT(21))) >> 20);
3618 const ULWord pixClkSel((inRegValue & (
BIT(16)|
BIT(17)|
BIT(18))) >> 16);
3621 oss <<
"Enabled: " <<
YesNo(!disabled) << endl
3622 <<
"Mode: " << ((inRegValue &
BIT( 0)) ?
"Capture" :
"Display") << endl
3623 <<
"DRT_DISP: " <<
OnOff(inRegValue &
BIT( 2)) << endl
3624 <<
"Fill Bit: " <<
DEC((inRegValue &
BIT( 3)) ? 1 : 0) << endl
3625 <<
"Dither: " <<
EnabDisab(inRegValue &
BIT( 4)) << endl
3626 <<
"RGB8 Convert: " << ((inRegValue &
BIT( 5)) ?
"Use '00'" :
"Copy MSBs") << endl
3627 <<
"Progressive: " <<
YesNo(inRegValue &
BIT( 6)) << endl
3629 <<
"Pix Clk Sel: " << sPixClkSelects[pixClkSel] <<
" MHz" << endl
3630 <<
"Sync: " << sSyncs[sync];
3632 oss <<
"Enabled: " <<
YesNo(!disabled);
3636 {
const ULWord lineCnt ((inRegValue & (0xFFFF0000)) >> 16);
3637 oss <<
"Field ID: " <<
OddEven(inRegValue &
BIT( 0)) << endl
3638 <<
"Line Count: " <<
DEC(lineCnt);
3642 {
const int32_t xferByteCnt((inRegValue & 0xFFFF0000) >> 16), linePitch(inRegValue & 0x0000FFFF);
3643 oss <<
"Line Pitch: " << linePitch << (linePitch < 0 ?
" (flipped)" :
"") << endl
3644 <<
"Xfer Byte Count: " << xferByteCnt <<
" [bytes/line]" << (linePitch < 0 ?
" (flipped)" :
"");
3648 {
const ULWord ROIVSize((inRegValue & (0x0FFF0000)) >> 16), ROIHSize(inRegValue & 0x00000FFF);
3649 oss <<
"ROI Horz Size: " <<
DEC(ROIHSize) <<
" [pixels]" << endl
3650 <<
"ROI Vert Size: " <<
DEC(ROIVSize) <<
" [lines]";
3655 {
const ULWord ROIVOff((inRegValue & (0x0FFF0000)) >> 16), ROIHOff(inRegValue & 0x00000FFF);
3657 oss <<
"ROI " << fld <<
" Horz Offset: " <<
DEC(ROIHOff) << endl
3658 <<
"ROI " << fld <<
" Vert Offset: " <<
DEC(ROIVOff);
3662 {
const ULWord tot((inRegValue & (0x0FFF0000)) >> 16), act(inRegValue & 0x00000FFF);
3663 oss <<
"Disp Horz Active: " <<
DEC(act) << endl
3664 <<
"Disp Horz Total: " <<
DEC(tot);
3668 {
const ULWord lo((inRegValue & (0x07FF0000)) >> 16), hi(inRegValue & 0x000007FF);
3669 oss <<
"Disp FID Lo: " <<
DEC(lo) << endl
3670 <<
"Disp FID Hi: " <<
DEC(hi);
3675 {
const ULWord actEnd((inRegValue & (0x07FF0000)) >> 16), actStart(inRegValue & 0x000007FF);
3677 oss <<
"Disp " << fld <<
" Active Start: " <<
DEC(actStart) << endl
3678 <<
"Disp " << fld <<
" Active End: " <<
DEC(actEnd);
3682 oss <<
"Unpacker Horz Offset: " <<
DEC(inRegValue & 0x0000FFFF);
3686 {
const ULWord hi((inRegValue & (0xFFFF0000)) >> 16), lo(inRegValue & 0x0000FFFF);
3689 oss <<
"Disp Fill " << CbBorCrR <<
": " <<
DEC(lo) <<
" " <<
xHEX0N(lo,4) << endl
3690 <<
"Disp Fill " << YGorA <<
": " <<
DEC(hi) <<
" " <<
xHEX0N(hi,4);
3694 {
const ULWord lo(inRegValue & 0x0000FFFF);
3695 oss <<
"ROI Fill Alpha: " <<
DEC(lo) <<
" " <<
xHEX0N(lo,4);
3699 oss <<
"Output Timing Frame Pulse Preset: " <<
DEC(inRegValue & 0x00FFFFFF) <<
" " 3700 <<
xHEX0N(inRegValue & 0x00FFFFFF,6);
3705 {
const int32_t lo (inRegValue & 0x00001FFF);
3706 oss <<
"Output Video Offset: " << lo <<
" " <<
xHEX0N(lo,6);
3710 return Decoder::operator()(inRegNum, inRegValue, inDeviceID);
3716 struct DecodeHDMIOutputControl :
public Decoder
3718 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3722 static const string sHDMIStdV1[] = {
"1080i",
"720p",
"480i",
"576i",
"1080p",
"SXGA",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"" };
3723 static const string sHDMIStdV2V3[] = {
"1080i",
"720p",
"480i",
"576i",
"1080p",
"1556i",
"2Kx1080p",
"2Kx1080i",
"UHD",
"4K",
"",
"",
"",
"",
"",
"" };
3724 static const string sVidRates[] = {
"",
"60.00",
"59.94",
"30.00",
"29.97",
"25.00",
"24.00",
"23.98",
"50.00",
"48.00",
"47.95",
"",
"",
"",
"",
"" };
3725 static const string sSrcSampling[] = {
"YC422",
"RGB",
"YC420",
"Unknown/invalid" };
3726 static const string sBitDepth[] = {
"8",
"10",
"12",
"Unknown/invalid" };
3729 const string hdmiVidStdStr (hdmiVers > 1 ? sHDMIStdV2V3[rawVideoStd] : (hdmiVers == 1 ? sHDMIStdV1[rawVideoStd] :
""));
3732 const uint32_t srcBPC ((inRegValue & (
BIT(16)|
BIT(17))) >> 16);
3733 const uint32_t txBitDepth ((inRegValue & (
BIT(20)|
BIT(21))) >> 20);
3734 oss <<
"Video Standard: " << hdmiVidStdStr;
3735 if (hdmiVidStdStr != vidStdStr)
3736 oss <<
" (" << vidStdStr <<
")";
3738 <<
"Color Mode: " << ((inRegValue &
BIT( 8)) ?
"RGB" :
"YCbCr") << endl
3740 <<
"Scan Mode: " << ((inRegValue &
BIT(13)) ?
"Progressive" :
"Interlaced") << endl
3741 <<
"Bit Depth: " << ((inRegValue &
BIT(14)) ?
"10-bit" :
"8-bit") << endl
3742 <<
"Output Color Sampling: " << ((inRegValue &
BIT(15)) ?
"4:4:4" :
"4:2:2") << endl
3743 <<
"Output Bit Depth: " << sBitDepth[txBitDepth] << endl
3744 <<
"Src Color Sampling: " << sSrcSampling[srcSampling] << endl
3745 <<
"Src Bits Per Component: " << sBitDepth[srcBPC] << endl
3746 <<
"Output Range: " << ((inRegValue &
BIT(28)) ?
"Full" :
"SMPTE") << endl
3747 <<
"Audio Channels: " << ((inRegValue &
BIT(29)) ?
"8" :
"2") << endl
3748 <<
"Output: " << ((inRegValue &
BIT(30)) ?
"DVI" :
"HDMI");
3751 <<
"Audio Loopback: " <<
OnOff(inRegValue &
BIT(31));
3754 } mDecodeHDMIOutputControl;
3756 struct DecodeHDMIInputStatus :
public Decoder
3758 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3765 static const string sStds[32] = {
"1080i",
"720p",
"480i",
"576i",
"1080p",
"SXGA",
"2K1080p",
"2K1080i",
"3840p",
"4096p"};
3766 static const string sRates[32] = {
"invalid",
"60.00",
"59.94",
"30.00",
"29.97",
"25.00",
"24.00",
"23.98",
"50.00",
"48.00",
"47.95" };
3767 oss <<
"HDMI Input: " << (inRegValue &
BIT(0) ?
"Locked" :
"Unlocked") << endl
3768 <<
"HDMI Input: " << (inRegValue &
BIT(1) ?
"Stable" :
"Unstable") << endl
3769 <<
"Color Mode: " << (inRegValue &
BIT(2) ?
"RGB" :
"YCbCr") << endl
3770 <<
"Bitdepth: " << (inRegValue &
BIT(3) ?
"10-bit" :
"8-bit") << endl
3771 <<
"Audio Channels: " << (inRegValue &
BIT(12) ? 2 : 8) << endl
3772 <<
"Scan Mode: " << (inRegValue &
BIT(13) ?
"Progressive" :
"Interlaced") << endl
3773 <<
"Standard: " << (inRegValue &
BIT(14) ?
"SD" :
"HD") << endl
3774 <<
"Video Standard: " << sStds[vidStd] << endl
3775 <<
"Protocol: " << (inRegValue &
BIT(27) ?
"DVI" :
"HDMI") << endl
3776 <<
"Video Rate : " << (rate < 11 ? sRates[rate] :
string(
"invalid"));
3779 } mDecodeHDMIInputStatus;
3781 struct DecodeHDMIInputControl :
public Decoder
3783 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3785 (
void) inRegNum; (
void) inDeviceID;
3787 const UWord chanPair ((inRegValue & (
BIT(2) |
BIT(3))) >> 2);
3789 const UWord txCh12Sel ((inRegValue & (
BIT(29)|
BIT(30))) >> 29);
3791 oss <<
"HDMI In EDID Write-Enable: " <<
EnabDisab(inRegValue &
BIT(0)) << endl
3792 <<
"HDMI Force Output Params: " <<
SetNotset(inRegValue &
BIT(1)) << endl
3794 <<
"hdmi_rx_8ch_src_off: " <<
YesNo(inRegValue &
BIT(4)) << endl
3795 <<
"Swap HDMI In Audio Ch. 3/4: " <<
YesNo(inRegValue &
BIT(5)) << endl
3796 <<
"Swap HDMI Out Audio Ch. 3/4: " <<
YesNo(inRegValue &
BIT(6)) << endl
3797 <<
"HDMI Prefer 420: " <<
SetNotset(inRegValue &
BIT(7)) << endl
3798 <<
"hdmi_rx_spdif_err: " <<
SetNotset(inRegValue &
BIT(8)) << endl
3799 <<
"hdmi_rx_afifo_under: " <<
SetNotset(inRegValue &
BIT(9)) << endl
3800 <<
"hdmi_rx_afifo_empty: " <<
SetNotset(inRegValue &
BIT(10)) << endl
3801 <<
"H polarity: " << (inRegValue &
BIT(16) ?
"Inverted" :
"Normal") << endl
3802 <<
"V polarity: " << (inRegValue &
BIT(17) ?
"Inverted" :
"Normal") << endl
3803 <<
"F polarity: " << (inRegValue &
BIT(18) ?
"Inverted" :
"Normal") << endl
3804 <<
"DE polarity: " << (inRegValue &
BIT(19) ?
"Inverted" :
"Normal") << endl
3805 <<
"Tx Src Sel: " <<
DEC(txSrcSel) <<
" (" <<
xHEX0N(txSrcSel,4) <<
")" << endl
3806 <<
"Tx Center Cut: " <<
SetNotset(inRegValue &
BIT(24)) << endl
3807 <<
"Tx 12 bit: " <<
SetNotset(inRegValue &
BIT(26)) << endl
3808 <<
"RGB Input Gamut: " << (inRegValue &
BIT(28) ?
"Full Range" :
"Narrow Range (SMPTE)") << endl
3809 <<
"Tx_ch12_sel: " <<
DEC(txCh12Sel) <<
" (" <<
xHEX0N(txCh12Sel,4) <<
")" << endl
3810 <<
"Input AVI Gamut: " << (inRegValue &
BIT(31) ?
"Full Range" :
"Narrow Range (SMPTE)") << endl
3814 } mDecodeHDMIInputControl;
3816 struct DecodeHDMIOutputStatus :
public Decoder
3818 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3819 { (
void) inRegNum; (
void) inDeviceID;
3825 } mDecodeHDMIOutputStatus;
3827 struct DecodeHDMIOutHDRPrimary :
public Decoder
3829 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3865 const double xFloat (
double(xPrimary) * 0.00002);
3866 const double yFloat (
double(yPrimary) * 0.00002);
3868 oss <<
"X: " <<
fDEC(xFloat,7,5) << endl;
3870 oss <<
"X: " <<
HEX0N(xPrimary, 4) <<
"(invalid)" << endl;
3872 oss <<
"Y: " <<
fDEC(yFloat,7,5);
3874 oss <<
"Y: " <<
HEX0N(yPrimary, 4) <<
"(invalid)";
3885 const double minFloat (
double(minValue) * 0.00001);
3886 const double maxFloat (maxValue);
3887 oss <<
"Min: " <<
fDEC(minFloat,7,5) << endl
3888 <<
"Max: " <<
fDEC(maxFloat,7,5);
3899 const double cntFloat (cntValue);
3900 const double frmFloat (frmValue);
3901 oss <<
"Max Content Light Level: " <<
fDEC(cntFloat,7,5) << endl
3902 <<
"Max Frame Light Level: " <<
fDEC(frmFloat,7,5);
3909 } mDecodeHDMIOutHDRPrimary;
3911 struct DecodeHDMIOutHDRControl :
public Decoder
3913 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3916 static const string sEOTFs[] = {
"Trad Gamma SDR",
"Trad Gamma HDR",
"SMPTE ST 2084",
"HLG"};
3925 <<
"EOTF: " << sEOTFs[(EOTFvalue < 3) ? EOTFvalue : 3] << endl
3926 <<
"Static MetaData Desc ID: " <<
HEX0N(staticMetaDataDescID, 2) <<
" (" <<
DEC(staticMetaDataDescID) <<
")";
3930 } mDecodeHDMIOutHDRControl;
3932 struct DecodeHDMIOutMRControl :
public Decoder
3934 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3935 { (
void) inRegNum; (
void) inDeviceID;
3937 static const string sMRStandard[] = {
"1080i",
"720p",
"480i",
"576i",
"1080p",
"1556i",
"2Kx1080p",
"2Kx1080i",
"UHD",
"4K",
"",
"",
"",
"",
"",
"" };
3939 const string hdmiVidStdStr (sMRStandard[rawVideoStd]);
3941 oss <<
"Video Standard: " << hdmiVidStdStr;
3942 if (hdmiVidStdStr != vidStdStr)
3943 oss <<
" (" << vidStdStr <<
")";
3945 <<
"Capture Mode: " << ((inRegValue &
kRegMaskMREnable) ?
"Enabled" :
"Disabled");
3948 } mDecodeHDMIOutMRControl;
3950 struct DecodeSDIOutputControl :
public Decoder
3952 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3957 const uint32_t vidStd (inRegValue & (
BIT(0)|
BIT(1)|
BIT(2)));
3958 static const string sStds[32] = {
"1080i",
"720p",
"480i",
"576i",
"1080p",
"1556i",
"6",
"7"};
3959 oss <<
"Video Standard: " << sStds[vidStd] << endl
3960 <<
"2Kx1080 mode: " << (inRegValue &
BIT(3) ?
"2048x1080" :
"1920x1080") << endl
3961 <<
"HBlank RGB Range: Black=" << (inRegValue &
BIT(7) ?
"0x40" :
"0x04") << endl
3962 <<
"12G enable: " <<
YesNo(inRegValue &
BIT(17)) << endl
3963 <<
"6G enable: " <<
YesNo(inRegValue &
BIT(16)) << endl
3964 <<
"3G enable: " <<
YesNo(inRegValue &
BIT(24)) << endl
3965 <<
"3G mode: " << (inRegValue &
BIT(25) ?
"b" :
"a") << endl
3966 <<
"VPID insert enable: " <<
YesNo(inRegValue &
BIT(26)) << endl
3967 <<
"VPID overwrite enable: " <<
YesNo(inRegValue &
BIT(27)) << endl
3968 <<
"DS 1 audio source: " "AudSys";
3969 switch ((inRegValue & (
BIT(28)|
BIT(30))) >> 28)
3971 case 0: oss << (inRegValue &
BIT(18) ? 5 : 1);
break;
3972 case 1: oss << (inRegValue &
BIT(18) ? 7 : 3);
break;
3973 case 4: oss << (inRegValue &
BIT(18) ? 6 : 2);
break;
3974 case 5: oss << (inRegValue &
BIT(18) ? 8 : 4);
break;
3976 oss << endl <<
"DS 2 audio source: AudSys";
3977 switch ((inRegValue & (
BIT(29)|
BIT(31))) >> 29)
3979 case 0: oss << (inRegValue &
BIT(19) ? 5 : 1);
break;
3980 case 1: oss << (inRegValue &
BIT(19) ? 7 : 3);
break;
3981 case 4: oss << (inRegValue &
BIT(19) ? 6 : 2);
break;
3982 case 5: oss << (inRegValue &
BIT(19) ? 8 : 4);
break;
3986 } mDecodeSDIOutputControl;
3988 struct DecodeSDIOutTimingCtrl :
public Decoder
3990 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3991 { (
void)inRegNum; (
void)inDeviceID;
3993 const uint32_t hMask(0x00001FFF), vMask(0x1FFF0000);
3994 const uint32_t hOffset(inRegValue & hMask), vOffset((inRegValue & vMask) >> 16);
3995 oss <<
"Horz Offset: " <<
xHEX0N(
UWord(hOffset),4) << endl
3996 <<
"Vert Offset: " <<
xHEX0N(
UWord(vOffset),4) << endl
3997 <<
"E-E Timing Override: " <<
EnabDisab(inRegValue &
BIT(31));
4000 } mDecodeSDIOutTimingCtrl;
4002 struct DecodeDMAControl :
public Decoder
4004 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4008 const uint16_t gen ((inRegValue & (
BIT(20)|
BIT(21)|
BIT(22)|
BIT(23))) >> 20);
4009 const uint16_t lanes ((inRegValue & (
BIT(16)|
BIT(17)|
BIT(18)|
BIT(19))) >> 16);
4010 const uint16_t fwRev ((inRegValue & 0x0000FF00) >> 8);
4012 for (uint16_t engine(0); engine < 4; engine++)
4013 oss <<
"DMA " << (engine+1) <<
" Int Active?: " <<
YesNo(inRegValue &
BIT(27+engine)) << endl;
4014 oss <<
"Bus Error Int Active?: " <<
YesNo(inRegValue &
BIT(31)) << endl;
4015 for (uint16_t engine(0); engine < 4; engine++)
4016 oss <<
"DMA " << (engine+1) <<
" Busy?: " <<
YesNo(inRegValue &
BIT(27+engine)) << endl;
4017 oss <<
"Strap: " << ((inRegValue &
BIT(7)) ?
"Installed" :
"Not Installed") << endl
4018 <<
"Firmware Rev: " <<
xHEX0N(fwRev, 2) <<
" (" <<
DEC(fwRev) <<
")" << endl
4019 <<
"Gen: " << gen << ((gen > 0 && gen < 4) ?
"" :
" <invalid>") << endl
4020 <<
"Lanes: " <<
DEC(lanes) << ((lanes < 9) ?
"" :
" <invalid>");
4023 } mDMAControlRegDecoder;
4025 struct DecodeDMAIntControl :
public Decoder
4027 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4032 for (uint16_t eng(0); eng < 4; eng++)
4033 oss <<
"DMA " << (eng+1) <<
" Enabled?: " <<
YesNo(inRegValue &
BIT(eng)) << endl;
4034 oss <<
"Bus Error Enabled?: " <<
YesNo(inRegValue &
BIT(4)) << endl;
4035 for (uint16_t eng(0); eng < 4; eng++)
4036 oss <<
"DMA " << (eng+1) <<
" Active?: " <<
YesNo(inRegValue &
BIT(27+eng)) << endl;
4037 oss <<
"Bus Error: " <<
YesNo(inRegValue &
BIT(31));
4040 } mDMAIntControlRegDecoder;
4042 struct DecodeDMAXferRate :
public Decoder
4044 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4045 { (
void) inRegNum; (
void) inDeviceID;
4047 oss <<
DEC(inRegValue) <<
" [MB/sec] [kB/ms] [B/us]";
4050 } mDMAXferRateRegDecoder;
4052 struct DecodeRP188InOutDBB :
public Decoder
4054 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4058 const bool isReceivingRP188 (inRegValue &
BIT(16));
4059 const bool isReceivingSelectedRP188 (inRegValue &
BIT(17));
4060 const bool isReceivingLTC (inRegValue &
BIT(18));
4061 const bool isReceivingVITC (inRegValue &
BIT(19));
4063 oss <<
"RP188: " << (isReceivingRP188 ? (isReceivingSelectedRP188 ?
"Selected" :
"Unselected") :
"No") <<
" RP-188 received" 4064 << (isReceivingLTC ?
" +LTC" :
"") << (isReceivingVITC ?
" +VITC" :
"") << endl
4065 <<
"Bypass: " << (inRegValue &
BIT(23) ? (inRegValue &
BIT(22) ?
"SDI In 2" :
"SDI In 1") :
"Disabled") << endl
4066 <<
"Filter: " <<
HEX0N((inRegValue & 0xFF000000) >> 24, 2) << endl
4067 <<
"DBB: " <<
HEX0N((inRegValue & 0x0000FF00) >> 8, 2) <<
" " <<
HEX0N(inRegValue & 0x000000FF, 2);
4070 } mRP188InOutDBBRegDecoder;
4072 struct DecodeVidProcControl :
public Decoder
4074 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4079 static const string sSplitStds [8] = {
"1080i",
"720p",
"480i",
"576i",
"1080p",
"1556i",
"?6?",
"?7?"};
4080 oss <<
"Mode: " << (inRegValue &
kRegMaskVidProcMode ? ((inRegValue &
BIT(24)) ?
"Shaped" :
"Unshaped") :
"Full Raster") << endl
4081 <<
"FG Control: " << (inRegValue &
kRegMaskVidProcFGControl ? ((inRegValue &
BIT(20)) ?
"Shaped" :
"Unshaped") :
"Full Raster") << endl
4082 <<
"BG Control: " << (inRegValue &
kRegMaskVidProcBGControl ? ((inRegValue &
BIT(22)) ?
"Shaped" :
"Unshaped") :
"Full Raster") << endl
4083 <<
"VANC Pass-Thru: " << ((inRegValue &
BIT(13)) ?
"Background" :
"Foreground") << endl
4087 <<
"Limiting: " << ((inRegValue &
BIT(11)) ?
"Off" : ((inRegValue &
BIT(12)) ?
"Legal Broadcast" :
"Legal SDI")) << endl
4091 } mVidProcControlRegDecoder;
4093 struct DecodeSplitControl :
public Decoder
4095 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4100 const uint32_t startmask (0x0000FFFF);
4101 const uint32_t slopemask (0x3FFF0000);
4102 const uint32_t fractionmask(0x00000007);
4103 oss <<
"Split Start: " <<
HEX0N((inRegValue & startmask) & ~fractionmask, 4) <<
" " 4104 <<
HEX0N((inRegValue & startmask) & fractionmask, 4) << endl
4105 <<
"Split Slope: " <<
HEX0N(((inRegValue & slopemask) >> 16) & ~fractionmask, 4) <<
" " 4106 <<
HEX0N(((inRegValue & slopemask) >> 16) & fractionmask, 4) << endl
4107 <<
"Split Type: " << ((inRegValue &
BIT(30)) ?
"Vertical" :
"Horizontal");
4110 } mSplitControlRegDecoder;
4112 struct DecodeFlatMatteValue :
public Decoder
4114 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4119 const uint32_t mask (0x000003FF);
4120 oss <<
"Flat Matte Cb: " <<
HEX0N(inRegValue & mask, 3) << endl
4121 <<
"Flat Matte Y: " <<
HEX0N(((inRegValue >> 10) & mask) - 0x40, 3) << endl
4122 <<
"Flat Matte Cr: " <<
HEX0N((inRegValue >> 20) & mask, 3);
4125 } mFlatMatteValueRegDecoder;
4127 struct DecodeEnhancedCSCMode :
public Decoder
4129 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4133 static const string sFiltSel[] = {
"Full",
"Simple",
"None",
"?"};
4134 static const string sEdgeCtrl[] = {
"black",
"extended pixels"};
4135 static const string sPixFmts[] = {
"RGB 4:4:4",
"YCbCr 4:4:4",
"YCbCr 4:2:2",
"?"};
4136 const uint32_t filterSelect ((inRegValue >> 12) & 0x3);
4137 const uint32_t edgeControl ((inRegValue >> 8) & 0x1);
4138 const uint32_t outPixFmt ((inRegValue >> 4) & 0x3);
4139 const uint32_t inpPixFmt (inRegValue & 0x3);
4141 oss <<
"Filter select: " << sFiltSel[filterSelect] << endl
4142 <<
"Filter edge control: " <<
"Filter to " << sEdgeCtrl[edgeControl] << endl
4143 <<
"Output pixel format: " << sPixFmts[outPixFmt] << endl
4144 <<
"Input pixel format: " << sPixFmts[inpPixFmt];
4147 } mEnhCSCModeDecoder;
4149 struct DecodeEnhancedCSCOffset :
public Decoder
4151 static string U10Dot6ToFloat (
const uint32_t inOffset)
4153 double result (
double((inOffset >> 6) & 0x3FF));
4154 result += double(inOffset & 0x3F) / 64.0;
4155 ostringstream oss; oss <<
fDEC(result,12,5);
string resultStr(oss.str());
4158 static string U12Dot4ToFloat (
const uint32_t inOffset)
4160 double result (
double((inOffset >> 4) & 0xFFF));
4161 result += double(inOffset & 0xF) / 16.0;
4162 ostringstream oss; oss <<
fDEC(result,12,4);
string resultStr(oss.str());
4165 static string S13Dot2ToFloat (
const uint32_t inOffset)
4167 double result (
double((inOffset >> 2) & 0x1FFF));
4168 result += double(inOffset & 0x3) / 4.0;
4169 if (inOffset &
BIT(15))
4171 ostringstream oss; oss <<
fDEC(result,12,2);
string resultStr(oss.str());
4174 static string S11Dot4ToFloat (
const uint32_t inOffset)
4176 double result (
double((inOffset >> 4) & 0x7FF));
4177 result += double(inOffset & 0xF) / 16.0;
4178 if (inOffset &
BIT(15))
4180 ostringstream oss; oss <<
fDEC(result,12,4);
string resultStr(oss.str());
4183 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4186 const uint32_t regNum (inRegNum & 0x1F);
4187 const uint32_t lo (inRegValue & 0x0000FFFF);
4188 const uint32_t hi ((inRegValue >> 16) & 0xFFFF);
4192 case 1: oss <<
"Component 0 input offset: " << U12Dot4ToFloat(lo) <<
" (12-bit), " << U10Dot6ToFloat(lo) <<
" (10-bit)" << endl
4193 <<
"Component 1 input offset: " << U12Dot4ToFloat(hi) <<
" (12-bit), " << U10Dot6ToFloat(hi) <<
" (10-bit)";
4195 case 2: oss <<
"Component 2 input offset: " << U12Dot4ToFloat(lo) <<
" (12-bit), " << U10Dot6ToFloat(lo) <<
" (10-bit)";
4197 case 12: oss <<
"Component A output offset: " << U12Dot4ToFloat(lo) <<
" (12-bit), " << U10Dot6ToFloat(lo) <<
" (10-bit)" << endl
4198 <<
"Component B output offset: " << U12Dot4ToFloat(hi) <<
" (12-bit), " << U10Dot6ToFloat(hi) <<
" (10-bit)";
4200 case 13: oss <<
"Component C output offset: " << U12Dot4ToFloat(lo) <<
" (12-bit), " << U10Dot6ToFloat(lo) <<
" (10-bit)";
4202 case 15: oss <<
"Key input offset: " << S13Dot2ToFloat(lo) <<
" (12-bit), " << S11Dot4ToFloat(lo) <<
" (10-bit)" << endl
4203 <<
"Key output offset: " << U12Dot4ToFloat(hi) <<
" (12-bit), " << U10Dot6ToFloat(hi) <<
" (10-bit)";
4209 } mEnhCSCOffsetDecoder;
4211 struct DecodeEnhancedCSCKeyMode :
public Decoder
4213 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4217 static const string sSrcSel[] = {
"Key Input",
"Video Y Input"};
4218 static const string sRange[] = {
"Full Range",
"SMPTE Range"};
4219 const uint32_t keySrcSelect (inRegValue & 0x1);
4220 const uint32_t keyOutRange ((inRegValue >> 4) & 0x1);
4222 oss <<
"Key Source Select: " << sSrcSel[keySrcSelect] << endl
4223 <<
"Key Output Range: " << sRange[keyOutRange];
4226 } mEnhCSCKeyModeDecoder;
4228 struct DecodeEnhancedCSCCoefficient :
public Decoder
4230 static string S2Dot15ToFloat (
const uint32_t inCoefficient)
4232 double result = (double((inCoefficient >> 15) & 0x3));
4233 result += double(inCoefficient & 0x7FFF) / 32768.0;
4234 if (inCoefficient &
BIT(17))
4236 ostringstream oss; oss <<
fDEC(result,12,10);
string resultStr(oss.str());
4239 static string S12Dot12ToFloat (
const uint32_t inCoefficient)
4241 double result(
double((inCoefficient >> 12) & 0xFFF));
4242 result += double(inCoefficient & 0xFFF) / 4096.0;
4243 if (inCoefficient &
BIT(24))
4245 ostringstream oss; oss <<
fDEC(result,12,6);
string resultStr(oss.str());
4248 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4251 uint32_t regNum (inRegNum & 0x1F);
4253 if (regNum > 2 && regNum < 12)
4256 static const string sCoeffNames[] = {
"A0",
"A1",
"A2",
"B0",
"B1",
"B2",
"C0",
"C1",
"C2"};
4257 const uint32_t coeff ((inRegValue >> 9) & 0x0003FFFF);
4258 oss << sCoeffNames[regNum] <<
" coefficient: " << S2Dot15ToFloat(coeff) <<
" (" <<
xHEX0N(coeff,8) <<
")";
4260 else if (regNum == 16)
4262 const uint32_t gain ((inRegValue >> 4) & 0x01FFFFFF);
4263 oss <<
"Key gain: " << S12Dot12ToFloat(gain) <<
" (" <<
HEX0N(gain,8) <<
")";
4267 } mEnhCSCCoeffDecoder;
4269 struct DecodeCSCoeff1234 :
public Decoder
4271 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4274 const uint32_t coeff1 (((inRegValue >> 11) & 0x00000003) | uint32_t(inRegValue & 0x000007FF));
4275 const uint32_t coeff2 ((inRegValue >> 14) & 0x00001FFF);
4276 uint16_t nCoeff1(1), nCoeff2(2);
4281 nCoeff1 = 3; nCoeff2 = 4;
break;
4297 oss <<
"Video Key Sync Status: " << (inRegValue &
BIT(28) ?
"SyncFail" :
"OK") << endl
4298 <<
"Make Alpha From Key Input: " <<
EnabDisab(inRegValue &
BIT(29)) << endl
4299 <<
"Matrix Select: " << (inRegValue &
BIT(30) ?
"Rec601" :
"Rec709") << endl
4300 <<
"Use Custom Coeffs: " <<
YesNo(inRegValue &
BIT(31)) << endl;
4302 oss <<
"RGB Range: " << (inRegValue &
BIT(31) ?
"SMPTE (0x040-0x3C0)" :
"Full (0x000-0x3FF)") << endl;
4303 oss <<
"Coefficient" <<
DEC(nCoeff1) <<
": " <<
xHEX0N(coeff1, 4) << endl
4304 <<
"Coefficient" <<
DEC(nCoeff2) <<
": " <<
xHEX0N(coeff2, 4);
4307 } mCSCoeff1234Decoder;
4309 struct DecodeCSCoeff567890 :
public Decoder
4311 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4314 const uint32_t coeff5 (((inRegValue >> 11) & 0x00000003) | uint32_t(inRegValue & 0x000007FF));
4315 const uint32_t coeff6 ((inRegValue >> 14) & 0x00001FFF);
4316 uint16_t nCoeff5(5), nCoeff6(6);
4321 nCoeff5 = 7; nCoeff6 = 8;
break;
4324 nCoeff5 = 9; nCoeff6 = 10;
break;
4334 oss <<
"Coefficient" <<
DEC(nCoeff5) <<
": " <<
xHEX0N(coeff5, 4) << endl
4335 <<
"Coefficient" <<
DEC(nCoeff6) <<
": " <<
xHEX0N(coeff6, 4);
4338 } mCSCoeff567890Decoder;
4340 struct DecodeLUTV1ControlReg :
public Decoder
4342 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4343 {
static const string sModes[] = {
"Off",
"RGB",
"YCbCr",
"3-Way",
"Invalid"};
4356 if (lutVersion != 1)
4357 oss <<
"(Register data relevant for V1 LUT, this device has V" <<
DEC(lutVersion) <<
" LUT)";
4360 oss <<
"LUT Saturation Value: " <<
xHEX0N(saturation,4) <<
" (" <<
DEC(saturation) <<
")" << endl
4361 <<
"LUT Output Bank Select: " <<
SetNotset(outBankSelect) << endl
4362 <<
"LUT Mode: " << sModes[mode] <<
" (" <<
DEC(mode) <<
")";
4365 <<
"LUT5 Host Bank Select: " <<
SetNotset(cc5HostBank) << endl
4366 <<
"LUT5 Output Bank Select: " <<
SetNotset(cc5OutputBank) << endl
4367 <<
"LUT5 Select: " <<
SetNotset(cc5Select) << endl
4368 <<
"Config 2nd LUT Set: " <<
YesNo(ccConfig2);
4371 <<
"LUT3 Bank Select: " <<
SetNotset(cc3BankSel) << endl
4372 <<
"LUT4 Bank Select: " <<
SetNotset(cc4BankSel);
4375 } mLUTV1ControlRegDecoder;
4377 struct DecodeLUTV2ControlReg :
public Decoder
4379 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4383 if (lutVersion != 2)
4384 oss <<
"(Register data relevant for V2 LUT, this device has V" <<
DEC(lutVersion) <<
"LUT)";
4387 for (
UWord lutNum(0); lutNum < 8; lutNum++)
4388 oss <<
"LUT" <<
DEC(lutNum+1) <<
" Enabled: " << (
YesNo(inRegValue & (1<<lutNum))) << endl
4389 <<
"LUT" <<
DEC(lutNum+1) <<
" Host Access Bank Select: " << (inRegValue & (1<<(lutNum+8)) ?
'1' :
'0') << endl
4390 <<
"LUT" <<
DEC(lutNum+1) <<
" Output Bank Select: " << (inRegValue & (1<<(lutNum+16)) ?
'1' :
'0') << endl;
4391 oss <<
"12-Bit LUT mode: " << ((inRegValue &
BIT(28)) ?
"12-bit" :
"10-bit") << endl
4392 <<
"12-Bit LUT page reg: " <<
DEC(
UWord((inRegValue & (
BIT(24)|
BIT(25))) >> 24));
4396 } mLUTV2ControlRegDecoder;
4398 struct DecodeLUT :
public Decoder
4400 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4404 const bool isRed(inRegNum >= RedReg && inRegNum < GreenReg), isGreen(inRegNum >= GreenReg && inRegNum < BlueReg), isBlue(inRegNum>=BlueReg);
4410 const string label(isRed ?
"Red[" : (isGreen ?
"Green[" :
"Blue["));
4411 const ULWord ndx((inRegNum - (isRed ? RedReg : (isGreen ? GreenReg : BlueReg))) * 2);
4414 oss << label <<
DEC0N(ndx+0,3) <<
"]: " <<
DEC0N(lo,3) << endl
4415 << label <<
DEC0N(ndx+1,3) <<
"]: " <<
DEC0N(hi,3);
4420 struct DecodeSDIErrorStatus :
public Decoder
4422 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4428 oss <<
"Unlock Tally: " <<
DEC(inRegValue & 0x7FFF) << endl
4429 <<
"Locked: " <<
YesNo(inRegValue &
BIT(16)) << endl
4430 <<
"Link A VPID Valid: " <<
YesNo(inRegValue &
BIT(20)) << endl
4431 <<
"Link B VPID Valid: " <<
YesNo(inRegValue &
BIT(21)) << endl
4432 <<
"TRS Error Detected: " <<
YesNo(inRegValue &
BIT(24));
4435 } mSDIErrorStatusRegDecoder;
4437 struct DecodeSDIErrorCount :
public Decoder
4439 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4445 oss <<
"Link A: " <<
DEC(inRegValue & 0x0000FFFF) << endl
4446 <<
"Link B: " <<
DEC((inRegValue & 0xFFFF0000) >> 16);
4449 } mSDIErrorCountRegDecoder;
4451 struct DecodeDriverVersion :
public Decoder
4453 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4454 { (
void) inDeviceID;
4458 ULWord buildType((inRegValue >> 30) & 0x00000003);
4459 static const string sBuildTypes[] = {
"Release",
"Beta",
"Alpha",
"Development"};
4460 static const string sBldTypes[] = {
"",
"b",
"a",
"d"};
4462 oss <<
"Driver Version: " <<
DEC(vMaj) <<
"." <<
DEC(vMin) <<
"." <<
DEC(vDot);
4463 if (buildType) oss << sBldTypes[buildType] <<
DEC(vBld);
4465 <<
"Major Version: " <<
DEC(vMaj) << endl
4466 <<
"Minor Version: " <<
DEC(vMin) << endl
4467 <<
"Point Version: " <<
DEC(vDot) << endl
4468 <<
"Build Type: " << sBuildTypes[buildType] << endl
4469 <<
"Build Number: " <<
DEC(vBld);
4472 } mDriverVersionDecoder;
4474 struct DecodeFourCC :
public Decoder
4476 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4477 { (
void) inDeviceID; (
void) inRegNum;
4478 char ch;
string str4cc;
4479 ch = char((inRegValue & 0xFF000000) >> 24);
4480 str4cc += ::isprint(ch) ? ch :
'?';
4481 ch = char((inRegValue & 0x00FF0000) >> 16);
4482 str4cc += ::isprint(ch) ? ch :
'?';
4483 ch = char((inRegValue & 0x0000FF00) >> 8);
4484 str4cc += ::isprint(ch) ? ch :
'?';
4485 ch = char((inRegValue & 0x000000FF) >> 0);
4486 str4cc += ::isprint(ch) ? ch :
'?';
4489 oss <<
"'" << str4cc <<
"'";
4494 struct DecodeDriverType :
public Decoder
4496 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4497 { (
void) inDeviceID; (
void) inRegNum;
4500 if (inRegValue == 0x44455854)
4501 oss <<
"DriverKit ('DEXT')";
4502 else if (inRegValue)
4503 oss <<
"(Unknown/Invalid " <<
xHEX0N(inRegValue,8) <<
")";
4505 oss <<
"Kernel Extension ('KEXT')";
4512 } mDecodeDriverType;
4513 struct DecodeVDevReady :
public Decoder
4515 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4516 { (
void) inDeviceID; (
void) inRegNum;
4520 oss <<
"VDev will set ";
4522 oss <<
"register " <<
DEC(inRegValue);
4525 oss <<
" when 'IsReady'";
4531 struct DecodeIDSwitchStatus :
public Decoder
4533 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4538 const uint32_t switchEnableBits (((inRegValue & 0x0F000000) >> 20) | ((inRegValue & 0xF0000000) >> 28));
4539 for (
UWord idSwitch(0); idSwitch < 4; )
4541 const uint32_t switchEnabled (switchEnableBits &
BIT(idSwitch));
4542 oss <<
"Switch " <<
DEC(++idSwitch) <<
": " << (switchEnabled ?
"Enabled" :
"Disabled");
4549 oss <<
"(ID Switch not supported)";
4554 } mDecodeIDSwitchStatus;
4556 struct DecodePWMFanControl :
public Decoder
4558 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4566 } mDecodePWMFanControl;
4568 struct DecodePWMFanMonitor :
public Decoder
4570 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4578 } mDecodePWMFanMonitor;
4580 struct DecodeBOBStatus :
public Decoder
4582 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4586 oss <<
"Break Out Board: " << ((inRegValue &
kRegMaskBOBAbsent) ?
"Disconnected" :
"Connected") << endl
4590 oss <<
"Device does not support a breakout board";
4595 struct DecodeBOBGPIIn :
public Decoder
4597 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4606 oss <<
"Device does not support a breakout board";
4611 struct DecodeBOBGPIInInterruptControl :
public Decoder
4613 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4622 oss <<
"Device does not support a breakout board";
4625 } mDecodeBOBGPIInInterruptControl;
4627 struct DecodeBOBGPIOut :
public Decoder
4629 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4638 oss <<
"Device does not support a breakout board";
4643 struct DecodeBOBAudioControl :
public Decoder
4645 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4654 dBuLabel =
"+24dBu";
4657 dBuLabel =
"+18dBu";
4660 dBuLabel =
"+12dBu";
4663 dBuLabel =
"+15dBu";
4668 <<
"Analog Level Control: " << dBuLabel << endl
4672 oss <<
"Device does not support a breakout board";
4675 } mDecodeBOBAudioControl;
4677 struct DecodeLEDControl :
public Decoder
4679 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4687 oss <<
"Device does not support a breakout board";
4690 } mDecodeLEDControl;
4692 static const int NOREADWRITE = 0;
4693 static const int READONLY = 1;
4694 static const int WRITEONLY = 2;
4695 static const int READWRITE = 3;
4697 static const int CONTAINS = 0;
4698 static const int STARTSWITH = 1;
4699 static const int ENDSWITH = 2;
4700 static const int EXACTMATCH = 3;
4702 typedef map <uint32_t, const Decoder *> RegNumToDecoderMap;
4703 typedef pair <uint32_t, const Decoder *> RegNumToDecoderPair;
4704 typedef multimap <string, uint32_t> RegClassToRegNumMMap, StringToRegNumMMap;
4705 typedef pair <string, uint32_t> StringToRegNumPair;
4706 typedef RegClassToRegNumMMap::const_iterator RegClassToRegNumConstIter;
4707 typedef StringToRegNumMMap::const_iterator StringToRegNumConstIter;
4709 typedef pair <uint32_t, uint32_t> XptRegNumAndMaskIndex;
4710 typedef map <NTV2InputCrosspointID, XptRegNumAndMaskIndex> InputXpt2XptRegNumMaskIndexMap;
4711 typedef map <XptRegNumAndMaskIndex, NTV2InputCrosspointID> XptRegNumMaskIndex2InputXptMap;
4712 typedef InputXpt2XptRegNumMaskIndexMap::const_iterator InputXpt2XptRegNumMaskIndexMapConstIter;
4713 typedef XptRegNumMaskIndex2InputXptMap::const_iterator XptRegNumMaskIndex2InputXptMapConstIter;
4717 RegNumToStringMap mRegNumToStringMap;
4718 RegNumToDecoderMap mRegNumToDecoderMap;
4719 RegClassToRegNumMMap mRegClassToRegNumMMap;
4720 StringToRegNumMMap mStringToRegNumMMap;
4722 InputXpt2XptRegNumMaskIndexMap mInputXpt2XptRegNumMaskIndexMap;
4723 XptRegNumMaskIndex2InputXptMap mXptRegNumMaskIndex2InputXptMap;
4753 return pInst ?
true :
false;
4760 return pInst ?
true :
false;
4767 return pInst ? pInst->DisposeInstance() :
false;
4775 return pRegExpert->RegNameToString(inRegNum);
4777 ostringstream oss; oss <<
"Reg ";
4779 oss <<
DEC(inRegNum);
4780 else if (inRegNum <= 0x0000FFFF)
4781 oss <<
xHEX0N(inRegNum,4);
4783 oss <<
xHEX0N(inRegNum,8);
4791 return pRegExpert ? pRegExpert->RegValueToString(inRegNum, inRegValue, inDeviceID) : string();
4798 return pRegExpert ? pRegExpert->IsRegInClass(inRegNum, inClassName) :
false;
4805 return pRegExpert ? pRegExpert->GetAllRegisterClasses() :
NTV2StringSet();
4812 return pRegExpert ? pRegExpert->GetRegisterClasses(inRegNum, inRemovePrefix) :
NTV2StringSet();
4819 return pRegExpert ? pRegExpert->GetRegistersForClass(inClassName) :
NTV2RegNumSet();
4833 return pRegExpert ? pRegExpert->GetRegistersForDevice(inDeviceID, inOtherRegsToInclude) :
NTV2RegNumSet();
4840 return pRegExpert ? pRegExpert->GetRegistersWithName(inName, inSearchStyle) :
NTV2RegNumSet();
4854 return pRegExpert ? pRegExpert->GetXptRegNumAndMaskIndex(inInputXpt, outXptRegNum, outMaskIndex) :
false;
Anc Field2 byte offset from end of frame buffer (GUMP on all boards except RTP for SMPTE2022/IP) ...
std::string NTV2FrameGeometryToString(const NTV2FrameGeometry inValue, const bool inForRetailDisplay=false)
defined(NTV2_DEPRECATE_17_6)
std::string NTV2AudioSystemToString(const NTV2AudioSystem inValue, const bool inCompactDisplay=false)
static bool DisposeInstance(void)
NTV2AudioSystem
Used to identify an Audio System on an NTV2 device. See Audio System Operation for more information...
Declares the AJALock class.
UWord NTV2DeviceGetNumLTCInputs(const NTV2DeviceID inDeviceID)
#define kRegColorCorrectionLUTOddShift
#define kRegClass_Channel2
static const ULWord kNumNTV4FrameStoreRegisters(regNTV4FS_REGISTER_COUNT)
NTV2InputCrosspointID GetInputCrosspointID(const uint32_t inXptRegNum, const uint32_t inMaskIndex) const
#define DEC0N(__x__, __n__)
Declares CNTV2SignalRouter class.
#define kRegColorCorrectionLUTEvenShift
Declares the AJADebug class.
Declares the CNTV2VPID class. See SMPTE 352 standard for details.
bool NTV2DeviceHasNTV4FrameStores(const NTV2DeviceID inDeviceID)
#define kColorCorrectionLUTOffset_Green
ULWord NTV2DeviceGetLUTVersion(const NTV2DeviceID inDeviceID)
bool NTV2DeviceCanDo425Mux(const NTV2DeviceID inDeviceID)
static int32_t Decrement(int32_t volatile *pTarget)
bool NTV2DeviceCanDo12GSDI(const NTV2DeviceID inDeviceID)
static NTV2RegNumSet GetRegistersForClass(const std::string &inClassName)
#define kColorCorrectionLUTOffset_Blue
bool NTV2DeviceCanDoEnhancedCSC(const NTV2DeviceID inDeviceID)
UWord NTV2DeviceGetNumSerialPorts(const NTV2DeviceID inDeviceID)
static const std::string sNTV4FrameStoreRegNames[]
This selects audio channels 5 and 6 (Group 2 channels 1 and 2)
std::vector< AJALabelValuePair > AJALabelValuePairs
An ordered sequence of label/value pairs.
static const ULWord kNTV4FrameStoreFirstRegNum(0x0000D000/sizeof(ULWord))
std::string NTV2DownConvertModeToString(const NTV2DownConvertMode inValue, const bool inCompactDisplay=false)
UWord NTV2DeviceGetNumCSCs(const NTV2DeviceID inDeviceID)
if(!(riid==IID_IUnknown) &&!(riid==IID_IClassFactory))
I am a reference-counted pointer template class. I am intended to be a proxy for an underlying object...
Defines a number of handy byte-swapping macros.
static bool Deallocate(void)
Explicitly deallocates the Register Expert singleton.
This selects audio channels 7 and 8 (Group 2 channels 3 and 4)
#define kRegClass_Timecode
Defines the AJARefPtr template class.
AJALabelValuePairs::const_iterator AJALabelValuePairsConstIter
The last AJA virtual register slot.
NTV2Channel
These enum values are mostly used to identify a specific widget_framestore. They're also commonly use...
bool NTV2DeviceCanDoAudioMixer(const NTV2DeviceID inDeviceID)
NTV2OutputXptIDSet::const_iterator NTV2OutputXptIDSetConstIter
A const iterator for iterating over an NTV2OutputXptIDSet.
#define DEF_REGNAME(_num_)
#define NTV2DriverVersionDecode_Major(__vers__)
#define kRegClass_SDIError
#define NTV2DriverVersionDecode_Point(__vers__)
#define NTV2_ASSERT(_expr_)
bool NTV2DeviceSoftwareCanChangeFrameBufferSize(const NTV2DeviceID inDeviceID)
NTV2FrameBufferFormat NTV2PixelFormat
An alias for NTV2FrameBufferFormat.
Anc Field1 byte offset from end of frame buffer (GUMP on all boards except RTP for SMPTE2022/IP) ...
AJARefPtr< RegisterExpert > RegisterExpertPtr
UWord NTV2DeviceGetNumHDMIVideoOutputs(const NTV2DeviceID inDeviceID)
NTV2FrameRate
Identifies a particular video frame rate.
std::string NTV2StandardToString(const NTV2Standard inValue, const bool inForRetailDisplay=false)
std::string NTV2InputCrosspointIDToString(const NTV2InputCrosspointID inValue, const bool inForRetailDisplay=false)
std::string NTV2AudioChannelQuadToString(const NTV2Audio4ChannelSelect inValue, const bool inCompactDisplay=false)
NTV2Standard
Identifies a particular video standard.
static bool GetRouteROMInfoFromReg(const ULWord inROMRegNum, const ULWord inROMRegValue, NTV2InputXptID &outInputXpt, NTV2OutputXptIDSet &outOutputXpts, const bool inAppendOutputXpts=false)
Answers with the NTV2InputXptID and NTV2OutputXptIDSet for the given ROM register value...
NTV2DeviceID
Identifies a specific AJA NTV2 device model number. The NTV2DeviceID is actually the PROM part number...
The first virtual register slot available for general use.
Monitor Anc Field2 byte offset from end of frame buffer (IoIP only, GUMP)
NTV2ReferenceSource
These enum values identify a specific source for the device's (output) reference clock.
static uint32_t gInstanceTally(0)
static const string gChlClasses[]
UWord NTV2DeviceGetNumFrameStores(const NTV2DeviceID inDeviceID)
static NTV2StringSet GetAllRegisterClasses(void)
NTV2StringSet::const_iterator NTV2StringSetConstIter
#define PresNotPres(__x__)
bool NTV2DeviceHasPWMFanControl(const NTV2DeviceID inDeviceID)
Reports HDMI output status information.
#define kRegClass_Channel1
This selects audio channels 1 and 2 (Group 1 channels 1 and 2)
#define NTV2_IS_VALID_InputCrosspointID(__s__)
bool GetXptRegNumAndMaskIndex(const NTV2InputCrosspointID inInputXpt, uint32_t &outXptRegNum, uint32_t &outMaskIndex) const
#define kRegClass_NTV4FrameStore
static RegisterExpertPtr gpRegExpert
#define kRegClass_Channel5
NTV2RegisterNumberSet NTV2RegNumSet
A set of distinct NTV2RegisterNumbers.
NTV2AudioChannelPair
Identifies a pair of audio channels.
std::vector< std::string > NTV2StringList
static const ULWord sMasks[]
#define kRegClass_Routing
bool NTV2DeviceCanDo3GLevelConversion(const NTV2DeviceID inDeviceID)
#define kRegClass_Channel8
#define kRegClass_Virtual
bool NTV2DeviceHasBiDirectionalSDI(const NTV2DeviceID inDeviceID)
ULWord NTV2DeviceGetHDMIVersion(const NTV2DeviceID inDeviceID)
#define NTV2_IS_VALID_HDR_PRIMARY(__val__)
ostream & Print(ostream &inOutStream) const
static int32_t Increment(int32_t volatile *pTarget)
static bool GetCrosspointSelectGroupRegisterInfo(const NTV2InputCrosspointID inInputXpt, uint32_t &outXptRegNum, uint32_t &outMaskIndex)
Answers with the crosspoint select register and mask information for a given widget input...
bool NTV2DeviceCanDoClockMonitor(const NTV2DeviceID inDeviceID)
ULWord NTV2DeviceGetUFCVersion(const NTV2DeviceID inDeviceID)
std::string NTV2IsoConvertModeToString(const NTV2IsoConvertMode inValue, const bool inCompactDisplay=false)
Declares NTV2DeviceCanDo... and NTV2DeviceGetNum... functions. This module is included at compile tim...
bool NTV2DeviceHasSDIRelays(const NTV2DeviceID inDeviceID)
static bool IsRegisterInClass(const uint32_t inRegNum, const std::string &inClassName)
#define kColorCorrectionLUTOffset_Red
UWord NTV2DeviceGetNumVideoInputs(const NTV2DeviceID inDeviceID)
std::string NTV2AudioChannelPairToString(const NTV2AudioChannelPair inValue, const bool inCompactDisplay=false)
static const string sNull
NTV2StringSet GetRegisterClasses(const uint32_t inRegNum, const bool inRemovePrefix) const
std::string NTV2UpConvertModeToString(const NTV2UpConvertMode inValue, const bool inCompactDisplay=false)
NTV2StringSet GetAllRegisterClasses(void) const
#define kIncludeOtherRegs_XptROM
bool IsRegisterWriteOnly(const uint32_t inRegNum) const
string RegNameToString(const uint32_t inRegNum) const
static NTV2InputCrosspointID GetInputCrosspointID(const uint32_t inXptRegNum, const uint32_t inMaskIndex)
#define NTV2_IS_VALID_CHANNEL(__x__)
std::string NTV2DeviceIDToString(const NTV2DeviceID inValue, const bool inForRetailDisplay=false)
static bool IsAllocated(void)
Monitor Anc Field1 byte offset from end of frame buffer (IoIP only, GUMP)
Originally 0x01. Changed to 0x00 in SDK 17.1.
bool NTV2DeviceCanDoIDSwitch(const NTV2DeviceID inDeviceID)
bool NTV2DeviceCanDoSDIErrorChecks(const NTV2DeviceID inDeviceID)
const char * NTV2RegisterNameString(const ULWord inRegNum)
bool IsRegisterReadOnly(const uint32_t inRegNum) const
static bool GetWidgetForOutput(const NTV2OutputXptID inOutputXpt, NTV2WidgetID &outWidgetID, const NTV2DeviceID inDeviceID=DEVICE_ID_NOTFOUND)
Returns the widget that "owns" the specified output crosspoint.
#define kRegClass_Channel6
static std::string GetDisplayValue(const uint32_t inRegNum, const uint32_t inRegValue, const NTV2DeviceID inDeviceID=DEVICE_ID_NOTFOUND)
#define kRegClass_Channel7
NTV2FrameGeometry
Identifies a particular video frame geometry.
static uint32_t gLivingInstances(0)
static RegisterExpertPtr GetInstance(const bool inCreateIfNecessary=true)
UWord NTV2DeviceGetNumLUTs(const NTV2DeviceID inDeviceID)
Declares numerous NTV2 utility functions.
string RegValueToString(const uint32_t inRegNum, const uint32_t inRegValue, const NTV2DeviceID inDeviceID) const
ULWord NTV2DeviceGetMaxRegisterNumber(const NTV2DeviceID inDeviceID)
NTV2OutputCrosspointID
Identifies a widget output, a signal source, that potentially can drive another widget's input (ident...
NTV2InputCrosspointID
Identifies a widget input that potentially can accept a signal emitted from another widget's output (...
NTV2RegNumSet GetRegistersForDevice(const NTV2DeviceID inDeviceID, const int inOtherRegsToInclude) const
static NTV2StringSet GetRegisterClasses(const uint32_t inRegNum, const bool inRemovePrefix=false)
#define NTV2_UNUSED(__p__)
Declares the CNTV2Bitfile class.
#define NTV2DriverVersionDecode_Build(__vers__)
std::string NTV2RegisterWriteModeToString(const NTV2RegisterWriteMode inValue, const bool inForRetailDisplay=false)
std::string NTV2ReferenceSourceToString(const NTV2ReferenceSource inValue, const bool inForRetailDisplay=false)
#define xHEX0N(__x__, __n__)
static NTV2RegNumSet GetRegistersForDevice(const NTV2DeviceID inDeviceID, const int inOtherRegsToInclude=0)
static std::string GetDisplayName(const uint32_t inRegNum)
#define SuppNotsupp(__x__)
NTV2RegNumSet GetRegistersForClass(const string &inClassName) const
A convenience class that simplifies encoding or decoding the 4-byte VPID payload that can be read or ...
std::string NTV2FrameBufferFormatToString(const NTV2FrameBufferFormat inValue, const bool inForRetailDisplay=false)
NTV2RegisterWriteMode
These values are used to determine when certain register writes actually take effect. See CNTV2Card::SetRegisterWriteMode or Field/Frame Interrupts.
#define kRegClass_ReadOnly
#define NTV2DriverVersionDecode_Minor(__vers__)
static NTV2RegNumSet GetRegistersWithName(const std::string &inName, const int inSearchStyle=EXACTMATCH)
bool NTV2DeviceCanDoHDMIHDROut(const NTV2DeviceID inDeviceID)
static bool Allocate(void)
Explicitly allocates the Register Expert singleton.
bool NTV2DeviceCanDoBreakoutBoard(const NTV2DeviceID inDeviceID)
#define kRegClass_Interrupt
enum NTV2InputCrosspointID NTV2InputXptID
static NTV2RegNumSet GetRegistersForChannel(const NTV2Channel inChannel)
UWord NTV2DeviceGetNumVideoOutputs(const NTV2DeviceID inDeviceID)
Private include file for all ajabase sources.
#define fDEC(__x__, __w__, __p__)
bool NTV2DeviceCanDoCustomAnc(const NTV2DeviceID inDeviceID)
#define DEF_REG(_num_, _dec_, _rw_, _c1_, _c2_, _c3_)
static const string sSpace(" ")
std::string join(const std::vector< std::string > &parts, const std::string &delim)
std::string NTV2OutputCrosspointIDToString(const NTV2OutputCrosspointID inValue, const bool inForRetailDisplay=false)
const char * NTV2DeviceIDString(const NTV2DeviceID id)
bool NTV2DeviceHasXilinxDMA(const NTV2DeviceID inDeviceID)
NTV2Audio4ChannelSelect
Identifies a contiguous, adjacent group of four audio channels.
#define ThruDeviceOrBypassed(__x__)
#define HEX0N(__x__, __n__)
static AJALock gRegExpertGuardMutex
bool NTV2DeviceCanDoVersalSysMon(const NTV2DeviceID inDeviceID)
static ostream & PrintLabelValuePairs(ostream &oss, const AJALabelValuePairs &inLabelValuePairs)
std::string & lower(std::string &str)
bool NTV2DeviceHasBracketLED(const NTV2DeviceID inDeviceID)
UWord NTV2DeviceGetNumHDMIVideoInputs(const NTV2DeviceID inDeviceID)
std::string & replace(std::string &str, const std::string &from, const std::string &to)
#define kRegClass_WriteOnly
std::set< NTV2OutputXptID > NTV2OutputXptIDSet
A collection of distinct NTV2OutputXptID values.
#define kRegClass_Channel3
#define NTV2EndianSwap32(__val__)
enum NTV2OutputCrosspointID NTV2OutputXptID
This selects audio channels 3 and 4 (Group 1 channels 3 and 4)
bool NTV2DeviceCanDoCustomAux(const NTV2DeviceID inDeviceID)
Packed driver version – use NTV2DriverVersionEncode, NTV2DriverVersionDecode* macros to encode/decod...
#define kRegClass_Channel4
std::string NTV2FrameRateToString(const NTV2FrameRate inValue, const bool inForRetailDisplay=false)
#define kIncludeOtherRegs_VRegs
std::set< std::string > NTV2StringSet
NTV2RegNumSet GetRegistersWithName(const string &inName, const int inMatchStyle=EXACTMATCH) const
static const ULWord sShifts[]
Declares the CNTV2RegisterExpert class.
bool IsRegInClass(const uint32_t inRegNum, const string &inClassName) const