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: 10068a3743fd
Choose a base ref
...
head repository: ngscopeclient/scopehal
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: d6f33313cf02
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Feb 12, 2021

  1. Copy the full SHA
    1bafc5c View commit details
  2. EyeMask: Fixed incorrect loading of masks with absolute timebase in p…

    …s. Added support for fs as timebase unit in eye masks.
    azonenberg committed Feb 12, 2021
    Copy the full SHA
    d6f3331 View commit details
Showing with 20 additions and 1 deletion.
  1. +13 −0 scopeprotocols/DeEmbedFilter.cpp
  2. +7 −1 scopeprotocols/EyeMask.cpp
13 changes: 13 additions & 0 deletions scopeprotocols/DeEmbedFilter.cpp
Original file line number Diff line number Diff line change
@@ -61,6 +61,9 @@ DeEmbedFilter::DeEmbedFilter(const string& color)

#ifdef HAVE_CLFFT

m_clfftForwardPlan = 0;
m_clfftReversePlan = 0;

m_windowProgram = NULL;
m_deembedProgram = NULL;
m_rectangularWindowKernel = NULL;
@@ -122,6 +125,11 @@ DeEmbedFilter::DeEmbedFilter(const string& color)
DeEmbedFilter::~DeEmbedFilter()
{
#ifdef HAVE_CLFFT
if(m_clfftForwardPlan != 0)
clfftDestroyPlan(&m_clfftForwardPlan);
if(m_clfftReversePlan != 0)
clfftDestroyPlan(&m_clfftReversePlan);

delete m_windowProgram;
delete m_rectangularWindowKernel;

@@ -325,6 +333,11 @@ void DeEmbedFilter::DoRefresh(bool invert)

if(g_clContext)
{
if(m_clfftForwardPlan != 0)
clfftDestroyPlan(&m_clfftForwardPlan);
if(m_clfftReversePlan != 0)
clfftDestroyPlan(&m_clfftReversePlan);

//Set up the FFT object
if(CLFFT_SUCCESS != clfftCreateDefaultPlan(&m_clfftForwardPlan, (*g_clContext)(), CLFFT_1D, &npoints))
{
8 changes: 7 additions & 1 deletion scopeprotocols/EyeMask.cpp
Original file line number Diff line number Diff line change
@@ -96,6 +96,7 @@ bool EyeMask::Load(const YAML::Node& node)
//Load units
auto units = node["units"];
float yscale = 1;
float timebaseScale = 1;
for(auto it : units)
{
auto name = it.first.as<string>();
@@ -105,6 +106,11 @@ bool EyeMask::Load(const YAML::Node& node)
if(scale == "ui")
m_timebaseIsRelative = true;
else if(scale == "ps")
{
m_timebaseIsRelative = false;
timebaseScale = 1000;
}
else if(scale == "fs")
m_timebaseIsRelative = false;
else
LogError("Unrecognized xscale \"%s\"\n", scale.c_str());
@@ -138,7 +144,7 @@ bool EyeMask::Load(const YAML::Node& node)

auto points = p["points"];
for(auto v : points)
poly.m_points.push_back(EyeMaskPoint(v["x"].as<float>(), v["y"].as<float>() * yscale));
poly.m_points.push_back(EyeMaskPoint(v["x"].as<float>() * timebaseScale, v["y"].as<float>() * yscale));

m_polygons.push_back(poly);
}