Lua palette quantization#802
Conversation
|
Definitely seeing some improvements by switching away from the green channel rods n' cones biasing thing. When I completely turn off the color caching and run this test script, there is a noticeable performance hit when turboing. I'd say it goes from 25x to 10x speed. As such, I changed the color cache to 5 bits per channel and it seems fine... But I'm still a bit leery, so I might make a Lua API that can turn this on and off just in case 5 bits still makes things weird. Here are some comparison results. Hopefully it's not too hard to see. With the green bias, the ghosts get kind of yellowy when they stack up. 3-bit green bias (the ways things are in master) 3bit-green_bias.mp4no cache euclid (best results, noticeable performance dip when turboing) no_cache-euclid.mp45-bit Euclid 5bit-euclid.mp43 bit euclid 3bit-euclid.mp4no cache green bias no_cache-green_bias.mp4 |
|
Looks like you guys have been busy with the Mac build scripts. I'll go ahead and rebase. |
Just want to see what happens. If the performance sucks, I'll try it with 5 or 6 bits. If the difference is negligible, I'll remove it properly.
I added this for testing purposes; you might find it useful, too. I imagine I'm going to revert this before merging.
64836be to
5fecb6e
Compare
|
@zeromus @bbbradsmith |
|
why does the cache get wacky? I can't imagine why something like that would happen. if there's an explanation for it I might accept it, but otherwise it seems like a bug-in-waiting. that would seem to be the only blemish on here (I don't mind keeping the algorithm picker for old-video compatibility or better blazing performance) |
|
The cache gets wacky because the colorspace regions are too broad. It stores the first color it happened to encounter in any given region, so over time, you end up with some strange mismatches. By changing it to use the upper 5 bits, the regions get tightened up and it's still just as fast. That's what I was trying to convey with those pretty rainbow squares. Since the same problem is technically still here (just less obvious), things might still look a little off. That's why I wanted to make |








Don't mind me, just using your appveyor to avoid setting up Visual Studio on my new PC :)