Hacker News new | ask | show | jobs
by are595 3625 days ago
Interesting that they are using VP8 to compress the JPEGs. This is one degree of separation away from Google's WebP [1]. It would be interesting to see how they stack up (WebP has a lossy and lossless mode).

[1]. https://developers.google.com/speed/webp/

1 comments

(EDIT: removed wording that Lepton produces files that conform to the JPEG spec. It doesn't. It losslessly compresses into a custom format, that losslessly decompresses into a JPEG)

Lepton uses the arithmetic coder [1] from VP8. Using arithmetic coding instead of Huffman encoding to get better compression was always an option in JPEG, but it has been historically avoided due to patents [2].

Compared to VP8-Intra, the compression used in lossy WebP, JPEG is missing the prediction step, usually called 'filtering' [3], which is the single largest contributor of WebP's compression outperforming JPEG.

Reading through the Lepton blog post, it seems they're using a different method of prediction, based on observations about typical gradients and correlations between AC and DC coefficients. VP8 uses a more 'traditional' approach of predicting your neighboring pixels, which was borne out of run-length encoding, but also very applicable to video's moving macroblocks. A comparison would indeed be enlightening.

[1] https://tools.ietf.org/html/rfc6386#section-7

[2] https://en.wikipedia.org/wiki/Arithmetic_coding#US_patents

[3] https://medium.com/@duhroach/how-webp-works-lossly-mode-33bd...