3 ms·
Good point. Do you have any idea why they didn't opt for a Hilbert curve, like others suggested here?
by amelius 10y ago
Good point. Do you have any idea why they didn't opt for a Hilbert curve, like others suggested here?
- ygra 10y agoThe way the quantization matrix is set up is that most non-zero values end up in a corner, so the zig-zagging actually manages to be pretty good since the data is already suitably aligned.
- deleted 10y ago[deleted]
- haneefmubarak 10y agoI'm not the parent, but I'd probably surmise that images are usually encoded in blocks to allow the image blocks to be decoded in parallel. If you're asking why they use the zigzag (within a block) instead of a Hilbert curve, IIRC (quite fuzzy on this, so take it w/ a gran of salt and verify) the reason is that it allows for better spatial encoding (imagine having a ripple in one corner and going out - that's essentially what you want to encode w/ your DCT). Using a Hilbert curve would preserve locality, but I don't think it would line up with the spatial distribution of frequencies in an image.