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();
161 REiDBG(
"RegsToStrsMap=" << mRegNumToStringMap.size()
162 <<
" RegsToDecodersMap=" << mRegNumToDecoderMap.size()
163 <<
" ClassToRegsMMap=" << mRegClassToRegNumMMap.size()
164 <<
" StrToRegsMMap=" << mStringToRegNumMMap.size()
165 <<
" InpXptsToXptRegInfoMap=" << mInputXpt2XptRegNumMaskIndexMap.size()
166 <<
" XptRegInfoToInpXptsMap=" << mXptRegNumMaskIndex2InputXptMap.size()
167 <<
" RegClasses=" << mAllRegClasses.size());
183 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 190 } mDefaultRegDecoder;
192 void DefineRegName(
const uint32_t regNumber,
const string & regName)
194 if (!regName.empty())
197 if (mRegNumToStringMap.find(regNumber) == mRegNumToStringMap.end())
199 mRegNumToStringMap.insert (RegNumToStringPair(regNumber, regName));
200 string lowerCaseRegName(regName);
201 mStringToRegNumMMap.insert (StringToRegNumPair(
aja::lower(lowerCaseRegName), regNumber));
205 inline void DefineRegDecoder(
const uint32_t inRegNum,
const Decoder & dec)
208 mRegNumToDecoderMap.insert (RegNumToDecoderPair(inRegNum, &dec));
210 inline void DefineRegClass (
const uint32_t inRegNum,
const string & className)
212 if (!className.empty())
215 mRegClassToRegNumMMap.insert(StringToRegNumPair(className, inRegNum));
218 void DefineRegReadWrite(
const uint32_t inRegNum,
const int rdWrt)
221 if (rdWrt == READONLY)
226 if (rdWrt == WRITEONLY)
232 void DefineRegister(
const uint32_t inRegNum,
const string & regName,
const Decoder & dec,
const int rdWrt,
const string & className1,
const string & className2,
const string & className3)
234 DefineRegName (inRegNum, regName);
235 DefineRegDecoder (inRegNum, dec);
236 DefineRegReadWrite (inRegNum, rdWrt);
237 DefineRegClass (inRegNum, className1);
238 DefineRegClass (inRegNum, className2);
239 DefineRegClass (inRegNum, className3);
245 for (
int ndx(0); ndx < 4; ndx++)
249 const XptRegNumAndMaskIndex regNumAndNdx(inRegNum, ndx);
250 if (mXptRegNumMaskIndex2InputXptMap.find(regNumAndNdx) == mXptRegNumMaskIndex2InputXptMap.end())
251 mXptRegNumMaskIndex2InputXptMap [regNumAndNdx] = indexes[ndx];
252 if (mInputXpt2XptRegNumMaskIndexMap.find(indexes[ndx]) == mInputXpt2XptRegNumMaskIndexMap.end())
253 mInputXpt2XptRegNumMaskIndexMap[indexes[ndx]] = regNumAndNdx;
257 void SetupBasicRegs(
void)
278 #if 1 // PCIAccessFrame regs are obsolete 287 #endif // PCIAccessFrame regs are obsolete 376 void SetupBOBRegs(
void)
385 void SetupLEDRegs(
void)
397 void SetupCMWRegs(
void)
407 void SetupVPIDRegs(
void)
443 void SetupTimecodeRegs(
void)
509 void SetupAudioRegs(
void)
596 void SetupMRRegs(
void)
607 void SetupDMARegs(
void)
638 void SetupXptSelect(
void)
650 if (mXptRegNumMaskIndex2InputXptMap.find (regNumAndNdx) == mXptRegNumMaskIndex2InputXptMap.end())
652 if (mInputXpt2XptRegNumMaskIndexMap.find (
NTV2_XptHDMIOutQ1Input) == mInputXpt2XptRegNumMaskIndexMap.end())
688 { ostringstream regName;
695 if (inputXptEnumName.empty())
696 regName <<
"kRegXptValid" <<
DEC0N(rawInputXpt,3) <<
"N" <<
DEC(ndx);
698 regName <<
"kRegXptValid" <<
aja::replace(inputXptEnumName,
"NTV2_Xpt",
"") <<
DEC(ndx);
701 regName <<
"kRegXptValue" <<
HEX0N(regNum,4);
706 void SetupAncInsExt(
void)
708 static const string AncExtRegNames [] = {
"Control",
"F1 Start Address",
"F1 End Address",
709 "F2 Start Address",
"F2 End Address",
"Field Cutoff Lines",
710 "Memory Total",
"F1 Memory Usage",
"F2 Memory Usage",
711 "V Blank Lines",
"Lines Per Frame",
"Field ID Lines",
712 "Ignore DID 1-4",
"Ignore DID 5-8",
"Ignore DID 9-12",
713 "Ignore DID 13-16",
"Ignore DID 17-20",
"Analog Start Line",
714 "Analog F1 Y Filter",
"Analog F2 Y Filter",
"Analog F1 C Filter",
715 "Analog F2 C Filter",
"",
"",
717 "Analog Act Line Len"};
718 static const string AncInsRegNames [] = {
"Field Bytes",
"Control",
"F1 Start Address",
719 "F2 Start Address",
"Pixel Delay",
"Active Start",
720 "Pixels Per Line",
"Lines Per Frame",
"Field ID Lines",
721 "Payload ID Control",
"Payload ID",
"Chroma Blank Lines",
722 "F1 C Blanking Mask",
"F2 C Blanking Mask",
"Field Bytes High",
723 "Reserved 15",
"RTP Payload ID",
"RTP SSRC",
725 static const uint32_t AncExtPerChlRegBase [] = { 0x1000, 0x1040, 0x1080, 0x10C0, 0x1100, 0x1140, 0x1180, 0x11C0 };
726 static const uint32_t AncInsPerChlRegBase [] = { 0x1200, 0x1240, 0x1280, 0x12C0, 0x1300, 0x1340, 0x1380, 0x13C0 };
728 NTV2_ASSERT(
sizeof(AncExtRegNames[0]) ==
sizeof(AncExtRegNames[1]));
733 for (
ULWord offsetNdx (0); offsetNdx < 8; offsetNdx++)
737 if (AncExtRegNames[reg].empty())
continue;
738 ostringstream oss; oss <<
"Extract " << (offsetNdx+1) <<
" " << AncExtRegNames[reg];
739 DefineRegName (AncExtPerChlRegBase[offsetNdx] + reg, oss.str());
743 ostringstream oss; oss <<
"Insert " << (offsetNdx+1) <<
" " << AncInsRegNames[reg];
744 DefineRegName (AncInsPerChlRegBase[offsetNdx] + reg, oss.str());
747 for (
ULWord ndx (0); ndx < 8; ndx++)
794 void SetupAuxInsExt(
void)
796 static const string AuxExtRegNames [] = {
"Control",
"F1 Start Address",
"F1 End Address",
797 "F2 Start Address",
"",
"",
798 "Memory Total",
"F1 Memory Usage",
"F2 Memory Usage",
799 "V Blank Lines",
"Lines Per Frame",
"Field ID Lines",
800 "Ignore DID 1-4",
"Ignore DID 5-8",
"Ignore DID 9-12",
801 "Ignore DID 13-16",
"Buffer Fill"};
809 static const uint32_t AuxExtPerChlRegBase [] = { 7616, 7680, 7744, 7808 };
810 static const uint32_t AuxInsPerChlRegBase [] = { 4608, 4672, 4736, 4800 };
813 NTV2_ASSERT(
sizeof(AuxExtRegNames[0]) ==
sizeof(AuxExtRegNames[1]));
818 for (
ULWord offsetNdx (0); offsetNdx < 4; offsetNdx++)
822 if (AuxExtRegNames[reg].empty())
continue;
823 ostringstream oss; oss <<
"Extract " << (offsetNdx+1) <<
" " << AuxExtRegNames[reg];
824 DefineRegName (AuxExtPerChlRegBase[offsetNdx] + reg, oss.str());
832 for (
ULWord ndx (0); ndx < 4; ndx++)
875 void SetupHDMIRegs(
void)
1103 void SetupSDIErrorRegs(
void)
1106 static const string suffixes [] = {
"Status",
"CRCErrorCount",
"FrameCountLow",
"FrameCountHigh",
"FrameRefCountLow",
"FrameRefCountHigh"};
1107 static const int perms [] = {READWRITE, READWRITE, READWRITE, READWRITE, READONLY, READONLY};
1110 for (
ULWord chan (0); chan < 8; chan++)
1111 for (
UWord ndx(0); ndx < 6; ndx++)
1113 ostringstream ossName; ossName <<
"kRegRXSDI" <<
DEC(chan+1) << suffixes[ndx];
1114 const string & regName (ossName.str());
1115 const uint32_t regNum (baseNum[chan] + ndx);
1116 const int perm (perms[ndx]);
1128 void SetupLUTRegs (
void)
1133 void SetupCSCRegs(
void)
1138 for (
unsigned num(0); num < 8; num++)
1140 ostringstream ossRegName; ossRegName <<
"kRegEnhancedCSC" << (num+1);
1141 const string & chanClass (sChan[num]);
const string rootName (ossRegName.str());
1142 const string modeName (rootName +
"Mode");
const string inOff01Name (rootName +
"InOffset0_1");
const string inOff2Name (rootName +
"InOffset2");
1143 const string coeffA0Name (rootName +
"CoeffA0");
const string coeffA1Name (rootName +
"CoeffA1");
const string coeffA2Name (rootName +
"CoeffA2");
1144 const string coeffB0Name (rootName +
"CoeffB0");
const string coeffB1Name (rootName +
"CoeffB1");
const string coeffB2Name (rootName +
"CoeffB2");
1145 const string coeffC0Name (rootName +
"CoeffC0");
const string coeffC1Name (rootName +
"CoeffC1");
const string coeffC2Name (rootName +
"CoeffC2");
1146 const string outOffABName(rootName +
"OutOffsetA_B");
const string outOffCName (rootName +
"OutOffsetC");
1147 const string keyModeName (rootName +
"KeyMode");
const string keyClipOffName (rootName +
"KeyClipOffset");
const string keyGainName (rootName +
"KeyGain");
1174 for (
unsigned chan(0); chan < 8; chan++)
1176 const string & chanClass (sChan[chan]);
1189 #if 1 // V2 tables need the appropriate Enable & Bank bits set in kRegLUTV2Control, otherwise they'll always readback zero! 1192 for (
ULWord ndx(0); ndx < 512; ndx++)
1194 ostringstream regNameR, regNameG, regNameB;
1195 regNameR <<
"kRegLUTRed" <<
DEC0N(ndx,3); regNameG <<
"kRegLUTGreen" <<
DEC0N(ndx,3); regNameB <<
"kRegLUTBlue" <<
DEC0N(ndx,3);
1203 void SetupMixerKeyerRegs(
void)
1222 void SetupNTV4FrameStoreRegs(
void)
1225 for (
ULWord fsNdx(0); fsNdx < 4; fsNdx++)
1229 ostringstream regName; regName <<
"kRegNTV4FS" <<
DEC(fsNdx+1) <<
"_";
1260 regName <<
"InputSourceSelect";
1264 regName <<
DEC(regNdx);
1272 void SetupLPRegs(
void)
1291 void SetupVRegs(
void)
1566 #if 0 // IoIP/KonaIP10g purge 1617 #endif // IoIP/KonaIP10g purge 1622 #if 0 // IoIP/KonaIP10g purge 1660 #endif // IoIP/KonaIP10g purge 1919 for (
ULWord ndx(1); ndx < 1024; ndx++)
1921 ostringstream oss; oss <<
"VIRTUALREG_START+" << ndx;
1922 const string regName (oss.str());
1924 if (mRegNumToStringMap.find(regNum) == mRegNumToStringMap.end())
1926 mRegNumToStringMap.insert (RegNumToStringPair(regNum, regName));
1927 mStringToRegNumMMap.insert (StringToRegNumPair(ToLower(regName), regNum));
1929 DefineRegDecoder (regNum, mDefaultRegDecoder);
1930 DefineRegReadWrite (regNum, READWRITE);
1945 const string & label (it->first);
1946 const string & value (it->second);
1949 else if (label.at(label.length()-1) !=
' ' && label.at(label.length()-1) !=
':')
1950 oss << label <<
": " << value;
1951 else if (label.at(label.length()-1) ==
':')
1952 oss << label <<
" " << value;
1954 oss << label << value;
1955 if (++it != inLabelValuePairs.end())
1964 RegNumToStringMap::const_iterator iter (mRegNumToStringMap.find (inRegNum));
1965 if (iter != mRegNumToStringMap.end())
1966 return iter->second;
1968 ostringstream oss; oss <<
"Reg ";
1970 oss <<
DEC(inRegNum);
1971 else if (inRegNum <= 0x0000FFFF)
1972 oss <<
xHEX0N(inRegNum,4);
1974 oss <<
xHEX0N(inRegNum,8);
1981 RegNumToDecoderMap::const_iterator iter(mRegNumToDecoderMap.find(inRegNum));
1983 if (iter != mRegNumToDecoderMap.end() && iter->second)
1985 const Decoder * pDecoder (iter->second);
1986 oss << (*pDecoder)(inRegNum, inRegValue, inDeviceID);
1991 bool IsRegInClass (
const uint32_t inRegNum,
const string & inClassName)
const 1994 for (RegClassToRegNumConstIter it(mRegClassToRegNumMMap.find(inClassName)); it != mRegClassToRegNumMMap.end() && it->first == inClassName; ++it)
1995 if (it->second == inRegNum)
2006 if (mAllRegClasses.empty())
2007 for (RegClassToRegNumConstIter it(mRegClassToRegNumMMap.begin()); it != mRegClassToRegNumMMap.end(); ++it)
2008 if (mAllRegClasses.find(it->first) == mAllRegClasses.end())
2009 mAllRegClasses.insert(it->first);
2010 return mAllRegClasses;
2019 if (IsRegInClass (inRegNum, *it))
2024 if (result.find(str) == result.end())
2034 for (RegClassToRegNumConstIter it(mRegClassToRegNumMMap.find(inClassName)); it != mRegClassToRegNumMMap.end() && it->first == inClassName; ++it)
2035 if (result.find(it->second) == result.end())
2036 result.insert(it->second);
2045 for (uint32_t regNum (0); regNum <= maxRegNum; regNum++)
2046 result.insert(regNum);
2055 const UWord numSpigots(numVideoInputs > numVideoOutputs ? numVideoInputs : numVideoOutputs);
2057 for (
UWord num(0); num < numSpigots; num++)
2060 allChanRegs.insert(chRegs.begin(), chRegs.end());
2062 std::set_intersection (ancRegs.begin(), ancRegs.end(), allChanRegs.begin(), allChanRegs.end(), std::inserter(result, result.begin()));
2070 const UWord numSpigots(numVideoInputs > numVideoOutputs ? numVideoInputs : numVideoOutputs);
2072 for (
UWord num(0); num < numSpigots; num++)
2075 allChanRegs.insert(chRegs.begin(), chRegs.end());
2077 std::set_intersection (auxRegs.begin(), auxRegs.end(), allChanRegs.begin(), allChanRegs.end(), std::inserter(result, result.begin()));
2083 result.insert(sdiErrRegs.begin(), sdiErrRegs.end());
2089 result.insert(regNum);
2091 result.insert(regNum);
2103 for (
UWord num(0); num < numCSCs; num++)
2106 allChanRegs.insert(chRegs.begin(), chRegs.end());
2108 std::set_intersection (ecscRegs.begin(), ecscRegs.end(), allChanRegs.begin(), allChanRegs.end(), std::inserter(result, result.begin()));
2114 result.insert(LUTRegs.begin(), LUTRegs.end());
2119 for (
ULWord regNum = 0x1d00; regNum <= 0x1d1f; regNum++)
2120 result.insert(regNum);
2121 for (
ULWord regNum = 0x2500; regNum <= 0x251f; regNum++)
2122 result.insert(regNum);
2123 for (
ULWord regNum = 0x2c00; regNum <= 0x2c1f; regNum++)
2124 result.insert(regNum);
2125 for (
ULWord regNum = 0x3000; regNum <= 0x301f; regNum++)
2126 result.insert(regNum);
2130 for (
ULWord regNum = 0x1d00; regNum <= 0x1d1f; regNum++)
2131 result.insert(regNum);
2132 for (
ULWord regNum = 0x1d40; regNum <= 0x1d5f; regNum++)
2133 result.insert(regNum);
2134 for (
ULWord regNum = 0x3C00; regNum <= 0x3C0A; regNum++)
2135 result.insert(regNum);
2153 for (
UWord num(0); num < numFrameStores; num++)
2156 chanRegs.insert(chRegs.begin(), chRegs.end());
2158 std::set_intersection (ntv4FSRegs.begin(), ntv4FSRegs.end(), chanRegs.begin(), chanRegs.end(), std::inserter(result, result.begin()));
2224 result.insert(vRegs.begin(), vRegs.end());
2230 result.insert(xptMapRegs.begin(), xptMapRegs.end());
2239 string nameStr(inName);
2240 const size_t nameStrLen(
aja::lower(nameStr).length());
2241 StringToRegNumConstIter it;
2243 if (inMatchStyle == EXACTMATCH)
2245 it = mStringToRegNumMMap.find(nameStr);
2246 if (it != mStringToRegNumMMap.end())
2247 result.insert(it->second);
2251 for (it = mStringToRegNumMMap.begin(); it != mStringToRegNumMMap.end(); ++it)
2253 const size_t pos(it->first.find(nameStr));
2254 if (pos == string::npos)
2256 switch (inMatchStyle)
2258 case CONTAINS: result.insert(it->second);
break;
2259 case STARTSWITH:
if (pos == 0)
2260 {result.insert(it->second);}
2262 case ENDSWITH:
if (pos+nameStrLen == it->first.length())
2263 {result.insert(it->second);}
2274 outXptRegNum = 0xFFFFFFFF;
2275 outMaskIndex = 0xFFFFFFFF;
2276 InputXpt2XptRegNumMaskIndexMapConstIter iter (mInputXpt2XptRegNumMaskIndexMap.find (inInputXpt));
2277 if (iter == mInputXpt2XptRegNumMaskIndexMap.end())
2279 outXptRegNum = iter->second.first;
2280 outMaskIndex = iter->second.second;
2287 const XptRegNumAndMaskIndex key (inXptRegNum, inMaskIndex);
2288 XptRegNumMaskIndex2InputXptMapConstIter iter (mXptRegNumMaskIndex2InputXptMap.find (key));
2289 if (iter != mXptRegNumMaskIndex2InputXptMap.end())
2290 return iter->second;
2294 ostream &
Print (ostream & inOutStream)
const 2297 static const string sLineBreak (96,
'=');
2298 static const uint32_t
sMasks[4] = {0x000000FF, 0x0000FF00, 0x00FF0000, 0xFF000000};
2300 inOutStream << endl << sLineBreak << endl <<
"RegisterExpert: Dump of RegNumToStringMap: " << mRegNumToStringMap.size() <<
" mappings:" << endl << sLineBreak << endl;
2301 for (RegNumToStringMap::const_iterator it (mRegNumToStringMap.begin()); it != mRegNumToStringMap.end(); ++it)
2302 inOutStream <<
"reg " << setw(5) << it->first <<
"(" <<
HEX0N(it->first,8) << dec <<
") => '" << it->second <<
"'" << endl;
2304 inOutStream << endl << sLineBreak << endl <<
"RegisterExpert: Dump of RegNumToDecoderMap: " << mRegNumToDecoderMap.size() <<
" mappings:" << endl << sLineBreak << endl;
2305 for (RegNumToDecoderMap::const_iterator it (mRegNumToDecoderMap.begin()); it != mRegNumToDecoderMap.end(); ++it)
2306 inOutStream <<
"reg " << setw(5) << it->first <<
"(" <<
HEX0N(it->first,8) << dec <<
") => " << (it->second == &mDefaultRegDecoder ?
"(default decoder)" :
"Custom Decoder") << endl;
2308 inOutStream << endl << sLineBreak << endl <<
"RegisterExpert: Dump of RegClassToRegNumMMap: " << mRegClassToRegNumMMap.size() <<
" mappings:" << endl << sLineBreak << endl;
2309 for (RegClassToRegNumMMap::const_iterator it (mRegClassToRegNumMMap.begin()); it != mRegClassToRegNumMMap.end(); ++it)
2310 inOutStream << setw(32) << it->first <<
" => reg " << setw(5) << it->second <<
"(" <<
HEX0N(it->second,8) << dec <<
") " << RegNameToString(it->second) << endl;
2312 inOutStream << endl << sLineBreak << endl <<
"RegisterExpert: Dump of StringToRegNumMMap: " << mStringToRegNumMMap.size() <<
" mappings:" << endl << sLineBreak << endl;
2313 for (StringToRegNumMMap::const_iterator it (mStringToRegNumMMap.begin()); it != mStringToRegNumMMap.end(); ++it)
2314 inOutStream << setw(32) << it->first <<
" => reg " << setw(5) << it->second <<
"(" <<
HEX0N(it->second,8) << dec <<
") " << RegNameToString(it->second) << endl;
2316 inOutStream << endl << sLineBreak << endl <<
"RegisterExpert: Dump of InputXpt2XptRegNumMaskIndexMap: " << mInputXpt2XptRegNumMaskIndexMap.size() <<
" mappings:" << endl << sLineBreak << endl;
2317 for (InputXpt2XptRegNumMaskIndexMap::const_iterator it (mInputXpt2XptRegNumMaskIndexMap.begin()); it != mInputXpt2XptRegNumMaskIndexMap.end(); ++it)
2319 <<
") => reg " << setw(3) << it->second.first <<
"(" <<
HEX0N(it->second.first,3) << dec <<
"|" << setw(20) << RegNameToString(it->second.first)
2320 <<
") mask " << it->second.second <<
"(" <<
HEX0N(
sMasks[it->second.second],8) <<
")" << endl;
2322 inOutStream << endl << sLineBreak << endl <<
"RegisterExpert: Dump of XptRegNumMaskIndex2InputXptMap: " << mXptRegNumMaskIndex2InputXptMap.size() <<
" mappings:" << endl << sLineBreak << endl;
2323 for (XptRegNumMaskIndex2InputXptMap::const_iterator it (mXptRegNumMaskIndex2InputXptMap.begin()); it != mXptRegNumMaskIndex2InputXptMap.end(); ++it)
2324 inOutStream <<
"reg " << setw(3) << it->first.first <<
"(" <<
HEX0N(it->first.first,4) <<
"|" << setw(20) << RegNameToString(it->first.first)
2325 <<
") mask " << it->first.second <<
"(" <<
HEX0N(
sMasks[it->first.second],8) <<
") => " 2331 typedef std::map<uint32_t, string> RegNumToStringMap;
2332 typedef std::pair<uint32_t, string> RegNumToStringPair;
2334 static string ToLower (
const string & inStr)
2336 string result (inStr);
2337 std::transform (result.begin (), result.end (), result.begin (), ::tolower);
2341 struct DecodeGlobalControlReg :
public Decoder
2343 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2358 for (
int led(0); led < 4; ++led)
2359 oss << (((inRegValue &
kRegMaskLED) >> (16 + led)) ?
"*" :
".");
2364 <<
"Color Correction: " <<
"Channel: " << ((inRegValue &
BIT(31)) ?
"2" :
"1")
2365 <<
" Bank " << ((inRegValue &
BIT (30)) ?
"1" :
"0");
2368 } mDecodeGlobalControlReg;
2371 struct DecodeGlobalControl2 :
public Decoder
2373 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2388 for (
unsigned ch(0); ch < 8; ch++)
2389 oss <<
"Audio " <<
DEC(ch+1) <<
" Play/Capture Mode: " <<
OnOff(inRegValue & playCaptModes[ch]) << endl;
2390 for (
unsigned ch(2); ch < 8; ch++)
2391 oss <<
"Ch " <<
DEC(ch+1) <<
" RP188 Output: " <<
EnabDisab(inRegValue & rp188Modes[ch]) << endl;
2392 for (
unsigned ch(0); ch < 3; ch++)
2393 oss <<
"Ch " <<
DEC(2*(ch+2)) <<
" 1080p50/p60 Link-B Mode: " <<
EnabDisab(inRegValue & BLinkModes[ch]) << endl;
2394 for (
unsigned ch(0); ch < 4; ch++)
2395 oss <<
"Ch " <<
DEC(ch*2+1) <<
"/" <<
DEC(ch*2+2) <<
" 2SI Mode: " <<
EnabDisab(inRegValue & k425Masks[ch]) << endl;
2396 oss <<
"2SI Min Align Delay 1-4: " <<
EnabDisab(inRegValue &
BIT(24)) << endl
2397 <<
"2SI Min Align Delay 5-8: " <<
EnabDisab(inRegValue &
BIT(25));
2400 } mDecodeGlobalControl2;
2403 struct DecodeGlobalControl3 :
public Decoder
2405 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2410 <<
"VU Meter Audio Select: " << (inRegValue &
kRegMaskVUMeterSelect ?
"AudMixer" :
"AudSys1") << endl
2420 } mDecodeGlobalControl3;
2423 struct DecodeGlobalControlChanReg :
public Decoder
2425 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2436 } mDecodeGlobalControlChanRegs;
2439 struct DecodeChannelControlReg :
public Decoder
2441 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2446 oss <<
"Mode: " << (inRegValue &
kRegMaskMode ?
"Capture" :
"Display") << endl
2449 <<
"Viper Squeeze: " << (inRegValue &
BIT(9) ?
"Squeeze" :
"Normal") << endl
2454 <<
"Frame Size: " << (1 << (((inRegValue &
kK2RegMaskFrameSize) >> 20) + 1)) <<
" MB" << endl;
2457 oss <<
"RGB Range: " << (inRegValue &
BIT(24) ?
"Black = 0x40" :
"Black = 0") << endl
2461 } mDecodeChannelControl;
2463 struct DecodeFBControlReg :
public Decoder
2465 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2467 const bool isOn ((inRegValue & (1 << 29)) != 0);
2468 const uint16_t format ((inRegValue >> 15) & 0x1F);
2470 oss <<
OnOff(isOn) << endl
2471 <<
"Format: " <<
xHEX0N(format,4) <<
" (" <<
DEC(format) <<
")";
2474 } mDecodeFBControlReg;
2476 struct DecodeChannelControlExtReg :
public Decoder
2478 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2481 oss <<
"Input Video 2:1 Decimate: " <<
EnabDisab(inRegValue &
BIT(0)) << endl
2482 <<
"HDMI Rx Direct: " <<
EnabDisab(inRegValue &
BIT(1)) << endl
2483 <<
"3:2 Pulldown Mode: " <<
EnabDisab(inRegValue &
BIT(2));
2486 } mDecodeChannelControlExt;
2488 struct DecodeSysmonVccIntDieTemp :
public Decoder
2490 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2492 UWord rawDieTemp (0);
2493 double dieTempC (0);
2496 rawDieTemp = (inRegValue & 0x0000FFFF);
2497 dieTempC = double(rawDieTemp) / 128.0;
2501 rawDieTemp = ((inRegValue & 0x0000FFFF) >> 6);
2502 dieTempC = ((double(rawDieTemp)) * 503.975 / 1024.0 - 273.15 );
2504 const UWord rawVoltage ((inRegValue >> 22) & 0x3FF);
2505 const double dieTempF (dieTempC * 9.0 / 5.0 + 32.0);
2506 const double voltage (
double(rawVoltage)/ 1024.0 * 3.0);
2508 oss <<
"Die Temperature: " <<
fDEC(dieTempC,5,2) <<
" Celcius (" <<
fDEC(dieTempF,5,2) <<
" Fahrenheit)" << endl
2509 <<
"Core Voltage: " <<
fDEC(voltage,5,2) <<
" Volts DC";
2512 } mDecodeSysmonVccIntDieTemp;
2514 struct DecodeSDITransmitCtrl :
public Decoder
2516 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2520 const UWord numSpigots (numInputs > numOutputs ? numInputs : numOutputs);
2524 const uint32_t txEnableBits (((inRegValue & 0x0F000000) >> 20) | ((inRegValue & 0xF0000000) >> 28));
2526 for (
UWord spigot(0); spigot < numSpigots; )
2528 const uint32_t txEnabled (txEnableBits &
BIT(spigot));
2529 oss <<
"SDI " <<
DEC(++spigot) <<
": " << (txEnabled ?
"Output/Transmit" :
"Input/Receive");
2530 if (spigot < numSpigots)
2534 oss <<
"(No SDI inputs or outputs)";
2537 oss <<
"(Bi-directional SDI not supported)";
2541 } mDecodeSDITransmitCtrl;
2543 struct DecodeConversionCtrl :
public Decoder
2545 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2551 oss <<
"Bitfile ID: " <<
xHEX0N(bitfileID, 2) << endl
2552 <<
"Memory Test: Start: " <<
YesNo(inRegValue &
BIT(28)) << endl
2553 <<
"Memory Test: Done: " <<
YesNo(inRegValue &
BIT(29)) << endl
2554 <<
"Memory Test: Passed: " <<
YesNo(inRegValue &
BIT(30));
2573 <<
"Vert Filter Preload: " <<
DisabEnab(inRegValue &
BIT(7)) << endl
2580 } mConvControlRegDecoder;
2582 struct DecodeRelayCtrlStat :
public Decoder
2584 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2598 oss <<
"(SDI bypass relays not supported)";
2601 } mDecodeRelayCtrlStat;
2603 struct DecodeWatchdogTimeout :
public Decoder
2605 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2610 const uint32_t ticks8nanos (inRegValue);
2611 const double microsecs (
double(ticks8nanos) * 8.0 / 1000.0);
2612 const double millisecs (microsecs / 1000.0);
2613 oss <<
"Watchdog Timeout [8-ns ticks]: " <<
xHEX0N(ticks8nanos,8) <<
" (" <<
DEC(ticks8nanos) <<
")" << endl
2614 <<
"Watchdog Timeout [usec]: " << microsecs << endl
2615 <<
"Watchdog Timeout [msec]: " << millisecs;
2618 oss <<
"(SDI bypass relays not supported)";
2621 } mDecodeWatchdogTimeout;
2623 struct DecodeWatchdogKick :
public Decoder
2625 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2632 const uint32_t expectedValue(whichReg ? 0x01234567 : 0xA5A55A5A);
2633 oss <<
xHEX0N(inRegValue,8);
2634 if (inRegValue == expectedValue)
2637 oss <<
" (Not expected, should be " <<
xHEX0N(expectedValue,8) <<
")";
2640 oss <<
"(SDI bypass relays not supported)";
2643 } mDecodeWatchdogKick;
2645 struct DecodeInputVPID:
public Decoder
2647 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2653 PrintLabelValuePairs(oss, ntv2vpid.GetInfo(info));
2656 } mVPIDInpRegDecoder;
2658 struct DecodeOutputVPID:
public Decoder
2660 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2665 PrintLabelValuePairs(oss, ntv2vpid.GetInfo(info));
2668 } mVPIDOutRegDecoder;
2670 struct DecodeBitfileDateTime :
public Decoder
2672 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2677 const UWord yyyy ((inRegValue & 0xFFFF0000) >> 16);
2678 const UWord mm ((inRegValue & 0x0000FF00) >> 8);
2679 const UWord dd (inRegValue & 0x000000FF);
2680 if (yyyy > 0x2015 && mm > 0 && mm < 0x13 && dd > 0 && dd < 0x32)
2681 oss <<
"Bitfile Date: " <<
HEX0N(mm,2) <<
"/" <<
HEX0N(dd,2) <<
"/" <<
HEX0N(yyyy,4);
2683 oss <<
"Bitfile Date: " <<
xHEX0N(inRegValue, 8);
2687 const UWord hh ((inRegValue & 0x00FF0000) >> 16);
2688 const UWord mm ((inRegValue & 0x0000FF00) >> 8);
2689 const UWord ss (inRegValue & 0x000000FF);
2690 if (hh < 0x24 && mm < 0x60 && ss < 0x60)
2691 oss <<
"Bitfile Time: " <<
HEX0N(hh,2) <<
":" <<
HEX0N(mm,2) <<
":" <<
HEX0N(ss,2);
2693 oss <<
"Bitfile Time: " <<
xHEX0N(inRegValue, 8);
2698 } mDecodeBitfileDateTime;
2700 struct DecodeBoardID :
public Decoder
2702 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2708 <<
"Device Name: '" << str1 <<
"'";
2711 <<
"Retail Device Name: '" << str2 <<
"'";
2716 struct DecodeDynFWUpdateCounts :
public Decoder
2718 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2721 oss <<
"# attempts: " <<
DEC(inRegValue >> 16) << endl
2722 <<
"# successes: " <<
DEC(inRegValue & 0x0000FFFF);
2725 } mDecodeDynFWUpdateCounts;
2727 struct DecodeFWUserID :
public Decoder
2729 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2739 } mDecodeFirmwareUserID;
2741 struct DecodeCanDoStatus :
public Decoder
2743 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2746 oss <<
"Has CanConnect Xpt Route ROM: " <<
YesNo(inRegValue &
BIT(0)) << endl
2747 <<
"AudioSystems can start on VBI: " <<
YesNo(inRegValue &
BIT(1)) << endl
2748 <<
"Main Flash SPI Controller: " <<
YesNo(inRegValue &
BIT(2)) << endl
2749 <<
"MB Flash SPI Controller: " <<
YesNo(inRegValue &
BIT(3)) << endl
2750 <<
"Has Enhanced (NTV4) FrameStores: " <<
YesNo(inRegValue &
BIT(4)) << endl
2751 <<
"Can report Mixer delay: " <<
YesNo(inRegValue &
BIT(5)) << endl
2752 <<
"AncIns supports HANC insertion: " <<
YesNo(inRegValue &
BIT(6));
2755 } mDecodeCanDoStatus;
2757 struct DecodeVidControlReg :
public Decoder
2759 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2761 const bool is16x9 ((inRegValue &
BIT(31)) != 0);
2762 const bool isMono ((inRegValue &
BIT(30)) != 0);
2764 oss <<
"Aspect Ratio: " << (is16x9 ?
"16x9" :
"4x3") << endl
2765 <<
"Depth: " << (isMono ?
"Monochrome" :
"Color");
2768 } mDecodeVidControlReg;
2770 struct DecodeVidIntControl :
public Decoder
2772 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2775 oss <<
"Output 1 Vertical Enable: " <<
YesNo(inRegValue &
BIT(0)) << endl
2776 <<
"Input 1 Vertical Enable: " <<
YesNo(inRegValue &
BIT(1)) << endl
2777 <<
"Input 2 Vertical Enable: " <<
YesNo(inRegValue &
BIT(2)) << endl
2778 <<
"Audio Out Wrap Interrupt Enable: " <<
YesNo(inRegValue &
BIT(4)) << endl
2779 <<
"Audio In Wrap Interrupt Enable: " <<
YesNo(inRegValue &
BIT(5)) << endl
2780 <<
"Wrap Rate Interrupt Enable: " <<
YesNo(inRegValue &
BIT(6)) << endl
2781 <<
"UART Tx Interrupt Enable" <<
YesNo(inRegValue &
BIT(7)) << endl
2782 <<
"UART Rx Interrupt Enable" <<
YesNo(inRegValue &
BIT(8)) << endl
2783 <<
"UART Rx Interrupt Clear" <<
ActInact(inRegValue &
BIT(15)) << endl
2784 <<
"UART 2 Tx Interrupt Enable" <<
YesNo(inRegValue &
BIT(17)) << endl
2785 <<
"Output 2 Vertical Enable: " <<
YesNo(inRegValue &
BIT(18)) << endl
2786 <<
"Output 3 Vertical Enable: " <<
YesNo(inRegValue &
BIT(19)) << endl
2787 <<
"Output 4 Vertical Enable: " <<
YesNo(inRegValue &
BIT(20)) << endl
2788 <<
"Output 4 Vertical Clear: " <<
ActInact(inRegValue &
BIT(21)) << endl
2789 <<
"Output 3 Vertical Clear: " <<
ActInact(inRegValue &
BIT(22)) << endl
2790 <<
"Output 2 Vertical Clear: " <<
ActInact(inRegValue &
BIT(23)) << endl
2791 <<
"UART Tx Interrupt Clear" <<
ActInact(inRegValue &
BIT(24)) << endl
2792 <<
"Wrap Rate Interrupt Clear" <<
ActInact(inRegValue &
BIT(25)) << endl
2793 <<
"UART 2 Tx Interrupt Clear" <<
ActInact(inRegValue &
BIT(26)) << endl
2794 <<
"Audio Out Wrap Interrupt Clear" <<
ActInact(inRegValue &
BIT(27)) << endl
2795 <<
"Input 2 Vertical Clear: " <<
ActInact(inRegValue &
BIT(29)) << endl
2796 <<
"Input 1 Vertical Clear: " <<
ActInact(inRegValue &
BIT(30)) << endl
2797 <<
"Output 1 Vertical Clear: " <<
ActInact(inRegValue &
BIT(31));
2800 } mDecodeVidIntControl;
2802 struct DecodeVidIntControl2 :
public Decoder
2804 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2807 oss <<
"Input 3 Vertical Enable: " <<
YesNo(inRegValue &
BIT(1)) << endl
2808 <<
"Input 4 Vertical Enable: " <<
YesNo(inRegValue &
BIT(2)) << endl
2809 <<
"Input 5 Vertical Enable: " <<
YesNo(inRegValue &
BIT(8)) << endl
2810 <<
"Input 6 Vertical Enable: " <<
YesNo(inRegValue &
BIT(9)) << endl
2811 <<
"Input 7 Vertical Enable: " <<
YesNo(inRegValue &
BIT(10)) << endl
2812 <<
"Input 8 Vertical Enable: " <<
YesNo(inRegValue &
BIT(11)) << endl
2813 <<
"Output 5 Vertical Enable: " <<
YesNo(inRegValue &
BIT(12)) << endl
2814 <<
"Output 6 Vertical Enable: " <<
YesNo(inRegValue &
BIT(13)) << endl
2815 <<
"Output 7 Vertical Enable: " <<
YesNo(inRegValue &
BIT(14)) << endl
2816 <<
"Output 8 Vertical Enable: " <<
YesNo(inRegValue &
BIT(15)) << endl
2817 <<
"Output 8 Vertical Clear: " <<
ActInact(inRegValue &
BIT(16)) << endl
2818 <<
"Output 7 Vertical Clear: " <<
ActInact(inRegValue &
BIT(17)) << endl
2819 <<
"Output 6 Vertical Clear: " <<
ActInact(inRegValue &
BIT(18)) << endl
2820 <<
"Output 5 Vertical Clear: " <<
ActInact(inRegValue &
BIT(19)) << endl
2821 <<
"Input 8 Vertical Clear: " <<
ActInact(inRegValue &
BIT(25)) << endl
2822 <<
"Input 7 Vertical Clear: " <<
ActInact(inRegValue &
BIT(26)) << endl
2823 <<
"Input 6 Vertical Clear: " <<
ActInact(inRegValue &
BIT(27)) << endl
2824 <<
"Input 5 Vertical Clear: " <<
ActInact(inRegValue &
BIT(28)) << endl
2825 <<
"Input 4 Vertical Clear: " <<
ActInact(inRegValue &
BIT(29)) << endl
2826 <<
"Input 3 Vertical Clear: " <<
ActInact(inRegValue &
BIT(30));
2829 } mDecodeVidIntControl2;
2831 struct DecodeStatusReg :
public Decoder
2833 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2836 oss <<
"Input 1 Vertical Blank: " <<
ActInact(inRegValue &
BIT(20)) << endl
2837 <<
"Input 1 Field ID: " << (inRegValue &
BIT(21) ?
"1" :
"0") << endl
2838 <<
"Input 1 Vertical Interrupt: " <<
ActInact(inRegValue &
BIT(30)) << endl
2839 <<
"Input 2 Vertical Blank: " <<
ActInact(inRegValue &
BIT(18)) << endl
2840 <<
"Input 2 Field ID: " << (inRegValue &
BIT(19) ?
"1" :
"0") << endl
2841 <<
"Input 2 Vertical Interrupt: " <<
ActInact(inRegValue &
BIT(29)) << endl
2842 <<
"Output 1 Vertical Blank: " <<
ActInact(inRegValue &
BIT(22)) << endl
2843 <<
"Output 1 Field ID: " << (inRegValue &
BIT(23) ?
"1" :
"0") << endl
2844 <<
"Output 1 Vertical Interrupt: " <<
ActInact(inRegValue &
BIT(31)) << endl
2845 <<
"Output 2 Vertical Blank: " <<
ActInact(inRegValue &
BIT(4)) << endl
2846 <<
"Output 2 Field ID: " << (inRegValue &
BIT(5) ?
"1" :
"0") << endl
2847 <<
"Output 2 Vertical Interrupt: " <<
ActInact(inRegValue &
BIT(8)) << endl;
2849 oss <<
"Output 3 Vertical Blank: " <<
ActInact(inRegValue &
BIT(2)) << endl
2850 <<
"Output 3 Field ID: " << (inRegValue &
BIT(3) ?
"1" :
"0") << endl
2851 <<
"Output 3 Vertical Interrupt: " <<
ActInact(inRegValue &
BIT(7)) << endl
2852 <<
"Output 4 Vertical Blank: " <<
ActInact(inRegValue &
BIT(0)) << endl
2853 <<
"Output 4 Field ID: " << (inRegValue &
BIT(1) ?
"1" :
"0") << endl
2854 <<
"Output 4 Vertical Interrupt: " <<
ActInact(inRegValue &
BIT(6)) << endl;
2855 oss <<
"Aux Vertical Interrupt: " <<
ActInact(inRegValue &
BIT(12)) << endl
2856 <<
"I2C 1 Interrupt: " <<
ActInact(inRegValue &
BIT(14)) << endl
2857 <<
"I2C 2 Interrupt: " <<
ActInact(inRegValue &
BIT(13)) << endl
2858 <<
"Chunk Rate Interrupt: " <<
ActInact(inRegValue &
BIT(16)) << endl;
2860 oss <<
"Generic UART Interrupt: " <<
ActInact(inRegValue &
BIT(9)) << endl
2861 <<
"Uart 1 Rx Interrupt: " <<
ActInact(inRegValue &
BIT(15)) << endl
2862 <<
"Uart 1 Tx Interrupt: " <<
ActInact(inRegValue &
BIT(24)) << endl;
2864 oss <<
"Uart 2 Tx Interrupt: " <<
ActInact(inRegValue &
BIT(26)) << endl;
2866 oss <<
"LTC In 1 Present: " <<
YesNo(inRegValue &
BIT(17)) << endl;
2867 oss <<
"Wrap Rate Interrupt: " <<
ActInact(inRegValue &
BIT(25)) << endl
2868 <<
"Audio Out Wrap Interrupt: " <<
ActInact(inRegValue &
BIT(27)) << endl
2869 <<
"Audio 50Hz Interrupt: " <<
ActInact(inRegValue &
BIT(28));
2874 struct DecodeCPLDVersion :
public Decoder
2876 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2879 oss <<
"CPLD Version: " <<
DEC(inRegValue & (
BIT(0)|
BIT(1))) << endl
2880 <<
"Failsafe Bitfile Loaded: " << (inRegValue &
BIT(4) ?
"Yes" :
"No") << endl
2881 <<
"Force Reload: " <<
YesNo(inRegValue &
BIT(8));
2882 ULWord pcbRev ((inRegValue & 0xF0000000) >> 28);
2883 if (pcbRev) oss << endl
2884 <<
"PCB Version: " <<
xHEX0N(pcbRev,2);
2887 } mDecodeCPLDVersion;
2889 struct DecodeStatus2Reg :
public Decoder
2891 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2893 static const uint8_t bitNumsInputVBlank[] = {20, 18, 16, 14, 12, 10};
2894 static const uint8_t bitNumsInputFieldID[] = {21, 19, 17, 15, 13, 11};
2895 static const uint8_t bitNumsInputVertInt[] = {30, 29, 28, 27, 26, 25};
2896 static const uint8_t bitNumsOutputVBlank[] = { 8, 6, 4, 2};
2897 static const uint8_t bitNumsOutputFieldID[] = { 9, 7, 5, 3};
2898 static const uint8_t bitNumsOutputVertInt[] = {31, 24, 23, 22};
2900 for (
unsigned ndx(0); ndx < 6; ndx++)
2901 oss <<
"Input " << (ndx+3) <<
" Vertical Blank: " <<
ActInact(inRegValue &
BIT(bitNumsInputVBlank[ndx])) << endl
2902 <<
"Input " << (ndx+3) <<
" Field ID: " << (inRegValue &
BIT(bitNumsInputFieldID[ndx]) ?
"1" :
"0") << endl
2903 <<
"Input " << (ndx+3) <<
" Vertical Interrupt: " <<
ActInact(inRegValue &
BIT(bitNumsInputVertInt[ndx])) << endl;
2904 for (
unsigned ndx(0); ndx < 4; ndx++)
2905 oss <<
"Output " << (ndx+5) <<
" Vertical Blank: " <<
ActInact(inRegValue &
BIT(bitNumsOutputVBlank[ndx])) << endl
2906 <<
"Output " << (ndx+5) <<
" Field ID: " << (inRegValue &
BIT(bitNumsOutputFieldID[ndx]) ?
"1" :
"0") << endl
2907 <<
"Output " << (ndx+5) <<
" Vertical Interrupt: " <<
ActInact(inRegValue &
BIT(bitNumsOutputVertInt[ndx])) << endl;
2908 oss <<
"HDMI In Hot-Plug Detect Interrupt: " <<
ActInact(inRegValue &
BIT(0)) << endl
2909 <<
"HDMI In Chip Interrupt: " <<
ActInact(inRegValue &
BIT(1));
2912 } mDecodeStatus2Reg;
2914 struct DecodeInputStatusReg :
public Decoder
2916 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2923 <<
"Input 1 Geometry: ";
2924 if (
BIT(30) & inRegValue)
2925 switch (((
BIT(4)|
BIT(5)|
BIT(6)) & inRegValue) >> 4)
2927 case 0: oss <<
"2K x 1080";
break;
2928 case 1: oss <<
"2K x 1556";
break;
2929 default: oss <<
"Invalid HI";
break;
2932 switch (((
BIT(4)|
BIT(5)|
BIT(6)) & inRegValue) >> 4)
2934 case 0: oss <<
"Unknown";
break;
2935 case 1: oss <<
"525";
break;
2936 case 2: oss <<
"625";
break;
2937 case 3: oss <<
"750";
break;
2938 case 4: oss <<
"1125";
break;
2939 case 5: oss <<
"1250";
break;
2940 case 6:
case 7: oss <<
"Reserved";
break;
2941 default: oss <<
"Invalid LO";
break;
2944 <<
"Input 1 Scan Mode: " << ((
BIT(7) & inRegValue) ?
"Progressive" :
"Interlaced") << endl
2946 <<
"Input 2 Geometry: ";
2947 if (
BIT(31) & inRegValue)
2948 switch (((
BIT(12)|
BIT(13)|
BIT(14)) & inRegValue) >> 12)
2950 case 0: oss <<
"2K x 1080";
break;
2951 case 1: oss <<
"2K x 1556";
break;
2952 default: oss <<
"Invalid HI";
break;
2955 switch (((
BIT(12)|
BIT(13)|
BIT(14)) & inRegValue) >> 12)
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 <<
"Input 2 Scan Mode: " << ((
BIT(15) & inRegValue) ?
"Progressive" :
"Interlaced") << endl
2969 <<
"Reference Geometry: ";
2970 switch (((
BIT(20)|
BIT(21)|
BIT(22)) & inRegValue) >> 20)
2972 case 0: oss <<
"NTV2_SG_UNKNOWN";
break;
2973 case 1: oss <<
"NTV2_SG_525";
break;
2974 case 2: oss <<
"NTV2_SG_625";
break;
2975 case 3: oss <<
"NTV2_SG_750";
break;
2976 case 4: oss <<
"NTV2_SG_1125";
break;
2977 case 5: oss <<
"NTV2_SG_1250";
break;
2978 default: oss <<
"Invalid";
break;
2981 <<
"Reference Scan Mode: " << ((
BIT(23) & inRegValue) ?
"Progressive" :
"Interlaced") << endl
2982 <<
"AES Channel 1-2: " << ((
BIT(24) & inRegValue) ?
"Invalid" :
"Valid") << endl
2983 <<
"AES Channel 3-4: " << ((
BIT(25) & inRegValue) ?
"Invalid" :
"Valid") << endl
2984 <<
"AES Channel 5-6: " << ((
BIT(26) & inRegValue) ?
"Invalid" :
"Valid") << endl
2985 <<
"AES Channel 7-8: " << ((
BIT(27) & inRegValue) ?
"Invalid" :
"Valid");
2988 } mDecodeInputStatusReg;
2990 struct DecodeSDIInputStatusReg :
public Decoder
2992 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 2994 uint16_t numSpigots(0), startSpigot(0), doTsiMuxSync(0);
3005 for (uint16_t spigotNdx(0); spigotNdx < numSpigots; )
3007 const uint16_t spigotNum (spigotNdx + startSpigot);
3008 const uint8_t statusBits ((inRegValue >> (spigotNdx*8)) & 0xFF);
3009 const uint8_t speedBits (statusBits & 0xC1);
3010 ostringstream ossSpeed, ossSpigot;
3011 ossSpigot <<
"SDI In " << spigotNum <<
" ";
3012 const string spigotLabel (ossSpigot.str());
3013 if (speedBits & 0x01) ossSpeed <<
" 3G";
3016 if (speedBits & 0x40) ossSpeed <<
" 6G";
3017 if (speedBits & 0x80) ossSpeed <<
" 12G";
3019 if (speedBits == 0) ossSpeed <<
" 1.5G";
3020 oss << spigotLabel <<
"Link Speed:" << ossSpeed.str() << endl
3021 << spigotLabel <<
"SMPTE Level B: " <<
YesNo(statusBits & 0x02) << endl
3022 << spigotLabel <<
"Link A VPID Valid: " <<
YesNo(statusBits & 0x10) << endl
3023 << spigotLabel <<
"Link B VPID Valid: " <<
YesNo(statusBits & 0x20) << endl;
3025 oss << spigotLabel <<
"3Gb-to-3Ga Conversion: " <<
EnabDisab(statusBits & 0x04);
3027 oss << spigotLabel <<
"3Gb-to-3Ga Conversion: n/a";
3028 if (++spigotNdx < numSpigots)
3032 for (
UWord tsiMux(0); tsiMux < 4; ++tsiMux)
3034 <<
"TsiMux" <<
DEC(tsiMux+1) <<
" Sync Fail: " << ((inRegValue & (0x00010000UL << tsiMux)) ?
"FAILED" :
"OK");
3037 } mDecodeSDIInputStatusReg;
3039 struct DecodeSDIInputStatus2Reg :
public Decoder
3041 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3048 oss << sOdd <<
" Scan Mode: " << ((
BIT(7) & inRegValue) ?
"Progressive" :
"Interlaced") << endl
3050 << sOdd <<
" Geometry: ";
3051 if (
BIT(30) & inRegValue)
switch (((
BIT(4)|
BIT(5)|
BIT(6)) & inRegValue) >> 4)
3053 case 0: oss <<
"2K x 1080";
break;
3054 case 1: oss <<
"2K x 1556";
break;
3055 default: oss <<
"Invalid HI";
break;
3057 else switch (((
BIT(4)|
BIT(5)|
BIT(6)) & inRegValue) >> 4)
3059 case 0: oss <<
"Unknown";
break;
3060 case 1: oss <<
"525";
break;
3061 case 2: oss <<
"625";
break;
3062 case 3: oss <<
"750";
break;
3063 case 4: oss <<
"1125";
break;
3064 case 5: oss <<
"1250";
break;
3065 case 6:
case 7: oss <<
"Reserved";
break;
3066 default: oss <<
"Invalid LO";
break;
3069 << sEven <<
" Scan Mode: " << ((
BIT(15) & inRegValue) ?
"Progressive" :
"Interlaced") << endl
3071 << sEven <<
" Geometry: ";
3072 if (
BIT(31) & inRegValue)
switch (((
BIT(12)|
BIT(13)|
BIT(14)) & inRegValue) >> 12)
3074 case 0: oss <<
"2K x 1080";
break;
3075 case 1: oss <<
"2K x 1556";
break;
3076 default: oss <<
"Invalid HI";
break;
3078 else switch (((
BIT(12)|
BIT(13)|
BIT(14)) & inRegValue) >> 12)
3080 case 0: oss <<
"Unknown";
break;
3081 case 1: oss <<
"525";
break;
3082 case 2: oss <<
"625";
break;
3083 case 3: oss <<
"750";
break;
3084 case 4: oss <<
"1125";
break;
3085 case 5: oss <<
"1250";
break;
3086 case 6:
case 7: oss <<
"Reserved";
break;
3087 default: oss <<
"Invalid LO";
break;
3091 } mDecodeSDIInputStatus2Reg;
3093 struct DecodeFS1RefSelectReg :
public Decoder
3095 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3098 oss <<
"BNC Select(LHi): " << (inRegValue & 0x00000010 ?
"LTCIn1" :
"Ref") << endl
3099 <<
"Ref BNC (Corvid): " <<
EnabDisab(inRegValue & 0x00000020) << endl
3100 <<
"LTC Present (also Reg 21): " <<
YesNo(inRegValue & 0x00000040) << endl
3101 <<
"LTC Emb Out Enable: " <<
YesNo(inRegValue & 0x00000080) << endl
3102 <<
"LTC Emb In Enable: " <<
YesNo(inRegValue & 0x00000100) << endl
3103 <<
"LTC Emb In Received: " <<
YesNo(inRegValue & 0x00000200) << endl
3104 <<
"LTC BNC Out Source: " << (inRegValue & 0x00000400 ?
"E-E" :
"Reg112/113");
3107 } mDecodeFS1RefSelectReg;
3109 struct DecodeLTCStatusControlReg :
public Decoder
3111 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3113 const uint16_t LTC1InTimingSelect ((inRegValue >> 1) & 0x0000007);
3114 const uint16_t LTC2InTimingSelect ((inRegValue >> 9) & 0x0000007);
3115 const uint16_t LTC1OutTimingSelect ((inRegValue >> 16) & 0x0000007);
3116 const uint16_t LTC2OutTimingSelect ((inRegValue >> 20) & 0x0000007);
3118 oss <<
"LTC 1 Input Present: " <<
YesNo(inRegValue & 0x00000001) << endl
3119 <<
"LTC 1 Input FB Timing Select): " <<
xHEX0N(LTC1InTimingSelect,2) <<
" (" <<
DEC(LTC1InTimingSelect) <<
")" << endl
3120 <<
"LTC 1 Bypass: " <<
EnabDisab(inRegValue & 0x00000010) << endl
3121 <<
"LTC 1 Bypass Select: " <<
DEC(
ULWord((inRegValue >> 5) & 0x00000001)) << endl
3122 <<
"LTC 2 Input Present: " <<
YesNo(inRegValue & 0x00000100) << endl
3123 <<
"LTC 2 Input FB Timing Select): " <<
xHEX0N(LTC2InTimingSelect,2) <<
" (" <<
DEC(LTC2InTimingSelect) <<
")" << endl
3124 <<
"LTC 2 Bypass: " <<
EnabDisab(inRegValue & 0x00001000) << endl
3125 <<
"LTC 2 Bypass Select: " <<
DEC(
ULWord((inRegValue >> 13) & 0x00000001)) << endl
3126 <<
"LTC 1 Output FB Timing Select): " <<
xHEX0N(LTC1OutTimingSelect,2) <<
" (" <<
DEC(LTC1OutTimingSelect) <<
")" << endl
3127 <<
"LTC 2 Output FB Timing Select): " <<
xHEX0N(LTC2OutTimingSelect,2) <<
" (" <<
DEC(LTC2OutTimingSelect) <<
")";
3130 } mLTCStatusControlDecoder;
3132 struct DecodeAudDetectReg :
public Decoder
3134 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3141 for (uint16_t num(0); num < 8; )
3143 const uint16_t group (num / 2);
3144 const bool isChan34 (num & 1);
3145 oss <<
"Group " << group <<
" CH " << (isChan34 ?
"3-4: " :
"1-2: ") << (inRegValue &
BIT(num) ?
"Present" :
"Absent");
3156 } mDecodeAudDetectReg;
3158 struct DecodeAudControlReg :
public Decoder
3160 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3162 static const string ChStrs [] = {
"Ch 1/2",
"Ch 3/4",
"Ch 5/6",
"Ch 7/8" };
3163 uint16_t sdiOutput (0);
3173 oss <<
"Audio Capture: " <<
EnabDisab(
BIT(0) & inRegValue) << endl
3174 <<
"Audio Loopback: " <<
EnabDisab(
BIT(3) & inRegValue) << endl
3175 <<
"Audio Input: " <<
DisabEnab(
BIT(8) & inRegValue) << endl
3176 <<
"Audio Output: " <<
DisabEnab(
BIT(9) & inRegValue) << endl
3177 <<
"Output Paused: " <<
YesNo(
BIT(11) & inRegValue) << endl;
3179 oss <<
"Audio Embedder SDIOut" << sdiOutput <<
": " <<
DisabEnab(
BIT(13) & inRegValue) << endl
3180 <<
"Audio Embedder SDIOut" << (sdiOutput+1) <<
": " <<
DisabEnab(
BIT(15) & inRegValue) << endl;
3182 oss <<
"A/V Sync Mode: " <<
EnabDisab(
BIT(15) & inRegValue) << endl
3183 <<
"AES Rate Converter: " <<
DisabEnab(
BIT(19) & inRegValue) << endl
3184 <<
"Audio Buffer Format: " << (
BIT(20) & inRegValue ?
"16-Channel " : (
BIT(16) & inRegValue ?
"8-Channel " :
"6-Channel ")) << endl
3185 << (
BIT(18) & inRegValue ?
"96kHz" :
"48kHz") << endl
3186 << (
BIT(18) & inRegValue ?
"96kHz Support" :
"48kHz Support") << endl
3188 <<
"Slave Mode (64-chl): " <<
EnabDisab(
BIT(23) & inRegValue) << endl
3189 <<
"K-box, Monitor: " << ChStrs [(
BIT(24) &
BIT(25) & inRegValue) >> 24] << endl
3190 <<
"K-Box Input: " << (
BIT(26) & inRegValue ?
"XLR" :
"BNC") << endl
3191 <<
"K-Box: " << (
BIT(27) & inRegValue ?
"Present" :
"Absent") << endl
3192 <<
"Cable: " << (
BIT(28) & inRegValue ?
"XLR" :
"BNC") << endl
3193 <<
"Audio Buffer Size: " << (
BIT(31) & inRegValue ?
"4 MB" :
"1 MB");
3196 } mDecodeAudControlReg;
3198 struct DecodeAudControl2Reg :
public Decoder
3200 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3203 ULWord val (inRegValue & 0x000000FF);
3206 for (
ULWord audSys(0); audSys < 8; audSys++)
3207 if (val & (1UL << audSys))
3209 nm <<
"AudSys" <<
DEC(audSys+1);
3210 names.push_back(nm.str());
3212 oss <<
"192kHz enabled Audio Systems: ";
3219 } mDecodeAudControl2Reg;
3221 struct DecodeAudSourceSelectReg :
public Decoder
3223 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3225 static const string SrcStrs [] = {
"AES Input",
"Embedded Groups 1 and 2",
"" };
3226 static const unsigned SrcStrMap [] = { 0, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 };
3227 const uint16_t vidInput = (inRegValue &
BIT(23) ? 2 : 0) + (inRegValue &
BIT(16) ? 1 : 0);
3230 oss <<
"Audio Source: " << SrcStrs [SrcStrMap [(
BIT(0) |
BIT(1) |
BIT(2) |
BIT(3)) & inRegValue]] << endl
3231 <<
"Embedded Source Select: Video Input " << (1 + vidInput) << endl
3232 <<
"AES Sync Mode bit (fib): " <<
EnabDisab(inRegValue &
BIT(18)) << endl
3233 <<
"PCM disabled: " <<
YesNo(inRegValue &
BIT(17)) << endl
3234 <<
"Erase head enable: " <<
YesNo(inRegValue &
BIT(19)) << endl
3235 <<
"Embedded Clock Select: " << (inRegValue &
BIT(22) ?
"Video Input" :
"Board Reference") << endl
3236 <<
"3G audio source: " << (inRegValue &
BIT(21) ?
"Data stream 2" :
"Data stream 1");
3239 } mDecodeAudSourceSelectReg;
3241 struct DecodeAudOutputSrcMap :
public Decoder
3243 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3245 static const string AESOutputStrs[] = {
"AES Outputs 1-4",
"AES Outputs 5-8",
"AES Outputs 9-12",
"AES Outputs 13-16",
""};
3246 static const string SrcStrs[] = {
"AudSys1, Audio Channels 1-4",
"AudSys1, Audio Channels 5-8",
3247 "AudSys1, Audio Channels 9-12",
"AudSys1, Audio Channels 13-16",
3248 "AudSys2, Audio Channels 1-4",
"AudSys2, Audio Channels 5-8",
3249 "AudSys2, Audio Channels 9-12",
"AudSys2, Audio Channels 13-16",
3250 "AudSys3, Audio Channels 1-4",
"AudSys3, Audio Channels 5-8",
3251 "AudSys3, Audio Channels 9-12",
"AudSys3, Audio Channels 13-16",
3252 "AudSys4, Audio Channels 1-4",
"AudSys4, Audio Channels 5-8",
3253 "AudSys4, Audio Channels 9-12",
"AudSys4, Audio Channels 13-16",
""};
3254 static const unsigned AESChlMappingShifts [4] = {0, 4, 8, 12};
3257 const uint32_t AESOutMapping (inRegValue & 0x0000FFFF);
3261 for (
unsigned AESOutputQuad(0); AESOutputQuad < 4; AESOutputQuad++)
3262 oss << AESOutputStrs[AESOutputQuad] <<
" Source: " << SrcStrs[(AESOutMapping >> AESChlMappingShifts[AESOutputQuad]) & 0x0000000F] << endl;
3275 const uint32_t HDMIMon1234Info (HDMIMonInfo & 0x0F);
3278 const uint32_t HDMIMon5678Info ((HDMIMonInfo >> 4) & 0x0F);
3286 } mDecodeAudOutputSrcMap;
3288 struct DecodePCMControlReg :
public Decoder
3290 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3294 for (uint8_t audChan (0); audChan < 4; audChan++)
3296 oss <<
"Audio System " << (startAudioSystem + audChan) <<
": ";
3297 const uint8_t pcmBits (uint32_t(inRegValue >> (audChan * 8)) & 0x000000FF);
3298 if (pcmBits == 0x00)
3302 oss <<
"non-PCM channels";
3303 for (uint8_t chanPair (0); chanPair < 8; chanPair++)
3304 if (pcmBits & (0x01 << chanPair))
3305 oss <<
" " << (chanPair*2+1) <<
"-" << (chanPair*2+2);
3312 } mDecodePCMControlReg;
3314 struct DecodeAudioMixerInputSelectReg :
public Decoder
3316 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3318 const UWord mainInputSrc((inRegValue ) & 0x0000000F);
3319 const UWord aux1InputSrc((inRegValue >> 4) & 0x0000000F);
3320 const UWord aux2InputSrc((inRegValue >> 8) & 0x0000000F);
3327 } mAudMxrInputSelDecoder;
3329 struct DecodeAudioMixerGainRegs :
public Decoder
3333 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3335 static const double kUnityGain (0x00010000);
3336 const bool atUnity (inRegValue == 0x00010000);
3339 oss <<
"Gain: 0 dB (Unity)";
3342 const double dValue (inRegValue);
3343 const bool aboveUnity (inRegValue >= 0x00010000);
3344 const string plusMinus (atUnity ?
"" : (aboveUnity ?
"+" :
"-"));
3345 const string aboveBelow (atUnity ?
"at" : (aboveUnity ?
"above" :
"below"));
3346 const uint32_t unityDiff (aboveUnity ? inRegValue - 0x00010000 : 0x00010000 - inRegValue);
3347 const double dB (
double(20.0) * ::log10(dValue/kUnityGain));
3348 oss <<
"Gain: " << dB <<
" dB, " << plusMinus <<
xHEX0N(unityDiff,6)
3349 <<
" (" << plusMinus <<
DEC(unityDiff) <<
") " << aboveBelow <<
" unity gain";
3353 } mAudMxrGainDecoder;
3355 struct DecodeAudioMixerChannelSelectReg :
public Decoder
3357 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3363 <<
"Level Measurement Sample Count: " <<
DEC(
ULWord(1 << powerOfTwo)) <<
" (bits 8-15)";
3366 } mAudMxrChanSelDecoder;
3369 struct DecodeAudioMixerMutesReg :
public Decoder
3372 typedef std::bitset<16> AudioChannelSet16;
3373 typedef std::bitset<2> AudioChannelSet2;
3376 outSet.clear(); outClear.clear();
3377 for (
size_t ndx(0); ndx < 16; ndx++)
3378 { ostringstream oss; oss <<
DEC(ndx+1);
3379 if (inChSet.test(ndx))
3380 outSet.push_back(oss.str());
3382 outClear.push_back(oss.str());
3384 if (outSet.empty()) outSet.push_back(
"<none>");
3385 if (outClear.empty()) outClear.push_back(
"<none>");
3389 outSet.clear(); outClear.clear();
static const string LR[] = {
"L",
"R"};
3390 for (
size_t ndx(0); ndx < 2; ndx++)
3391 if (inChSet.test(ndx))
3392 outSet.push_back(LR[ndx]);
3394 outClear.push_back(LR[ndx]);
3395 if (outSet.empty()) outSet.push_back(
"<none>");
3396 if (outClear.empty()) outClear.push_back(
"<none>");
3399 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3406 NTV2StringList mutedMainOut, unmutedMainOut, mutedMain, unmutedMain, mutedAux1, unmutedAux1, mutedAux2, unmutedAux2;
3407 SplitAudioChannelSet16(AudioChannelSet16(mainOutputMuteBits), mutedMainOut, unmutedMainOut);
3408 SplitAudioChannelSet2(AudioChannelSet2(mainInputMuteBits), mutedMain, unmutedMain);
3409 SplitAudioChannelSet2(AudioChannelSet2(aux1InputMuteBits), mutedAux1, unmutedAux1);
3410 SplitAudioChannelSet2(AudioChannelSet2(aux2InputMuteBits), mutedAux2, unmutedAux2);
3411 oss <<
"Main Output Muted/Disabled Channels: " << mutedMainOut << endl
3412 <<
"Main Output Unmuted/Enabled Channels: " << unmutedMainOut << endl;
3413 oss <<
"Main Input Muted/Disabled Channels: " << mutedMain << endl
3414 <<
"Main Input Unmuted/Enabled Channels: " << unmutedMain << endl;
3415 oss <<
"Aux Input 1 Muted/Disabled Channels: " << mutedAux1 << endl
3416 <<
"Aux Input 1 Unmuted/Enabled Channels: " << unmutedAux1 << endl;
3417 oss <<
"Aux Input 2 Muted/Disabled Channels: " << mutedAux2 << endl
3418 <<
"Aux Input 2 Unmuted/Enabled Channels: " << unmutedAux2;
3421 } mAudMxrMutesDecoder;
3423 struct DecodeAudioMixerLevelsReg :
public Decoder
3427 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3429 static const string sLabels[] = {
"Aux Input 1",
"Aux Input 2",
"Main Input Audio Channels 1|2",
"Main Input Audio Channels 3|4",
3430 "Main Input Audio Channels 5|6",
"Main Input Audio Channels 7|8",
"Main Input Audio Channels 9|10",
3431 "Main Input Audio Channels 11|12",
"Main Input Audio Channels 13|14",
"Main Input Audio Channels 15|16",
3432 "Main Output Audio Channels 1|2",
"Main Output Audio Channels 3|4",
"Main Output Audio Channels 5|6",
3433 "Main Output Audio Channels 7|8",
"Main Output Audio Channels 9|10",
"Main Output Audio Channels 11|12",
3434 "Main Output Audio Channels 13|14",
"Main Output Audio Channels 15|16"};
3438 const string & label(sLabels[labelOffset]);
3442 oss << label <<
" Left Level:" <<
xHEX0N(leftLevel, 4) <<
" (" <<
DEC(leftLevel) <<
")" << endl
3443 << label <<
" Right Level:" <<
xHEX0N(rightLevel,4) <<
" (" <<
DEC(rightLevel) <<
")";
3446 } mAudMxrLevelDecoder;
3448 struct DecodeAncExtControlReg :
public Decoder
3450 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3453 static const string SyncStrs [] = {
"field",
"frame",
"immediate",
"unknown" };
3454 oss <<
"HANC Y enable: " <<
YesNo(inRegValue &
BIT( 0)) << endl
3455 <<
"VANC Y enable: " <<
YesNo(inRegValue &
BIT( 4)) << endl
3456 <<
"HANC C enable: " <<
YesNo(inRegValue &
BIT( 8)) << endl
3457 <<
"VANC C enable: " <<
YesNo(inRegValue &
BIT(12)) << endl
3458 <<
"Progressive video: " <<
YesNo(inRegValue &
BIT(16)) << endl
3459 <<
"Synchronize: " << SyncStrs [(inRegValue & (
BIT(24) |
BIT(25))) >> 24] << endl
3460 <<
"Memory writes: " <<
EnabDisab(!(inRegValue &
BIT(28))) << endl
3461 <<
"SD Y+C Demux: " <<
EnabDisab(inRegValue &
BIT(30)) << endl
3462 <<
"Metadata from: " << (inRegValue &
BIT(31) ?
"LSBs" :
"MSBs");
3465 } mDecodeAncExtControlReg;
3467 struct DecodeAuxExtControlReg :
public Decoder
3469 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3472 static const string SyncStrs [] = {
"field",
"frame",
"immediate",
"unknown" };
3473 oss <<
"Progressive video: " <<
YesNo(inRegValue &
BIT(16)) << endl
3474 <<
"Synchronize: " << SyncStrs [(inRegValue & (
BIT(24) |
BIT(25))) >> 24] << endl
3475 <<
"Memory writes: " <<
EnabDisab(!(inRegValue &
BIT(28))) << endl
3476 <<
"Filter inclusion: " <<
EnabDisab(inRegValue &
BIT(29));
3479 } mDecodeAuxExtControlReg;
3482 struct DecodeAncExtFieldLinesReg :
public Decoder
3484 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3487 const uint32_t which (inRegNum & 0x1F);
3488 const uint32_t valueLow (inRegValue & 0xFFF);
3489 const uint32_t valueHigh ((inRegValue >> 16) & 0xFFF);
3492 case 5: oss <<
"F1 cutoff line: " << valueLow << endl
3493 <<
"F2 cutoff line: " << valueHigh;
3495 case 9: oss <<
"F1 VBL start line: " << valueLow << endl
3496 <<
"F2 VBL start line: " << valueHigh;
3498 case 11: oss <<
"Field ID high on line: " << valueLow << endl
3499 <<
"Field ID low on line: " << valueHigh;
3501 case 17: oss <<
"F1 analog start line: " << valueLow << endl
3502 <<
"F2 analog start line: " << valueHigh;
3505 oss <<
"Invalid register type";
3510 } mDecodeAncExtFieldLines;
3513 struct DecodeAncExtStatusReg :
public Decoder
3515 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3518 const uint32_t which (inRegNum & 0x1F);
3519 const uint32_t byteTotal (inRegValue & 0xFFFFFF);
3520 const bool overrun ((inRegValue &
BIT(28)) ?
true :
false);
3523 case 6: oss <<
"Total bytes: ";
break;
3524 case 7: oss <<
"Total F1 bytes: ";
break;
3525 case 8: oss <<
"Total F2 bytes: ";
break;
3526 default: oss <<
"Invalid register type";
break;
3528 oss <<
DEC(byteTotal) << endl
3529 <<
"Overrun: " <<
YesNo(overrun);
3532 } mDecodeAncExtStatus;
3535 struct DecodeAncExtIgnoreDIDReg :
public Decoder
3537 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3540 oss <<
"Ignoring DIDs " <<
HEX0N((inRegValue >> 0) & 0xFF, 2)
3541 <<
", " <<
HEX0N((inRegValue >> 8) & 0xFF, 2)
3542 <<
", " <<
HEX0N((inRegValue >> 16) & 0xFF, 2)
3543 <<
", " <<
HEX0N((inRegValue >> 24) & 0xFF, 2);
3546 } mDecodeAncExtIgnoreDIDs;
3548 struct DecodeAncExtAnalogFilterReg :
public Decoder
3550 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3553 uint32_t which (inRegNum & 0x1F);
3554 oss <<
"Each 1 bit specifies capturing ";
3557 case 18: oss <<
"F1 Y";
break;
3558 case 19: oss <<
"F2 Y";
break;
3559 case 20: oss <<
"F1 C";
break;
3560 case 21: oss <<
"F2 C";
break;
3561 default:
return "Invalid register type";
3563 oss <<
" line as analog, else digital";
3566 } mDecodeAncExtAnalogFilter;
3568 struct DecodeAncInsValuePairReg :
public Decoder
3570 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3573 const uint32_t which (inRegNum & 0x1F);
3574 const uint32_t valueLow (inRegValue & 0xFFFF);
3575 const uint32_t valueHigh ((inRegValue >> 16) & 0xFFFF);
3579 case 0: oss <<
"F1 byte count low: " << valueLow << endl
3580 <<
"F2 byte count low: " << valueHigh;
3582 case 4: oss <<
"HANC pixel delay: " << (valueLow & 0x3FF) << endl
3583 <<
"VANC pixel delay: " << (valueHigh & 0x7FF);
3585 case 5: oss <<
"F1 first active line: " << (valueLow & 0x7FF) << endl
3586 <<
"F2 first active line: " << (valueHigh & 0x7FF);
3588 case 6: oss <<
"Active line length: " << (valueLow & 0x7FF) << endl
3589 <<
"Total line length: " << (valueHigh & 0xFFF);
3591 case 8: oss <<
"Field ID high on line: " << (valueLow & 0x7FF) << endl
3592 <<
"Field ID low on line: " << (valueHigh & 0x7FF);
3594 case 11: oss <<
"F1 chroma blnk start line: " << (valueLow & 0x7FF) << endl
3595 <<
"F2 chroma blnk start line: " << (valueHigh & 0x7FF);
3597 case 14: oss <<
"F1 byte count high: " << valueLow << endl
3598 <<
"F2 byte count high: " << valueHigh;
3600 default:
return "Invalid register type";
3604 } mDecodeAncInsValuePairReg;
3606 struct DecodeAncInsControlReg :
public Decoder
3608 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3611 oss <<
"HANC Y enable: " <<
YesNo(inRegValue &
BIT( 0)) << endl
3612 <<
"VANC Y enable: " <<
YesNo(inRegValue &
BIT( 4)) << endl
3613 <<
"HANC C enable: " <<
YesNo(inRegValue &
BIT( 8)) << endl
3614 <<
"VANC C enable: " <<
YesNo(inRegValue &
BIT(12)) << endl
3615 <<
"Payload Y insert: " <<
YesNo(inRegValue &
BIT(16)) << endl
3616 <<
"Payload C insert: " <<
YesNo(inRegValue &
BIT(17)) << endl
3617 <<
"Payload F1 insert: " <<
YesNo(inRegValue &
BIT(20)) << endl
3618 <<
"Payload F2 insert: " <<
YesNo(inRegValue &
BIT(21)) << endl
3619 <<
"Progressive video: " <<
YesNo(inRegValue &
BIT(24)) << endl
3620 <<
"Memory reads: " <<
EnabDisab(!(inRegValue &
BIT(28))) << endl
3621 <<
"SD Packet Split: " <<
EnabDisab(inRegValue &
BIT(31));
3624 } mDecodeAncInsControlReg;
3626 struct DecodeAncInsChromaBlankReg :
public Decoder
3628 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3631 uint32_t which (inRegNum & 0x1F);
3633 oss <<
"Each 1 bit specifies if chroma in ";
3636 case 12: oss <<
"F1";
break;
3637 case 13: oss <<
"F2";
break;
3638 default:
return "Invalid register type";
3640 oss <<
" should be blanked or passed thru";
3643 } mDecodeAncInsChromaBlankReg;
3645 struct DecodeXptGroupReg :
public Decoder
3647 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3649 static unsigned sShifts[4] = {0, 8, 16, 24};
3651 for (
unsigned ndx(0); ndx < 4; ndx++)
3669 strs.push_back(oss.str());
3675 } mDecodeXptGroupReg;
3677 struct DecodeXptValidReg :
public Decoder
3679 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3696 ss <<
xHEX0N(outputXpt,2) <<
"(" <<
DEC(outputXpt) <<
")";
3698 ss <<
"'" << name <<
"'";
3699 outputXptNames.push_back(ss.str());
3701 if (!outputXptNames.empty())
3702 oss <<
"Valid Xpts: " << outputXptNames;
3706 return Decoder::operator()(inRegNum, inRegValue, inDeviceID);
3708 } mDecodeXptValidReg;
3710 struct DecodeNTV4FSReg :
public Decoder
3712 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3714 static const string sPixClkSelects[] = {
"27",
"74.1758",
"74.25",
"148.3516",
"148.5",
"inv5",
"inv6",
"inv7"};
3715 static const string sSyncs[] = {
"Sync to Frame",
"Sync to Field",
"Immediate",
"Sync to External"};
3721 {
const ULWord disabled (inRegValue &
BIT(1));
3722 const ULWord sync ((inRegValue & (
BIT(20)|
BIT(21))) >> 20);
3723 const ULWord pixClkSel((inRegValue & (
BIT(16)|
BIT(17)|
BIT(18))) >> 16);
3726 oss <<
"Enabled: " <<
YesNo(!disabled) << endl
3727 <<
"Mode: " << ((inRegValue &
BIT( 0)) ?
"Capture" :
"Display") << endl
3728 <<
"DRT_DISP: " <<
OnOff(inRegValue &
BIT( 2)) << endl
3729 <<
"Fill Bit: " <<
DEC((inRegValue &
BIT( 3)) ? 1 : 0) << endl
3730 <<
"Dither: " <<
EnabDisab(inRegValue &
BIT( 4)) << endl
3731 <<
"RGB8 Convert: " << ((inRegValue &
BIT( 5)) ?
"Use '00'" :
"Copy MSBs") << endl
3732 <<
"Progressive: " <<
YesNo(inRegValue &
BIT( 6)) << endl
3734 <<
"Pix Clk Sel: " << sPixClkSelects[pixClkSel] <<
" MHz" << endl
3735 <<
"Sync: " << sSyncs[sync];
3737 oss <<
"Enabled: " <<
YesNo(!disabled);
3741 {
const ULWord lineCnt ((inRegValue & (0xFFFF0000)) >> 16);
3742 oss <<
"Field ID: " <<
OddEven(inRegValue &
BIT( 0)) << endl
3743 <<
"Line Count: " <<
DEC(lineCnt);
3747 {
const int32_t xferByteCnt((inRegValue & 0xFFFF0000) >> 16), linePitch(inRegValue & 0x0000FFFF);
3748 oss <<
"Line Pitch: " << linePitch << (linePitch < 0 ?
" (flipped)" :
"") << endl
3749 <<
"Xfer Byte Count: " << xferByteCnt <<
" [bytes/line]" << (linePitch < 0 ?
" (flipped)" :
"");
3753 {
const ULWord ROIVSize((inRegValue & (0x0FFF0000)) >> 16), ROIHSize(inRegValue & 0x00000FFF);
3754 oss <<
"ROI Horz Size: " <<
DEC(ROIHSize) <<
" [pixels]" << endl
3755 <<
"ROI Vert Size: " <<
DEC(ROIVSize) <<
" [lines]";
3760 {
const ULWord ROIVOff((inRegValue & (0x0FFF0000)) >> 16), ROIHOff(inRegValue & 0x00000FFF);
3762 oss <<
"ROI " << fld <<
" Horz Offset: " <<
DEC(ROIHOff) << endl
3763 <<
"ROI " << fld <<
" Vert Offset: " <<
DEC(ROIVOff);
3767 {
const ULWord tot((inRegValue & (0x0FFF0000)) >> 16), act(inRegValue & 0x00000FFF);
3768 oss <<
"Disp Horz Active: " <<
DEC(act) << endl
3769 <<
"Disp Horz Total: " <<
DEC(tot);
3773 {
const ULWord lo((inRegValue & (0x07FF0000)) >> 16), hi(inRegValue & 0x000007FF);
3774 oss <<
"Disp FID Lo: " <<
DEC(lo) << endl
3775 <<
"Disp FID Hi: " <<
DEC(hi);
3780 {
const ULWord actEnd((inRegValue & (0x07FF0000)) >> 16), actStart(inRegValue & 0x000007FF);
3782 oss <<
"Disp " << fld <<
" Active Start: " <<
DEC(actStart) << endl
3783 <<
"Disp " << fld <<
" Active End: " <<
DEC(actEnd);
3787 oss <<
"Unpacker Horz Offset: " <<
DEC(inRegValue & 0x0000FFFF);
3791 {
const ULWord hi((inRegValue & (0xFFFF0000)) >> 16), lo(inRegValue & 0x0000FFFF);
3794 oss <<
"Disp Fill " << CbBorCrR <<
": " <<
DEC(lo) <<
" " <<
xHEX0N(lo,4) << endl
3795 <<
"Disp Fill " << YGorA <<
": " <<
DEC(hi) <<
" " <<
xHEX0N(hi,4);
3799 {
const ULWord lo(inRegValue & 0x0000FFFF);
3800 oss <<
"ROI Fill Alpha: " <<
DEC(lo) <<
" " <<
xHEX0N(lo,4);
3804 oss <<
"Output Timing Frame Pulse Preset: " <<
DEC(inRegValue & 0x00FFFFFF) <<
" " 3805 <<
xHEX0N(inRegValue & 0x00FFFFFF,6);
3810 {
const int32_t lo (inRegValue & 0x00001FFF);
3811 oss <<
"Output Video Offset: " << lo <<
" " <<
xHEX0N(lo,6);
3815 return Decoder::operator()(inRegNum, inRegValue, inDeviceID);
3821 struct DecodeIPv4Reg :
public Decoder
3823 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3826 oss << DEC((inRegValue & 0xFF000000) >> 24) <<
"." <<
DEC((inRegValue & 0x00FF0000) >> 16) <<
"." <<
DEC((inRegValue & 0x0000FF00) >> 8) <<
"." <<
DEC(inRegValue & 0x000000FF);
3831 struct DecodeHDMIOutputControl :
public Decoder
3833 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3836 static const string sHDMIStdV1[] = {
"1080i",
"720p",
"480i",
"576i",
"1080p",
"SXGA",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"" };
3837 static const string sHDMIStdV2V3[] = {
"1080i",
"720p",
"480i",
"576i",
"1080p",
"1556i",
"2Kx1080p",
"2Kx1080i",
"UHD",
"4K",
"",
"",
"",
"",
"",
"" };
3838 static const string sVidRates[] = {
"",
"60.00",
"59.94",
"30.00",
"29.97",
"25.00",
"24.00",
"23.98",
"50.00",
"48.00",
"47.95",
"",
"",
"",
"",
"" };
3839 static const string sSrcSampling[] = {
"YC422",
"RGB",
"YC420",
"Unknown/invalid" };
3840 static const string sBitDepth[] = {
"8",
"10",
"12",
"Unknown/invalid" };
3843 const string hdmiVidStdStr (hdmiVers > 1 ? sHDMIStdV2V3[rawVideoStd] : (hdmiVers == 1 ? sHDMIStdV1[rawVideoStd] :
""));
3846 const uint32_t srcBPC ((inRegValue & (
BIT(16)|
BIT(17))) >> 16);
3847 const uint32_t txBitDepth ((inRegValue & (
BIT(20)|
BIT(21))) >> 20);
3848 oss <<
"Video Standard: " << hdmiVidStdStr;
3849 if (hdmiVidStdStr != vidStdStr)
3850 oss <<
" (" << vidStdStr <<
")";
3852 <<
"Color Mode: " << ((inRegValue &
BIT( 8)) ?
"RGB" :
"YCbCr") << endl
3854 <<
"Scan Mode: " << ((inRegValue &
BIT(13)) ?
"Progressive" :
"Interlaced") << endl
3855 <<
"Bit Depth: " << ((inRegValue &
BIT(14)) ?
"10-bit" :
"8-bit") << endl
3856 <<
"Output Color Sampling: " << ((inRegValue &
BIT(15)) ?
"4:4:4" :
"4:2:2") << endl
3857 <<
"Output Bit Depth: " << sBitDepth[txBitDepth] << endl
3858 <<
"Src Color Sampling: " << sSrcSampling[srcSampling] << endl
3859 <<
"Src Bits Per Component: " << sBitDepth[srcBPC] << endl
3860 <<
"Output Range: " << ((inRegValue &
BIT(28)) ?
"Full" :
"SMPTE") << endl
3861 <<
"Audio Channels: " << ((inRegValue &
BIT(29)) ?
"8" :
"2") << endl
3862 <<
"Output: " << ((inRegValue &
BIT(30)) ?
"DVI" :
"HDMI");
3865 <<
"Audio Loopback: " <<
OnOff(inRegValue &
BIT(31));
3868 } mDecodeHDMIOutputControl;
3870 struct DecodeHDMIInputStatus :
public Decoder
3872 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3878 static const string sStds[32] = {
"1080i",
"720p",
"480i",
"576i",
"1080p",
"SXGA",
"2K1080p",
"2K1080i",
"3840p",
"4096p"};
3879 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" };
3880 oss <<
"HDMI Input: " << (inRegValue &
BIT(0) ?
"Locked" :
"Unlocked") << endl
3881 <<
"HDMI Input: " << (inRegValue &
BIT(1) ?
"Stable" :
"Unstable") << endl
3882 <<
"Color Mode: " << (inRegValue &
BIT(2) ?
"RGB" :
"YCbCr") << endl
3883 <<
"Bitdepth: " << (inRegValue &
BIT(3) ?
"10-bit" :
"8-bit") << endl
3884 <<
"Audio Channels: " << (inRegValue &
BIT(12) ? 2 : 8) << endl
3885 <<
"Scan Mode: " << (inRegValue &
BIT(13) ?
"Progressive" :
"Interlaced") << endl
3886 <<
"Standard: " << (inRegValue &
BIT(14) ?
"SD" :
"HD") << endl
3887 <<
"Video Standard: " << sStds[vidStd] << endl
3888 <<
"Protocol: " << (inRegValue &
BIT(27) ?
"DVI" :
"HDMI") << endl
3889 <<
"Video Rate : " << (rate < 11 ? sRates[rate] :
string(
"invalid"));
3892 } mDecodeHDMIInputStatus;
3894 struct DecodeHDMIInputControl :
public Decoder
3896 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3899 const UWord chanPair ((inRegValue & (
BIT(2) |
BIT(3))) >> 2);
3901 const UWord txCh12Sel ((inRegValue & (
BIT(29)|
BIT(30))) >> 29);
3903 oss <<
"HDMI In EDID Write-Enable: " <<
EnabDisab(inRegValue &
BIT(0)) << endl
3904 <<
"HDMI Force Output Params: " <<
SetNotset(inRegValue &
BIT(1)) << endl
3906 <<
"hdmi_rx_8ch_src_off: " <<
YesNo(inRegValue &
BIT(4)) << endl
3907 <<
"Swap HDMI In Audio Ch. 3/4: " <<
YesNo(inRegValue &
BIT(5)) << endl
3908 <<
"Swap HDMI Out Audio Ch. 3/4: " <<
YesNo(inRegValue &
BIT(6)) << endl
3909 <<
"HDMI Prefer 420: " <<
SetNotset(inRegValue &
BIT(7)) << endl
3910 <<
"hdmi_rx_spdif_err: " <<
SetNotset(inRegValue &
BIT(8)) << endl
3911 <<
"hdmi_rx_afifo_under: " <<
SetNotset(inRegValue &
BIT(9)) << endl
3912 <<
"hdmi_rx_afifo_empty: " <<
SetNotset(inRegValue &
BIT(10)) << endl
3913 <<
"H polarity: " << (inRegValue &
BIT(16) ?
"Inverted" :
"Normal") << endl
3914 <<
"V polarity: " << (inRegValue &
BIT(17) ?
"Inverted" :
"Normal") << endl
3915 <<
"F polarity: " << (inRegValue &
BIT(18) ?
"Inverted" :
"Normal") << endl
3916 <<
"DE polarity: " << (inRegValue &
BIT(19) ?
"Inverted" :
"Normal") << endl
3917 <<
"Tx Src Sel: " <<
DEC(txSrcSel) <<
" (" <<
xHEX0N(txSrcSel,4) <<
")" << endl
3918 <<
"Tx Center Cut: " <<
SetNotset(inRegValue &
BIT(24)) << endl
3919 <<
"Tx 12 bit: " <<
SetNotset(inRegValue &
BIT(26)) << endl
3920 <<
"RGB Input Gamut: " << (inRegValue &
BIT(28) ?
"Full Range" :
"Narrow Range (SMPTE)") << endl
3921 <<
"Tx_ch12_sel: " <<
DEC(txCh12Sel) <<
" (" <<
xHEX0N(txCh12Sel,4) <<
")" << endl
3922 <<
"Input AVI Gamut: " << (inRegValue &
BIT(31) ?
"Full Range" :
"Narrow Range (SMPTE)") << endl
3926 } mDecodeHDMIInputControl;
3928 struct DecodeHDMIOutputStatus :
public Decoder
3930 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3937 } mDecodeHDMIOutputStatus;
3939 struct DecodeHDMIOutHDRPrimary :
public Decoder
3941 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 3976 const double xFloat (
double(xPrimary) * 0.00002);
3977 const double yFloat (
double(yPrimary) * 0.00002);
3979 oss <<
"X: " <<
fDEC(xFloat,7,5) << endl;
3981 oss <<
"X: " <<
HEX0N(xPrimary, 4) <<
"(invalid)" << endl;
3983 oss <<
"Y: " <<
fDEC(yFloat,7,5);
3985 oss <<
"Y: " <<
HEX0N(yPrimary, 4) <<
"(invalid)";
3996 const double minFloat (
double(minValue) * 0.00001);
3997 const double maxFloat (maxValue);
3998 oss <<
"Min: " <<
fDEC(minFloat,7,5) << endl
3999 <<
"Max: " <<
fDEC(maxFloat,7,5);
4010 const double cntFloat (cntValue);
4011 const double frmFloat (frmValue);
4012 oss <<
"Max Content Light Level: " <<
fDEC(cntFloat,7,5) << endl
4013 <<
"Max Frame Light Level: " <<
fDEC(frmFloat,7,5);
4020 } mDecodeHDMIOutHDRPrimary;
4022 struct DecodeHDMIOutHDRControl :
public Decoder
4024 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4026 static const string sEOTFs[] = {
"Trad Gamma SDR",
"Trad Gamma HDR",
"SMPTE ST 2084",
"HLG"};
4035 <<
"EOTF: " << sEOTFs[(EOTFvalue < 3) ? EOTFvalue : 3] << endl
4036 <<
"Static MetaData Desc ID: " <<
HEX0N(staticMetaDataDescID, 2) <<
" (" <<
DEC(staticMetaDataDescID) <<
")";
4040 } mDecodeHDMIOutHDRControl;
4042 struct DecodeHDMIOutMRControl :
public Decoder
4044 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4047 static const string sMRStandard[] = {
"1080i",
"720p",
"480i",
"576i",
"1080p",
"1556i",
"2Kx1080p",
"2Kx1080i",
"UHD",
"4K",
"",
"",
"",
"",
"",
"" };
4049 const string hdmiVidStdStr (sMRStandard[rawVideoStd]);
4051 oss <<
"Video Standard: " << hdmiVidStdStr;
4052 if (hdmiVidStdStr != vidStdStr)
4053 oss <<
" (" << vidStdStr <<
")";
4055 <<
"Capture Mode: " << ((inRegValue &
kRegMaskMREnable) ?
"Enabled" :
"Disabled");
4058 } mDecodeHDMIOutMRControl;
4060 struct DecodeSDIOutputControl :
public Decoder
4062 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4065 const uint32_t vidStd (inRegValue & (
BIT(0)|
BIT(1)|
BIT(2)));
4066 static const string sStds[32] = {
"1080i",
"720p",
"480i",
"576i",
"1080p",
"1556i",
"6",
"7"};
4067 oss <<
"Video Standard: " << sStds[vidStd] << endl
4068 <<
"2Kx1080 mode: " << (inRegValue &
BIT(3) ?
"2048x1080" :
"1920x1080") << endl
4069 <<
"HBlank RGB Range: Black=" << (inRegValue &
BIT(7) ?
"0x40" :
"0x04") << endl
4070 <<
"12G enable: " <<
YesNo(inRegValue &
BIT(17)) << endl
4071 <<
"6G enable: " <<
YesNo(inRegValue &
BIT(16)) << endl
4072 <<
"3G enable: " <<
YesNo(inRegValue &
BIT(24)) << endl
4073 <<
"3G mode: " << (inRegValue &
BIT(25) ?
"b" :
"a") << endl
4074 <<
"VPID insert enable: " <<
YesNo(inRegValue &
BIT(26)) << endl
4075 <<
"VPID overwrite enable: " <<
YesNo(inRegValue &
BIT(27)) << endl
4076 <<
"DS 1 audio source: " "AudSys";
4077 switch ((inRegValue & (
BIT(28)|
BIT(30))) >> 28)
4079 case 0: oss << (inRegValue &
BIT(18) ? 5 : 1);
break;
4080 case 1: oss << (inRegValue &
BIT(18) ? 7 : 3);
break;
4081 case 4: oss << (inRegValue &
BIT(18) ? 6 : 2);
break;
4082 case 5: oss << (inRegValue &
BIT(18) ? 8 : 4);
break;
4084 oss << endl <<
"DS 2 audio source: AudSys";
4085 switch ((inRegValue & (
BIT(29)|
BIT(31))) >> 29)
4087 case 0: oss << (inRegValue &
BIT(19) ? 5 : 1);
break;
4088 case 1: oss << (inRegValue &
BIT(19) ? 7 : 3);
break;
4089 case 4: oss << (inRegValue &
BIT(19) ? 6 : 2);
break;
4090 case 5: oss << (inRegValue &
BIT(19) ? 8 : 4);
break;
4094 } mDecodeSDIOutputControl;
4096 struct DecodeSDIOutTimingCtrl :
public Decoder
4098 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4101 const uint32_t hMask(0x00001FFF), vMask(0x1FFF0000);
4102 const uint32_t hOffset(inRegValue & hMask), vOffset((inRegValue & vMask) >> 16);
4103 oss <<
"Horz Offset: " <<
xHEX0N(
UWord(hOffset),4) << endl
4104 <<
"Vert Offset: " <<
xHEX0N(
UWord(vOffset),4) << endl
4105 <<
"E-E Timing Override: " <<
EnabDisab(inRegValue &
BIT(31));
4108 } mDecodeSDIOutTimingCtrl;
4110 struct DecodeDMAControl :
public Decoder
4112 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4114 const uint16_t gen ((inRegValue & (
BIT(20)|
BIT(21)|
BIT(22)|
BIT(23))) >> 20);
4115 const uint16_t lanes ((inRegValue & (
BIT(16)|
BIT(17)|
BIT(18)|
BIT(19))) >> 16);
4116 const uint16_t fwRev ((inRegValue & 0x0000FF00) >> 8);
4118 for (uint16_t engine(0); engine < 4; engine++)
4119 oss <<
"DMA " << (engine+1) <<
" Int Active?: " <<
YesNo(inRegValue &
BIT(27+engine)) << endl;
4120 oss <<
"Bus Error Int Active?: " <<
YesNo(inRegValue &
BIT(31)) << endl;
4121 for (uint16_t engine(0); engine < 4; engine++)
4122 oss <<
"DMA " << (engine+1) <<
" Busy?: " <<
YesNo(inRegValue &
BIT(27+engine)) << endl;
4123 oss <<
"Strap: " << ((inRegValue &
BIT(7)) ?
"Installed" :
"Not Installed") << endl
4124 <<
"Firmware Rev: " <<
xHEX0N(fwRev, 2) <<
" (" <<
DEC(fwRev) <<
")" << endl
4125 <<
"Gen: " << gen << ((gen > 0 && gen < 4) ?
"" :
" <invalid>") << endl
4126 <<
"Lanes: " <<
DEC(lanes) << ((lanes < 9) ?
"" :
" <invalid>");
4129 } mDMAControlRegDecoder;
4131 struct DecodeDMAIntControl :
public Decoder
4133 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4136 for (uint16_t eng(0); eng < 4; eng++)
4137 oss <<
"DMA " << (eng+1) <<
" Enabled?: " <<
YesNo(inRegValue &
BIT(eng)) << endl;
4138 oss <<
"Bus Error Enabled?: " <<
YesNo(inRegValue &
BIT(4)) << endl;
4139 for (uint16_t eng(0); eng < 4; eng++)
4140 oss <<
"DMA " << (eng+1) <<
" Active?: " <<
YesNo(inRegValue &
BIT(27+eng)) << endl;
4141 oss <<
"Bus Error: " <<
YesNo(inRegValue &
BIT(31));
4144 } mDMAIntControlRegDecoder;
4146 struct DecodeDMAXferRate :
public Decoder
4148 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4151 oss <<
DEC(inRegValue) <<
" [MB/sec] [kB/ms] [B/us]";
4154 } mDMAXferRateRegDecoder;
4156 struct DecodeRP188InOutDBB :
public Decoder
4158 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4160 const bool isReceivingRP188 (inRegValue &
BIT(16));
4161 const bool isReceivingSelectedRP188 (inRegValue &
BIT(17));
4162 const bool isReceivingLTC (inRegValue &
BIT(18));
4163 const bool isReceivingVITC (inRegValue &
BIT(19));
4165 oss <<
"RP188: " << (isReceivingRP188 ? (isReceivingSelectedRP188 ?
"Selected" :
"Unselected") :
"No") <<
" RP-188 received" 4166 << (isReceivingLTC ?
" +LTC" :
"") << (isReceivingVITC ?
" +VITC" :
"") << endl
4167 <<
"Bypass: " << (inRegValue &
BIT(23) ? (inRegValue &
BIT(22) ?
"SDI In 2" :
"SDI In 1") :
"Disabled") << endl
4168 <<
"Filter: " <<
HEX0N((inRegValue & 0xFF000000) >> 24, 2) << endl
4169 <<
"DBB: " <<
HEX0N((inRegValue & 0x0000FF00) >> 8, 2) <<
" " <<
HEX0N(inRegValue & 0x000000FF, 2);
4172 } mRP188InOutDBBRegDecoder;
4174 struct DecodeVidProcControl :
public Decoder
4176 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4179 static const string sSplitStds [8] = {
"1080i",
"720p",
"480i",
"576i",
"1080p",
"1556i",
"?6?",
"?7?"};
4180 oss <<
"Mode: " << (inRegValue &
kRegMaskVidProcMode ? ((inRegValue &
BIT(24)) ?
"Shaped" :
"Unshaped") :
"Full Raster") << endl
4181 <<
"FG Control: " << (inRegValue &
kRegMaskVidProcFGControl ? ((inRegValue &
BIT(20)) ?
"Shaped" :
"Unshaped") :
"Full Raster") << endl
4182 <<
"BG Control: " << (inRegValue &
kRegMaskVidProcBGControl ? ((inRegValue &
BIT(22)) ?
"Shaped" :
"Unshaped") :
"Full Raster") << endl
4183 <<
"VANC Pass-Thru: " << ((inRegValue &
BIT(13)) ?
"Background" :
"Foreground") << endl
4187 <<
"Limiting: " << ((inRegValue &
BIT(11)) ?
"Off" : ((inRegValue &
BIT(12)) ?
"Legal Broadcast" :
"Legal SDI")) << endl
4191 } mVidProcControlRegDecoder;
4193 struct DecodeSplitControl :
public Decoder
4195 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4198 const uint32_t startmask (0x0000FFFF);
4199 const uint32_t slopemask (0x3FFF0000);
4200 const uint32_t fractionmask(0x00000007);
4201 oss <<
"Split Start: " <<
HEX0N((inRegValue & startmask) & ~fractionmask, 4) <<
" " 4202 <<
HEX0N((inRegValue & startmask) & fractionmask, 4) << endl
4203 <<
"Split Slope: " <<
HEX0N(((inRegValue & slopemask) >> 16) & ~fractionmask, 4) <<
" " 4204 <<
HEX0N(((inRegValue & slopemask) >> 16) & fractionmask, 4) << endl
4205 <<
"Split Type: " << ((inRegValue &
BIT(30)) ?
"Vertical" :
"Horizontal");
4208 } mSplitControlRegDecoder;
4210 struct DecodeFlatMatteValue :
public Decoder
4212 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4215 const uint32_t mask (0x000003FF);
4216 oss <<
"Flat Matte Cb: " <<
HEX0N(inRegValue & mask, 3) << endl
4217 <<
"Flat Matte Y: " <<
HEX0N(((inRegValue >> 10) & mask) - 0x40, 3) << endl
4218 <<
"Flat Matte Cr: " <<
HEX0N((inRegValue >> 20) & mask, 3);
4221 } mFlatMatteValueRegDecoder;
4223 struct DecodeEnhancedCSCMode :
public Decoder
4225 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4227 static const string sFiltSel[] = {
"Full",
"Simple",
"None",
"?"};
4228 static const string sEdgeCtrl[] = {
"black",
"extended pixels"};
4229 static const string sPixFmts[] = {
"RGB 4:4:4",
"YCbCr 4:4:4",
"YCbCr 4:2:2",
"?"};
4230 const uint32_t filterSelect ((inRegValue >> 12) & 0x3);
4231 const uint32_t edgeControl ((inRegValue >> 8) & 0x1);
4232 const uint32_t outPixFmt ((inRegValue >> 4) & 0x3);
4233 const uint32_t inpPixFmt (inRegValue & 0x3);
4235 oss <<
"Filter select: " << sFiltSel[filterSelect] << endl
4236 <<
"Filter edge control: " <<
"Filter to " << sEdgeCtrl[edgeControl] << endl
4237 <<
"Output pixel format: " << sPixFmts[outPixFmt] << endl
4238 <<
"Input pixel format: " << sPixFmts[inpPixFmt];
4241 } mEnhCSCModeDecoder;
4243 struct DecodeEnhancedCSCOffset :
public Decoder
4245 static string U10Dot6ToFloat (
const uint32_t inOffset)
4247 double result (
double((inOffset >> 6) & 0x3FF));
4248 result += double(inOffset & 0x3F) / 64.0;
4249 ostringstream oss; oss <<
fDEC(result,12,5);
string resultStr(oss.str());
4252 static string U12Dot4ToFloat (
const uint32_t inOffset)
4254 double result (
double((inOffset >> 4) & 0xFFF));
4255 result += double(inOffset & 0xF) / 16.0;
4256 ostringstream oss; oss <<
fDEC(result,12,4);
string resultStr(oss.str());
4259 static string S13Dot2ToFloat (
const uint32_t inOffset)
4261 double result (
double((inOffset >> 2) & 0x1FFF));
4262 result += double(inOffset & 0x3) / 4.0;
4263 if (inOffset &
BIT(15))
4265 ostringstream oss; oss <<
fDEC(result,12,2);
string resultStr(oss.str());
4268 static string S11Dot4ToFloat (
const uint32_t inOffset)
4270 double result (
double((inOffset >> 4) & 0x7FF));
4271 result += double(inOffset & 0xF) / 16.0;
4272 if (inOffset &
BIT(15))
4274 ostringstream oss; oss <<
fDEC(result,12,4);
string resultStr(oss.str());
4277 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4279 const uint32_t regNum (inRegNum & 0x1F);
4280 const uint32_t lo (inRegValue & 0x0000FFFF);
4281 const uint32_t hi ((inRegValue >> 16) & 0xFFFF);
4285 case 1: oss <<
"Component 0 input offset: " << U12Dot4ToFloat(lo) <<
" (12-bit), " << U10Dot6ToFloat(lo) <<
" (10-bit)" << endl
4286 <<
"Component 1 input offset: " << U12Dot4ToFloat(hi) <<
" (12-bit), " << U10Dot6ToFloat(hi) <<
" (10-bit)";
4288 case 2: oss <<
"Component 2 input offset: " << U12Dot4ToFloat(lo) <<
" (12-bit), " << U10Dot6ToFloat(lo) <<
" (10-bit)";
4290 case 12: oss <<
"Component A output offset: " << U12Dot4ToFloat(lo) <<
" (12-bit), " << U10Dot6ToFloat(lo) <<
" (10-bit)" << endl
4291 <<
"Component B output offset: " << U12Dot4ToFloat(hi) <<
" (12-bit), " << U10Dot6ToFloat(hi) <<
" (10-bit)";
4293 case 13: oss <<
"Component C output offset: " << U12Dot4ToFloat(lo) <<
" (12-bit), " << U10Dot6ToFloat(lo) <<
" (10-bit)";
4295 case 15: oss <<
"Key input offset: " << S13Dot2ToFloat(lo) <<
" (12-bit), " << S11Dot4ToFloat(lo) <<
" (10-bit)" << endl
4296 <<
"Key output offset: " << U12Dot4ToFloat(hi) <<
" (12-bit), " << U10Dot6ToFloat(hi) <<
" (10-bit)";
4302 } mEnhCSCOffsetDecoder;
4304 struct DecodeEnhancedCSCKeyMode :
public Decoder
4306 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4308 static const string sSrcSel[] = {
"Key Input",
"Video Y Input"};
4309 static const string sRange[] = {
"Full Range",
"SMPTE Range"};
4310 const uint32_t keySrcSelect (inRegValue & 0x1);
4311 const uint32_t keyOutRange ((inRegValue >> 4) & 0x1);
4313 oss <<
"Key Source Select: " << sSrcSel[keySrcSelect] << endl
4314 <<
"Key Output Range: " << sRange[keyOutRange];
4317 } mEnhCSCKeyModeDecoder;
4319 struct DecodeEnhancedCSCCoefficient :
public Decoder
4321 static string S2Dot15ToFloat (
const uint32_t inCoefficient)
4323 double result = (double((inCoefficient >> 15) & 0x3));
4324 result += double(inCoefficient & 0x7FFF) / 32768.0;
4325 if (inCoefficient &
BIT(17))
4327 ostringstream oss; oss <<
fDEC(result,12,10);
string resultStr(oss.str());
4330 static string S12Dot12ToFloat (
const uint32_t inCoefficient)
4332 double result(
double((inCoefficient >> 12) & 0xFFF));
4333 result += double(inCoefficient & 0xFFF) / 4096.0;
4334 if (inCoefficient &
BIT(24))
4336 ostringstream oss; oss <<
fDEC(result,12,6);
string resultStr(oss.str());
4339 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4341 uint32_t regNum (inRegNum & 0x1F);
4343 if (regNum > 2 && regNum < 12)
4346 static const string sCoeffNames[] = {
"A0",
"A1",
"A2",
"B0",
"B1",
"B2",
"C0",
"C1",
"C2"};
4347 const uint32_t coeff ((inRegValue >> 9) & 0x0003FFFF);
4348 oss << sCoeffNames[regNum] <<
" coefficient: " << S2Dot15ToFloat(coeff) <<
" (" <<
xHEX0N(coeff,8) <<
")";
4350 else if (regNum == 16)
4352 const uint32_t gain ((inRegValue >> 4) & 0x01FFFFFF);
4353 oss <<
"Key gain: " << S12Dot12ToFloat(gain) <<
" (" <<
HEX0N(gain,8) <<
")";
4357 } mEnhCSCCoeffDecoder;
4359 struct DecodeCSCoeff1234 :
public Decoder
4361 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4363 const uint32_t coeff1 (((inRegValue >> 11) & 0x00000003) | uint32_t(inRegValue & 0x000007FF));
4364 const uint32_t coeff2 ((inRegValue >> 14) & 0x00001FFF);
4365 uint16_t nCoeff1(1), nCoeff2(2);
4370 nCoeff1 = 3; nCoeff2 = 4;
break;
4386 oss <<
"Video Key Sync Status: " << (inRegValue &
BIT(28) ?
"SyncFail" :
"OK") << endl
4387 <<
"Make Alpha From Key Input: " <<
EnabDisab(inRegValue &
BIT(29)) << endl
4388 <<
"Matrix Select: " << (inRegValue &
BIT(30) ?
"Rec601" :
"Rec709") << endl
4389 <<
"Use Custom Coeffs: " <<
YesNo(inRegValue &
BIT(31)) << endl;
4391 oss <<
"RGB Range: " << (inRegValue &
BIT(31) ?
"SMPTE (0x040-0x3C0)" :
"Full (0x000-0x3FF)") << endl;
4392 oss <<
"Coefficient" <<
DEC(nCoeff1) <<
": " <<
xHEX0N(coeff1, 4) << endl
4393 <<
"Coefficient" <<
DEC(nCoeff2) <<
": " <<
xHEX0N(coeff2, 4);
4396 } mCSCoeff1234Decoder;
4398 struct DecodeCSCoeff567890 :
public Decoder
4400 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4402 const uint32_t coeff5 (((inRegValue >> 11) & 0x00000003) | uint32_t(inRegValue & 0x000007FF));
4403 const uint32_t coeff6 ((inRegValue >> 14) & 0x00001FFF);
4404 uint16_t nCoeff5(5), nCoeff6(6);
4409 nCoeff5 = 7; nCoeff6 = 8;
break;
4412 nCoeff5 = 9; nCoeff6 = 10;
break;
4422 oss <<
"Coefficient" <<
DEC(nCoeff5) <<
": " <<
xHEX0N(coeff5, 4) << endl
4423 <<
"Coefficient" <<
DEC(nCoeff6) <<
": " <<
xHEX0N(coeff6, 4);
4426 } mCSCoeff567890Decoder;
4428 struct DecodeLUTV1ControlReg :
public Decoder
4430 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4432 static const string sModes[] = {
"Off",
"RGB",
"YCbCr",
"3-Way",
"Invalid"};
4445 if (lutVersion != 1)
4446 oss <<
"(Register data relevant for V1 LUT, this device has V" <<
DEC(lutVersion) <<
" LUT)";
4449 oss <<
"LUT Saturation Value: " <<
xHEX0N(saturation,4) <<
" (" <<
DEC(saturation) <<
")" << endl
4450 <<
"LUT Output Bank Select: " <<
SetNotset(outBankSelect) << endl
4451 <<
"LUT Mode: " << sModes[mode] <<
" (" <<
DEC(mode) <<
")";
4454 <<
"LUT5 Host Bank Select: " <<
SetNotset(cc5HostBank) << endl
4455 <<
"LUT5 Output Bank Select: " <<
SetNotset(cc5OutputBank) << endl
4456 <<
"LUT5 Select: " <<
SetNotset(cc5Select) << endl
4457 <<
"Config 2nd LUT Set: " <<
YesNo(ccConfig2);
4460 <<
"LUT3 Bank Select: " <<
SetNotset(cc3BankSel) << endl
4461 <<
"LUT4 Bank Select: " <<
SetNotset(cc4BankSel);
4464 } mLUTV1ControlRegDecoder;
4466 struct DecodeLUTV2ControlReg :
public Decoder
4468 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4472 if (lutVersion != 2)
4473 oss <<
"(Register data relevant for V2 LUT, this device has V" <<
DEC(lutVersion) <<
"LUT)";
4476 for (
UWord lutNum(0); lutNum < 8; lutNum++)
4477 oss <<
"LUT" <<
DEC(lutNum+1) <<
" Enabled: " << (
YesNo(inRegValue & (1<<lutNum))) << endl
4478 <<
"LUT" <<
DEC(lutNum+1) <<
" Host Access Bank Select: " << (inRegValue & (1<<(lutNum+8)) ?
'1' :
'0') << endl
4479 <<
"LUT" <<
DEC(lutNum+1) <<
" Output Bank Select: " << (inRegValue & (1<<(lutNum+16)) ?
'1' :
'0') << endl;
4480 oss <<
"12-Bit LUT mode: " << ((inRegValue &
BIT(28)) ?
"12-bit" :
"10-bit") << endl
4481 <<
"12-Bit LUT page reg: " <<
DEC(
UWord((inRegValue & (
BIT(24)|
BIT(25))) >> 24));
4485 } mLUTV2ControlRegDecoder;
4487 struct DecodeLUT :
public Decoder
4489 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4492 const bool isRed(inRegNum >= RedReg && inRegNum < GreenReg), isGreen(inRegNum >= GreenReg && inRegNum < BlueReg), isBlue(inRegNum>=BlueReg);
4498 const string label(isRed ?
"Red[" : (isGreen ?
"Green[" :
"Blue["));
4499 const ULWord ndx((inRegNum - (isRed ? RedReg : (isGreen ? GreenReg : BlueReg))) * 2);
4502 oss << label <<
DEC0N(ndx+0,3) <<
"]: " <<
DEC0N(lo,3) << endl
4503 << label <<
DEC0N(ndx+1,3) <<
"]: " <<
DEC0N(hi,3);
4508 struct DecodeSDIErrorStatus :
public Decoder
4510 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4514 oss <<
"Unlock Tally: " <<
DEC(inRegValue & 0x7FFF) << endl
4515 <<
"Locked: " <<
YesNo(inRegValue &
BIT(16)) << endl
4516 <<
"Link A VPID Valid: " <<
YesNo(inRegValue &
BIT(20)) << endl
4517 <<
"Link B VPID Valid: " <<
YesNo(inRegValue &
BIT(21)) << endl
4518 <<
"TRS Error Detected: " <<
YesNo(inRegValue &
BIT(24));
4521 } mSDIErrorStatusRegDecoder;
4523 struct DecodeSDIErrorCount :
public Decoder
4525 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4529 oss <<
"Link A: " <<
DEC(inRegValue & 0x0000FFFF) << endl
4530 <<
"Link B: " <<
DEC((inRegValue & 0xFFFF0000) >> 16);
4533 } mSDIErrorCountRegDecoder;
4535 struct DecodeDriverVersion :
public Decoder
4537 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4542 ULWord buildType((inRegValue >> 30) & 0x00000003);
4543 static const string sBuildTypes[] = {
"Release",
"Beta",
"Alpha",
"Development"};
4544 static const string sBldTypes[] = {
"",
"b",
"a",
"d"};
4546 oss <<
"Driver Version: " <<
DEC(vMaj) <<
"." <<
DEC(vMin) <<
"." <<
DEC(vDot);
4547 if (buildType) oss << sBldTypes[buildType] <<
DEC(vBld);
4549 <<
"Major Version: " <<
DEC(vMaj) << endl
4550 <<
"Minor Version: " <<
DEC(vMin) << endl
4551 <<
"Point Version: " <<
DEC(vDot) << endl
4552 <<
"Build Type: " << sBuildTypes[buildType] << endl
4553 <<
"Build Number: " <<
DEC(vBld);
4556 } mDriverVersionDecoder;
4558 struct DecodeFourCC :
public Decoder
4560 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4566 struct DecodeDriverType :
public Decoder
4568 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4572 if (inRegValue == 0x44455854)
4573 oss <<
"DriverKit ('DEXT')";
4574 else if (inRegValue)
4575 oss <<
"(Unknown/Invalid " <<
xHEX0N(inRegValue,8) <<
")";
4577 oss <<
"Kernel Extension ('KEXT')";
4584 } mDecodeDriverType;
4586 struct DecodeVDevReady :
public Decoder
4588 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4593 oss <<
"VDev will set ";
4595 oss <<
"register " <<
DEC(inRegValue);
4598 oss <<
" when 'IsReady'";
4604 struct DecodeIDSwitchStatus :
public Decoder
4606 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4611 const uint32_t switchEnableBits (((inRegValue & 0x0F000000) >> 20) | ((inRegValue & 0xF0000000) >> 28));
4612 for (
UWord idSwitch(0); idSwitch < 4; )
4614 const uint32_t switchEnabled (switchEnableBits &
BIT(idSwitch));
4615 oss <<
"Switch " <<
DEC(++idSwitch) <<
": " << (switchEnabled ?
"Enabled" :
"Disabled");
4621 oss <<
"(ID Switch not supported)";
4624 } mDecodeIDSwitchStatus;
4626 struct DecodePWMFanControl :
public Decoder
4628 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4636 } mDecodePWMFanControl;
4638 struct DecodePWMFanMonitor :
public Decoder
4640 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4648 } mDecodePWMFanMonitor;
4650 struct DecodeBOBStatus :
public Decoder
4652 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4656 oss <<
"Break Out Board: " << ((inRegValue &
kRegMaskBOBAbsent) ?
"Disconnected" :
"Connected") << endl
4660 oss <<
"Device does not support a breakout board";
4665 struct DecodeBOBGPIIn :
public Decoder
4667 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4676 oss <<
"Device does not support a breakout board";
4681 struct DecodeBOBGPIInInterruptControl :
public Decoder
4683 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 } mDecodeBOBGPIInInterruptControl;
4697 struct DecodeBOBGPIOut :
public Decoder
4699 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4708 oss <<
"Device does not support a breakout board";
4713 struct DecodeBOBAudioControl :
public Decoder
4715 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4720 static const NTV2StringList dBuLabels = {
"+24dBu",
"+18dBu",
"+12dBu",
"+15dBu",
""};
4726 oss <<
"Device does not support a breakout board";
4729 } mDecodeBOBAudioControl;
4731 struct DecodeLEDControl :
public Decoder
4733 virtual string operator()(
const uint32_t inRegNum,
const uint32_t inRegValue,
const NTV2DeviceID inDeviceID)
const 4741 oss <<
"Device does not support a breakout board";
4744 } mDecodeLEDControl;
4746 static const int NOREADWRITE = 0;
4747 static const int READONLY = 1;
4748 static const int WRITEONLY = 2;
4749 static const int READWRITE = 3;
4751 static const int CONTAINS = 0;
4752 static const int STARTSWITH = 1;
4753 static const int ENDSWITH = 2;
4754 static const int EXACTMATCH = 3;
4756 typedef map <uint32_t, const Decoder *> RegNumToDecoderMap;
4757 typedef pair <uint32_t, const Decoder *> RegNumToDecoderPair;
4758 typedef multimap <string, uint32_t> RegClassToRegNumMMap, StringToRegNumMMap;
4759 typedef pair <string, uint32_t> StringToRegNumPair;
4760 typedef RegClassToRegNumMMap::const_iterator RegClassToRegNumConstIter;
4761 typedef StringToRegNumMMap::const_iterator StringToRegNumConstIter;
4763 typedef pair <uint32_t, uint32_t> XptRegNumAndMaskIndex;
4764 typedef map <NTV2InputCrosspointID, XptRegNumAndMaskIndex> InputXpt2XptRegNumMaskIndexMap;
4765 typedef map <XptRegNumAndMaskIndex, NTV2InputCrosspointID> XptRegNumMaskIndex2InputXptMap;
4766 typedef InputXpt2XptRegNumMaskIndexMap::const_iterator InputXpt2XptRegNumMaskIndexMapConstIter;
4767 typedef XptRegNumMaskIndex2InputXptMap::const_iterator XptRegNumMaskIndex2InputXptMapConstIter;
4771 RegNumToStringMap mRegNumToStringMap;
4772 RegNumToDecoderMap mRegNumToDecoderMap;
4773 RegClassToRegNumMMap mRegClassToRegNumMMap;
4774 StringToRegNumMMap mStringToRegNumMMap;
4776 InputXpt2XptRegNumMaskIndexMap mInputXpt2XptRegNumMaskIndexMap;
4777 XptRegNumMaskIndex2InputXptMap mXptRegNumMaskIndex2InputXptMap;
4807 return pInst ?
true :
false;
4814 return pInst ?
true :
false;
4821 return pInst ? pInst->DisposeInstance() :
false;
4829 return pRegExpert->RegNameToString(inRegNum);
4831 ostringstream oss; oss <<
"Reg ";
4833 oss <<
DEC(inRegNum);
4834 else if (inRegNum <= 0x0000FFFF)
4835 oss <<
xHEX0N(inRegNum,4);
4837 oss <<
xHEX0N(inRegNum,8);
4845 return pRegExpert ? pRegExpert->RegValueToString(inRegNum, inRegValue, inDeviceID) : string();
4852 return pRegExpert ? pRegExpert->IsRegInClass(inRegNum, inClassName) :
false;
4859 return pRegExpert ? pRegExpert->GetAllRegisterClasses() :
NTV2StringSet();
4866 return pRegExpert ? pRegExpert->GetRegisterClasses(inRegNum, inRemovePrefix) :
NTV2StringSet();
4873 return pRegExpert ? pRegExpert->GetRegistersForClass(inClassName) :
NTV2RegNumSet();
4887 return pRegExpert ? pRegExpert->GetRegistersForDevice(inDeviceID, inOtherRegsToInclude) :
NTV2RegNumSet();
4894 return pRegExpert ? pRegExpert->GetRegistersWithName(inName, inSearchStyle) :
NTV2RegNumSet();
4908 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)
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
bool NTV2DeviceHasLPProductCode(const NTV2DeviceID inDeviceID)
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[]
static std::string FourCCToString(const ULWord in4CC, const char nonPrintable='?')
#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