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)) << endl
2630 <<
"Main Flash SPI Controller: " <<
YesNo(inRegValue &
BIT(2)) << endl
2631 <<
"MB Flash SPI Controller: " <<
YesNo(inRegValue &
BIT(3)) << endl
2632 <<
"Has Enhanced (NTV4) FrameStores: " <<
YesNo(inRegValue &
BIT(4)) << endl
2633 <<
"Can report Mixer delay: " <<
YesNo(inRegValue &
BIT(5)) << endl
2634 <<
"AncIns supports HANC insertion: " <<
YesNo(inRegValue &
BIT(6));
2637 } mDecodeCanDoStatus;
2639 struct DecodeVidControlReg :
public Decoder
2641 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2645 const bool is16x9 ((inRegValue &
BIT(31)) != 0);
2646 const bool isMono ((inRegValue &
BIT(30)) != 0);
2648 oss <<
"Aspect Ratio: " << (is16x9 ?
"16x9" :
"4x3") << endl
2649 <<
"Depth: " << (isMono ?
"Monochrome" :
"Color");
2652 } mDecodeVidControlReg;
2654 struct DecodeVidIntControl :
public Decoder
2656 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2661 oss <<
"Output 1 Vertical Enable: " <<
YesNo(inRegValue &
BIT(0)) << endl
2662 <<
"Input 1 Vertical Enable: " <<
YesNo(inRegValue &
BIT(1)) << endl
2663 <<
"Input 2 Vertical Enable: " <<
YesNo(inRegValue &
BIT(2)) << endl
2664 <<
"Audio Out Wrap Interrupt Enable: " <<
YesNo(inRegValue &
BIT(4)) << endl
2665 <<
"Audio In Wrap Interrupt Enable: " <<
YesNo(inRegValue &
BIT(5)) << endl
2666 <<
"Wrap Rate Interrupt Enable: " <<
YesNo(inRegValue &
BIT(6)) << endl
2667 <<
"UART Tx Interrupt Enable" <<
YesNo(inRegValue &
BIT(7)) << endl
2668 <<
"UART Rx Interrupt Enable" <<
YesNo(inRegValue &
BIT(8)) << endl
2669 <<
"UART Rx Interrupt Clear" <<
ActInact(inRegValue &
BIT(15)) << endl
2670 <<
"UART 2 Tx Interrupt Enable" <<
YesNo(inRegValue &
BIT(17)) << endl
2671 <<
"Output 2 Vertical Enable: " <<
YesNo(inRegValue &
BIT(18)) << endl
2672 <<
"Output 3 Vertical Enable: " <<
YesNo(inRegValue &
BIT(19)) << endl
2673 <<
"Output 4 Vertical Enable: " <<
YesNo(inRegValue &
BIT(20)) << endl
2674 <<
"Output 4 Vertical Clear: " <<
ActInact(inRegValue &
BIT(21)) << endl
2675 <<
"Output 3 Vertical Clear: " <<
ActInact(inRegValue &
BIT(22)) << endl
2676 <<
"Output 2 Vertical Clear: " <<
ActInact(inRegValue &
BIT(23)) << endl
2677 <<
"UART Tx Interrupt Clear" <<
ActInact(inRegValue &
BIT(24)) << endl
2678 <<
"Wrap Rate Interrupt Clear" <<
ActInact(inRegValue &
BIT(25)) << endl
2679 <<
"UART 2 Tx Interrupt Clear" <<
ActInact(inRegValue &
BIT(26)) << endl
2680 <<
"Audio Out Wrap Interrupt Clear" <<
ActInact(inRegValue &
BIT(27)) << endl
2681 <<
"Input 2 Vertical Clear: " <<
ActInact(inRegValue &
BIT(29)) << endl
2682 <<
"Input 1 Vertical Clear: " <<
ActInact(inRegValue &
BIT(30)) << endl
2683 <<
"Output 1 Vertical Clear: " <<
ActInact(inRegValue &
BIT(31));
2686 } mDecodeVidIntControl;
2688 struct DecodeVidIntControl2 :
public Decoder
2690 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2695 oss <<
"Input 3 Vertical Enable: " <<
YesNo(inRegValue &
BIT(1)) << endl
2696 <<
"Input 4 Vertical Enable: " <<
YesNo(inRegValue &
BIT(2)) << endl
2697 <<
"Input 5 Vertical Enable: " <<
YesNo(inRegValue &
BIT(8)) << endl
2698 <<
"Input 6 Vertical Enable: " <<
YesNo(inRegValue &
BIT(9)) << endl
2699 <<
"Input 7 Vertical Enable: " <<
YesNo(inRegValue &
BIT(10)) << endl
2700 <<
"Input 8 Vertical Enable: " <<
YesNo(inRegValue &
BIT(11)) << endl
2701 <<
"Output 5 Vertical Enable: " <<
YesNo(inRegValue &
BIT(12)) << endl
2702 <<
"Output 6 Vertical Enable: " <<
YesNo(inRegValue &
BIT(13)) << endl
2703 <<
"Output 7 Vertical Enable: " <<
YesNo(inRegValue &
BIT(14)) << endl
2704 <<
"Output 8 Vertical Enable: " <<
YesNo(inRegValue &
BIT(15)) << endl
2705 <<
"Output 8 Vertical Clear: " <<
ActInact(inRegValue &
BIT(16)) << endl
2706 <<
"Output 7 Vertical Clear: " <<
ActInact(inRegValue &
BIT(17)) << endl
2707 <<
"Output 6 Vertical Clear: " <<
ActInact(inRegValue &
BIT(18)) << endl
2708 <<
"Output 5 Vertical Clear: " <<
ActInact(inRegValue &
BIT(19)) << endl
2709 <<
"Input 8 Vertical Clear: " <<
ActInact(inRegValue &
BIT(25)) << endl
2710 <<
"Input 7 Vertical Clear: " <<
ActInact(inRegValue &
BIT(26)) << endl
2711 <<
"Input 6 Vertical Clear: " <<
ActInact(inRegValue &
BIT(27)) << endl
2712 <<
"Input 5 Vertical Clear: " <<
ActInact(inRegValue &
BIT(28)) << endl
2713 <<
"Input 4 Vertical Clear: " <<
ActInact(inRegValue &
BIT(29)) << endl
2714 <<
"Input 3 Vertical Clear: " <<
ActInact(inRegValue &
BIT(30));
2717 } mDecodeVidIntControl2;
2719 struct DecodeStatusReg :
public Decoder
2721 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2726 oss <<
"Input 1 Vertical Blank: " <<
ActInact(inRegValue &
BIT(20)) << endl
2727 <<
"Input 1 Field ID: " << (inRegValue &
BIT(21) ?
"1" :
"0") << endl
2728 <<
"Input 1 Vertical Interrupt: " <<
ActInact(inRegValue &
BIT(30)) << endl
2729 <<
"Input 2 Vertical Blank: " <<
ActInact(inRegValue &
BIT(18)) << endl
2730 <<
"Input 2 Field ID: " << (inRegValue &
BIT(19) ?
"1" :
"0") << endl
2731 <<
"Input 2 Vertical Interrupt: " <<
ActInact(inRegValue &
BIT(29)) << endl
2732 <<
"Output 1 Vertical Blank: " <<
ActInact(inRegValue &
BIT(22)) << endl
2733 <<
"Output 1 Field ID: " << (inRegValue &
BIT(23) ?
"1" :
"0") << endl
2734 <<
"Output 1 Vertical Interrupt: " <<
ActInact(inRegValue &
BIT(31)) << endl
2735 <<
"Output 2 Vertical Blank: " <<
ActInact(inRegValue &
BIT(4)) << endl
2736 <<
"Output 2 Field ID: " << (inRegValue &
BIT(5) ?
"1" :
"0") << endl
2737 <<
"Output 2 Vertical Interrupt: " <<
ActInact(inRegValue &
BIT(8)) << endl;
2739 oss <<
"Output 3 Vertical Blank: " <<
ActInact(inRegValue &
BIT(2)) << endl
2740 <<
"Output 3 Field ID: " << (inRegValue &
BIT(3) ?
"1" :
"0") << endl
2741 <<
"Output 3 Vertical Interrupt: " <<
ActInact(inRegValue &
BIT(7)) << endl
2742 <<
"Output 4 Vertical Blank: " <<
ActInact(inRegValue &
BIT(0)) << endl
2743 <<
"Output 4 Field ID: " << (inRegValue &
BIT(1) ?
"1" :
"0") << endl
2744 <<
"Output 4 Vertical Interrupt: " <<
ActInact(inRegValue &
BIT(6)) << endl;
2745 oss <<
"Aux Vertical Interrupt: " <<
ActInact(inRegValue &
BIT(12)) << endl
2746 <<
"I2C 1 Interrupt: " <<
ActInact(inRegValue &
BIT(14)) << endl
2747 <<
"I2C 2 Interrupt: " <<
ActInact(inRegValue &
BIT(13)) << endl
2748 <<
"Chunk Rate Interrupt: " <<
ActInact(inRegValue &
BIT(16)) << endl;
2750 oss <<
"Generic UART Interrupt: " <<
ActInact(inRegValue &
BIT(9)) << endl
2751 <<
"Uart 1 Rx Interrupt: " <<
ActInact(inRegValue &
BIT(15)) << endl
2752 <<
"Uart 1 Tx Interrupt: " <<
ActInact(inRegValue &
BIT(24)) << endl;
2754 oss <<
"Uart 2 Tx Interrupt: " <<
ActInact(inRegValue &
BIT(26)) << endl;
2756 oss <<
"LTC In 1 Present: " <<
YesNo(inRegValue &
BIT(17)) << endl;
2757 oss <<
"Wrap Rate Interrupt: " <<
ActInact(inRegValue &
BIT(25)) << endl
2758 <<
"Audio Out Wrap Interrupt: " <<
ActInact(inRegValue &
BIT(27)) << endl
2759 <<
"Audio 50Hz Interrupt: " <<
ActInact(inRegValue &
BIT(28));
2764 struct DecodeCPLDVersion :
public Decoder
2766 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2771 oss <<
"CPLD Version: " <<
DEC(inRegValue & (
BIT(0)|
BIT(1))) << endl
2772 <<
"Failsafe Bitfile Loaded: " << (inRegValue &
BIT(4) ?
"Yes" :
"No") << endl
2773 <<
"Force Reload: " <<
YesNo(inRegValue &
BIT(8));
2774 ULWord pcbRev ((inRegValue & 0xF0000000) >> 28);
2775 if (pcbRev) oss << endl
2776 <<
"PCB Version: " <<
xHEX0N(pcbRev,2);
2779 } mDecodeCPLDVersion;
2781 struct DecodeStatus2Reg :
public Decoder
2783 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2787 static const uint8_t bitNumsInputVBlank[] = {20, 18, 16, 14, 12, 10};
2788 static const uint8_t bitNumsInputFieldID[] = {21, 19, 17, 15, 13, 11};
2789 static const uint8_t bitNumsInputVertInt[] = {30, 29, 28, 27, 26, 25};
2790 static const uint8_t bitNumsOutputVBlank[] = { 8, 6, 4, 2};
2791 static const uint8_t bitNumsOutputFieldID[] = { 9, 7, 5, 3};
2792 static const uint8_t bitNumsOutputVertInt[] = {31, 24, 23, 22};
2794 for (
unsigned ndx(0); ndx < 6; ndx++)
2795 oss <<
"Input " << (ndx+3) <<
" Vertical Blank: " <<
ActInact(inRegValue &
BIT(bitNumsInputVBlank[ndx])) << endl
2796 <<
"Input " << (ndx+3) <<
" Field ID: " << (inRegValue &
BIT(bitNumsInputFieldID[ndx]) ?
"1" :
"0") << endl
2797 <<
"Input " << (ndx+3) <<
" Vertical Interrupt: " <<
ActInact(inRegValue &
BIT(bitNumsInputVertInt[ndx])) << endl;
2798 for (
unsigned ndx(0); ndx < 4; ndx++)
2799 oss <<
"Output " << (ndx+5) <<
" Vertical Blank: " <<
ActInact(inRegValue &
BIT(bitNumsOutputVBlank[ndx])) << endl
2800 <<
"Output " << (ndx+5) <<
" Field ID: " << (inRegValue &
BIT(bitNumsOutputFieldID[ndx]) ?
"1" :
"0") << endl
2801 <<
"Output " << (ndx+5) <<
" Vertical Interrupt: " <<
ActInact(inRegValue &
BIT(bitNumsOutputVertInt[ndx])) << endl;
2802 oss <<
"HDMI In Hot-Plug Detect Interrupt: " <<
ActInact(inRegValue &
BIT(0)) << endl
2803 <<
"HDMI In Chip Interrupt: " <<
ActInact(inRegValue &
BIT(1));
2806 } mDecodeStatus2Reg;
2808 struct DecodeInputStatusReg :
public Decoder
2810 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2819 <<
"Input 1 Geometry: ";
2820 if (
BIT(30) & inRegValue)
2821 switch (((
BIT(4)|
BIT(5)|
BIT(6)) & inRegValue) >> 4)
2823 case 0: oss <<
"2K x 1080";
break;
2824 case 1: oss <<
"2K x 1556";
break;
2825 default: oss <<
"Invalid HI";
break;
2828 switch (((
BIT(4)|
BIT(5)|
BIT(6)) & inRegValue) >> 4)
2830 case 0: oss <<
"Unknown";
break;
2831 case 1: oss <<
"525";
break;
2832 case 2: oss <<
"625";
break;
2833 case 3: oss <<
"750";
break;
2834 case 4: oss <<
"1125";
break;
2835 case 5: oss <<
"1250";
break;
2836 case 6:
case 7: oss <<
"Reserved";
break;
2837 default: oss <<
"Invalid LO";
break;
2840 <<
"Input 1 Scan Mode: " << ((
BIT(7) & inRegValue) ?
"Progressive" :
"Interlaced") << endl
2842 <<
"Input 2 Geometry: ";
2843 if (
BIT(31) & inRegValue)
2844 switch (((
BIT(12)|
BIT(13)|
BIT(14)) & inRegValue) >> 12)
2846 case 0: oss <<
"2K x 1080";
break;
2847 case 1: oss <<
"2K x 1556";
break;
2848 default: oss <<
"Invalid HI";
break;
2851 switch (((
BIT(12)|
BIT(13)|
BIT(14)) & inRegValue) >> 12)
2853 case 0: oss <<
"Unknown";
break;
2854 case 1: oss <<
"525";
break;
2855 case 2: oss <<
"625";
break;
2856 case 3: oss <<
"750";
break;
2857 case 4: oss <<
"1125";
break;
2858 case 5: oss <<
"1250";
break;
2859 case 6:
case 7: oss <<
"Reserved";
break;
2860 default: oss <<
"Invalid LO";
break;
2863 <<
"Input 2 Scan Mode: " << ((
BIT(15) & inRegValue) ?
"Progressive" :
"Interlaced") << endl
2865 <<
"Reference Geometry: ";
2866 switch (((
BIT(20)|
BIT(21)|
BIT(22)) & inRegValue) >> 20)
2868 case 0: oss <<
"NTV2_SG_UNKNOWN";
break;
2869 case 1: oss <<
"NTV2_SG_525";
break;
2870 case 2: oss <<
"NTV2_SG_625";
break;
2871 case 3: oss <<
"NTV2_SG_750";
break;
2872 case 4: oss <<
"NTV2_SG_1125";
break;
2873 case 5: oss <<
"NTV2_SG_1250";
break;
2874 default: oss <<
"Invalid";
break;
2877 <<
"Reference Scan Mode: " << ((
BIT(23) & inRegValue) ?
"Progressive" :
"Interlaced") << endl
2878 <<
"AES Channel 1-2: " << ((
BIT(24) & inRegValue) ?
"Invalid" :
"Valid") << endl
2879 <<
"AES Channel 3-4: " << ((
BIT(25) & inRegValue) ?
"Invalid" :
"Valid") << endl
2880 <<
"AES Channel 5-6: " << ((
BIT(26) & inRegValue) ?
"Invalid" :
"Valid") << endl
2881 <<
"AES Channel 7-8: " << ((
BIT(27) & inRegValue) ?
"Invalid" :
"Valid");
2884 } mDecodeInputStatusReg;
2886 struct DecodeSDIInputStatusReg :
public Decoder
2888 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2891 uint16_t numSpigots(0), startSpigot(0), doTsiMuxSync(0);
2902 for (uint16_t spigotNdx(0); spigotNdx < numSpigots; )
2904 const uint16_t spigotNum (spigotNdx + startSpigot);
2905 const uint8_t statusBits ((inRegValue >> (spigotNdx*8)) & 0xFF);
2906 const uint8_t speedBits (statusBits & 0xC1);
2907 ostringstream ossSpeed, ossSpigot;
2908 ossSpigot <<
"SDI In " << spigotNum <<
" ";
2909 const string spigotLabel (ossSpigot.str());
2910 if (speedBits & 0x01) ossSpeed <<
" 3G";
2913 if (speedBits & 0x40) ossSpeed <<
" 6G";
2914 if (speedBits & 0x80) ossSpeed <<
" 12G";
2916 if (speedBits == 0) ossSpeed <<
" 1.5G";
2917 oss << spigotLabel <<
"Link Speed:" << ossSpeed.str() << endl
2918 << spigotLabel <<
"SMPTE Level B: " <<
YesNo(statusBits & 0x02) << endl
2919 << spigotLabel <<
"Link A VPID Valid: " <<
YesNo(statusBits & 0x10) << endl
2920 << spigotLabel <<
"Link B VPID Valid: " <<
YesNo(statusBits & 0x20) << endl;
2922 oss << spigotLabel <<
"3Gb-to-3Ga Conversion: " <<
EnabDisab(statusBits & 0x04);
2924 oss << spigotLabel <<
"3Gb-to-3Ga Conversion: n/a";
2925 if (++spigotNdx < numSpigots)
2929 for (
UWord tsiMux(0); tsiMux < 4; ++tsiMux)
2931 <<
"TsiMux" <<
DEC(tsiMux+1) <<
" Sync Fail: " << ((inRegValue & (0x00010000UL << tsiMux)) ?
"FAILED" :
"OK");
2934 } mDecodeSDIInputStatusReg;
2936 struct DecodeSDIInputStatus2Reg :
public Decoder
2938 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2946 oss << sOdd <<
" Scan Mode: " << ((
BIT(7) & inRegValue) ?
"Progressive" :
"Interlaced") << endl
2948 << sOdd <<
" Geometry: ";
2949 if (
BIT(30) & inRegValue)
switch (((
BIT(4)|
BIT(5)|
BIT(6)) & inRegValue) >> 4)
2951 case 0: oss <<
"2K x 1080";
break;
2952 case 1: oss <<
"2K x 1556";
break;
2953 default: oss <<
"Invalid HI";
break;
2955 else switch (((
BIT(4)|
BIT(5)|
BIT(6)) & inRegValue) >> 4)
2957 case 0: oss <<
"Unknown";
break;
2958 case 1: oss <<
"525";
break;
2959 case 2: oss <<
"625";
break;
2960 case 3: oss <<
"750";
break;
2961 case 4: oss <<
"1125";
break;
2962 case 5: oss <<
"1250";
break;
2963 case 6:
case 7: oss <<
"Reserved";
break;
2964 default: oss <<
"Invalid LO";
break;
2967 << sEven <<
" Scan Mode: " << ((
BIT(15) & inRegValue) ?
"Progressive" :
"Interlaced") << endl
2969 << sEven <<
" Geometry: ";
2970 if (
BIT(31) & inRegValue)
switch (((
BIT(12)|
BIT(13)|
BIT(14)) & inRegValue) >> 12)
2972 case 0: oss <<
"2K x 1080";
break;
2973 case 1: oss <<
"2K x 1556";
break;
2974 default: oss <<
"Invalid HI";
break;
2976 else switch (((
BIT(12)|
BIT(13)|
BIT(14)) & inRegValue) >> 12)
2978 case 0: oss <<
"Unknown";
break;
2979 case 1: oss <<
"525";
break;
2980 case 2: oss <<
"625";
break;
2981 case 3: oss <<
"750";
break;
2982 case 4: oss <<
"1125";
break;
2983 case 5: oss <<
"1250";
break;
2984 case 6:
case 7: oss <<
"Reserved";
break;
2985 default: oss <<
"Invalid LO";
break;
2989 } mDecodeSDIInputStatus2Reg;
2991 struct DecodeFS1RefSelectReg :
public Decoder
2993 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2995 (
void) inDeviceID; (
void) inRegNum;
2997 oss <<
"BNC Select(LHi): " << (inRegValue & 0x00000010 ?
"LTCIn1" :
"Ref") << endl
2998 <<
"Ref BNC (Corvid): " <<
EnabDisab(inRegValue & 0x00000020) << endl
2999 <<
"LTC Present (also Reg 21): " <<
YesNo(inRegValue & 0x00000040) << endl
3000 <<
"LTC Emb Out Enable: " <<
YesNo(inRegValue & 0x00000080) << endl
3001 <<
"LTC Emb In Enable: " <<
YesNo(inRegValue & 0x00000100) << endl
3002 <<
"LTC Emb In Received: " <<
YesNo(inRegValue & 0x00000200) << endl
3003 <<
"LTC BNC Out Source: " << (inRegValue & 0x00000400 ?
"E-E" :
"Reg112/113");
3006 } mDecodeFS1RefSelectReg;
3008 struct DecodeLTCStatusControlReg :
public Decoder
3010 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3012 (
void) inDeviceID; (
void) inRegNum;
3013 const uint16_t LTC1InTimingSelect ((inRegValue >> 1) & 0x0000007);
3014 const uint16_t LTC2InTimingSelect ((inRegValue >> 9) & 0x0000007);
3015 const uint16_t LTC1OutTimingSelect ((inRegValue >> 16) & 0x0000007);
3016 const uint16_t LTC2OutTimingSelect ((inRegValue >> 20) & 0x0000007);
3018 oss <<
"LTC 1 Input Present: " <<
YesNo(inRegValue & 0x00000001) << endl
3019 <<
"LTC 1 Input FB Timing Select): " <<
xHEX0N(LTC1InTimingSelect,2) <<
" (" <<
DEC(LTC1InTimingSelect) <<
")" << endl
3020 <<
"LTC 1 Bypass: " <<
EnabDisab(inRegValue & 0x00000010) << endl
3021 <<
"LTC 1 Bypass Select: " <<
DEC(
ULWord((inRegValue >> 5) & 0x00000001)) << endl
3022 <<
"LTC 2 Input Present: " <<
YesNo(inRegValue & 0x00000100) << endl
3023 <<
"LTC 2 Input FB Timing Select): " <<
xHEX0N(LTC2InTimingSelect,2) <<
" (" <<
DEC(LTC2InTimingSelect) <<
")" << endl
3024 <<
"LTC 2 Bypass: " <<
EnabDisab(inRegValue & 0x00001000) << endl
3025 <<
"LTC 2 Bypass Select: " <<
DEC(
ULWord((inRegValue >> 13) & 0x00000001)) << endl
3026 <<
"LTC 1 Output FB Timing Select): " <<
xHEX0N(LTC1OutTimingSelect,2) <<
" (" <<
DEC(LTC1OutTimingSelect) <<
")" << endl
3027 <<
"LTC 2 Output FB Timing Select): " <<
xHEX0N(LTC2OutTimingSelect,2) <<
" (" <<
DEC(LTC2OutTimingSelect) <<
")";
3030 } mLTCStatusControlDecoder;
3032 struct DecodeAudDetectReg :
public Decoder
3034 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3042 for (uint16_t num(0); num < 8; )
3044 const uint16_t group (num / 2);
3045 const bool isChan34 (num & 1);
3046 oss <<
"Group " << group <<
" CH " << (isChan34 ?
"3-4: " :
"1-2: ") << (inRegValue &
BIT(num) ?
"Present" :
"Absent");
3057 } mDecodeAudDetectReg;
3059 struct DecodeAudControlReg :
public Decoder
3061 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3065 static const string ChStrs [] = {
"Ch 1/2",
"Ch 3/4",
"Ch 5/6",
"Ch 7/8" };
3066 uint16_t sdiOutput (0);
3076 oss <<
"Audio Capture: " <<
EnabDisab(
BIT(0) & inRegValue) << endl
3077 <<
"Audio Loopback: " <<
EnabDisab(
BIT(3) & inRegValue) << endl
3078 <<
"Audio Input: " <<
DisabEnab(
BIT(8) & inRegValue) << endl
3079 <<
"Audio Output: " <<
DisabEnab(
BIT(9) & inRegValue) << endl
3080 <<
"Output Paused: " <<
YesNo(
BIT(11) & inRegValue) << endl;
3082 oss <<
"Audio Embedder SDIOut" << sdiOutput <<
": " <<
DisabEnab(
BIT(13) & inRegValue) << endl
3083 <<
"Audio Embedder SDIOut" << (sdiOutput+1) <<
": " <<
DisabEnab(
BIT(15) & inRegValue) << endl;
3085 oss <<
"A/V Sync Mode: " <<
EnabDisab(
BIT(15) & inRegValue) << endl
3086 <<
"AES Rate Converter: " <<
DisabEnab(
BIT(19) & inRegValue) << endl
3087 <<
"Audio Buffer Format: " << (
BIT(20) & inRegValue ?
"16-Channel " : (
BIT(16) & inRegValue ?
"8-Channel " :
"6-Channel ")) << endl
3088 << (
BIT(18) & inRegValue ?
"96kHz" :
"48kHz") << endl
3089 << (
BIT(18) & inRegValue ?
"96kHz Support" :
"48kHz Support") << endl
3091 <<
"Slave Mode (64-chl): " <<
EnabDisab(
BIT(23) & inRegValue) << endl
3092 <<
"K-box, Monitor: " << ChStrs [(
BIT(24) &
BIT(25) & inRegValue) >> 24] << endl
3093 <<
"K-Box Input: " << (
BIT(26) & inRegValue ?
"XLR" :
"BNC") << endl
3094 <<
"K-Box: " << (
BIT(27) & inRegValue ?
"Present" :
"Absent") << endl
3095 <<
"Cable: " << (
BIT(28) & inRegValue ?
"XLR" :
"BNC") << endl
3096 <<
"Audio Buffer Size: " << (
BIT(31) & inRegValue ?
"4 MB" :
"1 MB");
3099 } mDecodeAudControlReg;
3101 struct DecodeAudSourceSelectReg :
public Decoder
3103 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3107 static const string SrcStrs [] = {
"AES Input",
"Embedded Groups 1 and 2",
"" };
3108 static const unsigned SrcStrMap [] = { 0, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 };
3109 const uint16_t vidInput = (inRegValue &
BIT(23) ? 2 : 0) + (inRegValue &
BIT(16) ? 1 : 0);
3112 oss <<
"Audio Source: " << SrcStrs [SrcStrMap [(
BIT(0) |
BIT(1) |
BIT(2) |
BIT(3)) & inRegValue]] << endl
3113 <<
"Embedded Source Select: Video Input " << (1 + vidInput) << endl
3114 <<
"AES Sync Mode bit (fib): " <<
EnabDisab(inRegValue &
BIT(18)) << endl
3115 <<
"PCM disabled: " <<
YesNo(inRegValue &
BIT(17)) << endl
3116 <<
"Erase head enable: " <<
YesNo(inRegValue &
BIT(19)) << endl
3117 <<
"Embedded Clock Select: " << (inRegValue &
BIT(22) ?
"Video Input" :
"Board Reference") << endl
3118 <<
"3G audio source: " << (inRegValue &
BIT(21) ?
"Data stream 2" :
"Data stream 1");
3121 } mDecodeAudSourceSelectReg;
3123 struct DecodeAudOutputSrcMap :
public Decoder
3125 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3129 static const string AESOutputStrs[] = {
"AES Outputs 1-4",
"AES Outputs 5-8",
"AES Outputs 9-12",
"AES Outputs 13-16",
""};
3130 static const string SrcStrs[] = {
"AudSys1, Audio Channels 1-4",
"AudSys1, Audio Channels 5-8",
3131 "AudSys1, Audio Channels 9-12",
"AudSys1, Audio Channels 13-16",
3132 "AudSys2, Audio Channels 1-4",
"AudSys2, Audio Channels 5-8",
3133 "AudSys2, Audio Channels 9-12",
"AudSys2, Audio Channels 13-16",
3134 "AudSys3, Audio Channels 1-4",
"AudSys3, Audio Channels 5-8",
3135 "AudSys3, Audio Channels 9-12",
"AudSys3, Audio Channels 13-16",
3136 "AudSys4, Audio Channels 1-4",
"AudSys4, Audio Channels 5-8",
3137 "AudSys4, Audio Channels 9-12",
"AudSys4, Audio Channels 13-16",
""};
3138 static const unsigned AESChlMappingShifts [4] = {0, 4, 8, 12};
3141 const uint32_t AESOutMapping (inRegValue & 0x0000FFFF);
3145 for (
unsigned AESOutputQuad(0); AESOutputQuad < 4; AESOutputQuad++)
3146 oss << AESOutputStrs[AESOutputQuad] <<
" Source: " << SrcStrs[(AESOutMapping >> AESChlMappingShifts[AESOutputQuad]) & 0x0000000F] << endl;
3159 const uint32_t HDMIMon1234Info (HDMIMonInfo & 0x0F);
3162 const uint32_t HDMIMon5678Info ((HDMIMonInfo >> 4) & 0x0F);
3170 } mDecodeAudOutputSrcMap;
3172 struct DecodePCMControlReg :
public Decoder
3174 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3179 for (uint8_t audChan (0); audChan < 4; audChan++)
3181 oss <<
"Audio System " << (startAudioSystem + audChan) <<
": ";
3182 const uint8_t pcmBits (uint32_t(inRegValue >> (audChan * 8)) & 0x000000FF);
3183 if (pcmBits == 0x00)
3187 oss <<
"non-PCM channels";
3188 for (uint8_t chanPair (0); chanPair < 8; chanPair++)
3189 if (pcmBits & (0x01 << chanPair))
3190 oss <<
" " << (chanPair*2+1) <<
"-" << (chanPair*2+2);
3197 } mDecodePCMControlReg;
3199 struct DecodeAudioMixerInputSelectReg :
public Decoder
3201 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3202 { (
void) inDeviceID; (
void) inRegNum;
3203 const UWord mainInputSrc((inRegValue ) & 0x0000000F);
3204 const UWord aux1InputSrc((inRegValue >> 4) & 0x0000000F);
3205 const UWord aux2InputSrc((inRegValue >> 8) & 0x0000000F);
3212 } mAudMxrInputSelDecoder;
3214 struct DecodeAudioMixerGainRegs :
public Decoder
3218 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3219 { (
void)inRegNum; (
void)inDeviceID;
3220 static const double kUnityGain (0x00010000);
3221 const bool atUnity (inRegValue == 0x00010000);
3224 oss <<
"Gain: 0 dB (Unity)";
3227 const double dValue (inRegValue);
3228 const bool aboveUnity (inRegValue >= 0x00010000);
3229 const string plusMinus (atUnity ?
"" : (aboveUnity ?
"+" :
"-"));
3230 const string aboveBelow (atUnity ?
"at" : (aboveUnity ?
"above" :
"below"));
3231 const uint32_t unityDiff (aboveUnity ? inRegValue - 0x00010000 : 0x00010000 - inRegValue);
3232 const double dB (
double(20.0) * ::log10(dValue/kUnityGain));
3233 oss <<
"Gain: " << dB <<
" dB, " << plusMinus <<
xHEX0N(unityDiff,6)
3234 <<
" (" << plusMinus <<
DEC(unityDiff) <<
") " << aboveBelow <<
" unity gain";
3238 } mAudMxrGainDecoder;
3240 struct DecodeAudioMixerChannelSelectReg :
public Decoder
3242 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3243 { (
void) inRegNum; (
void) inDeviceID;
3248 <<
"Level Measurement Sample Count: " <<
DEC(
ULWord(1 << powerOfTwo)) <<
" (bits 8-15)";
3251 } mAudMxrChanSelDecoder;
3254 struct DecodeAudioMixerMutesReg :
public Decoder
3257 typedef std::bitset<16> AudioChannelSet16;
3258 typedef std::bitset<2> AudioChannelSet2;
3261 outSet.clear(); outClear.clear();
3262 for (
size_t ndx(0); ndx < 16; ndx++)
3263 { ostringstream oss; oss <<
DEC(ndx+1);
3264 if (inChSet.test(ndx))
3265 outSet.push_back(oss.str());
3267 outClear.push_back(oss.str());
3269 if (outSet.empty()) outSet.push_back(
"<none>");
3270 if (outClear.empty()) outClear.push_back(
"<none>");
3274 outSet.clear(); outClear.clear();
static const string LR[] = {
"L",
"R"};
3275 for (
size_t ndx(0); ndx < 2; ndx++)
3276 if (inChSet.test(ndx))
3277 outSet.push_back(LR[ndx]);
3279 outClear.push_back(LR[ndx]);
3280 if (outSet.empty()) outSet.push_back(
"<none>");
3281 if (outClear.empty()) outClear.push_back(
"<none>");
3284 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3285 { (
void) inRegNum; (
void) inDeviceID;
3291 NTV2StringList mutedMainOut, unmutedMainOut, mutedMain, unmutedMain, mutedAux1, unmutedAux1, mutedAux2, unmutedAux2;
3292 SplitAudioChannelSet16(AudioChannelSet16(mainOutputMuteBits), mutedMainOut, unmutedMainOut);
3293 SplitAudioChannelSet2(AudioChannelSet2(mainInputMuteBits), mutedMain, unmutedMain);
3294 SplitAudioChannelSet2(AudioChannelSet2(aux1InputMuteBits), mutedAux1, unmutedAux1);
3295 SplitAudioChannelSet2(AudioChannelSet2(aux2InputMuteBits), mutedAux2, unmutedAux2);
3296 oss <<
"Main Output Muted/Disabled Channels: " << mutedMainOut << endl
3297 <<
"Main Output Unmuted/Enabled Channels: " << unmutedMainOut << endl;
3298 oss <<
"Main Input Muted/Disabled Channels: " << mutedMain << endl
3299 <<
"Main Input Unmuted/Enabled Channels: " << unmutedMain << endl;
3300 oss <<
"Aux Input 1 Muted/Disabled Channels: " << mutedAux1 << endl
3301 <<
"Aux Input 1 Unmuted/Enabled Channels: " << unmutedAux1 << endl;
3302 oss <<
"Aux Input 2 Muted/Disabled Channels: " << mutedAux2 << endl
3303 <<
"Aux Input 2 Unmuted/Enabled Channels: " << unmutedAux2;
3306 } mAudMxrMutesDecoder;
3308 struct DecodeAudioMixerLevelsReg :
public Decoder
3312 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3313 { (
void) inDeviceID;
3314 static const string sLabels[] = {
"Aux Input 1",
"Aux Input 2",
"Main Input Audio Channels 1|2",
"Main Input Audio Channels 3|4",
3315 "Main Input Audio Channels 5|6",
"Main Input Audio Channels 7|8",
"Main Input Audio Channels 9|10",
3316 "Main Input Audio Channels 11|12",
"Main Input Audio Channels 13|14",
"Main Input Audio Channels 15|16",
3317 "Main Output Audio Channels 1|2",
"Main Output Audio Channels 3|4",
"Main Output Audio Channels 5|6",
3318 "Main Output Audio Channels 7|8",
"Main Output Audio Channels 9|10",
"Main Output Audio Channels 11|12",
3319 "Main Output Audio Channels 13|14",
"Main Output Audio Channels 15|16"};
3323 const string & label(sLabels[labelOffset]);
3327 oss << label <<
" Left Level:" <<
xHEX0N(leftLevel, 4) <<
" (" <<
DEC(leftLevel) <<
")" << endl
3328 << label <<
" Right Level:" <<
xHEX0N(rightLevel,4) <<
" (" <<
DEC(rightLevel) <<
")";
3331 } mAudMxrLevelDecoder;
3333 struct DecodeAncExtControlReg :
public Decoder
3335 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3340 static const string SyncStrs [] = {
"field",
"frame",
"immediate",
"unknown" };
3341 oss <<
"HANC Y enable: " <<
YesNo(inRegValue &
BIT( 0)) << endl
3342 <<
"VANC Y enable: " <<
YesNo(inRegValue &
BIT( 4)) << endl
3343 <<
"HANC C enable: " <<
YesNo(inRegValue &
BIT( 8)) << endl
3344 <<
"VANC C enable: " <<
YesNo(inRegValue &
BIT(12)) << endl
3345 <<
"Progressive video: " <<
YesNo(inRegValue &
BIT(16)) << endl
3346 <<
"Synchronize: " << SyncStrs [(inRegValue & (
BIT(24) |
BIT(25))) >> 24] << endl
3347 <<
"Memory writes: " <<
EnabDisab(!(inRegValue &
BIT(28))) << endl
3348 <<
"SD Y+C Demux: " <<
EnabDisab(inRegValue &
BIT(30)) << endl
3349 <<
"Metadata from: " << (inRegValue &
BIT(31) ?
"LSBs" :
"MSBs");
3352 } mDecodeAncExtControlReg;
3354 struct DecodeAuxExtControlReg :
public Decoder
3356 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3361 static const string SyncStrs [] = {
"field",
"frame",
"immediate",
"unknown" };
3362 oss <<
"Progressive video: " <<
YesNo(inRegValue &
BIT(16)) << endl
3363 <<
"Synchronize: " << SyncStrs [(inRegValue & (
BIT(24) |
BIT(25))) >> 24] << endl
3364 <<
"Memory writes: " <<
EnabDisab(!(inRegValue &
BIT(28))) << endl
3365 <<
"Filter inclusion: " <<
EnabDisab(inRegValue &
BIT(29));
3368 } mDecodeAuxExtControlReg;
3371 struct DecodeAncExtFieldLinesReg :
public Decoder
3373 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3377 const uint32_t which (inRegNum & 0x1F);
3378 const uint32_t valueLow (inRegValue & 0xFFF);
3379 const uint32_t valueHigh ((inRegValue >> 16) & 0xFFF);
3382 case 5: oss <<
"F1 cutoff line: " << valueLow << endl
3383 <<
"F2 cutoff line: " << valueHigh;
3385 case 9: oss <<
"F1 VBL start line: " << valueLow << endl
3386 <<
"F2 VBL start line: " << valueHigh;
3388 case 11: oss <<
"Field ID high on line: " << valueLow << endl
3389 <<
"Field ID low on line: " << valueHigh;
3391 case 17: oss <<
"F1 analog start line: " << valueLow << endl
3392 <<
"F2 analog start line: " << valueHigh;
3395 oss <<
"Invalid register type";
3400 } mDecodeAncExtFieldLines;
3403 struct DecodeAncExtStatusReg :
public Decoder
3405 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3409 const uint32_t which (inRegNum & 0x1F);
3410 const uint32_t byteTotal (inRegValue & 0xFFFFFF);
3411 const bool overrun ((inRegValue &
BIT(28)) ?
true :
false);
3414 case 6: oss <<
"Total bytes: ";
break;
3415 case 7: oss <<
"Total F1 bytes: ";
break;
3416 case 8: oss <<
"Total F2 bytes: ";
break;
3417 default: oss <<
"Invalid register type";
break;
3419 oss <<
DEC(byteTotal) << endl
3420 <<
"Overrun: " <<
YesNo(overrun);
3423 } mDecodeAncExtStatus;
3426 struct DecodeAncExtIgnoreDIDReg :
public Decoder
3428 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3433 oss <<
"Ignoring DIDs " <<
HEX0N((inRegValue >> 0) & 0xFF, 2)
3434 <<
", " <<
HEX0N((inRegValue >> 8) & 0xFF, 2)
3435 <<
", " <<
HEX0N((inRegValue >> 16) & 0xFF, 2)
3436 <<
", " <<
HEX0N((inRegValue >> 24) & 0xFF, 2);
3439 } mDecodeAncExtIgnoreDIDs;
3441 struct DecodeAncExtAnalogFilterReg :
public Decoder
3443 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3448 uint32_t which (inRegNum & 0x1F);
3449 oss <<
"Each 1 bit specifies capturing ";
3452 case 18: oss <<
"F1 Y";
break;
3453 case 19: oss <<
"F2 Y";
break;
3454 case 20: oss <<
"F1 C";
break;
3455 case 21: oss <<
"F2 C";
break;
3456 default:
return "Invalid register type";
3458 oss <<
" line as analog, else digital";
3461 } mDecodeAncExtAnalogFilter;
3463 struct DecodeAncInsValuePairReg :
public Decoder
3465 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3469 const uint32_t which (inRegNum & 0x1F);
3470 const uint32_t valueLow (inRegValue & 0xFFFF);
3471 const uint32_t valueHigh ((inRegValue >> 16) & 0xFFFF);
3475 case 0: oss <<
"F1 byte count low: " << valueLow << endl
3476 <<
"F2 byte count low: " << valueHigh;
3478 case 4: oss <<
"HANC pixel delay: " << (valueLow & 0x3FF) << endl
3479 <<
"VANC pixel delay: " << (valueHigh & 0x7FF);
3481 case 5: oss <<
"F1 first active line: " << (valueLow & 0x7FF) << endl
3482 <<
"F2 first active line: " << (valueHigh & 0x7FF);
3484 case 6: oss <<
"Active line length: " << (valueLow & 0x7FF) << endl
3485 <<
"Total line length: " << (valueHigh & 0xFFF);
3487 case 8: oss <<
"Field ID high on line: " << (valueLow & 0x7FF) << endl
3488 <<
"Field ID low on line: " << (valueHigh & 0x7FF);
3490 case 11: oss <<
"F1 chroma blnk start line: " << (valueLow & 0x7FF) << endl
3491 <<
"F2 chroma blnk start line: " << (valueHigh & 0x7FF);
3493 case 14: oss <<
"F1 byte count high: " << valueLow << endl
3494 <<
"F2 byte count high: " << valueHigh;
3496 default:
return "Invalid register type";
3500 } mDecodeAncInsValuePairReg;
3502 struct DecodeAncInsControlReg :
public Decoder
3504 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3509 oss <<
"HANC Y enable: " <<
YesNo(inRegValue &
BIT( 0)) << endl
3510 <<
"VANC Y enable: " <<
YesNo(inRegValue &
BIT( 4)) << endl
3511 <<
"HANC C enable: " <<
YesNo(inRegValue &
BIT( 8)) << endl
3512 <<
"VANC C enable: " <<
YesNo(inRegValue &
BIT(12)) << endl
3513 <<
"Payload Y insert: " <<
YesNo(inRegValue &
BIT(16)) << endl
3514 <<
"Payload C insert: " <<
YesNo(inRegValue &
BIT(17)) << endl
3515 <<
"Payload F1 insert: " <<
YesNo(inRegValue &
BIT(20)) << endl
3516 <<
"Payload F2 insert: " <<
YesNo(inRegValue &
BIT(21)) << endl
3517 <<
"Progressive video: " <<
YesNo(inRegValue &
BIT(24)) << endl
3518 <<
"Memory reads: " <<
EnabDisab(!(inRegValue &
BIT(28))) << endl
3519 <<
"SD Packet Split: " <<
EnabDisab(inRegValue &
BIT(31));
3522 } mDecodeAncInsControlReg;
3524 struct DecodeAncInsChromaBlankReg :
public Decoder
3526 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3531 uint32_t which (inRegNum & 0x1F);
3533 oss <<
"Each 1 bit specifies if chroma in ";
3536 case 12: oss <<
"F1";
break;
3537 case 13: oss <<
"F2";
break;
3538 default:
return "Invalid register type";
3540 oss <<
" should be blanked or passed thru";
3543 } mDecodeAncInsChromaBlankReg;
3545 struct DecodeXptGroupReg :
public Decoder
3547 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3549 static unsigned sShifts[4] = {0, 8, 16, 24};
3551 for (
unsigned ndx(0); ndx < 4; ndx++)
3569 strs.push_back(oss.str());
3575 } mDecodeXptGroupReg;
3577 struct DecodeXptValidReg :
public Decoder
3579 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3596 ss <<
xHEX0N(outputXpt,2) <<
"(" <<
DEC(outputXpt) <<
")";
3598 ss <<
"'" << name <<
"'";
3599 outputXptNames.push_back(ss.str());
3601 if (!outputXptNames.empty())
3602 oss <<
"Valid Xpts: " << outputXptNames;
3606 return Decoder::operator()(inRegNum, inRegValue, inDeviceID);
3608 } mDecodeXptValidReg;
3610 struct DecodeNTV4FSReg :
public Decoder
3612 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3613 { (
void) inDeviceID;
3614 static const string sPixClkSelects[] = {
"27",
"74.1758",
"74.25",
"148.3516",
"148.5",
"inv5",
"inv6",
"inv7"};
3615 static const string sSyncs[] = {
"Sync to Frame",
"Sync to Field",
"Immediate",
"Sync to External"};
3621 {
const ULWord disabled (inRegValue &
BIT(1));
3622 const ULWord sync ((inRegValue & (
BIT(20)|
BIT(21))) >> 20);
3623 const ULWord pixClkSel((inRegValue & (
BIT(16)|
BIT(17)|
BIT(18))) >> 16);
3626 oss <<
"Enabled: " <<
YesNo(!disabled) << endl
3627 <<
"Mode: " << ((inRegValue &
BIT( 0)) ?
"Capture" :
"Display") << endl
3628 <<
"DRT_DISP: " <<
OnOff(inRegValue &
BIT( 2)) << endl
3629 <<
"Fill Bit: " <<
DEC((inRegValue &
BIT( 3)) ? 1 : 0) << endl
3630 <<
"Dither: " <<
EnabDisab(inRegValue &
BIT( 4)) << endl
3631 <<
"RGB8 Convert: " << ((inRegValue &
BIT( 5)) ?
"Use '00'" :
"Copy MSBs") << endl
3632 <<
"Progressive: " <<
YesNo(inRegValue &
BIT( 6)) << endl
3634 <<
"Pix Clk Sel: " << sPixClkSelects[pixClkSel] <<
" MHz" << endl
3635 <<
"Sync: " << sSyncs[sync];
3637 oss <<
"Enabled: " <<
YesNo(!disabled);
3641 {
const ULWord lineCnt ((inRegValue & (0xFFFF0000)) >> 16);
3642 oss <<
"Field ID: " <<
OddEven(inRegValue &
BIT( 0)) << endl
3643 <<
"Line Count: " <<
DEC(lineCnt);
3647 {
const int32_t xferByteCnt((inRegValue & 0xFFFF0000) >> 16), linePitch(inRegValue & 0x0000FFFF);
3648 oss <<
"Line Pitch: " << linePitch << (linePitch < 0 ?
" (flipped)" :
"") << endl
3649 <<
"Xfer Byte Count: " << xferByteCnt <<
" [bytes/line]" << (linePitch < 0 ?
" (flipped)" :
"");
3653 {
const ULWord ROIVSize((inRegValue & (0x0FFF0000)) >> 16), ROIHSize(inRegValue & 0x00000FFF);
3654 oss <<
"ROI Horz Size: " <<
DEC(ROIHSize) <<
" [pixels]" << endl
3655 <<
"ROI Vert Size: " <<
DEC(ROIVSize) <<
" [lines]";
3660 {
const ULWord ROIVOff((inRegValue & (0x0FFF0000)) >> 16), ROIHOff(inRegValue & 0x00000FFF);
3662 oss <<
"ROI " << fld <<
" Horz Offset: " <<
DEC(ROIHOff) << endl
3663 <<
"ROI " << fld <<
" Vert Offset: " <<
DEC(ROIVOff);
3667 {
const ULWord tot((inRegValue & (0x0FFF0000)) >> 16), act(inRegValue & 0x00000FFF);
3668 oss <<
"Disp Horz Active: " <<
DEC(act) << endl
3669 <<
"Disp Horz Total: " <<
DEC(tot);
3673 {
const ULWord lo((inRegValue & (0x07FF0000)) >> 16), hi(inRegValue & 0x000007FF);
3674 oss <<
"Disp FID Lo: " <<
DEC(lo) << endl
3675 <<
"Disp FID Hi: " <<
DEC(hi);
3680 {
const ULWord actEnd((inRegValue & (0x07FF0000)) >> 16), actStart(inRegValue & 0x000007FF);
3682 oss <<
"Disp " << fld <<
" Active Start: " <<
DEC(actStart) << endl
3683 <<
"Disp " << fld <<
" Active End: " <<
DEC(actEnd);
3687 oss <<
"Unpacker Horz Offset: " <<
DEC(inRegValue & 0x0000FFFF);
3691 {
const ULWord hi((inRegValue & (0xFFFF0000)) >> 16), lo(inRegValue & 0x0000FFFF);
3694 oss <<
"Disp Fill " << CbBorCrR <<
": " <<
DEC(lo) <<
" " <<
xHEX0N(lo,4) << endl
3695 <<
"Disp Fill " << YGorA <<
": " <<
DEC(hi) <<
" " <<
xHEX0N(hi,4);
3699 {
const ULWord lo(inRegValue & 0x0000FFFF);
3700 oss <<
"ROI Fill Alpha: " <<
DEC(lo) <<
" " <<
xHEX0N(lo,4);
3704 oss <<
"Output Timing Frame Pulse Preset: " <<
DEC(inRegValue & 0x00FFFFFF) <<
" " 3705 <<
xHEX0N(inRegValue & 0x00FFFFFF,6);
3710 {
const int32_t lo (inRegValue & 0x00001FFF);
3711 oss <<
"Output Video Offset: " << lo <<
" " <<
xHEX0N(lo,6);
3715 return Decoder::operator()(inRegNum, inRegValue, inDeviceID);
3721 struct DecodeHDMIOutputControl :
public Decoder
3723 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3727 static const string sHDMIStdV1[] = {
"1080i",
"720p",
"480i",
"576i",
"1080p",
"SXGA",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"" };
3728 static const string sHDMIStdV2V3[] = {
"1080i",
"720p",
"480i",
"576i",
"1080p",
"1556i",
"2Kx1080p",
"2Kx1080i",
"UHD",
"4K",
"",
"",
"",
"",
"",
"" };
3729 static const string sVidRates[] = {
"",
"60.00",
"59.94",
"30.00",
"29.97",
"25.00",
"24.00",
"23.98",
"50.00",
"48.00",
"47.95",
"",
"",
"",
"",
"" };
3730 static const string sSrcSampling[] = {
"YC422",
"RGB",
"YC420",
"Unknown/invalid" };
3731 static const string sBitDepth[] = {
"8",
"10",
"12",
"Unknown/invalid" };
3734 const string hdmiVidStdStr (hdmiVers > 1 ? sHDMIStdV2V3[rawVideoStd] : (hdmiVers == 1 ? sHDMIStdV1[rawVideoStd] :
""));
3737 const uint32_t srcBPC ((inRegValue & (
BIT(16)|
BIT(17))) >> 16);
3738 const uint32_t txBitDepth ((inRegValue & (
BIT(20)|
BIT(21))) >> 20);
3739 oss <<
"Video Standard: " << hdmiVidStdStr;
3740 if (hdmiVidStdStr != vidStdStr)
3741 oss <<
" (" << vidStdStr <<
")";
3743 <<
"Color Mode: " << ((inRegValue &
BIT( 8)) ?
"RGB" :
"YCbCr") << endl
3745 <<
"Scan Mode: " << ((inRegValue &
BIT(13)) ?
"Progressive" :
"Interlaced") << endl
3746 <<
"Bit Depth: " << ((inRegValue &
BIT(14)) ?
"10-bit" :
"8-bit") << endl
3747 <<
"Output Color Sampling: " << ((inRegValue &
BIT(15)) ?
"4:4:4" :
"4:2:2") << endl
3748 <<
"Output Bit Depth: " << sBitDepth[txBitDepth] << endl
3749 <<
"Src Color Sampling: " << sSrcSampling[srcSampling] << endl
3750 <<
"Src Bits Per Component: " << sBitDepth[srcBPC] << endl
3751 <<
"Output Range: " << ((inRegValue &
BIT(28)) ?
"Full" :
"SMPTE") << endl
3752 <<
"Audio Channels: " << ((inRegValue &
BIT(29)) ?
"8" :
"2") << endl
3753 <<
"Output: " << ((inRegValue &
BIT(30)) ?
"DVI" :
"HDMI");
3756 <<
"Audio Loopback: " <<
OnOff(inRegValue &
BIT(31));
3759 } mDecodeHDMIOutputControl;
3761 struct DecodeHDMIInputStatus :
public Decoder
3763 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3770 static const string sStds[32] = {
"1080i",
"720p",
"480i",
"576i",
"1080p",
"SXGA",
"2K1080p",
"2K1080i",
"3840p",
"4096p"};
3771 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" };
3772 oss <<
"HDMI Input: " << (inRegValue &
BIT(0) ?
"Locked" :
"Unlocked") << endl
3773 <<
"HDMI Input: " << (inRegValue &
BIT(1) ?
"Stable" :
"Unstable") << endl
3774 <<
"Color Mode: " << (inRegValue &
BIT(2) ?
"RGB" :
"YCbCr") << endl
3775 <<
"Bitdepth: " << (inRegValue &
BIT(3) ?
"10-bit" :
"8-bit") << endl
3776 <<
"Audio Channels: " << (inRegValue &
BIT(12) ? 2 : 8) << endl
3777 <<
"Scan Mode: " << (inRegValue &
BIT(13) ?
"Progressive" :
"Interlaced") << endl
3778 <<
"Standard: " << (inRegValue &
BIT(14) ?
"SD" :
"HD") << endl
3779 <<
"Video Standard: " << sStds[vidStd] << endl
3780 <<
"Protocol: " << (inRegValue &
BIT(27) ?
"DVI" :
"HDMI") << endl
3781 <<
"Video Rate : " << (rate < 11 ? sRates[rate] :
string(
"invalid"));
3784 } mDecodeHDMIInputStatus;
3786 struct DecodeHDMIInputControl :
public Decoder
3788 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3790 (
void) inRegNum; (
void) inDeviceID;
3792 const UWord chanPair ((inRegValue & (
BIT(2) |
BIT(3))) >> 2);
3794 const UWord txCh12Sel ((inRegValue & (
BIT(29)|
BIT(30))) >> 29);
3796 oss <<
"HDMI In EDID Write-Enable: " <<
EnabDisab(inRegValue &
BIT(0)) << endl
3797 <<
"HDMI Force Output Params: " <<
SetNotset(inRegValue &
BIT(1)) << endl
3799 <<
"hdmi_rx_8ch_src_off: " <<
YesNo(inRegValue &
BIT(4)) << endl
3800 <<
"Swap HDMI In Audio Ch. 3/4: " <<
YesNo(inRegValue &
BIT(5)) << endl
3801 <<
"Swap HDMI Out Audio Ch. 3/4: " <<
YesNo(inRegValue &
BIT(6)) << endl
3802 <<
"HDMI Prefer 420: " <<
SetNotset(inRegValue &
BIT(7)) << endl
3803 <<
"hdmi_rx_spdif_err: " <<
SetNotset(inRegValue &
BIT(8)) << endl
3804 <<
"hdmi_rx_afifo_under: " <<
SetNotset(inRegValue &
BIT(9)) << endl
3805 <<
"hdmi_rx_afifo_empty: " <<
SetNotset(inRegValue &
BIT(10)) << endl
3806 <<
"H polarity: " << (inRegValue &
BIT(16) ?
"Inverted" :
"Normal") << endl
3807 <<
"V polarity: " << (inRegValue &
BIT(17) ?
"Inverted" :
"Normal") << endl
3808 <<
"F polarity: " << (inRegValue &
BIT(18) ?
"Inverted" :
"Normal") << endl
3809 <<
"DE polarity: " << (inRegValue &
BIT(19) ?
"Inverted" :
"Normal") << endl
3810 <<
"Tx Src Sel: " <<
DEC(txSrcSel) <<
" (" <<
xHEX0N(txSrcSel,4) <<
")" << endl
3811 <<
"Tx Center Cut: " <<
SetNotset(inRegValue &
BIT(24)) << endl
3812 <<
"Tx 12 bit: " <<
SetNotset(inRegValue &
BIT(26)) << endl
3813 <<
"RGB Input Gamut: " << (inRegValue &
BIT(28) ?
"Full Range" :
"Narrow Range (SMPTE)") << endl
3814 <<
"Tx_ch12_sel: " <<
DEC(txCh12Sel) <<
" (" <<
xHEX0N(txCh12Sel,4) <<
")" << endl
3815 <<
"Input AVI Gamut: " << (inRegValue &
BIT(31) ?
"Full Range" :
"Narrow Range (SMPTE)") << endl
3819 } mDecodeHDMIInputControl;
3821 struct DecodeHDMIOutputStatus :
public Decoder
3823 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3824 { (
void) inRegNum; (
void) inDeviceID;
3830 } mDecodeHDMIOutputStatus;
3832 struct DecodeHDMIOutHDRPrimary :
public Decoder
3834 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3870 const double xFloat (
double(xPrimary) * 0.00002);
3871 const double yFloat (
double(yPrimary) * 0.00002);
3873 oss <<
"X: " <<
fDEC(xFloat,7,5) << endl;
3875 oss <<
"X: " <<
HEX0N(xPrimary, 4) <<
"(invalid)" << endl;
3877 oss <<
"Y: " <<
fDEC(yFloat,7,5);
3879 oss <<
"Y: " <<
HEX0N(yPrimary, 4) <<
"(invalid)";
3890 const double minFloat (
double(minValue) * 0.00001);
3891 const double maxFloat (maxValue);
3892 oss <<
"Min: " <<
fDEC(minFloat,7,5) << endl
3893 <<
"Max: " <<
fDEC(maxFloat,7,5);
3904 const double cntFloat (cntValue);
3905 const double frmFloat (frmValue);
3906 oss <<
"Max Content Light Level: " <<
fDEC(cntFloat,7,5) << endl
3907 <<
"Max Frame Light Level: " <<
fDEC(frmFloat,7,5);
3914 } mDecodeHDMIOutHDRPrimary;
3916 struct DecodeHDMIOutHDRControl :
public Decoder
3918 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3921 static const string sEOTFs[] = {
"Trad Gamma SDR",
"Trad Gamma HDR",
"SMPTE ST 2084",
"HLG"};
3930 <<
"EOTF: " << sEOTFs[(EOTFvalue < 3) ? EOTFvalue : 3] << endl
3931 <<
"Static MetaData Desc ID: " <<
HEX0N(staticMetaDataDescID, 2) <<
" (" <<
DEC(staticMetaDataDescID) <<
")";
3935 } mDecodeHDMIOutHDRControl;
3937 struct DecodeHDMIOutMRControl :
public Decoder
3939 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3940 { (
void) inRegNum; (
void) inDeviceID;
3942 static const string sMRStandard[] = {
"1080i",
"720p",
"480i",
"576i",
"1080p",
"1556i",
"2Kx1080p",
"2Kx1080i",
"UHD",
"4K",
"",
"",
"",
"",
"",
"" };
3944 const string hdmiVidStdStr (sMRStandard[rawVideoStd]);
3946 oss <<
"Video Standard: " << hdmiVidStdStr;
3947 if (hdmiVidStdStr != vidStdStr)
3948 oss <<
" (" << vidStdStr <<
")";
3950 <<
"Capture Mode: " << ((inRegValue &
kRegMaskMREnable) ?
"Enabled" :
"Disabled");
3953 } mDecodeHDMIOutMRControl;
3955 struct DecodeSDIOutputControl :
public Decoder
3957 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3962 const uint32_t vidStd (inRegValue & (
BIT(0)|
BIT(1)|
BIT(2)));
3963 static const string sStds[32] = {
"1080i",
"720p",
"480i",
"576i",
"1080p",
"1556i",
"6",
"7"};
3964 oss <<
"Video Standard: " << sStds[vidStd] << endl
3965 <<
"2Kx1080 mode: " << (inRegValue &
BIT(3) ?
"2048x1080" :
"1920x1080") << endl
3966 <<
"HBlank RGB Range: Black=" << (inRegValue &
BIT(7) ?
"0x40" :
"0x04") << endl
3967 <<
"12G enable: " <<
YesNo(inRegValue &
BIT(17)) << endl
3968 <<
"6G enable: " <<
YesNo(inRegValue &
BIT(16)) << endl
3969 <<
"3G enable: " <<
YesNo(inRegValue &
BIT(24)) << endl
3970 <<
"3G mode: " << (inRegValue &
BIT(25) ?
"b" :
"a") << endl
3971 <<
"VPID insert enable: " <<
YesNo(inRegValue &
BIT(26)) << endl
3972 <<
"VPID overwrite enable: " <<
YesNo(inRegValue &
BIT(27)) << endl
3973 <<
"DS 1 audio source: " "AudSys";
3974 switch ((inRegValue & (
BIT(28)|
BIT(30))) >> 28)
3976 case 0: oss << (inRegValue &
BIT(18) ? 5 : 1);
break;
3977 case 1: oss << (inRegValue &
BIT(18) ? 7 : 3);
break;
3978 case 4: oss << (inRegValue &
BIT(18) ? 6 : 2);
break;
3979 case 5: oss << (inRegValue &
BIT(18) ? 8 : 4);
break;
3981 oss << endl <<
"DS 2 audio source: AudSys";
3982 switch ((inRegValue & (
BIT(29)|
BIT(31))) >> 29)
3984 case 0: oss << (inRegValue &
BIT(19) ? 5 : 1);
break;
3985 case 1: oss << (inRegValue &
BIT(19) ? 7 : 3);
break;
3986 case 4: oss << (inRegValue &
BIT(19) ? 6 : 2);
break;
3987 case 5: oss << (inRegValue &
BIT(19) ? 8 : 4);
break;
3991 } mDecodeSDIOutputControl;
3993 struct DecodeSDIOutTimingCtrl :
public Decoder
3995 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3996 { (
void)inRegNum; (
void)inDeviceID;
3998 const uint32_t hMask(0x00001FFF), vMask(0x1FFF0000);
3999 const uint32_t hOffset(inRegValue & hMask), vOffset((inRegValue & vMask) >> 16);
4000 oss <<
"Horz Offset: " <<
xHEX0N(
UWord(hOffset),4) << endl
4001 <<
"Vert Offset: " <<
xHEX0N(
UWord(vOffset),4) << endl
4002 <<
"E-E Timing Override: " <<
EnabDisab(inRegValue &
BIT(31));
4005 } mDecodeSDIOutTimingCtrl;
4007 struct DecodeDMAControl :
public Decoder
4009 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4013 const uint16_t gen ((inRegValue & (
BIT(20)|
BIT(21)|
BIT(22)|
BIT(23))) >> 20);
4014 const uint16_t lanes ((inRegValue & (
BIT(16)|
BIT(17)|
BIT(18)|
BIT(19))) >> 16);
4015 const uint16_t fwRev ((inRegValue & 0x0000FF00) >> 8);
4017 for (uint16_t engine(0); engine < 4; engine++)
4018 oss <<
"DMA " << (engine+1) <<
" Int Active?: " <<
YesNo(inRegValue &
BIT(27+engine)) << endl;
4019 oss <<
"Bus Error Int Active?: " <<
YesNo(inRegValue &
BIT(31)) << endl;
4020 for (uint16_t engine(0); engine < 4; engine++)
4021 oss <<
"DMA " << (engine+1) <<
" Busy?: " <<
YesNo(inRegValue &
BIT(27+engine)) << endl;
4022 oss <<
"Strap: " << ((inRegValue &
BIT(7)) ?
"Installed" :
"Not Installed") << endl
4023 <<
"Firmware Rev: " <<
xHEX0N(fwRev, 2) <<
" (" <<
DEC(fwRev) <<
")" << endl
4024 <<
"Gen: " << gen << ((gen > 0 && gen < 4) ?
"" :
" <invalid>") << endl
4025 <<
"Lanes: " <<
DEC(lanes) << ((lanes < 9) ?
"" :
" <invalid>");
4028 } mDMAControlRegDecoder;
4030 struct DecodeDMAIntControl :
public Decoder
4032 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4037 for (uint16_t eng(0); eng < 4; eng++)
4038 oss <<
"DMA " << (eng+1) <<
" Enabled?: " <<
YesNo(inRegValue &
BIT(eng)) << endl;
4039 oss <<
"Bus Error Enabled?: " <<
YesNo(inRegValue &
BIT(4)) << endl;
4040 for (uint16_t eng(0); eng < 4; eng++)
4041 oss <<
"DMA " << (eng+1) <<
" Active?: " <<
YesNo(inRegValue &
BIT(27+eng)) << endl;
4042 oss <<
"Bus Error: " <<
YesNo(inRegValue &
BIT(31));
4045 } mDMAIntControlRegDecoder;
4047 struct DecodeDMAXferRate :
public Decoder
4049 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4050 { (
void) inRegNum; (
void) inDeviceID;
4052 oss <<
DEC(inRegValue) <<
" [MB/sec] [kB/ms] [B/us]";
4055 } mDMAXferRateRegDecoder;
4057 struct DecodeRP188InOutDBB :
public Decoder
4059 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4063 const bool isReceivingRP188 (inRegValue &
BIT(16));
4064 const bool isReceivingSelectedRP188 (inRegValue &
BIT(17));
4065 const bool isReceivingLTC (inRegValue &
BIT(18));
4066 const bool isReceivingVITC (inRegValue &
BIT(19));
4068 oss <<
"RP188: " << (isReceivingRP188 ? (isReceivingSelectedRP188 ?
"Selected" :
"Unselected") :
"No") <<
" RP-188 received" 4069 << (isReceivingLTC ?
" +LTC" :
"") << (isReceivingVITC ?
" +VITC" :
"") << endl
4070 <<
"Bypass: " << (inRegValue &
BIT(23) ? (inRegValue &
BIT(22) ?
"SDI In 2" :
"SDI In 1") :
"Disabled") << endl
4071 <<
"Filter: " <<
HEX0N((inRegValue & 0xFF000000) >> 24, 2) << endl
4072 <<
"DBB: " <<
HEX0N((inRegValue & 0x0000FF00) >> 8, 2) <<
" " <<
HEX0N(inRegValue & 0x000000FF, 2);
4075 } mRP188InOutDBBRegDecoder;
4077 struct DecodeVidProcControl :
public Decoder
4079 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4084 static const string sSplitStds [8] = {
"1080i",
"720p",
"480i",
"576i",
"1080p",
"1556i",
"?6?",
"?7?"};
4085 oss <<
"Mode: " << (inRegValue &
kRegMaskVidProcMode ? ((inRegValue &
BIT(24)) ?
"Shaped" :
"Unshaped") :
"Full Raster") << endl
4086 <<
"FG Control: " << (inRegValue &
kRegMaskVidProcFGControl ? ((inRegValue &
BIT(20)) ?
"Shaped" :
"Unshaped") :
"Full Raster") << endl
4087 <<
"BG Control: " << (inRegValue &
kRegMaskVidProcBGControl ? ((inRegValue &
BIT(22)) ?
"Shaped" :
"Unshaped") :
"Full Raster") << endl
4088 <<
"VANC Pass-Thru: " << ((inRegValue &
BIT(13)) ?
"Background" :
"Foreground") << endl
4092 <<
"Limiting: " << ((inRegValue &
BIT(11)) ?
"Off" : ((inRegValue &
BIT(12)) ?
"Legal Broadcast" :
"Legal SDI")) << endl
4096 } mVidProcControlRegDecoder;
4098 struct DecodeSplitControl :
public Decoder
4100 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4105 const uint32_t startmask (0x0000FFFF);
4106 const uint32_t slopemask (0x3FFF0000);
4107 const uint32_t fractionmask(0x00000007);
4108 oss <<
"Split Start: " <<
HEX0N((inRegValue & startmask) & ~fractionmask, 4) <<
" " 4109 <<
HEX0N((inRegValue & startmask) & fractionmask, 4) << endl
4110 <<
"Split Slope: " <<
HEX0N(((inRegValue & slopemask) >> 16) & ~fractionmask, 4) <<
" " 4111 <<
HEX0N(((inRegValue & slopemask) >> 16) & fractionmask, 4) << endl
4112 <<
"Split Type: " << ((inRegValue &
BIT(30)) ?
"Vertical" :
"Horizontal");
4115 } mSplitControlRegDecoder;
4117 struct DecodeFlatMatteValue :
public Decoder
4119 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4124 const uint32_t mask (0x000003FF);
4125 oss <<
"Flat Matte Cb: " <<
HEX0N(inRegValue & mask, 3) << endl
4126 <<
"Flat Matte Y: " <<
HEX0N(((inRegValue >> 10) & mask) - 0x40, 3) << endl
4127 <<
"Flat Matte Cr: " <<
HEX0N((inRegValue >> 20) & mask, 3);
4130 } mFlatMatteValueRegDecoder;
4132 struct DecodeEnhancedCSCMode :
public Decoder
4134 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4138 static const string sFiltSel[] = {
"Full",
"Simple",
"None",
"?"};
4139 static const string sEdgeCtrl[] = {
"black",
"extended pixels"};
4140 static const string sPixFmts[] = {
"RGB 4:4:4",
"YCbCr 4:4:4",
"YCbCr 4:2:2",
"?"};
4141 const uint32_t filterSelect ((inRegValue >> 12) & 0x3);
4142 const uint32_t edgeControl ((inRegValue >> 8) & 0x1);
4143 const uint32_t outPixFmt ((inRegValue >> 4) & 0x3);
4144 const uint32_t inpPixFmt (inRegValue & 0x3);
4146 oss <<
"Filter select: " << sFiltSel[filterSelect] << endl
4147 <<
"Filter edge control: " <<
"Filter to " << sEdgeCtrl[edgeControl] << endl
4148 <<
"Output pixel format: " << sPixFmts[outPixFmt] << endl
4149 <<
"Input pixel format: " << sPixFmts[inpPixFmt];
4152 } mEnhCSCModeDecoder;
4154 struct DecodeEnhancedCSCOffset :
public Decoder
4156 static string U10Dot6ToFloat (
const uint32_t inOffset)
4158 double result (
double((inOffset >> 6) & 0x3FF));
4159 result += double(inOffset & 0x3F) / 64.0;
4160 ostringstream oss; oss <<
fDEC(result,12,5);
string resultStr(oss.str());
4163 static string U12Dot4ToFloat (
const uint32_t inOffset)
4165 double result (
double((inOffset >> 4) & 0xFFF));
4166 result += double(inOffset & 0xF) / 16.0;
4167 ostringstream oss; oss <<
fDEC(result,12,4);
string resultStr(oss.str());
4170 static string S13Dot2ToFloat (
const uint32_t inOffset)
4172 double result (
double((inOffset >> 2) & 0x1FFF));
4173 result += double(inOffset & 0x3) / 4.0;
4174 if (inOffset &
BIT(15))
4176 ostringstream oss; oss <<
fDEC(result,12,2);
string resultStr(oss.str());
4179 static string S11Dot4ToFloat (
const uint32_t inOffset)
4181 double result (
double((inOffset >> 4) & 0x7FF));
4182 result += double(inOffset & 0xF) / 16.0;
4183 if (inOffset &
BIT(15))
4185 ostringstream oss; oss <<
fDEC(result,12,4);
string resultStr(oss.str());
4188 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4191 const uint32_t regNum (inRegNum & 0x1F);
4192 const uint32_t lo (inRegValue & 0x0000FFFF);
4193 const uint32_t hi ((inRegValue >> 16) & 0xFFFF);
4197 case 1: oss <<
"Component 0 input offset: " << U12Dot4ToFloat(lo) <<
" (12-bit), " << U10Dot6ToFloat(lo) <<
" (10-bit)" << endl
4198 <<
"Component 1 input offset: " << U12Dot4ToFloat(hi) <<
" (12-bit), " << U10Dot6ToFloat(hi) <<
" (10-bit)";
4200 case 2: oss <<
"Component 2 input offset: " << U12Dot4ToFloat(lo) <<
" (12-bit), " << U10Dot6ToFloat(lo) <<
" (10-bit)";
4202 case 12: oss <<
"Component A output offset: " << U12Dot4ToFloat(lo) <<
" (12-bit), " << U10Dot6ToFloat(lo) <<
" (10-bit)" << endl
4203 <<
"Component B output offset: " << U12Dot4ToFloat(hi) <<
" (12-bit), " << U10Dot6ToFloat(hi) <<
" (10-bit)";
4205 case 13: oss <<
"Component C output offset: " << U12Dot4ToFloat(lo) <<
" (12-bit), " << U10Dot6ToFloat(lo) <<
" (10-bit)";
4207 case 15: oss <<
"Key input offset: " << S13Dot2ToFloat(lo) <<
" (12-bit), " << S11Dot4ToFloat(lo) <<
" (10-bit)" << endl
4208 <<
"Key output offset: " << U12Dot4ToFloat(hi) <<
" (12-bit), " << U10Dot6ToFloat(hi) <<
" (10-bit)";
4214 } mEnhCSCOffsetDecoder;
4216 struct DecodeEnhancedCSCKeyMode :
public Decoder
4218 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4222 static const string sSrcSel[] = {
"Key Input",
"Video Y Input"};
4223 static const string sRange[] = {
"Full Range",
"SMPTE Range"};
4224 const uint32_t keySrcSelect (inRegValue & 0x1);
4225 const uint32_t keyOutRange ((inRegValue >> 4) & 0x1);
4227 oss <<
"Key Source Select: " << sSrcSel[keySrcSelect] << endl
4228 <<
"Key Output Range: " << sRange[keyOutRange];
4231 } mEnhCSCKeyModeDecoder;
4233 struct DecodeEnhancedCSCCoefficient :
public Decoder
4235 static string S2Dot15ToFloat (
const uint32_t inCoefficient)
4237 double result = (double((inCoefficient >> 15) & 0x3));
4238 result += double(inCoefficient & 0x7FFF) / 32768.0;
4239 if (inCoefficient &
BIT(17))
4241 ostringstream oss; oss <<
fDEC(result,12,10);
string resultStr(oss.str());
4244 static string S12Dot12ToFloat (
const uint32_t inCoefficient)
4246 double result(
double((inCoefficient >> 12) & 0xFFF));
4247 result += double(inCoefficient & 0xFFF) / 4096.0;
4248 if (inCoefficient &
BIT(24))
4250 ostringstream oss; oss <<
fDEC(result,12,6);
string resultStr(oss.str());
4253 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4256 uint32_t regNum (inRegNum & 0x1F);
4258 if (regNum > 2 && regNum < 12)
4261 static const string sCoeffNames[] = {
"A0",
"A1",
"A2",
"B0",
"B1",
"B2",
"C0",
"C1",
"C2"};
4262 const uint32_t coeff ((inRegValue >> 9) & 0x0003FFFF);
4263 oss << sCoeffNames[regNum] <<
" coefficient: " << S2Dot15ToFloat(coeff) <<
" (" <<
xHEX0N(coeff,8) <<
")";
4265 else if (regNum == 16)
4267 const uint32_t gain ((inRegValue >> 4) & 0x01FFFFFF);
4268 oss <<
"Key gain: " << S12Dot12ToFloat(gain) <<
" (" <<
HEX0N(gain,8) <<
")";
4272 } mEnhCSCCoeffDecoder;
4274 struct DecodeCSCoeff1234 :
public Decoder
4276 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4279 const uint32_t coeff1 (((inRegValue >> 11) & 0x00000003) | uint32_t(inRegValue & 0x000007FF));
4280 const uint32_t coeff2 ((inRegValue >> 14) & 0x00001FFF);
4281 uint16_t nCoeff1(1), nCoeff2(2);
4286 nCoeff1 = 3; nCoeff2 = 4;
break;
4302 oss <<
"Video Key Sync Status: " << (inRegValue &
BIT(28) ?
"SyncFail" :
"OK") << endl
4303 <<
"Make Alpha From Key Input: " <<
EnabDisab(inRegValue &
BIT(29)) << endl
4304 <<
"Matrix Select: " << (inRegValue &
BIT(30) ?
"Rec601" :
"Rec709") << endl
4305 <<
"Use Custom Coeffs: " <<
YesNo(inRegValue &
BIT(31)) << endl;
4307 oss <<
"RGB Range: " << (inRegValue &
BIT(31) ?
"SMPTE (0x040-0x3C0)" :
"Full (0x000-0x3FF)") << endl;
4308 oss <<
"Coefficient" <<
DEC(nCoeff1) <<
": " <<
xHEX0N(coeff1, 4) << endl
4309 <<
"Coefficient" <<
DEC(nCoeff2) <<
": " <<
xHEX0N(coeff2, 4);
4312 } mCSCoeff1234Decoder;
4314 struct DecodeCSCoeff567890 :
public Decoder
4316 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4319 const uint32_t coeff5 (((inRegValue >> 11) & 0x00000003) | uint32_t(inRegValue & 0x000007FF));
4320 const uint32_t coeff6 ((inRegValue >> 14) & 0x00001FFF);
4321 uint16_t nCoeff5(5), nCoeff6(6);
4326 nCoeff5 = 7; nCoeff6 = 8;
break;
4329 nCoeff5 = 9; nCoeff6 = 10;
break;
4339 oss <<
"Coefficient" <<
DEC(nCoeff5) <<
": " <<
xHEX0N(coeff5, 4) << endl
4340 <<
"Coefficient" <<
DEC(nCoeff6) <<
": " <<
xHEX0N(coeff6, 4);
4343 } mCSCoeff567890Decoder;
4345 struct DecodeLUTV1ControlReg :
public Decoder
4347 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4348 {
static const string sModes[] = {
"Off",
"RGB",
"YCbCr",
"3-Way",
"Invalid"};
4361 if (lutVersion != 1)
4362 oss <<
"(Register data relevant for V1 LUT, this device has V" <<
DEC(lutVersion) <<
" LUT)";
4365 oss <<
"LUT Saturation Value: " <<
xHEX0N(saturation,4) <<
" (" <<
DEC(saturation) <<
")" << endl
4366 <<
"LUT Output Bank Select: " <<
SetNotset(outBankSelect) << endl
4367 <<
"LUT Mode: " << sModes[mode] <<
" (" <<
DEC(mode) <<
")";
4370 <<
"LUT5 Host Bank Select: " <<
SetNotset(cc5HostBank) << endl
4371 <<
"LUT5 Output Bank Select: " <<
SetNotset(cc5OutputBank) << endl
4372 <<
"LUT5 Select: " <<
SetNotset(cc5Select) << endl
4373 <<
"Config 2nd LUT Set: " <<
YesNo(ccConfig2);
4376 <<
"LUT3 Bank Select: " <<
SetNotset(cc3BankSel) << endl
4377 <<
"LUT4 Bank Select: " <<
SetNotset(cc4BankSel);
4380 } mLUTV1ControlRegDecoder;
4382 struct DecodeLUTV2ControlReg :
public Decoder
4384 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4388 if (lutVersion != 2)
4389 oss <<
"(Register data relevant for V2 LUT, this device has V" <<
DEC(lutVersion) <<
"LUT)";
4392 for (
UWord lutNum(0); lutNum < 8; lutNum++)
4393 oss <<
"LUT" <<
DEC(lutNum+1) <<
" Enabled: " << (
YesNo(inRegValue & (1<<lutNum))) << endl
4394 <<
"LUT" <<
DEC(lutNum+1) <<
" Host Access Bank Select: " << (inRegValue & (1<<(lutNum+8)) ?
'1' :
'0') << endl
4395 <<
"LUT" <<
DEC(lutNum+1) <<
" Output Bank Select: " << (inRegValue & (1<<(lutNum+16)) ?
'1' :
'0') << endl;
4396 oss <<
"12-Bit LUT mode: " << ((inRegValue &
BIT(28)) ?
"12-bit" :
"10-bit") << endl
4397 <<
"12-Bit LUT page reg: " <<
DEC(
UWord((inRegValue & (
BIT(24)|
BIT(25))) >> 24));
4401 } mLUTV2ControlRegDecoder;
4403 struct DecodeLUT :
public Decoder
4405 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4409 const bool isRed(inRegNum >= RedReg && inRegNum < GreenReg), isGreen(inRegNum >= GreenReg && inRegNum < BlueReg), isBlue(inRegNum>=BlueReg);
4415 const string label(isRed ?
"Red[" : (isGreen ?
"Green[" :
"Blue["));
4416 const ULWord ndx((inRegNum - (isRed ? RedReg : (isGreen ? GreenReg : BlueReg))) * 2);
4419 oss << label <<
DEC0N(ndx+0,3) <<
"]: " <<
DEC0N(lo,3) << endl
4420 << label <<
DEC0N(ndx+1,3) <<
"]: " <<
DEC0N(hi,3);
4425 struct DecodeSDIErrorStatus :
public Decoder
4427 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4433 oss <<
"Unlock Tally: " <<
DEC(inRegValue & 0x7FFF) << endl
4434 <<
"Locked: " <<
YesNo(inRegValue &
BIT(16)) << endl
4435 <<
"Link A VPID Valid: " <<
YesNo(inRegValue &
BIT(20)) << endl
4436 <<
"Link B VPID Valid: " <<
YesNo(inRegValue &
BIT(21)) << endl
4437 <<
"TRS Error Detected: " <<
YesNo(inRegValue &
BIT(24));
4440 } mSDIErrorStatusRegDecoder;
4442 struct DecodeSDIErrorCount :
public Decoder
4444 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4450 oss <<
"Link A: " <<
DEC(inRegValue & 0x0000FFFF) << endl
4451 <<
"Link B: " <<
DEC((inRegValue & 0xFFFF0000) >> 16);
4454 } mSDIErrorCountRegDecoder;
4456 struct DecodeDriverVersion :
public Decoder
4458 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4459 { (
void) inDeviceID;
4463 ULWord buildType((inRegValue >> 30) & 0x00000003);
4464 static const string sBuildTypes[] = {
"Release",
"Beta",
"Alpha",
"Development"};
4465 static const string sBldTypes[] = {
"",
"b",
"a",
"d"};
4467 oss <<
"Driver Version: " <<
DEC(vMaj) <<
"." <<
DEC(vMin) <<
"." <<
DEC(vDot);
4468 if (buildType) oss << sBldTypes[buildType] <<
DEC(vBld);
4470 <<
"Major Version: " <<
DEC(vMaj) << endl
4471 <<
"Minor Version: " <<
DEC(vMin) << endl
4472 <<
"Point Version: " <<
DEC(vDot) << endl
4473 <<
"Build Type: " << sBuildTypes[buildType] << endl
4474 <<
"Build Number: " <<
DEC(vBld);
4477 } mDriverVersionDecoder;
4479 struct DecodeFourCC :
public Decoder
4481 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4482 { (
void) inDeviceID; (
void) inRegNum;
4483 char ch;
string str4cc;
4484 ch = char((inRegValue & 0xFF000000) >> 24);
4485 str4cc += ::isprint(ch) ? ch :
'?';
4486 ch = char((inRegValue & 0x00FF0000) >> 16);
4487 str4cc += ::isprint(ch) ? ch :
'?';
4488 ch = char((inRegValue & 0x0000FF00) >> 8);
4489 str4cc += ::isprint(ch) ? ch :
'?';
4490 ch = char((inRegValue & 0x000000FF) >> 0);
4491 str4cc += ::isprint(ch) ? ch :
'?';
4494 oss <<
"'" << str4cc <<
"'";
4499 struct DecodeDriverType :
public Decoder
4501 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4502 { (
void) inDeviceID; (
void) inRegNum;
4505 if (inRegValue == 0x44455854)
4506 oss <<
"DriverKit ('DEXT')";
4507 else if (inRegValue)
4508 oss <<
"(Unknown/Invalid " <<
xHEX0N(inRegValue,8) <<
")";
4510 oss <<
"Kernel Extension ('KEXT')";
4517 } mDecodeDriverType;
4518 struct DecodeVDevReady :
public Decoder
4520 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4521 { (
void) inDeviceID; (
void) inRegNum;
4525 oss <<
"VDev will set ";
4527 oss <<
"register " <<
DEC(inRegValue);
4530 oss <<
" when 'IsReady'";
4536 struct DecodeIDSwitchStatus :
public Decoder
4538 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4543 const uint32_t switchEnableBits (((inRegValue & 0x0F000000) >> 20) | ((inRegValue & 0xF0000000) >> 28));
4544 for (
UWord idSwitch(0); idSwitch < 4; )
4546 const uint32_t switchEnabled (switchEnableBits &
BIT(idSwitch));
4547 oss <<
"Switch " <<
DEC(++idSwitch) <<
": " << (switchEnabled ?
"Enabled" :
"Disabled");
4554 oss <<
"(ID Switch not supported)";
4559 } mDecodeIDSwitchStatus;
4561 struct DecodePWMFanControl :
public Decoder
4563 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4571 } mDecodePWMFanControl;
4573 struct DecodePWMFanMonitor :
public Decoder
4575 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4583 } mDecodePWMFanMonitor;
4585 struct DecodeBOBStatus :
public Decoder
4587 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4591 oss <<
"Break Out Board: " << ((inRegValue &
kRegMaskBOBAbsent) ?
"Disconnected" :
"Connected") << endl
4595 oss <<
"Device does not support a breakout board";
4600 struct DecodeBOBGPIIn :
public Decoder
4602 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4611 oss <<
"Device does not support a breakout board";
4616 struct DecodeBOBGPIInInterruptControl :
public Decoder
4618 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4627 oss <<
"Device does not support a breakout board";
4630 } mDecodeBOBGPIInInterruptControl;
4632 struct DecodeBOBGPIOut :
public Decoder
4634 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4643 oss <<
"Device does not support a breakout board";
4648 struct DecodeBOBAudioControl :
public Decoder
4650 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4659 dBuLabel =
"+24dBu";
4662 dBuLabel =
"+18dBu";
4665 dBuLabel =
"+12dBu";
4668 dBuLabel =
"+15dBu";
4673 <<
"Analog Level Control: " << dBuLabel << endl
4677 oss <<
"Device does not support a breakout board";
4680 } mDecodeBOBAudioControl;
4682 struct DecodeLEDControl :
public Decoder
4684 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4692 oss <<
"Device does not support a breakout board";
4695 } mDecodeLEDControl;
4697 static const int NOREADWRITE = 0;
4698 static const int READONLY = 1;
4699 static const int WRITEONLY = 2;
4700 static const int READWRITE = 3;
4702 static const int CONTAINS = 0;
4703 static const int STARTSWITH = 1;
4704 static const int ENDSWITH = 2;
4705 static const int EXACTMATCH = 3;
4707 typedef map <uint32_t, const Decoder *> RegNumToDecoderMap;
4708 typedef pair <uint32_t, const Decoder *> RegNumToDecoderPair;
4709 typedef multimap <string, uint32_t> RegClassToRegNumMMap, StringToRegNumMMap;
4710 typedef pair <string, uint32_t> StringToRegNumPair;
4711 typedef RegClassToRegNumMMap::const_iterator RegClassToRegNumConstIter;
4712 typedef StringToRegNumMMap::const_iterator StringToRegNumConstIter;
4714 typedef pair <uint32_t, uint32_t> XptRegNumAndMaskIndex;
4715 typedef map <NTV2InputCrosspointID, XptRegNumAndMaskIndex> InputXpt2XptRegNumMaskIndexMap;
4716 typedef map <XptRegNumAndMaskIndex, NTV2InputCrosspointID> XptRegNumMaskIndex2InputXptMap;
4717 typedef InputXpt2XptRegNumMaskIndexMap::const_iterator InputXpt2XptRegNumMaskIndexMapConstIter;
4718 typedef XptRegNumMaskIndex2InputXptMap::const_iterator XptRegNumMaskIndex2InputXptMapConstIter;
4722 RegNumToStringMap mRegNumToStringMap;
4723 RegNumToDecoderMap mRegNumToDecoderMap;
4724 RegClassToRegNumMMap mRegClassToRegNumMMap;
4725 StringToRegNumMMap mStringToRegNumMMap;
4727 InputXpt2XptRegNumMaskIndexMap mInputXpt2XptRegNumMaskIndexMap;
4728 XptRegNumMaskIndex2InputXptMap mXptRegNumMaskIndex2InputXptMap;
4758 return pInst ?
true :
false;
4765 return pInst ?
true :
false;
4772 return pInst ? pInst->DisposeInstance() :
false;
4780 return pRegExpert->RegNameToString(inRegNum);
4782 ostringstream oss; oss <<
"Reg ";
4784 oss <<
DEC(inRegNum);
4785 else if (inRegNum <= 0x0000FFFF)
4786 oss <<
xHEX0N(inRegNum,4);
4788 oss <<
xHEX0N(inRegNum,8);
4796 return pRegExpert ? pRegExpert->RegValueToString(inRegNum, inRegValue, inDeviceID) : string();
4803 return pRegExpert ? pRegExpert->IsRegInClass(inRegNum, inClassName) :
false;
4810 return pRegExpert ? pRegExpert->GetAllRegisterClasses() :
NTV2StringSet();
4817 return pRegExpert ? pRegExpert->GetRegisterClasses(inRegNum, inRemovePrefix) :
NTV2StringSet();
4824 return pRegExpert ? pRegExpert->GetRegistersForClass(inClassName) :
NTV2RegNumSet();
4838 return pRegExpert ? pRegExpert->GetRegistersForDevice(inDeviceID, inOtherRegsToInclude) :
NTV2RegNumSet();
4845 return pRegExpert ? pRegExpert->GetRegistersWithName(inName, inSearchStyle) :
NTV2RegNumSet();
4859 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
NTV2StringSet::const_iterator NTV2StringSetConstIter
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)
std::set< std::string > NTV2StringSet
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)
#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.
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__)
std::vector< std::string > NTV2StringList
#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
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