9 ms·
Better Portable Graphics
- adrianN 7y agoAnd once again software patents are the hair in the soup.
- robert_foss 7y agoAgreed. An AV1 based format would be more interesting, and likely have better compression ratios.
- theandrewbailey 7y agoSee AVIF: https://en.wikipedia.org/wiki/AV1#AV1_Image_File_Format_(AVIF) https://en.wikipedia.org/wiki/AV1#AV1_Image_File_Format_(AVI...
- PostOnce 7y agosans patent issues: https://en.wikipedia.org/wiki/AV1#AV1_Image_File_Format_(AVIF) https://en.wikipedia.org/wiki/AV1#AV1_Image_File_Format_(AVI... still waiting on the software support.
- DoctorNick 7y agopatent encumbered. non-starter.
- pgeorgi 7y agoAnd worse than what the wikipedia article states (Bellard asserts that devices licensed for HEVC would be able to use BGP since it's the same technology), licenses are usually given for a certain purpose. I'd be wary about reusing licenses for unrelated tasks like that.
- pedrocr 7y agoSeems like the same strategy starting with AV1 would be a good solution.
- dwheeler 7y agoI agree. We already have JPEG, a format that can be used without obvious patent problems. I don't think the world needs a format with obvious patent problems. Saving some bytes is nice, but when people are streaming videos and audio, shaving off a few bytes isn't worth the endless lawsuits.
- lucideer 7y agoPresuming this was posted by someone exploring the works of Fabrice Bellard after reading the HN comments here https://news.ycombinator.com/item?id=20411154 https://news.ycombinator.com/item?id=20411154
- namibj 7y agoThis pattern continues to amuse me. I wish for some analysis of these connectivity graphs, but I guess it's near-impossible to do accurately without capturing the poster's history and looking at how they stumbled from previous HN posts/comments onto the thing they post now.
- microcolonel 7y agoIt also crosses site boundaries. https://news.ycombinator.com/item?id=20366844 https://news.ycombinator.com/item?id=20366844
- namibj 7y agoWhich is why I think user's browser history would be needed. And that's not possible to do at statistically significant/useful scale.
- anderspitman 7y agoI think you could achieve a first-order approximation by crawling front-page links a couple levels deep and seeing what's connected.
- hn_throwaway_99 7y agoThis is amusing to me, because I knew about FFMpeg and QEMU and jslinux, and yesterday found out about quickjs, and so I like how the "small" project is just a complete and better replacement for jpeg. The guy is not human.
- deleted 7y ago[deleted]
- legulere 7y agoDoes something similar exist with AV1?
- kristofferR 7y agohttps://en.wikipedia.org/wiki/AV1#AV1_Image_File_Format_(AVIF) https://en.wikipedia.org/wiki/AV1#AV1_Image_File_Format_(AVI...
- andy_ppp 7y agoYou can see how unbelievably better this is than JPG (at almost any file size) here: http://xooyoozoo.github.io/yolo-octo-bugfixes/#swallowtail&jpg=t&bpg=t http://xooyoozoo.github.io/yolo-octo-bugfixes/#swallowtail&j... Or here: https://bellard.org/bpg/lena.html https://bellard.org/bpg/lena.html The difference between webp from the first link is actually quite small (http://xooyoozoo.github.io/yolo-octo-bugfixes/#swallowtail&webp=t&bpg=t http://xooyoozoo.github.io/yolo-octo-bugfixes/#swallowtail&w...). Additionally you can find the Javascript decoder here: https://github.com/xingmarc/bpg-decoder https://github.com/xingmarc/bpg-decoder It's 215k of Javascript though so isn't really that practical in most cases and I'd worry about how it was affecting battery life. It'd be very interesting to do some tests and see.
- nolok 7y agoIn that link bpg tiny is insanely better at under 25kB than jpeg medium at 42kB. Looks really like this would be great for all the very small pictures and icons on the web.
- ape4 7y agoIf I was making a graphics format I'd have one bit in the header for: is_lena. Then I could have very small Lena images /joke
- kevin_thibedeau 7y agoOriginal Lena or the remastered scan?
- enriquto 7y agoThis comparison is a bit unfair to JPG. There are many JPG decompression algorithms. The "simplest" one consists in reconstructing the image from the given quantized DCT coefficients. But this is not the only one. Modern decompression methods (such as the one implemented by BPG) find the cleanest possible image that would get compressed to the given JPG file. These decompression algorithms eliminate most blocking artifacts on uniform regions, and that would be a fairer comparison. Nonetheless, the BPG format is a super-incredible hack.
- DagAgren 7y agoiOS is already using HEIF, which is basically the same thing in a different container format. That seems a much more likely candidate for actually being taken up.
- rhardih 7y agoAnytime I see anything with Fabrice' name on it I'm immediately intrigued. He's just on a different level. His list of projects is simply astounding. I can duly recommend checking out some his other projects at https://bellard.org https://bellard.org.
- sproketboy 7y agoWhy bother when we have PNG?
- wffurr 7y agoTotally different algorithm for different purposes. PNG is lossless encoding, doesn't work well for photographs or complex images.
- arghwhat 7y agoPlease see AVIF (https://en.wikipedia.org/wiki/AV1#AV1_Image_File_Format_(AVIF) https://en.wikipedia.org/wiki/AV1#AV1_Image_File_Format_(AVI...) for an open, royalty-free alternative with similar or better performance. And if you must use HEVC-based imaging, consider HEIF which has considerable support.
- cyborgx7 7y agoI actually just discovered AVIF from the related links in this submission. Firefox planning to support it sounds promising.
- theandrewbailey 7y agoLast week, I encoded a bunch of images into AVIF. For the same dimensions and roughly same file size, AVIF images are dramatically clearer than JPEG. I wish I could start using them right now, but: 1. The AVIF encoder I was using[0] is based off libaom, which means a 1080p image takes almost 30 seconds to encode. rav1e is supposedly much faster, so I wonder how well it would do for AVIF. 2. Almost no viewer or browser support, and what does is usually some kind of beta or preview. (VLC nightly, Windows 10 AV1 plugin[1]) [0] https://github.com/Kagami/go-avif https://github.com/Kagami/go-avif [1] https://www.microsoft.com/en-us/p/av1-video-extension-beta/9mvzqvxjbq9v https://www.microsoft.com/en-us/p/av1-video-extension-beta/9...
- dspillett 7y ago> Almost no viewer or browser support For browser support it should be possible to implement a poly-fill similar to https://github.com/UprootLabs/poly-flif https://github.com/UprootLabs/poly-flif which renders images in the FLIF format (https://flif.info/ https://flif.info/) into canvas elements. FLIF as a format might be worth looking at while you are reviewing the area.
- theandrewbailey 7y agoThere is an AVIF polyfill, but it has lots of important edge cases. https://github.com/Kagami/avif.js https://github.com/Kagami/avif.js I'd rather keep it simple and not deal with more JS, and I'm OK with using JPEG for now. (I've been using mozJPEG for years)
- m4r35n357 7y agoFabrice strikes again! FFMPEG, QEMU, TCC . . . . https://bellard.org/ https://bellard.org/
- musikele 7y agoHow this guy finds the time to work on these very different projects? Some of them require skills that are very specific, how can you pass from writing QEMU to TCC to the 4G station ... What does he do for living, how does he spend his free time?
- leadingthenet 7y agoHe's a god amongst men.
- m-p-3 7y agoDude is a goddamn genius.
- thechao 7y agoWriting emulators, compilers, operating-systems, and codecs are all standard-skills of any low-level systems programmer. My entire team of 50+ people are capable of doing this stuff. The difference between us & Fabrice are: (1) we work for a major company & none of our stuff is publicly available; and, (2) he's still at least head-and-shoulders above most of the people doing this. He'd easily be in the top 5 for my team, and certainly better than of the kids under 40.
- sneak 7y agoIs there a reason that browsers don't jump on the bandwagon and implement codecs for all reasonably-stable image codecs (save this one, which seems to be patent encumbered)? i.e.: why doesn't Chrome support AVIF? Is it because it competes with their own invented-here WebP? It seems like adding new image codecs for given content types would be pretty trivial if the libraries are available and stable and license compatible; why be conservative and not just support the newish ones to help the best ones gain traction? It seems like browser vendors are just dragging their feet.
- noisem4ker 7y agoSecurity liabilities, most likely. Buggy decoder libraries widen the surface for exploits. And no software is bug free, nor first party vetting is free, nor sandboxes can be blindly trusted to do their job. Better not to take any unnecessary risk, especially since browsers are already complicated enough.
- theandrewbailey 7y ago1. Security 2. Bloat 3. You can't really stop supporting media formats. Once you put anything into a browser, you can't take it out. The best that can be done is depreciate it forever.
- timw4mail 7y agoBecause browsers have an enormous API/file support surface as is, and each new image format can be a significant amount of code to support essentially forever. Webp now is supported by pretty much every browser, but a lot of image viewers don't support the format yet. There has to be a certain amount of momentum to justify supporting a new image format.
- yboris 7y agoI'm looking forward to FUIF - Free Universal Image Format https://cloudinary.com/blog/introducing_fuif_responsive_images_by_design https://cloudinary.com/blog/introducing_fuif_responsive_imag... Created by the same person who created FLIF (already an amazing format)! Better yet, it's probably the most-likely technology to be accepted into the upcoming JPEG XL standard!
- microcolonel 7y agoThe problem with FUIF is probably that it's not all that efficient at encoding images, which is probably why there are zero comparisons or demonstrations of the actual images that can be found easily by going to the repository or the authors' blog. The one FUIF image I've seen was the one in their clip showing generational loss with various codecs.
- bryanlarsen 7y agoFUIF has the ability to losslessly transcode from JPEG. This will make it very useful in a couple of important use cases. But by constraining itself to DCT in this way, I assume it performs relatively poorly compared to other modern alternatives when compressing from a RAW source.
- Rhamb 7y agoThere is also FLIF (https://en.wikipedia.org/wiki/Free_Lossless_Image_Format https://en.wikipedia.org/wiki/Free_Lossless_Image_Format) which has a nice property: it is adaptive by design, that is, you can only look at the first X bytes and get a first approximation of the image, and the further you go, the better it becomes. It also allows for both lossless and lossy compression. I wonder how they compare. (Don't take my word for that, I'm no expert on the subject)
- lucb1e 7y agoJPEG does that too, you can enable progressive rendering in the encoder. Having it enabled does not make the image larger in my experience.
- anderspitman 7y agoSomewhat OT but are there any JS libraries (or maybe servers via query params) that you can configure to only download X-bytes from progressive images? For example if you detect your user is on a slow mobile connection you could download at most 50kb from all the images on your site in order to keep it fast.
- jokoon 7y agoWhat about encoding/decoding performance? > Current research works on designing and developing more energy-efficient BPG hardware which can then be integrated in portable devices such as digital cameras. I guess it doesn't really matter that much, but I'm still curious.
- m-p-3 7y agoI knew I recognized that name, it's one of the main ffmpeg and QEMU developers! If BPG is up to the same quality than those two, then it has to be a great format!
- JyrkiAlakuijala 7y agoImage compression is complicated. Licencing topics, decompression cpu time, decompression memory use, decompression memory bandwidth use, compression time, is asymmetric slower but more efficient compression available, multi-threading, how much of the decoding can be shadowed during the data transfer, how many levels of progression are preferred, global image artefacts (such as banding) that don't appear in objective metrics, inter-frame copying ending up copying strange stuff around, red colors tend to not to be compressed with great success (there is no gamma compression for red in the eye, but in image formats there is), how much the image format is for the eyes and how much for the metrics, are the results the same on different platforms/implementations, is alpha supported, how good is the HDR modeling and its rather non-linear relations to gamma and colors in general, does the image format tend to preserve the quality of materials such as wood, marble, skin, cloth -- or replace them with cheap plastic imitation, some image formats work dramatically well at low BPP (<0.5) but start failing when compared to old JPEG at higher BPP (2.5+ BPP). Some image formats decode only a few megapixels per second which can be a disaster if your images happen to be in the 40 megapixel category. Overall, it is a very complex landscape.
- jacobolus 7y ago> there is no gamma compression for red in the eye What does this mean? Do you have a citation to a source explaining whatever this is trying to say using precise standard color science terminology?
- airstrike 7y agoDon't you know every HN thread needs its standard armchair top comment rebuttal on how TFA is actually wrong and the author is naive and doesn't really understand the problem with all its intricacies?
- muizelaar 7y agoThe top comment rebuttal is written by the author of the WebP lossless, https://github.com/google/butteraugli https://github.com/google/butteraugli and https://github.com/google/pik https://github.com/google/pik so calling it armchairing doesn't really seem appropriate.
- elamje 7y agoThe guy who wrote BPG is a legend. I was looking at his home page where it lists cool projects - https://bellard.org/ https://bellard.org/ and I was thinking this is a great list of really popular projects. Then I realized he made all of them! People that make this many important contributions should be better recognized.
- datalus 7y agoQuickJS is a great little JS engine as well that he wrote and is super easy to embed :)
- AnthonBerg 7y agoFabrice Bellard is a monster. I want to be just like him when I grow up. With a monstrous list of accomplishments.
- Vosporos 7y agoThat's it? we're milking Bellard's treasure cave for upvotes now?
- ChuckMcM 7y ago"Patent issues may prevent JPEG replacement by BPG despite BPG's better technical performance.[6]" BPG meet GIF, GIF meet BPG. The most annoying thing about GIF in the early days were the damn Compuserve patents that they would go out of their way to hassle you with if they thought they could.
- devwastaken 7y agoYou can already use native av1 to display images in browser. You simply encode your image to a single frame av1 webm with ffmpeg. Browsers will automatically display the first image fully rendered, because it acts as a thumbnail. Afaik no need for autoplay privledges.
- devy 7y agoApple has unilaterally pushing their HEIF format to replace JPEG after iOS 11 - to combat the criticism of they differentiating their iPhone/iPad by storage sizes and artificially make the base model a very small capacity (16GB for the longest time) and their storage not customer replaceable. https://support.apple.com/en-us/HT207022 https://support.apple.com/en-us/HT207022