-
-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
quantanal claims that onedot.png misses color #2502
Comments
technically we don't expect exact consonance, since Sixel is fundamentally incapable of expressing all colors due to [0..255] being mapped to [0..100]. but we expect a much closer match than this. |
original pixel: 0xffcb2ea9
hrmmm, looks like we might have something reversed here? cb2ea9: 203 46 169 well we're learning all kinds of things today, aren't we |
it appears to be rendered as a82eca |
so a82eca (the actual render color) is what we would expect -- 168, 46, 202. that's one off on R and B, dead-on for G, the amount of distortion we would expect from the Sixel reduction. so this is a |
so what's up? is our sixel intake busted? that seems plausible. |
that's 168.3, 45.9, and 201.45.
ahh, much better |
oughtn't 45.9 become 46, not 45? |
we're looking pretty solid on |
well, we know my algorithm is pretty precise. that's why it's so slow, and why we can only handle 256 colors without spinning out. it's not like libsixel's mincut is superior to my flattening algorithm; it's that 1024 colors are going to waste 256. |
|
it occurs to me that we ought be easily able to calculate a best-case expectation function for the ways to differ by 0: 1 well fuck all that it's gonna be the cube root of 2^16 so a little over 2^5 max on each component, so 32* 32*64 / 2, so about 2^5.32/2 ~= 20 away on any component. total miss of about 60, right? hrmm so for a 0 or 255, they can't accommodate smaller or larger values. so ought they have larger absolute value distances than other numbers in such a unform distribution? like if you had to map [0..98] to [0..2], you'd want [0..32] mapped to 0, [33..65] mapped to 1, and [66..98] mapped to 2, right? hrmmm well i guess it depends on whether you map back to {0, 33, 66} or {0, 49, 98}; in the first case, you're always taking the 32 above the truncated form; in the latter, you've got bounds of {0, 32}, {-16, 16}, and {-32, 0}. well, i suppose that's just a matter of unit convenience, then. |
how exactly does the sixel space get translated back to RGB? like does 0 sixel equal 0 or 1.28 (1)? does 1 equal 3 or 3.84 or 5.12? does 99 equal 253.44, or 254.72, or 255? |
let's take this to #1452 |
In #2501 I introduced the
quantanal
tool with which I'll be measuring our efforts to improve Sixel performance and quality. Running it ondata/onedot.png
, we would expect a perfect match (all 0 deltas). Instead,quantanal
claims a significant miss:so either
quantanal
is not quite yet ready for primetime, or our sixel quantization is well and truly fucked.The text was updated successfully, but these errors were encountered: