News for hackers. Stuff that matters.
Re:BPG Image Format by jjcm on Friday October 02, 2020 @07:52PM (#24668230)
Bellard is obviously a technical genius. I have no doubt that BPG is competitive on a technical aspect. Politically though AV1 is looking like it has the best chance of unseating jpg. Near universal buy-in by browsers/OSes/hardware makers, hardware acceleration starting to roll out, and patent free.

Lots of other discussion on this though: https://hn.algolia.com/?q=bpg+bellard

Re:BPG Image Format by ksec on Friday October 02, 2020 @11:13PM (#24669205)
>and patent free.

Royalty Free.

Purely from a Web Image usage perspective, Jpeg XL is very competitive in terms of features and performance. Also Royalty free.

Re:BPG Image Format by yarg on Friday October 02, 2020 @09:24PM (#24668712)
Will it necessarily matter though? In a WASM context format starts to matter less since content in arbitrary codecs can be downloaded and decoded.

There are some concerns:

Non-native support requires non-static pages - even for something that will always appear to be the same, things like noscript will kill the page;

Hardware acceleration will need to be done in general terms - something like WebGPU will help, but it will still be less efficient than hardware acceleration (and that could be a problem for mobile).

Re:BPG Image Format by gigel82 on Friday October 02, 2020 @09:35PM (#24668764)
Also CORS: you can hotlink images from everywhere, but if you try to actually put those bits in a Buffer (as you'd need with BPG) the browser won't let you unless CORS is properly set up for the specific source-target URLs (affects things like image CDNs and so on).
Re:BPG Image Format by mumblerino on Friday October 02, 2020 @11:23PM (#24669256)
The point of using a format over another, given the availability, is to gain performance.

You're suggesting to load a whole new parser, parse images at a higher level than browsers can (i.e. slower and with less concurrency), and make `<img>` a whole lot harder to manage.

That's not worth it at all unless the savings are substantial (say BMP vs JPEG)

Re:BPG Image Format by tjoff on Saturday October 03, 2020 @02:45AM (#24670131)
The web we got today are an astounding feat of not caring about performance in the most aggressive way imaginable.

Performance is not a factor in this.

Re:BPG Image Format by mumblerino on Saturday October 03, 2020 @08:27PM (#24675751)
> Performance is not a factor in this.

What a completely ridiculous statement. Why else would anyone choose BGP if not for performance (i.e. download speed)? The choice to use BGP over a plain old JPG would be made specifically by people who do care.

Re:BPG Image Format by tjoff on Sunday October 04, 2020 @02:55AM (#24677011)
The context here is rendering performance.
Re:BPG Image Format by raindeer3 on Saturday October 03, 2020 @02:56AM (#24670164)
> The web we got today are an astounding feat of not caring about performance in the most aggressive way imaginable.

> Performance is not a factor in this.

If you care about SEO, it does. Check Google's pagespeed test.

Re:BPG Image Format by tjoff on Saturday October 03, 2020 @04:41AM (#24670558)
If that is true then the web does not care about SEO. And quite obviously it isn't weighted particularly hard at all (probably because there wouldn't be anything left).

edit: Case in point, except for google.com (which itself has a terrible score of 62) I can't even find out a single google service that isn't in the reds on the pagespeed index.

Even when it decided to load the mobile version.

Re:BPG Image Format by wmf on Friday October 02, 2020 @09:46PM (#24668821)
Chrome and Firefox are already implementing AVIF so using WASM to decode a different, more-patented format seems pointless.
Re:BPG Image Format by untog on Friday October 02, 2020 @10:02PM (#24668893)
It would mean that image decoding can’t start until the page JS is initialised, which is a pretty crappy trade off compared to today.
Re:BPG Image Format by tambourine_man on Friday October 02, 2020 @10:01PM (#24668890)
Hardware acceleration, as you mentioned, will never be as efficient.

Besides, do you really want to download and parse a codec for every page?

Re:BPG Image Format by yarg on Saturday October 03, 2020 @08:35PM (#24675782)
No, not for every page - it will very much be use case dependent.

However, it does present a viable path to the introduction of new codecs independent of the bogged up process that still has us using GIF and JPEG despite the fact that they've been known for years to be shite.

Also, WASM supports a binary form, so you can skip parsing.

Re:BPG Image Format by theandrewbailey on Thursday October 01, 2020 @08:39AM (#24650194)
Re:BPG Image Format by pornel on Saturday October 03, 2020 @12:59PM (#24673253)
Yes. BPG (and H.265 it uses) may be technically excellent, but H.265 is a commercial patent-encumbered codec. Patents cover any implementation, even free and open-source ones, so in countries that allow software patents BPG is illegal to use without a patent license for H.265.

"Hope you're not worth suing" may be an OK strategy for many people using BPG on their websites, but it's a blocker for wide adoption of the format. The licensing situation is so bad, that the industry went all behind the AV1 alternative, and the AVIF format rides that wave.

https://aomedia.org/

Re:BPG Image Format by masklinn on Saturday October 03, 2020 @03:19AM (#24670256)
BPG has never been very popular, though the “official” variant (heif which is the same idea by the MPEG) is supported by windows, macOS, iOS and Android.
Re:BPG Image Format by seishan on Friday October 02, 2020 @07:52PM (#24668227)
This is by the same person that wrote ffmpeg.

Discussion 2 years ago: https://news.ycombinator.com/item?id=17587684

Discussion 6 years ago: https://news.ycombinator.com/item?id=8704629

Re:BPG Image Format by dang on Friday October 02, 2020 @08:06PM (#24668304)
Re:BPG Image Format by pmoriarty on Friday October 02, 2020 @09:40PM (#24668787)
Re:BPG Image Format by usr1106 on Friday October 02, 2020 @08:02PM (#24668281)
and qemu
Re:BPG Image Format by messe on Friday October 02, 2020 @08:40PM (#24668472)
and tcc (the tiny C compiler).

Those who can be called genius are few in the world, but Facrice Bellard is certainly among them.

Re:BPG Image Format by schoolornot on Friday October 02, 2020 @10:54PM (#24669106)
I wish the Computer History Museum would do an "Oral History" video with him. Such a fascinating individual with monumental contributions to tech.
Re:BPG Image Format by pwdisswordfish4 on Saturday October 03, 2020 @03:37AM (#24670323)
And my axe.
Re:BPG Image Format by viraptor on Friday October 02, 2020 @07:55PM (#24668247)
> 14bit (...) It gives a higher dynamic range (which is important for cameras and new displays) and a slightly better compression ratio (because there are less rounding errors in the decoder).

That's clever and a bit counterintuitive.

Re:BPG Image Format by m45t3r on Friday October 02, 2020 @10:41PM (#24669050)
Yeah, I remember reading years ago a paper explaining the same for H.264 and why 10-bit encoding matters (even for 8-bit content). It was fascinating reason, btw.

AFAIK, there is also less banding issues even in 8-bit content, and the filesize is generally smaller too. The biggest reason against its usage is more computational power, though.

Re:BPG Image Format by ksec on Friday October 02, 2020 @11:21PM (#24669244)
Was there really a paper on the topic ? I thought it was x264 mailing list from Jason Garrett-Glaser / Dark Shikari.
Re:BPG Image Format by garaetjjte on Saturday October 03, 2020 @10:20AM (#24672246)
Practically superseded by HEIF, which is same idea but in complicated ISO container: https://en.wikipedia.org/wiki/High_Efficiency_Image_File_For...
Re:BPG Image Format by touchpadder on Friday October 02, 2020 @08:31PM (#24668433)
to wait until BPG becomes an open format would take a lifetime. I've been waiting for years now. Fortunately webp is now widely adopted so no need for waiting for bpg anymore
Re:BPG Image Format by rootw0rm on Saturday October 03, 2020 @02:57AM (#24670167)
once upon a time i designed an automated framework to attempt to brute force optimal x264 encoder settings for a small library of sample clips. i used lossless BPG for storing select keyframes from various test runs before analysis. i soon learned that having software try to decide the quality of one image versus another is not a terribly easy problem to solve. thanks for the trip down memory lane =)
Re:BPG Image Format by tinus_hn on Thursday October 01, 2020 @05:06PM (#24656145)
Unfortunately its patented.
Re:BPG Image Format by buzzerbetrayed on Friday October 02, 2020 @07:57PM (#24668253)
According to Wikipedia:

> According to Bellard's site BPG may be covered by some of the patents on HEVC, but any device licensed to support HEVC will also be covered for BPG. Patent issues may prevent JPEG replacement by BPG despite BPG's better technical performance.

So it sounds like you’re ultimately correct.

Re:BPG Image Format by sreekotay on Friday October 02, 2020 @08:53PM (#24668554)
The problem is the JS decode mean images in practice load slower than competing formats.
Re:BPG Image Format by tpmx on Thursday October 01, 2020 @03:04PM (#24654921)
So it's like WebP but based on HEVC instead of VP8.
Re:BPG Image Format by kevin_b_er on Saturday October 03, 2020 @01:04PM (#24673293)
Unfortunately HEVC is a patent minefield and unless you have deep pockets to stomach patent trolls, implementing anything with HEVC is a risk.
Re:BPG Image Format by severak_cz on Saturday October 03, 2020 @05:02AM (#24670649)
Of these new image format I am a fan of FLIF

http://flif.info/index.html

Re:BPG Image Format by pezezin on Saturday October 03, 2020 @07:01AM (#24671163)
FLIF has been integrated has the lossless mode of JPEG XL, the next JPEG standard.
Re:BPG Image Format by kernelbugs on Saturday October 03, 2020 @08:13AM (#24671448)
FLIF was superseded by FUIF and then by JPEG XL, but it hasn't been fully integrated. JPEG XL has parallel decode and uses MAANS entropy encoding instead of MANIAC, which results is slightly less compression for some situations (but faster decode). That said, I certainly agree that JPEG XL is already very impressive and hopefully the next majorly supported image format.
Re:BPG Image Format by pkamb on Friday October 02, 2020 @09:45PM (#24668817)
but how is it pronounced?
Re:BPG Image Format by aidenn0 on Saturday October 03, 2020 @01:14AM (#24669708)
The G is pronounced just like it is in gif.
Re:BPG Image Format by junon on Saturday October 03, 2020 @03:04AM (#24670203)
Don't even start.
Re:BPG Image Format by person_of_color on Friday October 02, 2020 @11:57PM (#24669396)
Neural compression is the future, not this.