JPEG XL

Info

rules 57
github 35276
reddit 647

JPEG XL

tools 4225
website 1655
adoption 20712
image-compression-forum 0

General chat

welcome 3810
introduce-yourself 291
color 1414
photography 3435
other-codecs 23765
on-topic 24923
off-topic 22701

Voice Channels

General 2147

Archived

bot-spam 4380

adoption

Adoption of jxl: what software supports jxl already, how to get more adoption?

diskorduser
2022-08-26 09:33:29
Will pdf support including jxl images in future? Who decides about it?
2022-08-26 09:39:46
If pdf includes jxl support then these browser vendors would be forced to include jxl. Because opening pdf in browser is a common feature.
novomesk
Jim A photographer and Krita HDR developer are supporting JXL on Chrome: https://bugs.chromium.org/p/chromium/issues/detail?id=1178058#c66
2022-08-26 09:40:59
The Krita developers are very skilled, I saw their code. It is clear they are exploring many libjxl possibilities but as early adopters, they are running into issues. For example they tried CMYK with JXL ( https://github.com/libjxl/libjxl/issues/1719 )
2022-08-26 10:12:26
Krita supports JXL animation but they cannot support animated AVIF such easily. That's because libheif library is used for AVIF support and it doesn't support animation. It is weird situation, because in animation, AVIF would manifest power of AV1 compression.
_wb_ As far as I understand, it's the avif proponents who initiated the review in the first place, and I'm assuming they did not do that to get jxl support enabled, but rather to remove what they see as an obstacle to avif adoption.
2022-08-26 10:37:18
If I know who are those anti-JXL, pro-AVIF "proponents" I'd suggest them that instead of hindering other format(s), they can work on improving AVIF support in various places in the first place. They have many areas with huge potential of improvements and their effort would be appreciated there by consumers/customers/end-users. What I do not understand is that some Google people are involved to work related to AVIF and other Google people are close to work on JXL. It looks like Google vs Google.
_wb_
2022-08-26 10:51:36
The browser/codecs team within Google is involved in AVIF. The Research team within Google is involved in JPEG XL. Two very different teams. The one involved in AVIF has control over Chrome decisions.
diskorduser
2022-08-26 12:57:19
novomesk
2022-08-26 01:38:42
There is another viewer vipsdisp, which (according the description) supports JXL https://www.reddit.com/r/gnome/comments/wtpzrp/new_gtk4_image_viewer/
Jim
novomesk If I know who are those anti-JXL, pro-AVIF "proponents" I'd suggest them that instead of hindering other format(s), they can work on improving AVIF support in various places in the first place. They have many areas with huge potential of improvements and their effort would be appreciated there by consumers/customers/end-users. What I do not understand is that some Google people are involved to work related to AVIF and other Google people are close to work on JXL. It looks like Google vs Google.
2022-08-26 02:19:08
The Google employees have said in the past that there is little to no communication between different groups/departments within Google. I'm sure this is to reduce the chances of unions forming but it also hinders the progress of the departments. I've noted in the past that Google works on a number of standards and recommendations (IAB advertising, web performance, etc.) that other parts of Google ignore - that's the reason, they don't communicate much.
2022-08-26 02:26:06
Additionally, they spent a decent amount of time complaining about JXL a while back for very minor things, but did nothing to correct the record about AVIF. I've pointed out that there are numerous news sites out there that incorrectly labeled and acted as if AVIF were a replacement for JPEG. It is not, and the proponents would only state that THEY never said that, which is true, but doesn't fix the problem of the ecosystem incorrectly promoting the format's purpose.
yurume
2022-08-26 02:27:08
not just standards, but I've heard that there are at least 20+ different mature configuration languages inside Google, often developed in-house per each department (lol)
BlueSwordM
JendaLinda Honestly, I see nothing interesting about AVIF, it's just another lossy compression, so we could just use WebP instead. I'm not going to be using AVIF any time soon.
2022-08-26 03:30:44
WebP is absolute garbage for lossy compression vs proper AV1 though.
Demez
novomesk I suggest that anyone add specific info that some on the other popular applications have JPEG XL support already: IrfanView since 2021-12-01 https://www.irfanview.com/history_old.htm digiKam since 2022-06-26 https://www.digikam.org/news/2022-06-26-7.7.0_release_announcement/ qimgv since 2021-09-22 https://github.com/easymodo/qimgv/releases/tag/v1.0.0 I also know that that darktable is preparing JXL support too ( https://github.com/darktable-org/darktable/pull/10044 ) and they are also quite known/popular application.
2022-08-26 03:46:37
i plan to add jpeg xl support to my own image viewer I've been working on recently
JendaLinda
BlueSwordM WebP is absolute garbage for lossy compression vs proper AV1 though.
2022-08-26 03:53:53
It might be but WebP always works at least. AVIF relies on different AV1 profiles and extensions and those have to be supported by the decoder to work. The infamous example is native AVIF support in Windows, which is pretty broken at this point.
2022-08-26 04:21:05
To be fair, the whole HEIF implementation in Windows is broken. How long it took Microsoft to get PNG decoding right? 20 years?
novomesk
2022-08-26 04:47:01
It is a fact that MS doesn't have excellent AVIF implementation. But we see it because there are other implementations and we can compare them between each other. We can see if independent developers implemented features correctly and how they understood the specification. Different implementation actually improves the format's specification because uncertain things can be further clarified and better explained. It is harder to see differences when everyone use the same library.
_wb_
2022-08-26 05:09:08
That is true, but imo the main causes of trouble are not decoders implementing the codec incorrectly, but one level higher, applications not properly implementing the 'surrounding' functionality besides decoding a pixel buffer: doing proper color management, orientation, not ignoring alpha or the K of CMYK, dealing with the option of more than one frame, etc.
novomesk
_wb_ That is true, but imo the main causes of trouble are not decoders implementing the codec incorrectly, but one level higher, applications not properly implementing the 'surrounding' functionality besides decoding a pixel buffer: doing proper color management, orientation, not ignoring alpha or the K of CMYK, dealing with the option of more than one frame, etc.
2022-08-26 05:27:11
Yes, there are also problems on the higher level. For example my implementations are also incomplete. However, in case of MS, they have problem in YUV444 -> RGB conversion. And when they decode AVIF which is already in RGB, they performed unnecessary YUV->RGB conversion and changed colors.
_wb_
2022-08-26 06:02:02
Yes, that kind of thing happens when coding tools like color transforms are left as an application responsibility...
JendaLinda
2022-08-26 06:08:00
I that regard, the design of JXL seems to much more robust.
Quikee
diskorduser Will pdf support including jxl images in future? Who decides about it?
2022-08-27 08:07:40
New versions of PDF sepcs is written by dev. group under ISO probably with Adobe in the lead. Note that they could mandate in the next version of PDF specs to require JXL, but that would only be necessary if the viewer/writer effectively supports that PDF version. As a lot of bloat was added to the latest PDF standard (with exception of Acrobat) most viewers and especially writers don't care about a lot of features that were added in PDF latest versions.
fab
2022-08-27 11:45:44
Modular currently suck at speed 7
2022-08-27 11:45:57
Super blocky
2022-08-27 11:46:07
The compression is improved
2022-08-27 11:46:19
But i suggest you to upgrade
2022-08-27 11:46:22
Jon
2022-08-27 11:46:44
To study better quality of both modes
Traneptora
2022-08-27 04:56:36
what I don't understand is the whole reason there's a war
2022-08-27 04:56:44
why we have to go "but we have image format at home"
2022-08-27 04:56:58
I really don't see the particular reason AVIF and JPEG XL can't both be implemented by major browsers
Fraetor
2022-08-27 06:15:37
I think it is mostly Not Invented Here syndrome, but with web browsers specifically there is the support consideration, as if something starts to be used widely on the web, it basically has to stay supported forever.
2022-08-27 06:16:44
Like how all browsers support BMP images, despite them being completely superseded by PNG for the last 20 years.
novomesk
2022-08-27 08:30:58
Macromedia/Adobe flash was widely supported and now it is almost gone. Support can be removed.
Traneptora
2022-08-27 09:33:28
although support only really needs to be removed if there's a security risk
2022-08-27 09:33:55
evidently they consider BMP support to be worth the code overhead, since it's a question of "is this feature worth the extra code weight"
_wb_
2022-08-27 10:11:10
I think they should support both avif and jxl, and then maybe start thinking about a deprecation plan for j2k and webp.
BlueSwordM
2022-08-27 11:37:34
>WebP >Depreciation plan That does not sound like a great idea TBH.
username
2022-08-27 11:42:42
deprecation plan for j2k? I don't think any browsers support j2k unless you are talking about places/fields that make use of j2k like for medical scans, satellite images and etc
Demez
2022-08-28 12:37:44
i wish it could be, but it's really just too widespread
The_Decryptor
username deprecation plan for j2k? I don't think any browsers support j2k unless you are talking about places/fields that make use of j2k like for medical scans, satellite images and etc
2022-08-28 12:49:47
Safari supports it, and the GTK port "recently" had to add support for it because sites depended on it, https://bugs.webkit.org/show_bug.cgi?id=186272
Jim
2022-08-28 01:07:52
Instead of getting rid of WebP, they need to start planning for WebP2. I feel their latest comparison actually situates them between AVIF and JXL.
BlueSwordM
2022-08-28 04:08:56
Yes.
_wb_
2022-08-28 12:36:09
I think deprecating gif, png and jpg is impossible because sites assume it will work, without any content negotiation or fallback.
2022-08-28 12:37:27
For webp and j2k, it's possible to deprecate, just like jxr was deprecated in Edge, since they always have a fallback.
novomesk
2022-08-28 01:43:05
According https://w3techs.com/technologies/details/im-webp , popularity of WEBP is growing. LibreOffice added WEBP support only recently, Godot game engine last year.
_wb_
2022-08-28 01:51:29
Now it works in all major browsers, you can think about dropping fallback for webp, which is why I think it's important for browsers to think about a deprecation plan if they ever want to be able to get rid of it
JendaLinda
2022-08-28 01:52:52
The difference between Adobe Flash and image formats is that Adobe Flash was completely proprietary relying on a closed source plugin.
_wb_
2022-08-28 02:13:32
Yes, arguably Flash has never actually been part of the web platform
novomesk
2022-08-28 03:55:44
WEBP is shining: https://www.phoronix.com/news/Ubuntu-22.10-webp-pixbuf-loader
Deleted User
2022-08-28 06:03:37
should be jxl instead
2022-08-28 06:04:55
tired of google monopoly
2022-08-28 06:06:32
cause browsers already support webp, webp is good for web content
JendaLinda
2022-08-28 06:06:59
WebP is mature. JXL will come later.
Deleted User
2022-08-28 06:07:36
yea but jxl is better
2022-08-28 06:08:34
webp cannot do lossy 4:4:4
2022-08-28 06:09:25
no progressive decoding, only 4 channels
2022-08-28 06:09:45
only 16k width/height max.
2022-08-28 06:10:02
thats even less than jpg
_wb_
2022-08-28 06:10:37
WebP is slightly better for lossy than JPEG, but it can only do 4:2:0 and non-progressive. WebP is consistently better for lossless than PNG, but it can only do 8-bit.
Deleted User
2022-08-28 06:10:38
it decodes fast so ppl use it on their websites
_wb_ WebP is slightly better for lossy than JPEG, but it can only do 4:2:0 and non-progressive. WebP is consistently better for lossless than PNG, but it can only do 8-bit.
2022-08-28 06:11:42
yeah it's definitely smaller in lossless compared to png. png gets really big if the resolution is high
2022-08-28 06:11:52
its not that good in compression ratio (png)
_wb_
2022-08-28 06:12:52
One of the main arguments for webp was that there was VP8 decoding needed already anyway, so it was 'for free' in terms of code size and security attack surface
Deleted User
novomesk WEBP is shining: https://www.phoronix.com/news/Ubuntu-22.10-webp-pixbuf-loader
2022-08-28 06:14:10
also i thought webp support was already in most OS
2022-08-28 06:14:39
given webp is from 2010
_wb_
2022-08-28 06:14:51
Now I wonder if anyone still uses VP8 for video, I think it could probably be retired because av1, vp9, h264 is enough.
2022-08-28 06:15:27
WebP was conceived to be a Web format, basically something only browsers and web devs need to know about
Deleted User
2022-08-28 06:15:38
it has web in the name too
_wb_
2022-08-28 06:15:47
Which is I think a very bad concept
2022-08-28 06:16:45
But understandable for Google engineers who basically control both the client and a large part of the server...
JendaLinda
2022-08-28 06:18:18
As WebP is already used in the wild, it makes sense to support it first.
Deleted User
2022-08-28 06:18:24
searching webp on google, fifth result is "webp to jpg"
2022-08-28 06:19:22
i guess people don't like unfamiliarity
JendaLinda As WebP is already used in the wild, it makes sense to support it first.
2022-08-28 06:19:29
true
2022-08-28 06:20:10
surprised they havent done that until now esp. for the most used distribution
2022-08-28 06:21:54
i like webp, it's very small + fast decode
2022-08-28 06:22:07
i guess its a matter of time for people to notice jxl though..
2022-08-28 06:22:28
webp is noticed because it's made by the largest tech company
novomesk WEBP is shining: https://www.phoronix.com/news/Ubuntu-22.10-webp-pixbuf-loader
2022-08-28 06:24:06
also this doesnt really matter unless you use the default image viewer, if you download something like qimgv support is already in
fab
2022-08-28 06:26:26
qimgv is ukainin
2022-08-28 06:26:34
dzgas won't use it
JendaLinda
2022-08-28 06:29:55
I like WebP lossless. The efficiency is pretty good and the encoder is fast. The JXL lossless still needs some tweaking. Unfortunately I'm using a website which accepts only JPEG and PNG, so pngout is my friend, but it's very very slow.
_wb_
2022-08-28 06:36:06
WebP lossless hits a very sweet spot in speed vs density, both encode and decode. Just a pity it's limited to 8-bit and 16383 pixels in either dimension.
2022-08-28 06:39:04
JXL is more flexible in both features and trade-offs between speed and density, and it will take time to make encoders that fit in between fjxl and libjxl e2, and with better trade-offs in between e3 and e9
JendaLinda
2022-08-28 06:46:41
I don't mind slower encoding speed, after all I'm always using -e 9. The speed may be important for some users though.
2022-08-28 06:51:31
WebP has limitations but it's still sufficient for many use cases.
Jim
2022-08-28 07:56:26
I think they should wait until WebP2 comes out to deprecate WebP, then give them a large enough amount of time to convert over to other formats. When JXL is supported they should deprecate JPG and PNG, but again give something like a decade before removing it with many warnings in-between.
novomesk
Demez i plan to add jpeg xl support to my own image viewer I've been working on recently
2022-08-28 08:28:23
What is your image viewer? I am curious.
2022-08-28 08:44:56
I think WebP2 is not coming soon, activity in libwebp2 repo is not so frequent. On the other side, libaom and libvpx are much active. I guess that Webp2 is an experimental research project and the results will be re-used in some future technology. Like VP10, it was not finalized but work was reused for AV1.
Demez
novomesk What is your image viewer? I am curious.
2022-08-28 09:56:16
its not anything too special as I only started it a few days ago lol, but of is on my github
novomesk
2022-08-28 10:21:53
nomacs
username
2022-08-29 03:13:59
I have been waiting for this for a while now and it's finally a thing! there is a plugin for paint.net now! https://github.com/0xC0000054/pdn-jpegxl
_wb_
2022-08-29 03:18:28
https://bugs.chromium.org/p/chromium/issues/detail?id=1178058#c72 <@826537092669767691> This is a valid point, and indeed <@268284145820631040>'s work-in-progress independent implementation (J40, see https://gist.github.com/lifthrasiir/137a3bf550f5a8408d4d9450d026101f) is indeed causing some spec bugs to be found. I think we're getting quite close to having a second, independent implementation though — it already decodes both VarDCT and Modular, the main thing left to do are the optional things like filters, splines, noise and patches.
2022-08-29 03:19:06
However I don't think this needs to be a blocker for browser adoption. How many implementations of WebP are there?
Kornel
2022-08-29 03:20:19
I think WebP has been an asshole move by Google.
2022-08-29 03:20:29
It does have one implementation only, and it's not a standard.
2022-08-29 03:21:02
Other vendors have been forced to relent on WebP only for web compat, not because of it being a standard or good enough that they wanted to adopt it.
2022-08-29 03:21:14
So let's not repeat that.
2022-08-29 03:23:23
I'm currently fighting with a program using libvpx spraying memory so badly that valgrind can't even generate a valid stack trace, and ironically the same program under ASAN works flawlessly, so I'm running ASAN in production 😄
2022-08-29 03:28:01
Do you have more info on the J40 implementation?
2022-08-29 03:29:45
Maybe you could define a "web profile" for JPEG XL that doesn't use the features that J40 lacks?
Fraetor
2022-08-29 03:31:57
I think J40 intends to implement everything, it just hasn't got there yet. You wouldn't want a new profile as it might end up the defacto standard ike JFIF.
Kornel
2022-08-29 03:34:20
The project — independent C impl based on the spec — is exactly what I'd like to see.
_wb_
2022-08-29 03:39:55
Level 5 is supposed to be the "web profile" for jpeg xl — it doesn't impose many restrictions though, just no CMYK, at most 16-bit, no more than 4 additional channels besides RGB, and animations are capped to 120 FPS.
Kornel The project — independent C impl based on the spec — is exactly what I'd like to see.
2022-08-29 03:41:30
I'm also happy that <@268284145820631040> started doing this independent implementation from spec, he has been finding quite a lot of bugs and unclear things in the spec, which will make the 2nd edition of the spec a lot better
2022-08-29 03:44:35
It already decodes quite a lot of bitstreams nicely, so I'm quite confident that we'll have an actual standard with several implementations and not only a single implementation that basically defines the codec.
2022-08-29 03:45:21
That said, I do hope that libjxl will just be good enough to be usable as-is for most use cases 🙂
2022-08-29 03:47:25
In particular I'm not really looking forward to having proprietary jxl encoders that are better than what can be done with FOSS encoders — as is sadly the current situation for both J2K (where Kakadu beats OpenJPEG) and AVIF (where Aurora beats libaom/svt/rav1e).
yurume
2022-08-29 10:00:03
yes, J40 intends to implement everything in the end, otherwise there would be always an unverified hole in the spec.
2022-08-30 12:14:49
it's still short of being an actual library, so please account for that, but in brief: - baseline Modular: done - baseline VarDCT: done - progressive decoding: not yet implemented, in fact the current J40 will choke when TOC is permuted - restoration filters: garborish done, epf in progress - other image features: not yet implemented - upsampling: not yet implemented - colour transformation: only a slow sRGB path exists - animation and blending: not yet implemented - API: basic design in place, implementation in progress
2022-08-30 12:18:58
well, I have went too far and it would be a shame if I stop here 😉
2022-08-30 12:20:04
I think you'd just compile `j40.c`, not `j40.h`
2022-08-30 12:20:39
oh, and `-lm` if you're using linux
2022-08-30 12:22:12
for now `./j40 input.jxl [output.png]` will emit the first frame to output.png, which can be omitted just like djxl
2022-08-30 12:22:59
I'm pretty sure that that will require YCbCr which is not currently implemented, but assertion makes me concerned, I will investigate later
2022-08-30 12:23:31
it is also possible that it's animated, in which case there is a known bug that triggers this assertion
2022-08-30 02:23:48
<@456226577798135808> just in case, could you upload that particular file?
2022-08-30 05:22:36
thank you, that's more than enough information 🙂
2022-08-30 05:26:40
whoops, that's entirely my fault: `f->lf_thr[i][j] = j40__unpack_signed(j40__u32(st, 0, 4, 16, 8, 272, 16, 65808, 32));` won't work because the last term has `u(32)` which may cause an overflow :S
2022-08-30 05:28:01
(I think at this point it's better to continue in <#794206087879852106> )
fab
yurume it's still short of being an actual library, so please account for that, but in brief: - baseline Modular: done - baseline VarDCT: done - progressive decoding: not yet implemented, in fact the current J40 will choke when TOC is permuted - restoration filters: garborish done, epf in progress - other image features: not yet implemented - upsampling: not yet implemented - colour transformation: only a slow sRGB path exists - animation and blending: not yet implemented - API: basic design in place, implementation in progress
2022-08-30 06:37:15
Is it in rust?
yurume
2022-08-30 06:39:52
no, it's C.
_wb_
2022-08-30 08:57:04
the language doesn't matter that much imo — what is important is that it's an independent implementation from spec, as opposed to a fork or translation of libjxl that would not help to reveal spec bugs since it would just inherit any discrepancies
0xC0000054
username I have been waiting for this for a while now and it's finally a thing! there is a plugin for paint.net now! https://github.com/0xC0000054/pdn-jpegxl
2022-08-30 11:50:34
I am the author of the Paint.NET JXL plugin. Version 1.0 of the plugin does not have support for EXIF or XMP metadata, due to libjxl 0.6.1 not having the appropriate APIs. The plugin does not support animated or multi-frame images, and only Gray(Alpha) and RGB(Alpha) color spaces are supported. All unsupported images should be rejected with an error message, but I was unable to find any non-animated multi-frame images to test with. Encoding an image with libjxl is significantly faster and uses less memory than AVIF with libaom. My Paint.NET AVIF plugin has to use a HEIF image grid (tiles that the decoder reassembles to form the full image) on most images in order to keep the AOM encoding speed and memory usage acceptable.
_wb_
0xC0000054 I am the author of the Paint.NET JXL plugin. Version 1.0 of the plugin does not have support for EXIF or XMP metadata, due to libjxl 0.6.1 not having the appropriate APIs. The plugin does not support animated or multi-frame images, and only Gray(Alpha) and RGB(Alpha) color spaces are supported. All unsupported images should be rejected with an error message, but I was unable to find any non-animated multi-frame images to test with. Encoding an image with libjxl is significantly faster and uses less memory than AVIF with libaom. My Paint.NET AVIF plugin has to use a HEIF image grid (tiles that the decoder reassembles to form the full image) on most images in order to keep the AOM encoding speed and memory usage acceptable.
2022-08-30 11:55:53
for viewing purposes, decoding non-animated multi-frame should be handled correctly by default since the decode api will merge the layers automatically for you if you don't tell it explicitly to not do that.
0xC0000054
2022-08-30 12:15:17
Thanks for the info.
w
2022-08-30 12:42:59
it'd be cool if it can save and decode layers as layers
_wb_
2022-08-30 12:46:00
you need to set JxlDecoderSetCoalescing to false if you want to decode layers
2022-08-30 12:47:45
you then do need to handle things yourself though: returned frames can have arbitrary dimensions (including larger than the frame!) and an x0,y0 offset, and there are other blend modes than just the usual alpha blending
w
2022-08-30 12:47:58
i got a curious result for one image ``` 47M 001.png 17M 001.webp 16M 001_cjxl_e3.jxl 28M 001_pdn-jpegxl_e3.jxl```
_wb_
2022-08-30 12:48:34
what is that last one?
w
2022-08-30 12:49:35
using <@833420862334042152>'s plugin
2022-08-30 12:49:51
all we need now is a photoshop plugin
_wb_
2022-08-30 12:52:09
are you looking at lossless or lossy?
w
2022-08-30 12:52:20
lossless
_wb_
2022-08-30 12:52:29
can you run jxlinfo on the last one?
2022-08-30 12:52:50
could be it's using XYB, so not actually lossless and quite ineffective
w
2022-08-30 12:58:08
> lossy, 8-bit RGB hmmmm
0xC0000054
w all we need now is a photoshop plugin
2022-08-30 01:29:58
I am hoping that Adobe will add built-in support, based on the fact that one of their employees was asking for Chrome/Chromium to enable JXL by default: https://bugs.chromium.org/p/chromium/issues/detail?id=1178058#c61
w
2022-08-30 01:30:38
yeah i often think about making a plugin but if there's going to be official support then it'd be a waste
0xC0000054
w yeah i often think about making a plugin but if there's going to be official support then it'd be a waste
2022-08-30 01:38:01
I wrote a Photoshop plugin for AVIF support. https://github.com/0xC0000054/avif-format The plugin does not support HDR, and I have no idea how I would go about implementing it. It appears that Adobe never documented the details of Photoshop's 32-bit float image mode in the Photoshop SDK, other than the fact that it was added in CS2. Adobe has not added official support for AVIF, despite 2 years of requests for it.
_wb_
2022-08-30 02:53:56
https://twitter.com/kornelski/status/1564574363835404288?t=iPdS6wGMJuWNgnk9qhJpYw&s=19 <@826537092669767691> These are valid points, but it's kind of frustrating to me that they have this double standard: WebP and AVIF were both added to Chrome quite quickly and maybe even prematurely — in the sense that the formats weren't fully frozen yet, evidence of compression performance was flimsy at best, ecosystem support and tooling was quite poor — while for JPEG XL they are suddenly taking a rather slow and conservative approach.
2022-08-30 03:00:41
Point 2 is also true for WebP and AVIF, and point 3 too — you can claim that they "come for free" because most code is shared with the corresponding video codecs, but I think that's a rather short-term argument: video formats can eventually be retired more easily than image formats imo, so it's quite plausible that at some point VP8 and AV1 would be retired as supported video codecs (say in 15 years or so, when everyone is using AV4 and it is enough to keep only h264, VP9, AV2, AV3 and AV4), except they need to be kept around just for WebP and AVIF.
2022-08-30 03:03:57
Anyway it's hard to get rid of the impression that WebP and AVIF have received a 'preferential treatment' in Chrome since they were 'invented there', while JXL was not.
Kornel
2022-08-30 03:24:52
WebP has been unilaterally and prematurely forced by Google, without standards process, without consensus. In retrospective it's been a big mistake, e.g. waiting until VP9 would have improved the format greatly.
2022-08-30 03:25:19
So yeah, I hold JPEG XL to a higher standard than WebP.
2022-08-30 03:25:47
The fact that Google carelessly forced one image format doesn't mean they should force another.
2022-08-30 03:25:56
AVIF got in only because of AV1.
2022-08-30 03:31:17
I wonder if there is a path to dropping AV1, and therefore AVIF
2022-08-30 03:31:54
VP8 unfortunately got immortalized in WebRTC and WebP
BlueSwordM
Kornel WebP has been unilaterally and prematurely forced by Google, without standards process, without consensus. In retrospective it's been a big mistake, e.g. waiting until VP9 would have improved the format greatly.
2022-08-30 03:33:10
God, can you imagine how much better lossy WebP would have been by then? 😂
JendaLinda
2022-08-30 03:37:17
Honestly, only the lossless part of WebP was interesting for me. I was using it for archiving some large images before I converted them to lossless JXL.
Kornel
2022-08-30 03:42:09
BTW, Safari seems to have a custom WebP decoder, or at least something else than vanilla libvpx
2022-08-30 03:42:20
because there are libvpx-produced WebPs that don't decode in Safari
2022-08-30 03:46:56
Apple has delayed adding WebP until WebP was available in macOS natively. I presume they care what happens with "Save As", etc.
2022-08-30 03:47:19
Google has delayed adding AVIF to mobile Chrome until AV1 decoder shipped with Android
2022-08-30 03:47:27
due to code size concerns
2022-08-30 03:49:38
so I guess the path to JXL adoption needs to go through OSes first?
190n
2022-08-30 04:13:54
on desktop, it's only safari that relies on OS codecs
2022-08-30 04:15:13
i'm not as familiar with mobile but no android browser _needs_ OS support for particular formats. not sure why google would've waited for android avif support (especially since the latest chrome often runs on old android that won't support avif anyway).
_wb_
2022-08-30 05:26:10
Yes some WebPs do not decode in Safari, both lossy and lossless. That could indeed be because they have their own implementation.
2022-08-30 05:27:44
Any codec supported in Safari needs to be in Apple's CoreMedia, so MacOS/iOS support is a prerequisite for Safari support. It makes sense, tbh.
2022-08-30 05:31:07
On Android, depending on system level support for anything is annoying due to the long tail of old versions that never get updated. So it is understandable that Chrome ships some codecs regardless of Android support. Same with not wanting to rely on Microsoft.
2022-08-30 05:35:18
OS-level support and having a "Save As..." that works out of the box for everyone is very important imo. It makes the difference between a format people don't even notice because it's just a picture that works (which is a good thing!) and a format people hate with a passion because they get frustrated by having an image they can view in a browser but cannot use anywhere else.
2022-08-30 05:38:51
So I hope Microsoft will soon announce jxl support. On Linux, we already have out-of-the-box jxl support in quite a few distros and I am sure the rest will follow easily. Windows still has a significant market share though.
Jim
2022-08-30 06:45:15
https://twitter.com/kornelski/status/1564618319994421254
_wb_ https://twitter.com/kornelski/status/1564574363835404288?t=iPdS6wGMJuWNgnk9qhJpYw&s=19 <@826537092669767691> These are valid points, but it's kind of frustrating to me that they have this double standard: WebP and AVIF were both added to Chrome quite quickly and maybe even prematurely — in the sense that the formats weren't fully frozen yet, evidence of compression performance was flimsy at best, ecosystem support and tooling was quite poor — while for JPEG XL they are suddenly taking a rather slow and conservative approach.
2022-08-30 06:46:38
Complains about attack surface, but wouldn't just using some conversion tool be a bigger potential security issue than using the full implementation? 👀
JendaLinda Honestly, only the lossless part of WebP was interesting for me. I was using it for archiving some large images before I converted them to lossless JXL.
2022-08-30 06:49:08
I agree, I tried converting some images to lossy webp years ago and the color was wildly lost. It is a *decent* PNG replacement and good for icons but not so much for photos.
_wb_ So I hope Microsoft will soon announce jxl support. On Linux, we already have out-of-the-box jxl support in quite a few distros and I am sure the rest will follow easily. Windows still has a significant market share though.
2022-08-30 06:51:15
Don't get your hopes up on Microsoft. They don't even support WebP.
JendaLinda
2022-08-30 06:53:14
I was experimenting with lossy WebP mostly for animation, as an attempt to recompress heavily dithered GIFs. WebP managed to filter out the dithering by smoothing and reduced the file size. Can't tell if the result looked better or worse, though. Both GIF and WebP looked bad.
Jim
2022-08-30 06:54:11
I hardly see any animated WebPs in the wild. Oddly, it seems many of them don't seem to work in Firefox while other do? Not sure what the issue is there.
2022-08-30 06:55:06
I still believe that animated GIF, WebP, etc. should be done away with. Just use video.
JendaLinda
2022-08-30 06:58:49
An interesting feature is ability to mix lossy and lossless images in single animation. This is possible also in JXL.
Jim
2022-08-30 07:04:24
For graphs/charts, vector-type animations, yes. It can go even further: https://discord.com/channels/794206087879852103/794206170445119489/1013920244634484816
2022-08-30 07:04:55
What I am referring to are memes or any animations that just show photos, other videos.
Hello71
2022-08-31 02:34:52
https://packages.debian.org/search?keywords=libjxl
2022-08-31 02:36:11
pulling a reason out of my ass, malaterre is probably waiting for 1.0 or at least some vaguely "stable" labelled release to move it
eddie.zato
2022-08-31 03:18:18
foobar 2.0 beta 2 now supports WIC. This means support for covers in JXL via jxl_winthumb.
diskorduser
eddie.zato foobar 2.0 beta 2 now supports WIC. This means support for covers in JXL via jxl_winthumb.
2022-08-31 03:51:25
Album art in jxl format?
eddie.zato
2022-08-31 04:00:53
Yeap
Jim
2022-08-31 04:00:15
Chrome added progressive rendering support to JXL for non-alpha images. https://bugs.chromium.org/p/chromium/issues/detail?id=1178058#c75
w
2022-08-31 04:03:25
my firefox patches 😢
_wb_
w my firefox patches 😢
2022-08-31 04:13:18
What happened?
w
2022-08-31 04:13:35
nothing happened
_wb_
Jim Chrome added progressive rendering support to JXL for non-alpha images. https://bugs.chromium.org/p/chromium/issues/detail?id=1178058#c75
2022-08-31 04:14:43
<@795684063032901642> can we make it work for alpha too? At least in the (default) squeeze case, where 8x8 downsampled alpha is actually available in the bitstream at the same time as the vardct DC...
paperboyo
Jim Chrome added progressive rendering support to JXL for non-alpha images. https://bugs.chromium.org/p/chromium/issues/detail?id=1178058#c75
2022-08-31 04:22:40
Does this mean the decision to keep/develop JXL support in Chrome was made? And correctly, at that? 😉
_wb_
2022-08-31 04:24:57
No, it doesn't mean anything regarding that, afaiu
improver
2022-08-31 05:40:19
..and it got reverted?
username
2022-08-31 05:43:47
it's pretty common for changes to get reverted from what I have seen since chromium has a lot of tests that things go through and if any of the tests fail then the changes gets reverted
2022-08-31 05:44:32
so at some point soon somebody is probably going to fix whatever is causing the failing testcase and then progressive decoding will get readded
_wb_
2022-08-31 06:20:59
Yes, lots of build targets for Chrome, and I suppose some of the more exotic ones are not tried until the commit gets merged
Moritz Firsching
_wb_ <@795684063032901642> can we make it work for alpha too? At least in the (default) squeeze case, where 8x8 downsampled alpha is actually available in the bitstream at the same time as the vardct DC...
2022-08-31 07:20:53
Do you think there is a strong use case for progressive with alpha? I think alpha images often contain non-photographic content and in those cases the smoothing might even be worse than waiting, because it will be very noticeable.
Jim
2022-08-31 07:36:45
Yep, it looks like some builds are failing. Bugs will happen.
Moritz Firsching Do you think there is a strong use case for progressive with alpha? I think alpha images often contain non-photographic content and in those cases the smoothing might even be worse than waiting, because it will be very noticeable.
2022-08-31 07:37:42
Images that have a photo layer and vector (text maybe?) in a layer above with alpha, or a photo with alpha would still need progressive decoding.
2022-08-31 07:39:34
There is not much use of alpha in photos because it only came about in WebP and now AVIF, but WebP is bad unless it's lossless so it didn't get used much. I feel it will get used more in JXL, possibly in AVIF but there is low uptake so far.
Moritz Firsching
2022-08-31 07:43:38
the smoothing in progressive non-photographic images right now, already might yield unexpected results when patches are used, because those patches will not be smoothed
Jim
2022-08-31 07:47:39
Other use cases: A 3D (or 2D) video game character with transparent background. Believe it or not, I've seen both current ways of doing this: Making it part of a larger image (background and foreground combined into one massive image that is then split into blocks). This severely limits how designs function and completely prevents responsive sites. The other way, exporting your characters as WebP or PNG lossless which are massive (yes, I've seen sites like this that take a good 20-30 seconds to load images on a broadband connection). JXL will be a massive step for such uses. People often "cut out" things from images and would want transparency around them as well.
_wb_
2022-08-31 08:06:58
Alpha and photo traditionally don't mix well on the web because JPEG has no alpha and PNG sucks at photo. So current usage patterns are likely not representative for what people actually want to do.
2022-08-31 08:09:12
Something like a circular cutout from a photo (without having to resort to CSS to do it) is quite widely used. Background removal tools are getting better too, so if the codecs support it in a nice way, I can imagine some nice web designs where the hero image is not just an opaque rectangle.
2022-08-31 08:12:43
One of the strengths of jxl is that it natively supports alpha, including progressive interleaving of rgb data with alpha data. This is something that cannot be done in formats like heic and avif where the rgb and alpha data are separate bitstreams (they cannot do progressive in general, but even if av1 could be displayed incrementally, avif cannot do incremental display of rgba without waiting for either the full rgb or the full alpha).
JendaLinda
2022-08-31 08:28:04
Are there plans to allow setting different distance for color channels and alpha? For example, for circular cutout, lossless alpha would make sense.
Jim
2022-08-31 08:35:36
Another one is a avatar for websites. Some people like to use various cut out characters or their own heads or caricatures. Using a filter drop shadow, it takes into account the fully transparent pixels and will wrap the shadow nicely around the non-transparent areas of the image.
JendaLinda
2022-08-31 08:50:58
In such cases, the alpha channel will be very simple, very low count of alpha levels, mostly fully opaque and fully transparent.
_wb_
Moritz Firsching the smoothing in progressive non-photographic images right now, already might yield unexpected results when patches are used, because those patches will not be smoothed
2022-08-31 09:01:07
Unexpected, yes, but in some cases perhaps also desirable. Patches are great for text, so for something like a photo with embedded title or caption it could be quite cool to have readable text already in the 8x8 progressive preview.
Hello71
2022-08-31 09:54:37
does jpeg xl support efficiently coding text overlaid on photo with no opaque background, e.g. "impact font meme"?
paperboyo
Moritz Firsching Do you think there is a strong use case for progressive with alpha? I think alpha images often contain non-photographic content and in those cases the smoothing might even be worse than waiting, because it will be very noticeable.
2022-08-31 09:56:26
From my experience, it’s exactly > [_ _wb_ _] Alpha and photo traditionally don't mix well on the web because JPEG has no alpha and PNG sucks at photo. So current usage patterns are likely not representative for what people actually want to do. In other words > [you] I think alpha images often contain non-photographic content is merely an expression of the technical constraints that JXL promises to alleviate, not a natural state. In my work, whenever there is any question of having a raster image with alpha, there is always this dread of the filesize and of having to have a required PNG8 fallback that also must go through a clever more-than-1bit transparency tech that takes ages and until recently wasn’t easily available. While the natural state would be to worry less, because the holes in the image should be cheaper than image itself, right?
2022-08-31 09:59:18
Not to mention it would help CSS Shapes adoption.
_wb_
Hello71 does jpeg xl support efficiently coding text overlaid on photo with no opaque background, e.g. "impact font meme"?
2022-08-31 10:48:32
It's doable, but the current encoder will not detect it so atm it can only be done with help of authoring tools, e.g. coding the text as a separate layer with alpha blending (in which the current encoder can detect duplicate glyphs and encode them only once)
2022-09-01 05:21:13
I think Mozilla just doesn't want to add anything as long as Chrome doesn't.
0xC0000054
w lossless
2022-09-01 09:06:00
I just published a new version that fixes a bug in the lossless mode.
2022-09-01 09:07:27
My code was setting the `uses_original_profile` field to `false` when using lossless encoding.
w
2022-09-01 09:27:10
poggers
2022-09-01 09:27:52
i was wondering why it was so much slower but it was because i was doing -e 3 with cjxl and speed 3 in your plugin but i should have been doing speed 7
2022-09-01 09:29:18
another quirk ``` /m/i/e/test) jxlinfo Untitled_pdn-jpegxl.jxl | grep rendering 02:27:05 Color space: RGB, D65, sRGB primaries, sRGB transfer function, rendering intent: Relative /m/i/e/test) jxlinfo Untitled_cjxl.jxl | grep rendering 02:28:40 Color space: RGB, D65, sRGB primaries, sRGB transfer function, rendering intent: Perceptual```
0xC0000054
w i was wondering why it was so much slower but it was because i was doing -e 3 with cjxl and speed 3 in your plugin but i should have been doing speed 7
2022-09-01 09:39:42
The encoding speed values are inverted in the plugin UI when compared to the native libjxl values, higher numbers are faster. The GIMP plugin in the libjxl repository has the same behavior. I could change it to use the native libjxl values, but I thought that lower values being faster was confusing behavior for users that are not familiar with libjxl.
w
2022-09-01 09:40:05
what if there were two sliders that changed each other
0xC0000054
2022-09-01 09:40:32
What do you mean?
w
2022-09-01 09:41:25
dumb idea, both speed and effort slider where one would update the other with the inverse value
2022-09-01 09:41:30
probably not possible anyway
JendaLinda
2022-09-01 09:48:01
Not a problem as long it's clearly labeled.
0xC0000054
2022-09-01 09:49:15
The issue with linking the sliders would be lossless mode, the quality slider is disabled when using lossless encoding.
w
2022-09-01 09:51:43
rendering intent being relative is important though
0xC0000054
2022-09-01 10:23:26
The rendering intent is set by `JxlColorEncodingSetToSRGB`, not sure why it is using relative as its default rendering intent. I will override the rendering intent to use perceptual for the next version of the plugin.
Jim
_wb_ I think Mozilla just doesn't want to add anything as long as Chrome doesn't.
2022-09-01 11:04:02
I don't think that's the case. They have far fewer developers and had 2 major layoffs in the past couple years. They've been falling even further behind Chrome on features recently but at the same time some of it is good as some of the features have shown to have potential to be security or privacy issues. Having extra time to review and let Chrome "test" new features exposes these. In the end I think it comes down to Mozilla's fewer resources and their more cautious nature in general. However, if Chrome adds it and usage takes off, they will be pressured to increase the priority.
Moritz Firsching
w my firefox patches 😢
2022-09-01 11:05:33
By now you could use the new API and subscribe to the JXL_DEC_FRAME_PROGRESSION for your firefox patch.
0xC0000054
JendaLinda Not a problem as long it's clearly labeled.
2022-09-01 11:10:25
For the next version of the plugin I changed the slider range to match cjxl and added a description to the UI regarding the value range.
Jim
2022-09-01 11:13:19
I'll also bring up support comparison. After AVIF was announced, the only major company that is part of AOM that showed major support was Netflix. Most were there for AV1 support, but didn't speak out in support of AVIF. A number of them have now come out in support for JXL. After only 1 of the AOM companies made a large article about it, they implemented it. Since then there has been low uptake and a fair amount of anger over the slow speed, lack of features, and people realizing it wasn't meant as a JPG replacement as they many had hoped and some had advertised. However, as JXL progresses a number of people & organizations (including some large AOM members) have come out in support of it. It's suddenly called "bragging." One company & bunch of news articles with incorrect information = support. 5+ companies + many individuals = bragging. It's definitely political.
2022-09-01 11:15:26
What I'm currently worried about is changing excuses. In politics it's common to come up with an excuse to not support an idea. When that excuse gets solved or debunked, they come up with another excuse. Then another. When they run out of excuses they fall back on some previous non-issue or will just start ignoring it. There is a possibility of that happening to JXL.
yurume
2022-09-01 11:16:01
was that tweet about "bragging" (if I understand what you meant correctly) meant to be critical of jxl by the way?
2022-09-01 11:16:06
I thought it was neutral
Jim
2022-09-01 11:16:43
Felt a bit condescending or passive-aggressive to me.
_wb_
2022-09-01 11:21:09
I think adoption outside browsers is proceeding nicely — imagemagick, ffmpeg, gimp, krita, now Adobe and Intel also indicating support. Adoption in browsers is taking more time, which I think is partly for a good reason (don't rush adding new formats, don't repeat the mistakes of the past where webp/j2k/avif were added quite prematurely) and partly for a bad/political reason (some kind of misconception amongst Chrome devs that adding JXL support is strategically bad for AOM/AVIF/AV1/AV2 so JXL is seen as an "enemy")
2022-09-01 11:25:32
https://twitter.com/ericlaw/status/1564263815063244800?t=sPEI1Q9fw34OsdC8TvZd6Q&s=19 you mean that one? I don't think it was meant in a bad way.
Jim
2022-09-01 11:28:33
Here, use of the word brag is seen as a negative (even though people do it all the time). Had it been "JPEGXL is accumulating a some pretty impressive support & pressure to implement it" or something similar, it would not appear negative.
2022-09-01 11:38:34
I don't think JXL is an enemy of AV1, likely more an ally since JXL has nothing to do with video. However, AVIF is meant for a smaller use case outside of what JXL is meant for, so they should compliment each other. However, I think it's just confused people as they just want to take their JPGs and PNGs and convert them but discovering that may not be the best choice in most cases. With JXL, that is the intended case. I assume they intend to (at some point) make AVIF more of a universal web format but they likely weren't expecting another format to do the same until they got to that point.
yurume
2022-09-01 11:38:42
I think "brag sheet" is a single term, but I'm not a native speaker so my interpretation can be wrong
2022-09-01 11:39:13
(more formal word would be a letter of recommendation)
paperboyo
2022-09-01 11:40:42
I may be naive, and am just a user, but not sure it must be political and/or bad faith. Lacking active external body, browser teams may see themselves as guardians of the web platform. And they worry, because once giveth, it cannot be taketh away (unlike some export option in Photoshop). One more reason may be, that sadly, for some uses (low quality) AVIF may be winning over JXL. The fact that Cloudinary is researching tech to choose the codec based on image make-up is very cool. But, also, is a little sad, because it shows there is no clear winner for all use cases (so situation remains similar to last gen, even if less so). Now, should it be on browser teams' shoulders to effectively judge life/death like Roman emperors? No. Is it fair to them to have to make this decision? No. Should they decide in favour of JXL?Yes.😜
Jim
2022-09-01 11:48:06
Except that the vast majority of people are not setting PS quality 10, the majority are exporting a quality 50 or above which is where JXL shines and AVIF starts faltering.
The_Decryptor
2022-09-01 11:48:28
"Brag sheet" is a odd US term, not something I'd heard of before, but it's got a good meaning
Jim
2022-09-01 11:49:33
I know in parts of the US and UK it's a wildly negative term. A single brag is bad enough. Multiple brags (as in a sheet of them), would be much worse.
The_Decryptor
2022-09-01 11:50:13
The definition I'm seeing is something akin to a resume, showing reasons to pick it
2022-09-01 11:50:31
So an "impressive brag sheet" is a strong list of reasons to pick it over alternatives
Jim
2022-09-01 11:54:09
Also, as you stated in resumes, a brag is typically the person doing the work marketing it (or at least claiming they did, I've interviewed people that bragged they did work I found out others did). If others not directly related to it speak positively on it, it's not a brag, its support from the outside. Support from others is seen as a much more trustworthy source than someone bragging they did X/Y/Z.
2022-09-01 11:57:40
I would relate it more to product reviews on a website. If all you saw was the company bragging about their own product's virtues and nothing from others who used the product... would you be more likely to purchase the product over the one where there were thousands of people talking about all the positive attributes?
0xC0000054
2022-09-01 12:15:56
I crashed Paint.NET while fiddling with the encoder parameters because libjxl called `abort()` when an assert failed. I was attempting to encode monochrome image with lossless and effort 9, and after hooking up the debugger the stack trace showed the `n <=255` assert in `StoreVarLenUint8` failing with `n == 256` . Edit: It looks like the crash was due to using a debug build, it works fine in a release build.
w
Moritz Firsching By now you could use the new API and subscribe to the JXL_DEC_FRAME_PROGRESSION for your firefox patch.
2022-09-01 12:45:48
what's the purpose of JXL_DEC_FRAME_PROGRESSION? as opposed to only painting when JXL_DEC_NEED_MORE_INPUT
Moritz Firsching
2022-09-01 12:56:53
to have more control about when repainting makes sense.
w
2022-09-01 12:59:08
<:thenk:349311010584395788>
Moritz Firsching
2022-09-01 01:04:07
We have little control over how much byte we get each time, so JXL_DEC_NEED_MORE_INPUT might be called more times than it makes sense to flush. With JXL_DEC_FRAME_PROGRESSION we indicate when it makes sense to flush, which can then be used to make that decision. At least this is the idea
w
2022-09-01 01:09:48
oh, so if I restate, JXL_DEC_NEED_MORE_INPUT can be called multiple times when there isn't anything available such as progressive data?
_wb_
2022-09-01 01:11:39
if you feed the decoder one byte at a time, it will respond with NEED_MORE_INPUT every time
Moritz Firsching
2022-09-01 01:15:28
If the decoder in a browser feeds the decoder byte-by-byte, then your internet connection is too slow 😉 But seriously, for a large image on a slow connection the JXL_DEC_NEED_MORE_INPUT might get triggered many times
_wb_
2022-09-01 01:17:10
you also have a weird internet connection if data arrives one byte at a time 🙂 but I was just making a point
w
2022-09-01 01:49:21
JXL_DEC_FRAME_PROGRESSION isnt giving me any progressive steps...
Moritz Firsching
w JXL_DEC_FRAME_PROGRESSION isnt giving me any progressive steps...
2022-09-01 02:09:06
make sure your image doesn't have alpha?!
w
2022-09-01 02:16:32
now i get 1 step
2022-09-01 02:16:50
ill try more later(maybe)...
_wb_
2022-09-01 02:18:49
how many steps you get can be configured
BlueSwordM
paperboyo I may be naive, and am just a user, but not sure it must be political and/or bad faith. Lacking active external body, browser teams may see themselves as guardians of the web platform. And they worry, because once giveth, it cannot be taketh away (unlike some export option in Photoshop). One more reason may be, that sadly, for some uses (low quality) AVIF may be winning over JXL. The fact that Cloudinary is researching tech to choose the codec based on image make-up is very cool. But, also, is a little sad, because it shows there is no clear winner for all use cases (so situation remains similar to last gen, even if less so). Now, should it be on browser teams' shoulders to effectively judge life/death like Roman emperors? No. Is it fair to them to have to make this decision? No. Should they decide in favour of JXL?Yes.😜
2022-09-01 03:05:13
Also, let's not forget that JXL doesn't have weaknesses that most video formats do.
Jim
2022-09-01 09:50:07
What do you mean by weaknesses?
Fraetor
Jim What do you mean by weaknesses?
2022-09-01 09:51:41
Things like limited frame size, or required 4:2:0 or things like that.
2022-09-01 09:54:01
<:JXL:805850130203934781> has some pretty impressive limits:
Jim
2022-09-01 10:26:30
👍
BlueSwordM
Jim What do you mean by weaknesses?
2022-09-02 03:01:52
YCbCr mainly and availability of chroma subsampling.
Traneptora
2022-09-03 07:21:45
I find progressive decoding to be a strong feature of JXL when it comes to the web
_wb_
2022-09-03 07:41:41
I agree. Unfortunately there is little available evidence to show that progressive decode is a useful thing — imo it's kind of self-evident that it is, but then people start talking about the negative properties of progressive (cognitive load, bad first impressions, extra cpu cost for more passes/renders, etc), especially people who are fans of formats that happen to be non-progressive
Brinkie Pie
2022-09-03 07:45:41
from what I gathered, it's a subjective matter. I guess it also depends on the context, whether you're in a situation where everything loads fast-ish anyways, or in one where images load slowly, so you actually benefit a lot more from a progressive scan compared to seeing nothing at all.
_wb_
2022-09-03 07:46:11
I think it's kind of silly to claim that progressive is not desirable - if it wouldn't be, then 1) browsers could just stop rendering images progressively, or offer a user preference option to select whether to do it or not — none of them ever did that afaik, and 2) web devs wouldn't bother with complicated LQIP schemes where they load a preview first and then replace it with the full image later using javascript, as a poor man's version of progressive rendering.
2022-09-03 07:48:25
Imo if the network is slow, getting something rather than nothing is obviously better. And if it is fast, then still it will feel even snappier with progressive loading.
JendaLinda
2022-09-03 08:02:08
Progressive mode is nice to have and it's optional, so anybody can choose to use it or not. In PNG, progressive mode is not that great as it really hurts compression. In JPEG, progressive mode works pretty well.
Jim
_wb_ I agree. Unfortunately there is little available evidence to show that progressive decode is a useful thing — imo it's kind of self-evident that it is, but then people start talking about the negative properties of progressive (cognitive load, bad first impressions, extra cpu cost for more passes/renders, etc), especially people who are fans of formats that happen to be non-progressive
2022-09-04 01:29:29
Having a large image show with a blank screen I've thought that the download was broken and closed the window/tab. At least when you can see that the image is loading it lets you know something is happening rather than a broken image. That's more than enough evidence for me. Granted, I think the progressive encoding should be able to be turned off if so desired, but should be enabled by default.
yurume
2022-09-05 02:53:23
it will handle just enough container stuffs to handle codestream, a major reason being compressed metadata requires Brotli proper, which requires a large preset dictionary.
Fraetor
2022-09-05 08:07:11
I guess with jxl the metadata shouldn't effect display at all, so that shouldn't be an issue.
Jim
2022-09-05 05:08:54
Don't things like EXIF orientation affect the display?
yurume
2022-09-05 05:13:11
the codestream is expected to have the same orientation information as Exif metadata, if Exif ever appears in the container
_wb_
2022-09-05 05:13:34
In jxl, orientation is a codestream header field. Exif orientation can be there too, but it gets overridden by the codestream value (so viewers can ignore Exif).
yurume
2022-09-05 05:13:38
when they are not in agreement the codestream orientation takes precedence
2022-09-05 05:13:44
yeah
_wb_
2022-09-05 05:14:30
Which reminds me, we need to implement something that can adjust jxl codestream headers without reencoding
yurume
2022-09-05 05:14:40
jxltran 😉
Traneptora
_wb_ Which reminds me, we need to implement something that can adjust jxl codestream headers without reencoding
2022-09-08 02:16:56
luckily adjusting the orientation can be done in a bit editor cause all orientation fields are the same size i.e. u(3)
2022-09-08 02:17:12
but if there's an ICC Profile present then other fields could be complicated
2022-09-08 02:17:31
since zeropadtobyte() doesn't occur between the imagemetadata and the icc profile
_wb_
Traneptora luckily adjusting the orientation can be done in a bit editor cause all orientation fields are the same size i.e. u(3)
2022-09-08 02:26:02
except sometimes the orientation field is not signalled at all, i.e. when `all_default` or `!extra_fields`
Traneptora
2022-09-08 02:27:34
ah, crap forgot about that
2022-09-08 02:27:49
so that would require potentially redoing the entire size header and ICC profile
2022-09-08 02:28:17
at least the frame header is byte-aligned
2022-09-08 02:28:23
so that won't need to be re-written
_wb_
2022-09-08 02:29:28
yeah, well not really redoing ICC but you do need to implement something that moves bits around (as opposed to bytes), which is somewhat annoying
Traneptora
2022-09-08 02:30:18
I don't think there's a way to do memmove() on bits without essentially just reading a `uint64_t` and left shifting it and then writing it
2022-09-08 02:30:20
or equivalent
2022-09-08 02:30:31
(in an endian-dependent way)
yurume
2022-09-08 02:34:38
yeah I think so
_wb_
2022-09-08 02:34:45
yes, it requires shifting. still pretty cheap to do, just annoying
yurume
2022-09-08 02:35:41
I kind of think about hooks in J40, which would be a long-term plan, basically a set of initially undefined macros that when defined allow for more fine-grained access to the codestream
Demez
2022-09-11 07:41:17
I assume chrome has yet do respond to the issue still?
_wb_
2022-09-11 07:51:35
afaik, yes.
Squid Baron
2022-09-12 07:48:30
Safari added AVIF support: https://webkit.org/blog/13152/webkit-features-in-safari-16-0/ Sadly, that pretty much seals it, JPEG XL lost the format war.
_wb_
2022-09-12 07:52:03
That was announced for a while already, no?
2022-09-12 07:53:50
AVIF is 3 years older than JXL, so I think it's not too surprising that AVIF support is landing earlier than JXL support. I don't think it implies anything about "winning a format war".
Squid Baron
2022-09-12 07:55:27
I hope you're right.
2022-09-12 07:56:36
The problem is that while JPEG XL has obvious advantages, it pretty much solves the same problem as AVIF and that may disincentivize browser developers from adding support
2022-09-12 07:56:51
they may see it as duplication
2022-09-12 07:58:14
("the same problem" meaning "better lossy image compression")
2022-09-12 07:58:46
but otoh there's a precedent, webp didn't prevent avif from succeeding
2022-09-12 07:59:18
so maybe you're right...
JendaLinda
2022-09-12 08:03:55
Adding AVIF into Safari doesn't change the fact that the lossless AVIF is barely functional.
w
2022-09-12 11:27:23
i mainly (only) use jxl for lossless so for me nothing even competes
JendaLinda
2022-09-13 06:18:56
That's right. Also lossless JPEG transcoding is the killer feature that no other format has.
_wb_
2022-09-13 07:16:20
Lossy jxl is also quite nice — every other new lossy format (webp, heic, avif) has made big improvements to the low end (very low quality, where jpeg becomes a blocky mess) but not really to the high end (high quality to visually lossless). In fact, when evaluated properly (i.e. not through poor metrics like psnr or vmaf), webp/heic/avif might not even really improve upon jpeg, or at least not consistently, in the range of qualities that many people actually want to use (d0.5 - d2 / q80 - q95). However jxl really shines in that range.
JendaLinda
2022-09-13 07:54:47
Agreed, high fidelity lossy compression is very useful too.
2022-09-13 07:57:12
It seems AVIF has absolutely nothing to offer. It's just slightly better lossy WebP. It's completely useless for me.
190n
2022-09-13 08:01:56
it should be the best animated format that can fit in an <img> tag, which is a real constraint sometimes
2022-09-13 08:02:16
shame firefox doesn't support that, wonder if safari does?
2022-09-13 08:05:39
> Safari for iOS 16 includes support for still images compressed using the AVIF format <https://webkit.org/blog/13152/webkit-features-in-safari-16-0/> my sides
JendaLinda
2022-09-13 08:10:17
As a replacement for GIF tor short video clips, that's the only use case of AVIF that makes sense to me. Does anybody use animated WebP? That should still do better than GIF.
190n
2022-09-13 08:11:16
youtube uses that for the short preview when you hover over a video
JendaLinda
2022-09-13 08:12:58
That makes sense and even low fidelity doesn't matter in thumbnails.
Demez
JendaLinda As a replacement for GIF tor short video clips, that's the only use case of AVIF that makes sense to me. Does anybody use animated WebP? That should still do better than GIF.
2022-09-13 08:13:11
i would if discord supported embedding them
JendaLinda
2022-09-13 08:16:24
Animations are kinda specific, those have different requirements than static images.
2022-09-13 08:18:53
That's also the reason why animated PNG is only used for emojis and GUI elements AFAIK.
_wb_
2022-09-13 08:22:03
animated gif/png/webp/jxl is not really useful for anything bigger than an emoji, imo. It's a pity that browser support for real video codecs in img tags is so messed up — safari supports h264 and nothing else, chrome supports av1 and nothing else, and firefox supports nothing.
2022-09-13 08:24:03
if we could just have universal support for h264 in an img tag, that would already be a huge step forwards. Having an option for vp9 and av1 would be nice too, but the step from needing a gif fallback to not needing it would be the big jump
JendaLinda
2022-09-13 08:26:53
I recall there were OBJECT and EMBED elements in HTML, where you could insert pretty much anything, including images, sounds, videos, etc. Does this still work?
_wb_
2022-09-13 08:46:19
There's the video tag too. But in some use cases, it's hard to do custom html, or e.g. in emails, often only img will work, not arbitrary html.
JendaLinda
2022-09-13 09:20:34
WebP in IMG should work pretty much in all browsers now, right? So GIF fallback isn't necessary anymore. I know WebP isn't as efficient as real video but it's better than nothing. It's a substitution for non existent animated JPEG.
_wb_
2022-09-13 12:16:36
Netscape Navigator was the first to allow non-still-images in img, afaik
2022-09-13 12:17:09
arguably that was a historical mistake, but I don't think there's a way to undo that
paperboyo
2022-09-13 12:20:41
Just my usual cheap advocacy comment about low fidelity being important for web stuff. So I do not agree that > It seems AVIF has absolutely nothing to offer. and if it would depend on me, I would channel all resources into making JXL perform better at the low end too. Then, the last (but not sure if not most important) reason to use AVIF would sorta go away.
diskorduser
2022-09-13 12:22:03
Yeah. It would be better if it adds some filters or hacks to hide artifacts at low quality
fredomondi
2022-09-13 01:00:47
Do we have any sample JXL HDR pictures?
spider-mario
fredomondi Do we have any sample JXL HDR pictures?
2022-09-13 01:09:06
https://sturmen.github.io/posts/hdr-jpeg-xl-2022/ and https://people.csail.mit.edu/ericchan/hdr/hdr-jxl.php
fredomondi
spider-mario https://sturmen.github.io/posts/hdr-jpeg-xl-2022/ and https://people.csail.mit.edu/ericchan/hdr/hdr-jxl.php
2022-09-13 01:09:50
thanks!
JendaLinda
paperboyo Just my usual cheap advocacy comment about low fidelity being important for web stuff. So I do not agree that > It seems AVIF has absolutely nothing to offer. and if it would depend on me, I would channel all resources into making JXL perform better at the low end too. Then, the last (but not sure if not most important) reason to use AVIF would sorta go away.
2022-09-13 01:19:52
Okay. JXL needs to improve at the low end too to be really versatile. I agree with that. WebP is already used for low fidelity. 8bit 4:2:0 fits perfectly for low fidelity. What does AVIF improve there?
_wb_
2022-09-13 02:12:09
https://sneyers.info/tradeoff-relative.html
2022-09-13 02:16:46
At the very low end (the average libjpeg q18 quality), basically mozjpeg saves 28% bytes compared to unoptimized jpeg, WebP saves 43%, jxl e6 saves 47%, and AVIF saves 50 to 60% depending on how much cpu you want to throw at it
2022-09-13 02:17:27
(these numbers are according to ssimulacra2, grains of salt need to be applied of course)
2022-09-13 02:18:10
question is if _that_ low fidelity is actually useful for anyone.
paperboyo
_wb_ question is if _that_ low fidelity is actually useful for anyone.
2022-09-13 02:29:59
I use MozJPEG at 45 and WebP at 25 in production (both for DPR2 images only). I know: low. I would love an encoder that will give me **better** quality than that for all (most?) images, but lower filesize (I do hope for defo lower than MozJPEG, WebP is very variable and I may indeed be using it way too low, but for reasons).
2022-09-13 02:44:06
I will choose the one that will give me lowest filesize. I would love it to also be the one that has a proper progressive mode. And the one where setting one quality value (I know: bit amateurish*) for thousands+ of different images will give me most consistent quality and filesize (WebP is so low, because even at this quality, some images are already weightier than in MozJPEG).
2022-09-13 02:47:10
* amateurish = no readily available open source per-image quality setting tech that I know of
_wb_
2022-09-13 03:24:58
That fidelity is around SSIMULACRA2 = 50 on average, which I think is low but still reasonable for some web use cases
JendaLinda
2022-09-13 03:27:51
At levels about 20 and lower there's either artifacting or excess smoothing. I don't think anyone would like to look at that.
_wb_
2022-09-13 03:29:16
Maybe for dpr3 or in very bad network conditions, but yeah generally speaking I think only the range 50-90 in ssimulacra2 is useful
JendaLinda
2022-09-13 03:32:24
Very bad network could take advantage of progressive decoding.
2022-09-13 03:33:51
So that's point for JXL.
Demez
_wb_ animated gif/png/webp/jxl is not really useful for anything bigger than an emoji, imo. It's a pity that browser support for real video codecs in img tags is so messed up — safari supports h264 and nothing else, chrome supports av1 and nothing else, and firefox supports nothing.
2022-09-13 03:34:15
tenor gifs
JendaLinda
2022-09-13 03:41:31
Interesting, --resampling=2 doesn't seem to work in the latest cjxl.
2022-09-13 03:42:33
It says that the flag value is invalid.
paperboyo
_wb_ Maybe for dpr3 or in very bad network conditions, but yeah generally speaking I think only the range 50-90 in ssimulacra2 is useful
2022-09-13 03:45:14
Just a note, we don’t care about dpr>2. Based on me eyesight and eg. this: https://observablehq.com/@eeeps/visual-acuity-and-device-pixel-ratio.
_wb_
2022-09-13 03:53:57
yes, I agree that you probably shouldn't really care about dpr > 2, and just serve them dpr2 — <@702298678333014087> is here too btw 🙂
spider-mario
2022-09-13 05:21:36
with one caveat: that’s assuming a viewing distance of ~70 cm
2022-09-13 05:21:43
closer than that and higher dpr may make sense again
_wb_
2022-09-13 05:23:59
Wait, dpr2 in the css sense is supposed to be in terms of visual angle, so factoring in viewing distance already, no?
spider-mario
2022-09-13 05:31:37
the device still has to assume one
2022-09-13 05:31:58
unless we start to see devices that measure it in realtime and make the page larger or smaller accordingly, but that would be strange
_wb_
2022-09-13 05:50:40
yes, devices make assumptions, but I think for phones those assumptions can be relatively good in the typical case
spider-mario
2022-09-13 05:54:04
I wasn’t just thinking about phones but e.g. 8K monitors
2022-09-13 05:54:28
when I was trying one out (32"), I found that my distance to the screen ended up being much more dynamic than with less dense screens
_wb_
2022-09-13 06:09:57
Ah yes that makes sense. If there is more detail to see when you get closer, it makes sense to get closer, just like what you could do when viewing a painting in a museum
2022-09-13 06:13:09
This is another difference btw between video and still images.
Brinkie Pie
2022-09-13 10:37:23
but muted, looped and autoplayed videos are basically indistinguishable from animated GIFs, so why not support them, given that GIFs are supported? Personally, I think ideally (mute) animations should be a 3rd category, besides video and (still) img. However having them as a special case img or video reduces some kind of complexity.
improver
2022-09-14 12:06:58
ive never seen looped videos as indistinguashable thing
2022-09-14 12:10:34
it feels like browsers aren't optimized playing things in loop because theres always some sort of delay, or maybe it's a bit related to codec internals too (keyframes vs delta frames), and gifs often degrading in somewhat smoother, and aesthetic ways for synthetic content compared to video codecs
Brinkie Pie
improver ive never seen looped videos as indistinguashable thing
2022-09-15 10:05:47
you didn't notice the unnoticeable? ;P When you think you see a GIF on the web, it might just be a muted, looped, autoplayed video. Imgur coined the term "gifv" for those. https://blog.imgur.com/2014/10/09/introducing-gifv/
improver
2022-09-15 10:11:13
eh? i mean that i often see differences between these fake gifs and real ones
2022-09-15 10:12:27
though i dont browse imgur nor reddit which sometimes link to that
2022-09-15 10:13:36
also i feel that using name "gifv" for this is deceiptive
2022-09-15 10:15:16
if the original was uploaded as gif then there shouldn't be any difference.. except if upon conversion dithered gradients are smoothed out
2022-09-15 10:18:03
id say giphy aint that bad - on the site they clearly label gifs and mp4 separate for download
yurume
2022-09-15 10:18:16
at this point gif is no longer file format name and a term for short looped muted video
2022-09-15 10:18:41
maybe we can make a backronym
improver
2022-09-15 10:20:45
its one thing when the service itself contains gif in name, especially if it can both accept and serve actual gifs. when they actually put that as file extension then it feels like its no longer just an optimization, but a bad marketing stunt
yurume
2022-09-15 10:22:15
laypersons don't know about file formats, so when they see the name "gif" and a video disguised as a gif file, they would instead think that this company has somehow made gif better, not realizing it's not gif at all
improver
2022-09-15 10:35:44
yeah, and that's negative thing in my eyes, especially when the real reason is cdn bandwidth optimization, done by messing up original data. portraying that as great new thing is smart PR move for non-tech audience but at cost of more confusion for everyone, messed up quality of data and some faster downloads i guess. but overall it feels like morally broken thing to do
2022-09-15 10:37:40
but then i know imgur doing stuff like this all the time, sometimes serving direct .png links as html pages with ads and other stuff to promote "engagement" aka eat up people's attention for their own benefit
2022-09-15 10:39:26
i'll stop ranting about this, need some sleep.
Brinkie Pie
2022-09-15 11:04:26
not necessarily. You can have all the colors in a GIF, you just need to overlay together multiple frames with a 0ms delay in between, each frame can have their own palette. https://en.wikipedia.org/wiki/GIF#True_color
JendaLinda
Brinkie Pie not necessarily. You can have all the colors in a GIF, you just need to overlay together multiple frames with a 0ms delay in between, each frame can have their own palette. https://en.wikipedia.org/wiki/GIF#True_color
2022-09-15 11:08:06
The problem is that 0 delay doesn't work as it should, in practice there's always some delay between frames.
improver
2022-09-15 11:11:12
converter could interpret 0 correctly.. or they could emulate browsers' behavior
JendaLinda
2022-09-15 11:12:39
There are lots of GIF animations in the wild with 0 delay, relying on the default minimum delay.
_wb_
2022-09-17 08:08:33
<@532010383041363969> <@795684063032901642> the chromestatus page for jxl (https://chromestatus.com/feature/5188299478007808) still has some fields that could be updated imo: > Standard maturity Unknown standards status - check spec link for status ISO/IEC 18181-1 (codestream) and 18181-2 (file format) are published international standards, so I wouldn't say that's "unknown status". > Safari views_link > https://lists.webkit.org/pipermail/webkit-dev/2021-May/031846.html Not sure if this link is very helpful. It doesn't really say anything about what Safari's view is. > Supported on all platforms? False > Web Platform Tests False Can/should anything be done to turn these into True? "Start prototyping" is marked as the 'Active stage' — why aren't we in the next stage yet of "Dev trials and iterate on design"?
2022-09-17 08:11:07
Also Lode is still on the list of 'owners', though <@768090355546587137> has meanwhile moved on to other projects as far as I understand. Is that OK?
Jyrki Alakuijala
2022-09-20 10:42:15
I'll apply some more updates on it
2022-09-20 10:45:45
Fixed the 'unknown status' on the standard
Traneptora
2022-09-22 12:26:35
it works only with 0.7.0 yea
2022-09-22 05:27:59
speaking of that above issue, it appears the Arch Linux maintainer of FFmpeg closed the issue as "won't implement"
Jim
2022-09-22 11:50:42
> ffmpeg is an audio and video utility, it is bloated enough already, please use image utilities like IM, vips or skia for this. > > Supporting some of the popular image formats we already do in case you'd like to create a video clip from a sequence of images can make sense but I hardly see the need to have that temporary image sequence as jxl instead of png for instance. Even jxl screenshots is a non issue, just save your screenshot as png then convert it to jxl using one of the above.
2022-09-22 11:51:01
🤦 OS devs making more work for their users is not a good thing.
The_Decryptor
2022-09-23 01:03:15
iirc the same thing happened with HTTP/2 support in curl with Arch, just decided users didn't need it
2022-09-23 01:03:21
Took a while for that decision to change
Jim
2022-09-23 01:25:48
Mac and Windows do not support even WebP. To be fair, it only has roughly 6-7% web market share. AVIF is less than 1%. I feel JXL is the only format likely to break the 10% barrier as it's the only one designed to replace the old jpg which is the vast majority of internet images. It also works as a great png and non-animated gif replacement. All that is likely to eventually lead to a ~80% market share.
BlueSwordM
Jim Mac and Windows do not support even WebP. To be fair, it only has roughly 6-7% web market share. AVIF is less than 1%. I feel JXL is the only format likely to break the 10% barrier as it's the only one designed to replace the old jpg which is the vast majority of internet images. It also works as a great png and non-animated gif replacement. All that is likely to eventually lead to a ~80% market share.
2022-09-23 03:56:19
Windows does support WEbP 😄
Demez
2022-09-23 08:24:43
yeah it does
Jim
2022-09-23 10:37:02
It does seem to be working now. I know when I tried it earlier this year it was not even showing a preview. I do notice that it won't let you edit metadata.
JendaLinda
2022-09-23 10:46:46
There is WebP plugin in MS Store but it seems to be installed by default.
_wb_
2022-09-24 06:01:01
This doesn't surprise me. Does current djxl even get it right?
2022-09-24 06:08:34
Yeah thought so
2022-09-24 06:09:04
Could you open an issue on the libjxl repo about this?
2022-09-24 06:10:48
I think we should let libjxl detect the cmyk case (i.e. the icc profile being a cmyk one and a kBlack channel being present), and by default it should convert it to RGB so things 'just work' in applications that don't want to deal with cmyk codepaths.
2022-09-24 06:12:19
Currently libjxl will just give you the cmy as if it was rgb, with an icc profile that says it is cmyk, and you manually have to fetch the k channel and do the color management to convert it to rgb for display
2022-09-24 06:13:20
That should still remain an option, but imo the default behavior should make it easy for the application to just view the image without extra effort.
2022-09-24 06:31:00
It's related but I think this one is more important: it's about rendering cmyk correctly by default
Traneptora
2022-09-24 07:56:13
FFmpeg has no support for CMYK so this doesn't really surprise me
2022-09-24 07:57:03
it's just based on libjxl, so the issue here is more that libjxl doesn't properly render it in RGB space when it's requested
_wb_
2022-09-24 08:17:25
I agree - better behavior would be for libjxl to convert it to some sufficiently wide gamut RGB space and return it like that, so applications that don't support cmyk can still view cmyk images properly.
2022-09-24 08:18:55
Applications that do know how to handle cmyk can set some option to skip the conversion and fetch the k channel separately (or we could add an option for getting interleaved cmyk, just like we have that for rgba)
2022-09-24 08:23:55
I think getting cmyk to work better is important for adoption in use cases where printing is a thing, like Krita. If we want jxl to be not just a web delivery format but also an interchange format, getting cmyk to work easily (even in browsers) can be a gamechanger imo.
2022-09-24 08:25:03
Currently the only interoperable options for cmyk are jpeg and tiff. One is lossy and doesn't support layers, the other has very poor compression and is barely an interoperable standard (it's basically a proprietary Adobe format).
JendaLinda
2022-09-24 09:16:48
When I was doing experiments with CMYK, it seemed that everything related to CMYK relies on Adobe.
_wb_
2022-09-24 09:50:33
Jxl can only represent 3 channels with dct, so cannot do cmyk jpegs reversibly
2022-09-24 09:51:53
The only way currently to produce cmyk jxl is to manually use the api, pass cmy as if it is rgb and k in a separate kBlack channel, set the color profile to a cmyk ICC profile, and set use_original_profile=true
JendaLinda
2022-09-24 03:14:45
CMYK in JPEG is an ugly hack.
_wb_
2022-09-24 03:20:20
What surprises me is that nobody bothered to define a 4-component jpeg that does RGBA. Seems more useful than CMYK to me, and it's from the codestream perspective the same thing (just 4 channels).
JendaLinda
2022-09-24 03:27:04
Right, additionally CMY uses some color transform that doesn't make any sense.
_wb_
2022-09-24 03:31:15
It just (optionally) does YCbCr on cmy, which does kind of make sense
2022-09-24 03:31:48
They encode CMY such that 0 means full ink, 255 means no ink
2022-09-24 03:32:19
Which means it behaves pretty much like RGB
2022-09-24 03:33:42
Inverted subtractive color is not that different from the usual additive color: C is basically lack-of-red, M is lack-of-green, and Y is lack-of-blue.
JendaLinda
2022-09-24 03:34:55
I've seen programs decoding this YCbCr as RGB and displaying that. The colors were all off of course. The K channel was ignored.
2022-09-24 03:37:21
JPEG with alpha might be useful, although DCT compressed alpha would possibly result in ugly artifacts.
yurume
2022-09-25 11:46:31
oh indeed
Traneptora
2022-09-25 12:32:01
Do you have screenshot-sw enabled?
2022-09-25 12:44:33
what version of ffmpeg/mpv are you using? what version of libjxl?
2022-09-25 12:46:18
use `-v debug`
2022-09-25 12:48:58
try git master FFmpeg
2022-09-25 12:49:11
this is a bug I thought I had fixed already
2022-09-25 12:53:35
it can
2022-09-25 12:53:48
if you take the bug I fixed
2022-09-25 12:54:02
yup, this is the one
2022-09-25 02:17:24
update: it not being backported was just an oversight
2022-09-25 02:17:30
I just asked if we could backport it to the 5.1 branch, and it was
novomesk
2022-09-27 08:54:37
Do you have experiences with flatpak manifests? I need some help in https://invent.kde.org/packaging/flatpak-kde-runtime/-/merge_requests/104
_wb_
2022-09-30 10:31:53
https://bugs.webkit.org/show_bug.cgi?id=208235#c15
2022-09-30 10:40:52
yes, on iOS all browsers are Safari
2022-09-30 10:41:55
and Safari uses OS-level image and video decoding (CoreMedia), so it can only add support for codecs that have OS-level support
2022-09-30 10:42:27
so it's pretty much an all-or-nothing approach in the Apple ecosystem: either nothing will support jxl, or everything will support it
2022-09-30 10:42:42
which if you think about it may not be such a bad thing
2022-09-30 10:43:16
it certainly helps to avoid the "this image doesn't work!" thing that WebP experienced
2022-09-30 10:44:29
but it does mean that the ball is completely in Apple's court, there is basically nothing that we can do
JendaLinda
2022-09-30 10:51:49
Can losslessly transcoded JPEG to JXL be progressive?
spider-mario
2022-09-30 11:28:51
(on Linux) true HDR: AFAIK no (currently not possible on X11 nor Wayland; possible with direct framebuffer access which mpv and Kodi support but not sure whether they specifically support HDR in that mode) tonemapped to SDR: Chrome, and there is ongoing work on the quality of the tonemapping
2022-09-30 11:30:03
the macOS version of https://github.com/Tom94/tev (an EXR viewer) does seem to output HDR
2022-09-30 11:30:47
(as do the Windows and macOS versions of Chrome)
_wb_
JendaLinda Can losslessly transcoded JPEG to JXL be progressive?
2022-09-30 12:20:56
Yes. All VarDCT jxl files have DC first, including transcoded jpegs, so in that sense they're already progressive. You can also have multiple AC scans but that's optional and currently the jpeg recompression doesn't do that (but it could in principle). But having DC first is probably the most important thing in terms of UX advantage. Gradual refinement is imo less important.
2022-09-30 12:22:25
I would assume so, but it's really hard to know what Apple is going to do or what influences their decisions, they are quite secretive...
JendaLinda
2022-09-30 12:23:09
So in practice, DC in transcoded JPEG is like 8x downsampled image.
2022-09-30 12:27:37
Apple is kind of alien technology to me. It doesn't have that much influence outside the US.
_wb_
2022-09-30 12:41:00
iOS market share by region: - Europe: 31.8% - UK: 48.8% - North America: 53.8% - South America: 12.7 % - Asia: 17% - Africa: 13.4% - Oceania: 50.7%
2022-09-30 12:42:04
so yeah it's mostly an Anglo-Saxon thing, but even 12-13% is not nothing
2022-09-30 12:44:18
Traneptora
spider-mario (on Linux) true HDR: AFAIK no (currently not possible on X11 nor Wayland; possible with direct framebuffer access which mpv and Kodi support but not sure whether they specifically support HDR in that mode) tonemapped to SDR: Chrome, and there is ongoing work on the quality of the tonemapping
2022-09-30 04:37:37
iirc mpv with gpu-next does support it
2022-09-30 04:37:59
One could also make a viewer based on libplacebo that bypasses the mpv player loop
veluca
2022-10-01 05:55:18
Uh, ops
2022-10-01 05:55:39
Progressive AC is kinda easy, progressive DC less so
2022-10-01 05:56:17
<@794205442175402004> feel like implementing this?
2022-10-01 05:56:35
If not I can also give it a shot once I find the time
_wb_
2022-10-01 06:12:15
Progressive DC is just a matter of doing lossless squeeze, no?
veluca
2022-10-01 06:30:17
not sure, the decoder would get floats
2022-10-01 06:31:35
I'd be worried with progressive DC (and at least the current implementation) that you'd get random device-dependent off by ones
_wb_
2022-10-01 06:41:29
It also gets floats in the non-dc-frame approach, right?
veluca
2022-10-01 06:43:49
mhhhhh, at most it's float(integer)
2022-10-01 06:44:01
but with dc frame it can be more complex stuff
_wb_
2022-10-01 07:01:37
Because of dc frames being dequanted already?
veluca
2022-10-01 07:37:24
yep
Sam
2022-10-17 02:56:10
https://bugs.chromium.org/p/chromium/issues/detail?id=1178058#c79 Shopify expresses support and says they've enabled jxl on all sites for browsers with the flag enabled
_wb_
2022-10-19 09:33:22
HDR might be the “killer feature” where jxl moves the needle enough to push adoption. The only alternatives are: - PNG, which doesn’t offer lossy compression and only mediocre lossless compression - AVIF, which doesn’t offer good fidelity, nor reasonable encode time (both of which are probably showstoppers for photographers who care about HDR) - TIFF, which has no browser support, no lossy and poor lossless compression, and probably poor interoperability when used with HDR (legacy viewers will likely get it wrong) - PSD, which is like TIFF and even more proprietary - JPEG-HDR (JPEG XT), which has poor compression and no browser support; nearly all applications will only show you the fallback SDR image
DuxVitae
2022-10-19 11:04:59
I wonder why your list does not include HDR and EXR.
_wb_
2022-10-19 12:06:49
Right, EXR is also an alternative, but also no lossy / poor or no compression
2022-10-19 12:06:55
What is HDR?
2022-10-19 12:07:26
Also JXR and J2K are alternatives but meh
Jim
2022-10-19 06:48:37
https://bugs.chromium.org/p/chromium/issues/detail?id=1178058#c80
2022-10-19 06:49:03
Adobe is trying to force support now - nice to see them doing what they can to back browsers into a corner.
_wb_
2022-10-19 06:59:59
It's kind of needed. There are not enough browsers to have a healthy competition in being the first to support new features. Basically there are only three browsers: - Chrome is by far the biggest one, but key decision makers in Chrome codec decisions are also hardcore avif proponents who seem to be afraid to allow jxl support since it might hurt avif adoption. - Safari is also important, but they are slowed down by their policy to only support codecs with OS-level support (in iOS and MacOS), meaning it is unlikely they can ship quickly (in contrast to Chrome) - Firefox is not really important enough to be the leader in something like this, they rather follow whatever Chrome will do. They also recently fired lots of people and don't really have much resources left to implement stuff, and they don't want to make their 'allies' in the AOM angry by being the first to support jxl.
2022-10-19 07:02:24
https://research.google/people/105284/ <- this is the key decision maker in Chrome, being the leader of Chrome's Web Platform team including media, codecs, graphics and capabilities
BlueSwordM
_wb_ https://research.google/people/105284/ <- this is the key decision maker in Chrome, being the leader of Chrome's Web Platform team including media, codecs, graphics and capabilities
2022-10-19 07:13:44
I honestly don't get it at this point. There are so many good things from JPEG-XL that would heavily benefit AOM so much in a new codec that it would be stupid not to do so.
DuxVitae
_wb_ What is HDR?
2022-10-19 07:18:07
HDR: http://www.paulbourke.net/dataformats/pic/ - lossless only, mediocre compression EXR: both lossy and lossless, from my experience on panoramic images: PIZ and DWA/B can well compete against jxl lossless and jxl -d=0.1 (however, I only tested it on libjxl shipped with gimp 2.99.12)
_wb_
2022-10-19 07:19:02
Oh, I didn't realize EXR did lossy too.
BlueSwordM I honestly don't get it at this point. There are so many good things from JPEG-XL that would heavily benefit AOM so much in a new codec that it would be stupid not to do so.
2022-10-19 07:29:10
I don't really get it either, in my view the mission of the AOM is completely compatible with JXL — making royalty-free codecs for the web. But I think they somehow have this idea that if jxl gets traction, it will hurt avif adoption (which is likely true, imo), and therefore (which is imo a non sequitur) it will hurt av1 adoption and harm the success of the AOM.
Fraetor
2022-10-19 07:31:59
AVIF is a really weak reason for AV1 adoption.
BlueSwordM
_wb_ I don't really get it either, in my view the mission of the AOM is completely compatible with JXL — making royalty-free codecs for the web. But I think they somehow have this idea that if jxl gets traction, it will hurt avif adoption (which is likely true, imo), and therefore (which is imo a non sequitur) it will hurt av1 adoption and harm the success of the AOM.
2022-10-19 07:32:15
Nah, I think it's because of something else in regards to development. Can you imagine PSNR and SSIM scores going down by integrating JXL level tools? We can't have that.
Fraetor
2022-10-19 07:32:32
lol
_wb_
Fraetor AVIF is a really weak reason for AV1 adoption.
2022-10-19 07:37:09
I agree. Yet this seems to be the focus of Jim's team. Instead of spending effort on making the video codec better at what it's designed for (video!), they are now doing things aimed at "closing the gap with jxl", like making incremental and 'progressive' decoding work somehow for avif, or somehow making a 16-bit version of avif. I think their resources would be better spent on making the actual video codec perform better (i.e. competing with vvc, not jxl), rather than somehow trying to make it a better still image format.
BlueSwordM Nah, I think it's because of something else in regards to development. Can you imagine PSNR and SSIM scores going down by integrating JXL level tools? We can't have that.
2022-10-19 07:41:01
Oh, yes. There I think they made a fundamental mistake by setting 3 metrics in stone (psnr, ssim, vmaf) and blindly trusting those and only those when making any decision. I can see how that simplifies some discussions by a lot (there are only numbers, no opinions), but it's a very bad approach if you care about perceptual quality and not so much about BD rate gains w.r.t. nearly irrelevant quality metrics.
spider-mario
2022-10-19 07:55:40
it’s a great illustration of https://www.discovermagazine.com/the-sciences/why-scientific-studies-are-so-often-wrong-the-streetlight-effect
2022-10-19 07:59:03
I recently came across another relevant quote, but I can’t find where it was
_wb_
2022-10-19 08:01:48
I think this is a typical pitfall for codecs (or anything really) that get developed by a large committee or a large number of contributors: they tend to focus on clear-cut "objective" performance indicators, because that makes the consensus process seem fair and unbiased, but the end result is that they end up optimizing the wrong objective function. Small teams, even solo devs, have a big advantage there: they can do what is the best thing to do, with progressing insights into what that is, which may be very different from setting a priori criteria and then optimizing the hell out of them.
2022-10-19 08:08:57
They made this mistake with hevc (it became a psnr machine but perceptually mediocre for its complexity), and they repeated it with av1.
spider-mario
spider-mario I recently came across another relevant quote, but I can’t find where it was
2022-10-19 08:11:11
ah, I found it: > The attempt to give an “optimal” answer to the wrong question has been called “Type-III error.” The statistician John Tukey (e.g., 1969) argued for a change in perspective: An appropriate answer to the right problem is better than an optimal answer to the wrong problem (Perlman and Wu, 1999).
2022-10-19 08:11:27
(from https://doi.org/10.1016/j.socec.2004.09.033)
Jim
_wb_ I don't really get it either, in my view the mission of the AOM is completely compatible with JXL — making royalty-free codecs for the web. But I think they somehow have this idea that if jxl gets traction, it will hurt avif adoption (which is likely true, imo), and therefore (which is imo a non sequitur) it will hurt av1 adoption and harm the success of the AOM.
2022-10-19 10:46:01
Except AVIF wasn't even meant for the same reason as JXL, it's meant for low-bit images. JXL is medium to lossless. AV1 has nothing to do JXL, it's a video format. The slow adoption is because hardware is only beginning to support it and it's still the slowest encoder out there. Once it gets faster it will be adopted quicker.
Traneptora
Jim Except AVIF wasn't even meant for the same reason as JXL, it's meant for low-bit images. JXL is medium to lossless. AV1 has nothing to do JXL, it's a video format. The slow adoption is because hardware is only beginning to support it and it's still the slowest encoder out there. Once it gets faster it will be adopted quicker.
2022-10-21 01:42:40
even if AVIF excels more in lower-fidelity images and JXL wins in medium and high-fidelity lossy images, people will still see them as direct competitors as they are both extended-life next-gen image formats that came out at around the same time
2022-10-21 01:43:33
from a workflow perspective it doesn't make sense to use AVIF for low-fidelity and JXL for medium-and high-fidelity when you could serve one or the other tbh
Orum
2022-10-21 03:58:01
ultimately people will use what their application (or their client's application) supports, so for AVIF and JXL to even compete far more things need to support *both*
BlueSwordM
2022-10-21 04:18:34
<@794205442175402004> Do you believe that libjxl could be fast enough on both decoding and encoding to support replacing something like JPEG XS?
Jim
Traneptora even if AVIF excels more in lower-fidelity images and JXL wins in medium and high-fidelity lossy images, people will still see them as direct competitors as they are both extended-life next-gen image formats that came out at around the same time
2022-10-21 04:18:42
I think it has more to do with software capability and complexity. You can add a rule saying if resolution is lower than x/y, use avif, otherwise use jxl. However, that's not what it's meant for. AVIF is meant for low bitrate application. However, there's no simple way for software - especially websites - to detect a 2G connection vs a broadband connection. Some CDNs will do this using either lists of IPs and associated speeds or an AI, but that is not feasible for most small websites and apps. So most will just skip that step and go with a single format.
_wb_
BlueSwordM <@794205442175402004> Do you believe that libjxl could be fast enough on both decoding and encoding to support replacing something like JPEG XS?
2022-10-21 04:24:51
I doubt it, JXS supports ultra-low-latency down to just 4 _lines_ IIRC, with some hard guarantees on bitstream sizes etc. That is not something jxl is designed for.
BlueSwordM
_wb_ I doubt it, JXS supports ultra-low-latency down to just 4 _lines_ IIRC, with some hard guarantees on bitstream sizes etc. That is not something jxl is designed for.
2022-10-21 04:25:19
Oh I see. Wait. **4 LINES?!!!** That is so absurdly low.
_wb_
2022-10-21 04:26:58
fast jxl encode/decode could probably be fast enough to replace some of the use cases of a mezzanine codec like jxs (i.e. ones where latency constraints can be relaxed), but it's really a rather specific niche jxs is designed for and I'm quite sure jxl cannot replace it