News for hackers. Stuff that matters.
Re:H.264 is Magic (2016) by tmp65535 on Thursday March 17, 2022 @09:17AM (#30710815)
Fabrice Bellard's BPG image format uses H.265's keyframe compressor: https://bellard.org/bpg/

Here is a side-by-side visual comparison: http://xooyoozoo.github.io/yolo-octo-bugfixes/#ballet-exerci...

Amazing.

I ported his BPG decoder to Android ARM for a pornographic app. See my comment history for details. It reduced data transfer by more than 60%.

Re:H.264 is Magic (2016) by silisili on Thursday March 17, 2022 @11:18AM (#30712077)
That's amazing, thanks for sharing. Going in rather uninformed, I expected it to 'look better' by typical smoothing tricks and whatnot...but no. It has -tons- more detail...looking at little things like wrinkles in the socks and shirt and whatnot. Impressive.
Re:H.264 is Magic (2016) by torginus on Thursday March 17, 2022 @10:22AM (#30711491)
What's the patent status? As far as I know, H265 is patent encumbered(and not actually supported on a large chunk of Android devices for the same reason) , so including this somewhere might invite legal trouble.
Re:H.264 is Magic (2016) by nijave on Thursday March 17, 2022 @11:06AM (#30711937)
I was under the impression most implementations rely on hardware support. Hardware vendors pay the royalties then software just hands it off. Afaik that's how it works in most browsers and many modern CPU/GPUs support hardware decoding h265
Re:H.264 is Magic (2016) by tmp65535 on Thursday March 17, 2022 @10:49AM (#30711787)
You are correct, there may be licensing issue.
Re:H.264 is Magic (2016) by fallat on Thursday March 17, 2022 @10:39AM (#30711673)
I cannot get over how much of a CompSci God Fabrice is. What a person!
Re:H.264 is Magic (2016) by aikinai on Thursday March 17, 2022 @09:20AM (#30710846)
Isn’t that exactly what HEIC is?
Re:H.264 is Magic (2016) by pornel on Thursday March 17, 2022 @11:08AM (#30711961)
HEIC is this plus a kitchen sink of features for digital camera rolls, which aren't useful on the web, all wrapped in a ton of legacy ISO BMFF complexity reaching as far as Classic Mac Quicktime. BPG structure is much more minimal and pragmatic.

However, BPG is unnecessary nowadays. Modern browsers support AVIF, which is HEIF+AV1, so basically HEIC with the painfully patented bit swapped for a freely licensed one.

Re:H.264 is Magic (2016) by madars on Thursday March 17, 2022 @03:16PM (#30714854)
Really hopeful for AVIF but you can't use it on iOS https://caniuse.com/?search=avif :(
Re:H.264 is Magic (2016) by localhost on Thursday March 17, 2022 @11:03AM (#30711907)
It seems that way - I read this [1] which does a high level comparison of the technologies. It does seem like BPG is patent encumbered by the underlying H265 algorithms (aka HEVC) [2]

[1] https://www.zyxtech.org/2019/06/13/what-is-heic-heif-plus-a-...

[2] https://en.wikipedia.org/wiki/High_Efficiency_Video_Coding

Re:H.264 is Magic (2016) by innocenat on Thursday March 17, 2022 @09:31AM (#30710955)
It looks like BGP actually predates HEIC. HEIC technical document finalise in 2015. The GitHub mirror of BGP has history back to 2014.
Re:H.264 is Magic (2016) by thrdbndndn on Thursday March 17, 2022 @09:52AM (#30711155)
I'm not saying which one is earlier as I have no idea, but comparing these two dates doesn't seem to be a good way.

Implementation of HEIC existed before its documentation finalized.

Re:H.264 is Magic (2016) by pbronez on Thursday March 17, 2022 @09:46AM (#30711092)
Wow that comparison is really cool. Looking at BPG vs original, you can see some loss of fine detail as the file size cranks down, but you can get an excellent reproduction with an order of magnitude less storage. Seems like BPG is smoothing the image a bit. For example, the space shuttle image has film grain in the sky, but BPG smooths this away.

Significantly better than JPEG at small file sizes... BPG eliminates the obvious color banding and does a much better job preserving detail.

Re:H.264 is Magic (2016) by aembleton on Thursday March 17, 2022 @12:08PM (#30712700)
If you set BPG to a large file size, you still get some of the noise in the sky of the Endeavor photo. But this is 1/20 the size of the original image which is incredible.
Re:H.264 is Magic (2016) by Markoff on Thursday March 17, 2022 @12:45PM (#30713160)
Why would anyone use such exotic unsupported format when there is WebP, AVIF or JPEG XL, which are all much more supported and better? It's shame they are not natively supported by most of the camera Android apps.
Re:H.264 is Magic (2016) by tmp65535 on Thursday March 17, 2022 @12:51PM (#30713243)
In my case, the year was 2017. Early 2017.

How many of those formats were available on all Android phones in 2017?

Answer: None.

Re:H.264 is Magic (2016) by dlp211 on Thursday March 17, 2022 @11:37AM (#30712303)
This was fascinating. I changed to JPEG large vs BPG small and they are almost indistinguishable. JPEG small vs BPG small wasn't even close (JPEG being much worst).
Re:H.264 is Magic (2016) by MetaWhirledPeas on Thursday March 17, 2022 @01:10PM (#30713445)
It does look really good for detailed areas, but when you look at the abandoned building pic BPG can never quite get the smooth sky gradient right, even at Large size.
Re:H.264 is Magic (2016) by MrBuddyCasino on Thursday March 17, 2022 @09:35AM (#30710995)
They did the same for AV1, image size is 50% of HEIC (25% of JPEG) due to increases in coding efficiency.
Re:H.264 is Magic (2016) by high_priest on Thursday March 17, 2022 @09:35AM (#30710994)
Bro. Why are you promoting so much an app that barely does anything (opens a series of images from a hosting), as 'pornographic application that change your life'?
Re:H.264 is Magic (2016) by tmp65535 on Thursday March 17, 2022 @09:52AM (#30711153)
This account exists ONLY to talk about that app. Every one of my projects is isolated from the others by using different accounts, etc. We should all be meticulous about compartmentalizing our online identity.

This app uses an unusual image codec (BPG) which illustrates that if you control the encoder and decoder, you can choose a format with no mainstream support. I think it is a good point.

Re:H.264 is Magic (2016) by antasvara on Thursday March 17, 2022 @10:17AM (#30711428)
Do you run into issues being seen as a shill for your app?

I ask this in good faith, because I think a decent chunk of HN readers check a person's post history when they recommend something. I get the idea of compartmentalizing your online identity, but I imagine that comes at a cost in some instances.

Re:H.264 is Magic (2016) by tmp65535 on Thursday March 17, 2022 @10:20AM (#30711472)
Sure. But the benefits of privacy and compartmentalization outweigh the costs.
Re:H.264 is Magic (2016) by criddell on Thursday March 17, 2022 @10:43AM (#30711716)
> We should all be meticulous about compartmentalizing our online identity.

I disagree and I believe the HN guidelines do as well:

> Throwaway accounts are ok for sensitive information, but please don't create accounts routinely. HN is a community—users should have an identity that others can relate to.

Re:H.264 is Magic (2016) by Cthulhu_ on Thursday March 17, 2022 @11:10AM (#30711978)
Do you believe the person posting is guilty of "creating accounts routinely"? Or just one for this app and one 'main' account?

I don't see an issue with creating multiple accounts as long as they're not used for abuse, e.g. spam or trolling, or cause technical issues, e.g. creating millions of accounts. I mean if done right you'd never know or care.

Re:H.264 is Magic (2016) by oefrha on Thursday March 17, 2022 @12:04PM (#30712645)
This person is totally guilty of violating the rule on self promotion:

> Please don't use HN primarily for promotion. It's ok to post your own stuff occasionally, but the primary use of the site should be for curiosity.

Promoting your app in every single otherwise okay comment is certainly distasteful.

Re:H.264 is Magic (2016) by wccrawford on Thursday March 17, 2022 @12:38PM (#30713071)
I'm usually pretty critical of self-promotion, but in this case they gave a real world example of how they did something related to the article's contents. They didn't even provide a link or an app name, just said that you could find it in their history if you were curious.

I think that's about the best you can do not to promote your product while trying to give real-world examples of things that are being discussed.

Re:H.264 is Magic (2016) by tmp65535 on Thursday March 17, 2022 @12:19PM (#30712829)
Listen friend, I'm using it as a concrete example of a technology in every case.

Today I'm using it as a concrete example of H.265 (BPG) as an astonishingly good alternative to JPEG in applications where you control the encoder and decoder.

Re:H.264 is Magic (2016) by tmp65535 on Thursday March 17, 2022 @10:53AM (#30711823)
We may differ in our interpretation of the phrase "sensitive information".

It used to be that most computer programmers ("hackers") understood the value of privacy.