E.g. some file formats may be row-major, others column-major, some block-based (like JPEG) or a fancy interleaving scheme (like Adam7). Some might store the channels interleaved, others separate the channels. If any of these choices doesn't match the desired output format, it breaks streaming.
So you can't do such a conversion in a streaming fashion, but there is no need to load all data in memory either.
https://www.intel.com/content/www/us/en/developer/articles/t...
Because the Hilbert/Z-order curves are defined recursively, algorithms for converting between the curve and row/column order are "cache-oblivious", in that they don't need to take an explicit block size. You write it once, and it performs well on any system regardless the CPU cache size and/or page size.
A fix would be to change:
110rrrrr ggggbbbb - copy the last pixel and adjust RGB by (r-15, g-7, b-7)
to: 1100rrrr ggggbbbb - copy the last pixel and adjust RGB by (r-7, g-7, b-7)
This leaves: 1101???? ...
available for future extensions.One idea would be to start a predicted color (calculate the delta of the previous two pixels, apply that, then specify a delta to that). Another would be to encode the delta in YUV or some other color space, and then experiment with the best balance of bits between those channels.
Perhaps it would be better to steal bits from RUN16 instead, I somewhat doubt it's usefulness.
Not exactly. It's "copy the last pixel color for which (r^g^b^a)&63 == x".