Skip to content

Commit 9d027e5

Browse files
committed
Reduce chroma weight for tile clustering
1 parent 84908d0 commit 9d027e5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Tiles.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,10 @@ static inline void ConvertToTiles(
6464
//! I have no idea why this is the case, though.
6565
float Norm = Mean.b;
6666
if(Norm) {
67-
float InvNorm = 1.0f / sqrtf(Norm);
67+
//! NOTE: Chroma values are scaled by 0.1 relative to luma and
68+
//! alpha; this is to give 10x more importance to the latter,
69+
//! and is used to fixe some edge cases with subtle details.
70+
float InvNorm = 0.1f / sqrtf(Norm);
6871
Mean.g *= InvNorm;
6972
Mean.r *= InvNorm;
7073
}

0 commit comments

Comments
 (0)