From 0eaeb51ea33afbe11b9325a8ebfe7a34869afe70 Mon Sep 17 00:00:00 2001 From: Chlumsky Date: Wed, 18 Oct 2023 09:30:53 +0200 Subject: [PATCH] Fixed bug in error correction's diagonal interpolation test --- core/MSDFErrorCorrection.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/MSDFErrorCorrection.cpp b/core/MSDFErrorCorrection.cpp index 437069b..9a5cefe 100644 --- a/core/MSDFErrorCorrection.cpp +++ b/core/MSDFErrorCorrection.cpp @@ -317,7 +317,7 @@ static bool hasDiagonalArtifactInner(const ArtifactClassifier &artifactClassifie em[0] = am, em[1] = dm; tEnd[tEx0 > t[i]] = tEx0; em[tEx0 > t[i]] = interpolatedMedian(a, l, q, tEx0); - rangeFlags |= artifactClassifier.rangeTest(tEnd[0], tEnd[1], t[i], am, dm, xm); + rangeFlags |= artifactClassifier.rangeTest(tEnd[0], tEnd[1], t[i], em[0], em[1], xm); } // tEx1 if (tEx1 > 0 && tEx1 < 1) { @@ -325,7 +325,7 @@ static bool hasDiagonalArtifactInner(const ArtifactClassifier &artifactClassifie em[0] = am, em[1] = dm; tEnd[tEx1 > t[i]] = tEx1; em[tEx1 > t[i]] = interpolatedMedian(a, l, q, tEx1); - rangeFlags |= artifactClassifier.rangeTest(tEnd[0], tEnd[1], t[i], am, dm, xm); + rangeFlags |= artifactClassifier.rangeTest(tEnd[0], tEnd[1], t[i], em[0], em[1], xm); } if (artifactClassifier.evaluate(t[i], xm, rangeFlags)) return true;