3 ms·
would adding dithering support to the encoder help with gradient smoothness? i know it helps a lot with non-compressed formats in addition to shrinking filesize
by leeoniya 12y ago
would adding dithering support to the encoder help with gradient smoothness? i know it helps a lot with non-compressed formats in addition to shrinking filesize (though it may not be the case with jpeg compression). you can toy with the params [1] and see that even dropping target palette color count by >50%, still gets good results with a dithering kernel selected. repo here [2], btw.
[1] http://o-0.me/RgbQuant/ http://o-0.me/RgbQuant/
[2] https://github.com/leeoniya/RgbQuant.js https://github.com/leeoniya/RgbQuant.js
- pornel 12y agoYes, some sort of deblocking in the decoder could go a long way, e.g. http://johncostella.com/unblock/ http://johncostella.com/unblock/ This isn't something that can be done on the encoding side, so it's out of scope of MozJPEG. I do think it may be worthwhile to spec a backwards-compatible extension for decoders that adds deblocking.
- derf_ 12y agoYou could also just modulate the lambda used in the trellis quantization so that it is less aggressive in smooth blocks, and more aggressive in textured blocks. It's not as good as being able to change the quantizer, but you can get somewhere around half the benefits of real activity masking by changing lambda alone.