Storing images as a double array where the first index is the horizontal position (and this guarantees that no 2 pixels will be next to each other on the same line) is the most inefficient way I can imagine an image being stored as.
And I bet there are quite a lot of projects doing that already. Its like they hate optimized memcpys.

· · Web · 1 · 1 · 5

I boosted this because I thought of something even worse: storing frames in a 3D array, with the first index being the frame number, so it's [frame_num][horizontal_pos][vertical_pos]
Bonus points for a paletted pixel format, so this just gives you an index into a palette.
What's worse is some GIF viewer is probably doing just that.

why not:

@wolf480pl Good point, ruins prediction even better.

@wolf480pl @lynne how about a 3-dimensional space-filling curve through them?
Sign in to participate in the conversation

A Mastodon instance for people interested in multimedia, codecs, assembly, SIMD, and the occasional weeb stuff.