3 ms·
Ignoring stuff is fine if you make an encoder. When you're making a decoder, it's a big no-go. If implementers of the original JPEG would have implemented the w
by jonsneyers 5y ago
Ignoring stuff is fine if you make an encoder. When you're making a decoder, it's a big no-go. If implementers of the original JPEG would have implemented the whole spec, we would have 12-bit and lossless JPEGs. Instead we're stuck with the de facto JPEG standard, the subset of the spec that everyone ended up implementing.
- astrange 5y agolibjpeg supports that with a compile time option. Nobody used it because you can't abstract over bit-depth (and sometimes pixel format) without losing all performance, because it means a lot of if statements have to go inside every hot loop, so instead you have to duplicate all related code. Also, there wasn't a way to view them until HDR displays came around recently. The main issue with implementing all of MPEG-4 is the spec is overdetermined (the same fields exist at different layers and can disagree), but also it's full of nonsense nobody cares about, like the alternate codec for animating faces only. https://core.ac.uk/download/pdf/207365065.pdf https://core.ac.uk/download/pdf/207365065.pdf
- ChrisMarshallNY 5y ago> When you're making a decoder, it's a big no-go. I remember one of my first big OO projects was writing a TIFF reader. What a nightmare.