Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ngscopeclient/scopehal
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: d218f4b275f4
Choose a base ref
...
head repository: ngscopeclient/scopehal
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: ba280985a601
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Feb 13, 2020

  1. Copy the full SHA
    ba28098 View commit details
Showing with 26 additions and 13 deletions.
  1. +26 −13 scopeprotocols/TMDSDecoder.cpp
39 changes: 26 additions & 13 deletions scopeprotocols/TMDSDecoder.cpp
Original file line number Diff line number Diff line change
@@ -177,6 +177,13 @@ void TMDSDecoder::Refresh()

//TODO: TERC4 (5.4.3)

enum
{
TYPE_DATA,
TYPE_PREAMBLE,
TYPE_GUARD
} last_symbol_type = TYPE_DATA;

//Decode the actual data
for(size_t i=max_offset; i<sampdata.size()-11; i+= 10)
{
@@ -198,6 +205,7 @@ void TMDSDecoder::Refresh()
sampdata[i].m_offset,
sampdata[i+10].m_offset - sampdata[i].m_offset,
TMDSSymbol(TMDSSymbol::TMDS_TYPE_CONTROL, j)));
last_symbol_type = TYPE_PREAMBLE;
break;
}
}
@@ -206,22 +214,26 @@ void TMDSDecoder::Refresh()
continue;

//Check for HDMI video/control leading guard band
for(size_t j=0; j<2; j++)
if( (last_symbol_type == TYPE_PREAMBLE) || (last_symbol_type == TYPE_GUARD) )
{
match = true;
for(size_t k=0; k<10; k++)
for(size_t j=0; j<2; j++)
{
if(sampdata[i+k].m_sample != video_guard[j][k])
match = false;
}
match = true;
for(size_t k=0; k<10; k++)
{
if(sampdata[i+k].m_sample != video_guard[j][k])
match = false;
}

if(match)
{
cap->m_samples.push_back(TMDSSample(
sampdata[i].m_offset,
sampdata[i+10].m_offset - sampdata[i].m_offset,
TMDSSymbol(TMDSSymbol::TMDS_TYPE_GUARD, j)));
break;
if(match)
{
cap->m_samples.push_back(TMDSSample(
sampdata[i].m_offset,
sampdata[i+10].m_offset - sampdata[i].m_offset,
TMDSSymbol(TMDSSymbol::TMDS_TYPE_GUARD, j)));
last_symbol_type = TYPE_GUARD;
break;
}
}
}

@@ -253,6 +265,7 @@ void TMDSDecoder::Refresh()
sampdata[i].m_offset,
sampdata[i+10].m_offset - sampdata[i].m_offset,
TMDSSymbol(TMDSSymbol::TMDS_TYPE_DATA, d)));
last_symbol_type = TYPE_DATA;
}

SetData(cap);