Page 1 of 1

add support for newer codecs

Posted: Sat Feb 03, 2024 2:05 am
by secelt
Factorio 1.1 contains over 1 GiB of graphics data and over 128 MiB of sound data, encoded in PNG and Ogg Vorbis, respectively. both of these codecs are quite old and have been superseded in recent years. i hope that the Factorio devs implement support for these better codecs to reduce download sizes, especially since more content than ever before will be in the game when the Expansion is released.

first, for the graphics, the golden standard these days in both lossy and lossless image compression is JPEG XL. it’s an open, royalty‐free format. compared to PNG, its lossless mode can compress images 35 % better, while its lossy mode can can recognize text (and other flat graphics) and compress those parts losslessly.

second, for the sounds, essentially the entire industry has converged on Opus as the default choice. it’s also royalty‐free, made by the same people as Vorbis and beats Vorbis in audio quality at similar bitrates, as shown in these two listening tests: [1], [2].

i know that this may seem like small potatoes, but these data savings do add up, especially for players with bad Internet connections. it would also save you a little money on Web hosting, as a bonus!

Re: add support for newer codecs

Posted: Sat Feb 03, 2024 4:36 pm
by Illiander42
Pretty sure people will be sceptical of JPEG formats after what happened with Unity.

Re: add support for newer codecs

Posted: Sat Feb 03, 2024 4:51 pm
by Qon
Illiander42 wrote:
Sat Feb 03, 2024 4:36 pm
Pretty sure people will be sceptical of JPEG formats after what happened with Unity.
Why? JPEG XL is FOSS and royalty-free, how is this related to Unity at all?

Re: add support for newer codecs

Posted: Sun Feb 04, 2024 7:08 am
by steinio
SVG is scalable infinitely :D

Re: add support for newer codecs

Posted: Sun Feb 04, 2024 9:52 am
by Illiander42
Qon wrote:
Sat Feb 03, 2024 4:51 pm
Illiander42 wrote:
Sat Feb 03, 2024 4:36 pm
Pretty sure people will be sceptical of JPEG formats after what happened with Unity.
Why? JPEG XL is FOSS and royalty-free, how is this related to Unity at all?
Did you miss the massive thing where Unity tried to retroactively change its license agreement?

And which license is it under? Because the link you gave only said "royalty-free" which leaves a whole heap of nasty stuff open.

Re: add support for newer codecs

Posted: Sun Feb 04, 2024 2:15 pm
by secelt
Illiander42 wrote:
Sun Feb 04, 2024 9:52 am
Did you miss the massive thing where Unity tried to retroactively change its license agreement?

And which license is it under? Because the link you gave only said "royalty-free" which leaves a whole heap of nasty stuff open.
the format and algorithms of JPEG XL are standardized as ISO 18181.

libjxl, the reference implementation, is licensed under the 3‑clause BSD license. free‐software licenses are, in most cases, non‐revocable (genuinely great article, highly recommended), although, since BSD-3-clause is a permissive license, nothing is stopping future versions of libjxl in becoming closed‐source.

in addition, Google grants a patent license to anyone in regards to libjxl, subject to a patent retaliation clause.

so, no, i don’t think this is anything like Unity.

Re: add support for newer codecs

Posted: Sun Feb 04, 2024 3:14 pm
by Qon
Illiander42 wrote:
Sun Feb 04, 2024 9:52 am
And which license is it under? Because the link you gave only said "royalty-free" which leaves a whole heap of nasty stuff open.
I didn't give you a link.
OP a link to https://jpegxl.info/ titled "open, royalty‐free format" which does say "FOSS and royalty-free".

Re: add support for newer codecs

Posted: Sun Feb 04, 2024 5:25 pm
by Illiander42
secelt wrote:
Sun Feb 04, 2024 2:15 pm
Illiander42 wrote:
Sun Feb 04, 2024 9:52 am
Did you miss the massive thing where Unity tried to retroactively change its license agreement?

And which license is it under? Because the link you gave only said "royalty-free" which leaves a whole heap of nasty stuff open.
the format and algorithms of JPEG XL are standardized as ISO 18181.
That doesn't actually make something safe to use. Remember Office Open XML?
secelt wrote:
Sun Feb 04, 2024 2:15 pm
libjxl, the reference implementation, is licensed under the 3‑clause BSD license. free‐software licenses are, in most cases, non‐revocable (genuinely great article, highly recommended), although, since BSD-3-clause is a permissive license, nothing is stopping future versions of libjxl in becoming closed‐source.
So the Unity problem is sitting right there in the open.
secelt wrote:
Sun Feb 04, 2024 2:15 pm
in addition, Google grants a patent license to anyone in regards to libjxl, subject to a patent retaliation clause.
Is Google the only contributor to that? Does Google offload their patents to a sub-company that isn't bound by that? What if they sell the patents straight?

Also: "This grant does not include claims that would be infringed only as a consequence of further modification of this implementation."

Which means there's no right to improve for anyone other than Google.

That isn't a Free license. That's a royalty-free license, which is nowhere near good enough for a standard.

Re: add support for newer codecs

Posted: Sun Feb 04, 2024 5:50 pm
by Qon
Illiander42 wrote:
Sun Feb 04, 2024 5:25 pm
That isn't a Free license. That's a royalty-free license, which is nowhere near good enough for a standard.
libjxl is not JPEG XL, you can use JPEG XL without it.
libjxl source is 3 clause BSD, which is FOSS. The patent license is an addition, it doesn't subtract any rights that you were given regarding the copyright of libjxl source. It just means Google is giving you the irrevocable right to use the source without worrying about the patents they hold related to the implementation.
This grant does not include claims that would be
infringed only as a consequence of further modification of this
implementation.
If you modify it to use patents that are not already used by libjxl, your additions can't just nullify ALL OTHER non-libjxl google patents. So you can't make a loophole and blow it open.