Skip to content

Commit 7d0da42

Browse files
authored
Add files via upload
1 parent 2e6bb66 commit 7d0da42

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

nQuantCpp/PnnLABQuantizer.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,9 @@ namespace PnnLABQuant
482482

483483
unsigned short PnnLABQuantizer::closestColorIndex(const ARGB* pPalette, const UINT nMaxColors, ARGB argb, const UINT pos)
484484
{
485+
if (PG < coeffs[0][1] && BlueNoise::TELL_BLUE_NOISE[pos & 4095] > -88)
486+
return hybridColorIndex(pPalette, nMaxColors, argb, pos);
487+
485488
Color c(argb);
486489
if (c.GetA() <= alphaThreshold)
487490
return nearestColorIndex(pPalette, nMaxColors, argb, pos);

0 commit comments

Comments
 (0)