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: 297c5d284e01
Choose a base ref
...
head repository: ngscopeclient/scopehal
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 118fb4f4578d
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Nov 28, 2020

  1. Copy the full SHA
    118fb4f View commit details
Showing with 5 additions and 8 deletions.
  1. +5 −8 scopeprotocols/JitterSpectrumFilter.cpp
13 changes: 5 additions & 8 deletions scopeprotocols/JitterSpectrumFilter.cpp
Original file line number Diff line number Diff line change
@@ -163,18 +163,15 @@ void JitterSpectrumFilter::Refresh()
size_t ui_width = EstimateUIWidth(din);

//Loop over the input and copy samples.
//If we have runs of identical bits, extend the same jitter value.
//TODO: interpolate?
vector<float, AlignedAllocator<float, 64>> extended_samples;
extended_samples.reserve(inlen);
for(size_t i=0; i<inlen; i++)
{
//Add the base sample
extended_samples.push_back(din->m_samples[i]);

//If we have gaps between UIs, fill them with zeroes (no jitter).
//TODO: interpolate?
int64_t nui = round(1.0 * din->m_durations[i] / ui_width);
for(int64_t j=1; j<nui; j++)
extended_samples.push_back(0);
for(int64_t j=0; j<nui; j++)
extended_samples.push_back(din->m_samples[i]);
}

//Refine our estimate of the final UI width.
@@ -204,5 +201,5 @@ void JitterSpectrumFilter::Refresh()
memset(m_rdin + npoints_raw, 0, (npoints - npoints_raw) * sizeof(float));

//and do the actual FFT processing
DoRefresh(din, ui_width_final, nouts, npoints);
DoRefresh(din, ui_width_final, npoints, nouts);
}