Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
mcychan authored Sep 30, 2024
1 parent 8bd0003 commit 2f61122
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nQuantCpp/GilbertCurve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ namespace Peano
m_lookup[offset] = m_ditherFn(m_pPalette, m_nMaxColor, c2.GetValue(), bidx) + 1;
qPixelIndex = m_lookup[offset] - 1;

int acceptedDiff = max(1, m_nMaxColor - margin);
int acceptedDiff = max(2, m_nMaxColor - margin);
if (m_saliencies != nullptr && (CIELABConvertor::Y_Diff(pixel, c2) > acceptedDiff || CIELABConvertor::U_Diff(pixel, c2) > (2 * acceptedDiff))) {
auto strength = 1 / 3.0f;
c2 = BlueNoise::diffuse(pixel, m_pPalette[qPixelIndex], 1.0f / m_saliencies[bidx], strength, x, y);
Expand Down

0 comments on commit 2f61122

Please sign in to comment.