5 ms·
Does anyone know how this compares to other projects such as Lepton? https://github.com/dropbox/lepton https://github.com/dropbox/lepton The goals and results
by jncraton 7y ago
Does anyone know how this compares to other projects such as Lepton?
https://github.com/dropbox/lepton https://github.com/dropbox/lepton
The goals and results appear similar. Is the primary difference that brunsli will likely actually be part of a standard (JPEG XL)?
- gbanfalvi 7y agoAnd how does it compare against HEIF?
- 0-_-0 7y agoHEIF can't compress JPEG images losslessly
- rndgermandude 7y agoIndeed, HEIF/HEIC is basically a slightly dumbed down HEVC (h.265) i-frame (full frame) (HEIC)[1] and new container format (HEIF)[2], similar to WEBP being VP8 i-frames in a RIFF container. So they are used as full blown codecs in practice, usually not in a lossless mode, so shifting JPEG to HEIC or WEBP will lose some quality. [1] Decoding HEIC in Windows (10) requires you to have installed a compatible HEVC decoder. Which is 99 cents (and the hassle of setting up a store accounts and payment processing with MS) or an alternative free one which will use the HEVC codec that is shipped with hardware such as newer Intels (QSV) or GPUs. Thank you patent mess! [2] HEIF the container format can contain JPEG data, but in practice does not or only as a supplementary image (previews, pre-renders, thumbnails, etc)
- deleted 7y ago[deleted]
- ksec 7y agoBelow 0.5 bpp, both HEIF or BPG [1] and AVIF performs quite a bit better than JPEG XL , XL shines in 0.8 bpp. At least in initial testing. [1] https://bellard.org/bpg/ https://bellard.org/bpg/
- ajnin 7y agoDo you have a link for JPEG XL comparisons ? The comparisons on that page are with JPEG XR, which is a different thing.
- ksec 7y agoUnfortunately It couldn't find the exact one, it was from the author's presentation against a few other codec on common metrics such as PSNR and SSIM. There is a thread on Doom9 [1] with similar results though. [1] https://forum.doom9.org/showpost.php?p=1894341&postcount=167 https://forum.doom9.org/showpost.php?p=1894341&postcount=167
- duskwuff 7y agoNot comparable. Brunsli and Lepton are lossless compressors for JPEG files; HEIF is a completely different lossy image encoder. To compare the size of a Brunsli/Lepton encoded JPEG file with an HEIF image, you'd need to define some sort of quality equivalence between the two, which gets complicated fast.
- todotask 7y agoHave you tried to test on your machine? You'll see various results with lossless/lossy image optimisers. I got <22% with Brunsli.
- llarsson 7y agoTheir respective READMEs both claim a 22% size reduction, which sounds like an interesting coincidence. Have they identified a similar inefficiency in the format itself?
- ksec 7y agoJPEG's entropy encoding is ancient. Adding modern arithmetic coding can save significant bits without changing the actual visual data.
- robryk 7y agoAnother inefficiency of JPEG is that each block (8x8 pixels in size) is compressed independently[^]. This means that the correlations between pixels that are adjacent across a block boundary are not used. If I were to take a JPEG image and randomly flip its blocks (mirror them along x and/or y axis), the resulting JPEG would have a very similar filesize, even though it's a much less likely image. Brunsli and, IIUC, Lepton, make use of these correlations. [^] the average color of blocks is not compressed strictly independently, but the space used on those is small compared to all the rest of the information about a block Disclaimer: I've worked on Brunsli.
- londons_explore 7y agoThat might prove to be a good measure of image compression 'efficiency'. Present to a user two images, one an image compressed by image compressor X, and one compressed by the same image compressor with a single bit of output flipped. In an ideal image compression scenario, the decompressed images would not be the same, but a user could not tell which was the 'correct' image, since both would look equally realistic.
- robryk 7y agoIf a scheme had something like that property and satisfied some simpler conditions, I would wager that it necessarily is a good compression scheme. However, this is very much not required of a good compression scheme: Imagine that a compression scheme used the first bit to indicate if the encoded image is an image of a cat or not. Changing that bit would then have very obvious and significant implications on the encoded image. If that example seems too unrealistic, imagine a modification of a compression scheme that, before decoding, xors every non-first bit with the first bit. Then flipping the first bit in the modified scheme is equivalent to flipping a lot of bits in the unmodified scheme, but they are equivalently good at encoding images. Edit: To put it short, the important property is that equally-long encoded images are "equally plausible": it's not important how many bits differ between them, and it doesn't matter if they are similar to each other.
- tpetry 7y agoThe files created by lepton cant be displayed by any client. Brunsli is a converter for JPEG <-> JPEG XR which is losless, and by the improved jpeg xr algorithms decreases filesize. The interesting part is you can therefore convert between these formats thousands of times without visual regressions. You could (in a few years) only store the jpeg xr file and your webserver may transcode it to jpeg for legacy browsers.
- ksec 7y ago>Brunsli is a converter for JPEG <-> JPEG XR which is losless... You mean JPEG XL? JPEG XR is a completely different thing [1] [1] https://en.wikipedia.org/wiki/JPEG_XR https://en.wikipedia.org/wiki/JPEG_XR
- thedance 7y agoThey may still be comparable. If the point of Lepton is to save space, and if a round-trip through Brunsli costs less than Lepton encoding while saving similar amounts of space, then it could be a design alternative.
- JyrkiAlakuijala 7y agoSingle-threaded brunsli runs 2.5x faster than single-threaded lepton, but brunsli compresses 1 % less. Brunsli is able to compress more JPEGs (including more exotic JPEG configurations) than lepton.
- thedance 7y agoJust to put numbers on this, on an Intel Skylake CPU, brunsli compressed a 1MB image in .16s, lepton needed .5s, more than triple the CPU time. Brunsli peaked at 100MB while lepton peaked at 44MB of RAM. Decoding with lepton wants .23s and 8MB of RAM while brunsli used .13s and 42MB of RAM.