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

color

Quackdoc
2024-10-27 04:20:53
at least that is how HLG is supposed to work, i've never confirmed this
2024-10-27 04:32:45
wonder if there is a desmos that could show "ideal" tonemapping/scaling based on 99th/95th/avg luminance of a display for PQ and HLG
damian101
Quackdoc displays typically don't clip lel, they will track as far as they can then use a really harsh tonemapping curve for PQ, for HLG they... scale it, tonemap isnt really the right word
2024-10-27 04:51:26
some displays follow bt.2390, which works quite nicely
2024-10-27 04:52:10
was designed to be easy to implement, happens all on PQ
Quackdoc
2024-10-27 05:06:00
2390 has a lot of issues though
dogelition
2024-10-27 05:12:31
the current state on windows is that applications are expected to do their own tonemapping to the reported capabilities of the display, so the display should ideally just track pq and hard clip
2024-10-27 05:12:47
not sure if/what hdr metadata windows sends to the display for MaxCLL and stuff, but applications shouldn't set that themselves anymore
Quackdoc
dogelition the current state on windows is that applications are expected to do their own tonemapping to the reported capabilities of the display, so the display should ideally just track pq and hard clip
2024-10-27 05:15:16
and that's competely horrid
dogelition
2024-10-27 05:15:23
why?
Quackdoc
2024-10-27 05:15:51
because compositors should be the one to handle mapping, since it allows you to have multiple applications side by side without looking like trash
dogelition
2024-10-27 05:16:29
why would it look like trash?
Quackdoc
2024-10-27 05:16:59
if you have a 1000 nit display, SDR apps are being displayed at 203 nits, but you have a bright HDR image, it will completely wash out the SDR app
2024-10-27 05:17:15
you need the compositor to handle normalization for this
2024-10-27 05:17:46
this talk briefly talks about similar concepts but it largely applies here https://www.youtube.com/watch?v=bYS-P2bF2TQ
2024-10-27 05:18:00
phenomenal talk btw, highly reccomended watch for anyone
dogelition
Quackdoc you need the compositor to handle normalization for this
2024-10-27 05:20:07
normalize it according to the current luminance of the hdr content that's on screen? or its hdr metadata
Quackdoc
2024-10-27 05:20:55
normalize it in however way is best for the current situation, being contextual aware, and allowing the user to have input is very important
dogelition
2024-10-27 05:21:17
do you have an example of a platform that does something like this?
Quackdoc
2024-10-27 05:21:46
nope. Wayland will eventually allow this though
2024-10-27 05:22:01
but I also don't know of any platform that actually does HDR good
2024-10-27 05:26:17
well, KDE gives you rudimentary control over whitepoint for SDR applications which is at least a step in the right direction to align with windows
_wb_
2024-10-29 03:13:35
<@604964375924834314> <@532010383041363969> do you remember where the values in https://github.com/libjxl/libjxl/blob/main/lib/jxl/cms/opsin_params.h are coming from?
spider-mario
2024-10-29 03:16:48
I think they originated fom some optimisation process, and then there was the tweak to make X=B for grayscale
_wb_
2024-10-29 03:21:21
in the white paper on JPEG XL and also in the spec itself we make it look like it's LMS
2024-10-29 03:22:27
but there are different LMS-ish color spaces, basically one for each color appearance model
2024-10-29 03:22:32
https://en.wikipedia.org/wiki/LMS_color_space
2024-10-29 03:24:40
if you use the Hunt–Pointer–Estevez (von Kries) matrix, for D65, then the matrix you get for going from linear sRGB to LMS looks like this: ``` L = 0.31399022f*R + 0.63951294f*G + 0.04649755f*B; M = 0.15537241f*R + 0.75789446f*G + 0.08670142f*B; S = 0.01775239f*R + 0.10944209f*G + 0.87256922f*B; ```
2024-10-29 03:27:41
which seems like a much "sharper" LMS matrix than the one we use in XYB, especially our S has way bigger weights for R and G
2024-10-29 03:29:10
(but also the L and M of XYB are closer to one another than in the HPE LMS)
veluca
2024-10-29 07:26:07
I for sure tweaked the matrix so that grayscale has X=0, Y=B
2024-10-29 07:26:46
otherwise you get interesting color artefacts
TheBigBadBoy - 𝙸𝚛
2024-10-29 09:12:54
anyonr know how I can apply ICC profile to raw pixels data ? e.g. when making a screenshot with MPV, it writes a PNG with ICC but some programs don't support it :/
spider-mario
2024-10-29 09:38:01
if they assume sRGB, then that means you would want to convert from that profile to sRGB
2024-10-29 09:38:22
you can do that using imagemagick: ```console $ magick input.png -profile .../sRGB.icc output.png ```
2024-10-29 09:39:20
you can optionally also add `+profile '*'` to not include that sRGB profile in the output PNG (although it seems to cause trouble on Windows because it tries to interpret the * as a wildcard…)
2024-10-29 09:39:32
`-strip` might also work
TheBigBadBoy - 𝙸𝚛
2024-10-29 09:46:46
thanks
_wb_
2024-10-29 09:58:17
You can produce an sRGB profile if you need one with `icc_simplify sRGB sRGB.icc`
TheBigBadBoy - 𝙸𝚛
2024-10-29 10:29:00
where do I get `icc_simplify`?
_wb_
2024-10-29 11:05:41
It's one of the tools in libjxl
Quackdoc
_wb_ You can produce an sRGB profile if you need one with `icc_simplify sRGB sRGB.icc`
2024-10-29 11:15:09
that's pretty neat
_wb_
veluca I for sure tweaked the matrix so that grayscale has X=0, Y=B
2024-10-30 02:48:04
Wouldn't any matrix where each row sums to 1 (or to whatever other same number) have the property that R=G=B implies L=M=S, which implies X=0, Y=B? Did we originally have a matrix where the rows didn't sum to the same value?
2024-10-30 02:51:19
Anyway, I'm wondering why the HPE matrix for LMS looks so different from the one XYB uses. It looks like the XYB one is closer to the actual cone responses...
2024-10-30 02:52:57
made a little plot to see the sensitivity curves in comparison to the RGB primaries according to Rec2020 (where the primaries are spectral colors; in sRGB they are not)
veluca
_wb_ Wouldn't any matrix where each row sums to 1 (or to whatever other same number) have the property that R=G=B implies L=M=S, which implies X=0, Y=B? Did we originally have a matrix where the rows didn't sum to the same value?
2024-10-30 02:54:37
Correct, originally we did not 😛
_wb_
2024-10-30 02:57:19
The usual definitions of LMS like HPE and Bradford do have matrices that have rows summing to one, but they make L, M and S much more distinct and closer to R, G and B
2024-10-30 03:01:15
<@532010383041363969> do you remember what the LMS matrix of XYB was based on?
2024-10-30 03:06:50
Also: is kOpsinAbsorbanceBias a term meant to model spontaneous opsin activation, or is it just something to make the cube root transfer function better fit the actual psychovisual transfer function? (or both?)
jonnyawsom3
2024-11-04 12:42:47
If I recall, weren't there discussions about if displays can even hit 10K nits currently? https://youtu.be/SV4F3v3TekU
A homosapien
2024-11-04 03:56:59
I think they just min-maxed the tests. Real world performance seems to be more "reasonable".
2024-11-04 03:57:26
Is there an article or form thread covering this phenomenon?
CrushedAsian255
_wb_ Also: is kOpsinAbsorbanceBias a term meant to model spontaneous opsin activation, or is it just something to make the cube root transfer function better fit the actual psychovisual transfer function? (or both?)
2024-11-04 09:02:41
The image compression gods are talking in their own language again
A homosapien
2024-11-04 09:03:41
color science is another can of worms where I don't understand a single word said
2024-11-04 09:03:50
It might as well be magic
Quackdoc
2024-11-04 10:52:07
Does anyone know more about this HDR vivid? Was introduced on phoronix and can't find much info about it but what I can find, it actually looks dope https://www.phoronix.com/news/Vulkan-1.3.301-HDR-Vivid https://www.abu.org.my/wp-content/uploads/2012/04/T-22-22-2-Introduction-of-HDR-Vivid-Standard.pdf https://www.hisilicon.com/en/techtalk/hdr-vivid
2024-11-04 10:52:36
unforunately it seems everthing is mostly just fluff aside from this which actually looks great as it allows you to define tonemapping curve params, like a HDR10 extended
CrushedAsian255
2024-11-11 05:16:35
is 1000:1 a good contrast ratio
2024-11-11 05:16:42
for a non-old display
spider-mario
2024-11-11 08:28:45
it’s somewhat typical of an IPS or TN panel
2024-11-11 08:28:57
maybe slightly on the low end for IPS (some are closer to 1500:1)
2024-11-11 08:29:26
but closer to the high end for TN
CrushedAsian255
2024-11-11 10:51:04
It’s ips
2024-11-11 10:51:17
Samsung s9 27 inch 5k
spider-mario
2024-11-11 12:14:21
https://www.reddit.com/r/Monitors/comments/1dmxal5/best_5k_thunderboltusbc_monitor_for_macs_spoiler/
CrushedAsian255
spider-mario https://www.reddit.com/r/Monitors/comments/1dmxal5/best_5k_thunderboltusbc_monitor_for_macs_spoiler/
2024-11-11 12:27:15
Can’t find the lg ultrafine selling in Australia
2024-11-11 12:27:48
It says discontinued on lg site https://www.lg.com/au/monitors/ultrafine-uhd-4k-5k/27md5ka-b/
Lucas Chollet
2024-11-15 06:33:26
I have a colorspace related question, I hope you guys don't mind me asking it here.
2024-11-15 06:33:32
2024-11-15 06:34:11
This is from [wikipedia](https://en.wikipedia.org/w/index.php?title=SRGB#From_CIE_XYZ_to_sRGB), and given that I don't have access to that standard I'm wondering how did they get the numbers in the matrix. These numbers can also be found in ["How to interpret the sRGB color space"](https://color.org/chardata/rgb/sRGB.pdf) and as mentioned in the article, they differ from the ones in the original publication. I also calculated the matrix on my own, and I got the exact same results that the erroneous one from the original publication. Does anyone has an idea of what's going on here? Here is my Python's code to calculate the values: ``` # http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html import numpy as np ## sRGB srgb_r_chromacity = np.array([0.640, 0.330]) srgb_g_chromacity = np.array([0.300, 0.600]) srgb_b_chromacity = np.array([0.150, 0.060]) # ## White points white_point_d65 = np.array([0.312700, 0.329000]) # r_chromacity = srgb_r_chromacity g_chromacity = srgb_g_chromacity b_chromacity = srgb_b_chromacity white_point = white_point_d65 def tristmimulus_vector(chromacity): return np.array([chromacity[0] /chromacity[1], 1, (1 - chromacity[0] - chromacity[1]) / chromacity[1]]) tristmimulus_matrix = np.hstack(( tristmimulus_vector(r_chromacity).reshape(3, 1), tristmimulus_vector(g_chromacity).reshape(3, 1), tristmimulus_vector(b_chromacity).reshape(3, 1), )) white_correction = np.linalg.inv(tristmimulus_matrix) @ tristmimulus_vector(white_point) M = tristmimulus_matrix * white_correction np.set_printoptions(formatter={'float_kind':'{:.4f}'.format}) # print(M) print(np.linalg.inv(M)) ```
spider-mario
2024-11-15 09:43:27
I think they might be referring to the rounding of D65
2024-11-15 09:43:50
the values you are using are rounded versions of (0.31272, 0.32903)
2024-11-15 09:44:13
this then propagates throughout the calculation
2024-11-15 09:45:32
wait, no, that’s not it
2024-11-15 09:46:11
I’m not sure either, because I still get similar results when I tweak your program to use arbitrary precision arithmetic using SymPy
2024-11-15 09:46:27
2024-11-15 09:55:30
(if you simply remove the `.applyfunc(...)`, it will print the exact fractions)
Lucas Chollet
spider-mario the values you are using are rounded versions of (0.31272, 0.32903)
2024-11-15 02:06:04
First time I see these values 😅
spider-mario I’m not sure either, because I still get similar results when I tweak your program to use arbitrary precision arithmetic using SymPy
2024-11-15 02:06:38
Oh using Sympy is a nice idea, I haven't used that in years
2024-11-15 02:08:34
I don't know if you shed some light or made it worse because it's _again_ a different set of values lol. But thanks for your answer!
2024-11-15 02:12:04
For the record: while I took the formula from there, the results are also slightly different on that website. <http://www.brucelindbloom.com/Eqn_RGB_XYZ_Matrix.html>
2024-11-15 02:13:01
And at the same time, the values from the JavaScript code in the css-color spec are the same as my initial results.
dogelition
Lucas Chollet And at the same time, the values from the JavaScript code in the css-color spec are the same as my initial results.
2024-11-15 02:37:18
if you do the exact math with the chromaticity xy values specified in the spec, you get these matrices <https://www.avsforum.com/threads/ground-truth-re-bt-709-rgb-cie-xyz.1115923/?post_id=34070242#post-34070242>
2024-11-15 02:37:44
not entirely sure if that's technically correct to use, since the spec does specify a slightly different matrix
2024-11-15 02:39:33
but IMO treating the xy values as the ground truth makes the most sense
Lucas Chollet
dogelition but IMO treating the xy values as the ground truth makes the most sense
2024-11-15 02:52:46
I would say the same but I actually don't know how to get the values in another way than from the xy values.
dogelition
2024-11-15 02:53:21
i mean as opposed to just using the weirdly rounded matrix from the spec
Lucas Chollet
dogelition not entirely sure if that's technically correct to use, since the spec does specify a slightly different matrix
2024-11-15 02:53:21
AFAICT, it is what everyone uses so it's probably ok
dogelition i mean as opposed to just using the weirdly rounded matrix from the spec
2024-11-15 02:54:16
I understood, but now I'm quite curious to know how they got these numbers in the spec.
Quackdoc
dogelition if you do the exact math with the chromaticity xy values specified in the spec, you get these matrices <https://www.avsforum.com/threads/ground-truth-re-bt-709-rgb-cie-xyz.1115923/?post_id=34070242#post-34070242>
2024-11-15 02:55:49
paywalled spec pain
dogelition
2024-11-15 02:58:05
well, i have a copy of it from a torrent, but it just specifies the same xy values as bt.709 anyway
Quackdoc
2024-11-15 02:58:27
neat
dogelition
Lucas Chollet I understood, but now I'm quite curious to know how they got these numbers in the spec.
2024-11-15 03:01:39
i think this answers that question https://photosauce.net/blog/post/making-a-minimal-srgb-icc-profile-part-3-choose-your-colors-carefully
Lucas Chollet
2024-11-15 03:30:15
That blog is on my list of things to read 😅
2024-11-15 03:30:40
I'll read that tonight, thanks for the link!
spider-mario
2024-11-15 03:59:58
it seems https://photosauce.net/blog/post/what-makes-srgb-a-special-color-space is relevant too
lonjil
2024-11-15 08:56:58
https://x.com/DSCCRoss/status/1857208745014776215
_wb_
2024-11-15 09:11:00
It's nice to see further improvements in what was already a pretty good display to begin with.
2024-11-25 03:52:10
ugh, something changed in Chrome?
2024-11-25 03:52:12
https://sneyers.info/hdr/stimuli/sources/alps-sunset.png
2024-11-25 03:52:19
https://sneyers.info/hdr/stimuli/distorted/alps-sunset.png/alps-sunset.png-jxl-d1.png
2024-11-25 03:53:00
these two images used to look identical in Chrome, and now the second one looks quite noticeably darker than the first
2024-11-25 03:53:57
if I strip that `cICP` chunk from the second PNG (so only the ICC profile remains, which is equivalent to the cICP chunk), then the problem disappears
spider-mario
2024-11-25 04:25:57
darker, but also less clipped
2024-11-25 04:26:20
maybe it has to do with the highlight headroom that Chrome decides to give it
2024-11-25 04:28:41
<@794205442175402004> the second image has not just a `cICP` chunk but also a `cLLi` one
_wb_
2024-11-25 04:29:07
ah, is that what is causing the difference?
spider-mario
2024-11-25 04:29:09
I guess the jxl was compressed with intensity_target=10000, and so it’s what gets written to the cLLi chunk and it leaves more headroom than necessary?
_wb_
2024-11-25 04:29:45
yes, the second one is just what you get if you do default cjxl/djxl on the first one
2024-11-25 04:30:17
it's not great that doing default cjxl/djxl produces an image that looks different from the original
spider-mario
2024-11-25 04:30:58
I’m not sure what Chrome does with the first image that leads it to use a < 10 000 source peak for its tone mapping
2024-11-25 04:31:13
it might be that it just defaults to a lower value
_wb_
2024-11-25 04:31:53
I guess we should match our defaults then
spider-mario
2024-11-25 04:36:34
it’s 1000 https://source.chromium.org/chromium/chromium/src/+/main:ui/gfx/hdr_metadata.cc;l=56-57;drc=277f4ab48eb85f7441f78aed191c31068ce89814
2024-11-25 04:36:41
which seems a bit low as default
2024-11-25 04:37:28
(in fact, for me, the first image has visible clipping)
2024-11-25 04:42:44
ah, unless I reduce my screen brightness enough (to a somewhat ridiculous extent)
2024-11-25 04:48:45
maybe we could just not write the `cLLi` chunk if the intensity_target is the PQ maximum anyway
2024-11-25 04:49:21
then we just leave it up to whatever is reading the PNG to use an appropriate value
2024-11-25 04:49:26
we don’t have to lie about it
_wb_
2024-11-25 07:05:35
Makes sense. And that solves the discrepancy too.
Quackdoc
2024-11-30 09:22:58
seems like the wayland protocol for colormanagement is starting to get close to the end, protocol in it's current state is here If anyone has questions or suggestions for the wayland devs, better start raising them https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/8ac0dc6108b826614b20d5a037175cba0d3006cc/staging/color-management/color-management-v1.xml
Demiurge
2024-12-02 02:05:14
Ideally tonemapping an image to an sdr screen should be no different than to an hdr screen, so I wonder why it goes wrong...
2024-12-02 02:14:45
I think on an hdr screen more is done in hardware than software and because an sdr screen lacks the same hardware it's often not done at all, not in software either since it's not thought of?
Traneptora
Quackdoc seems like the wayland protocol for colormanagement is starting to get close to the end, protocol in it's current state is here If anyone has questions or suggestions for the wayland devs, better start raising them https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/8ac0dc6108b826614b20d5a037175cba0d3006cc/staging/color-management/color-management-v1.xml
2024-12-04 01:42:36
may want to bring this up in #mpv-devel on libera
2024-12-04 01:42:45
or #libplacebo
Quackdoc
Traneptora may want to bring this up in #mpv-devel on libera
2024-12-04 02:52:41
i believe they are already aware
Traneptora
2024-12-04 02:52:49
then nvm
VcSaJen
2024-12-16 05:29:53
Is sRGB distance closer to perceptual distance than linear RGB?
_wb_
2024-12-16 08:45:26
yes
Lumen
2024-12-21 06:16:54
Hi, sorry for bothering you I was implementing an ssimu2 for vapoursynth on GPU and for that I needed to implement the RGBS to positive XYB I wanted to know if my output seemed coherent with what you saw by the past, I tried copying the code of an existing ssimu2 vapoursynth implementationhttps://cdn.discordapp.com/attachments/1168620680850456696/1320084010625405010/image.png?ex=67684f8a&is=6766fe0a&hm=ee34098cef0ab8f8a9d82d8d15db558e1ad1bbc39641edd9d3294e002ceed469&
_wb_
2024-12-21 09:42:31
Haven't checked but those values do make sense
Quackdoc
2024-12-23 10:09:18
is there a document with the various xyb info and transforms and stuff? or is it just go code spelunking?
spider-mario
2024-12-23 10:17:03
I’m afraid it’s probably mostly the latter
_wb_
2024-12-24 08:38:16
The forward transform is given in the white paper (https://ds.jpeg.org/whitepapers/jpeg-xl-whitepaper.pdf). I started working on a long "definitive" paper describing jxl which will of course also discuss XYB, but it will take a while before I have a sharable draft...
Traneptora
Quackdoc is there a document with the various xyb info and transforms and stuff? or is it just go code spelunking?
2024-12-24 11:26:09
the default inverse matrix is in the spec 18181-1, as is forward iirc in annex O
diskorduser
2024-12-27 07:02:40
https://youtube.com/shorts/GxdYYlss2bg
Quackdoc
2025-01-09 03:13:43
https://hyprland.org/news/update46/ > Color handling has been moved to OkLab from sRGB. This means gradients and color transitions will now look more natural.
2025-01-09 03:14:32
I never knew that there was a compositor that did this. That is really cool though I can't assume this would be great for performance
2025-01-09 03:16:16
I wonder If other compositor will follow suit
lonjil
2025-01-09 03:55:36
Which compositors generate gradients...?
Quackdoc
2025-01-09 04:39:10
I think niri does, but this is also going to help them a lot when it comes to color management
lonjil
2025-01-09 06:09:27
Why would you need OkLab for color management?
Quackdoc
2025-01-09 06:11:35
you dont need oklab specifically, but doing management in these type of colorspaces makes dealing with gamut and transfers a lot less painful
2025-01-09 06:11:48
well, it makes a lot of things more simple
Lumen
2025-01-09 07:44:22
Hi, I come here in search of help I am trying to put 🧈 on GPU so I go through the code but some functions are just... not inside the code but with some random image lib linking so I am not sure about what s in the "rgb to xyb" thing I currently use the implementation of rgb to xyb from my SSIMU2 GPU thingy. Problem is that inside, there is an opsin absorbance and if I follow this code with my function, I ll get 2 opsin absorbance..
2025-01-09 07:44:40
do you think that I should remove the opsinabs from my rgb to xyb and apply it there
2025-01-09 07:44:46
or the 2 opsin abs are fine
Quackdoc
2025-01-09 07:50:42
iirc butter and ssimu2/jxl use different xyb functions don't they? I think this was a <@532010383041363969> thing?
_wb_
2025-01-09 08:29:03
IIRC butteraugli uses a logarithmic transfer function while jxl/ssimu2 uses a cubic one (with a bias term in both cases so the cubic is not exactly a gamma curve).
Lumen
2025-01-09 10:15:16
mmh.. do you have a link for an implementation of the butter version?
2025-01-09 10:15:29
so I can see if the opsin is also made the same way
_wb_
2025-01-10 07:07:14
here's the original butteraugli: https://github.com/google/butteraugli
2025-01-10 07:10:02
Current butteraugli is here: https://github.com/libjxl/libjxl/tree/main/lib/jxl/butteraugli
Lumen
2025-01-10 09:10:46
what is DF ?
2025-01-10 09:11:01
I feel like I can ignore it but just in case I ll ask
veluca
2025-01-10 09:13:29
feel free to ignore it
2025-01-10 09:13:43
it's a marker for which set of SIMD instructions to use
jonnyawsom3
2025-01-10 09:30:13
Just to double check, XYB is Luminance, Green-Magenta and Blue-Yellow, correct?
veluca
2025-01-10 09:34:24
that'd be YXB 😉
Quackdoc
2025-01-10 09:43:45
I've been wondering, the luminance in XYB, what is it's relationship to nits? is it like XYZ where a Y=10000.0 == 10000 nits / y=0.1 == 0.1% of # nits?
Tirr
2025-01-10 09:54:40
it's a little bit complicated. at least in jxl, it's normalized so that (1, 1, 1) is `intensity_target` nits *after* coverting to sRGB gamut
2025-01-10 09:55:48
X and Y are mixed during conversion and gamma is applied with bias, so...
spider-mario
2025-01-10 01:18:29
now that we have X=B=0 for greyscale, there should be a relationship at least in that case, although it might have a slightly funny expression
2025-01-10 01:18:43
but yeah, it becomes much trickier once you throw chroma into the mix
2025-01-10 01:33:25
(well, okay, maybe not _that_ much trickier)
jonnyawsom3
veluca that'd be YXB 😉
2025-01-11 02:25:19
As a sanity check X = Green-Magenta Y = Luminance B = Blue-Yellow Right? It took me 5 minutes to shuffle them around, running on 4 hours of sleep xP
veluca
2025-01-11 02:25:39
yup
jonnyawsom3
2025-01-11 02:25:44
Thanks
2025-01-11 02:26:59
Though... Why put Y in the middle instead of the start to match YCbCr? Surely then graceful degredation would've been easier for subsampled images and pipelines
2025-01-11 02:28:20
(I ask because Telegram is subsampling jpegs assuming YCbCr causing chroma noise and much lower quality Luma)
veluca
2025-01-11 02:31:29
something something XYZ
2025-01-11 02:31:39
idk in hindsight I think YXB would have been better too
2025-01-11 02:31:58
not my decision though
spider-mario
2025-01-11 05:13:11
I thought we did do YXB in jpegli?
2025-01-11 05:13:16
don't we?
lonjil
2025-01-11 05:20:02
You do
Meow
2025-01-11 05:33:38
Are YXB and XYB the different spaces?
spider-mario
2025-01-11 06:20:58
YXB = [0, 1, 0; 1, 0, 0; 0, 0, 1] × XYB
2025-01-11 06:21:45
(in the case of jpegli, not quite, because there’s also some rescaling going on, but that’s the gist of it)
jonnyawsom3
spider-mario I thought we did do YXB in jpegli?
2025-01-11 07:01:58
The attached ICC is labelled XYB_Per
2025-01-11 07:05:03
Meow
The attached ICC is labelled XYB_Per
2025-01-11 07:19:10
Yes this "XYB_Per" is what would be shown on a viewer
jonnyawsom3
2025-01-11 07:27:17
Yeah, but apparently it's meant to be YXB on regular JPEGs
2025-01-11 07:42:56
Yep, YXB isn't mentioned a single time on the libjxl repo
Demiurge
2025-01-12 11:46:34
It's always called xyb
2025-01-12 12:11:22
720 bytes is pretty good but I wonder how much further it could be shrunk down using manual hex editing...
2025-01-12 12:12:00
The iccv4 profiles here are typically 480 bytes. https://github.com/saucecontrol/Compact-ICC-Profiles
Tirr
2025-01-18 09:30:54
found an interesting Chromium issue regarding BT.709 transfer https://issues.chromium.org/issues/40539111
2025-01-18 09:31:19
so it's just doing sRGB EOTF now
A homosapien
2025-01-18 09:35:25
Is chrome doing the color transfer wrong?
Quackdoc
Tirr so it's just doing sRGB EOTF now
2025-01-18 04:13:51
that is actually horrid lol
username
2025-01-18 04:30:42
Firefox seems to do so as well https://github.com/mozilla/gecko-dev/blame/9621af264d4cc734ce10d59eaf41ceccc125270f/modules/libpref/init/StaticPrefList.yaml#L6333
Quackdoc
2025-01-18 05:32:57
firefox in general is horrid tho so at least that is expected from them
username
2025-01-18 05:40:35
I tried to find the date of when Firefox started doing it like that because I thought it might have been to follow chrome however git blame locks up on that file so idk
Quackdoc
2025-01-18 05:43:13
[av1_dogelol](https://cdn.discordapp.com/emojis/867794291652558888.webp?size=48&name=av1_dogelol)
Demiurge
2025-01-19 01:56:29
It's using the wrong transfer curve on purpose...??
AccessViolation_
2025-01-19 02:34:37
I thought this very obvious color banding on the gray background was YouTube's compression reducing the precision, but no, the eyedropper revealed that every band is actually 1 R,G,B value apart, wtf. This is the first time I realize how bad color banding is on 8 bits per channel without dithering
jonnyawsom3
2025-01-19 02:47:37
The banding *is* 8-bit per channel, but it's also still Youtube's fault. It was most likely either a solid color or was dithered
AccessViolation_
2025-01-19 02:50:18
There was definitely an intended gradient in the video. If YouTube's compression un-ditheres videos that's kind of cursed
2025-01-19 02:50:53
I mean dithering itself is cursed, ideally people upload higher bit depth videos and the decoder/renderer dithers them only when necessary I guess?
2025-01-19 02:51:30
If av1 is anything like JXL in that higher bit depth images don't really increase the file size it wouldn't even cost them anything
jonnyawsom3
2025-01-19 02:51:54
Well, dithering is awful for compression usually, so it gets 'smoothed' into banding... Which then doesn't get dithered again
AccessViolation_
2025-01-19 02:52:20
Right, yeah
jonnyawsom3
AccessViolation_ If av1 is anything like JXL in that higher bit depth images don't really increase the file size it wouldn't even cost them anything
2025-01-19 02:58:39
There's been talk for the past decade about encoding 8-bit source as 10-bit since h.264. Don't think anyone's actually benchmarked the results, other than this paper from 2013 citing a 5% density improvement https://www.researchgate.net/publication/269326380_Comparison_of_compression_performance_of_10-bit_vs_8-bit_depth_under_H264_Hi422_profile
AccessViolation_
2025-01-19 03:01:17
Wow, savings even
AccessViolation_ I mean dithering itself is cursed, ideally people upload higher bit depth videos and the decoder/renderer dithers them only when necessary I guess?
2025-01-19 03:03:35
thoughts on this, in general? i think if most media were for example 10 bit, then on 10-bit displays they would render as is, and on 8-bit displays the decoder or renderer could choose to map to 8-bit (resulting in banding) or dither it, (potentially resulting in visible artifacts on low resolution displays), and the user could even choose which mode they'd want to use if they have a lower bit depth display, but critically the media itself is never dithered so you don't blow up file sizes
2025-01-19 03:04:27
outputting files that are already dithered sounds like something that shouldn't really be necessary in basically any case, unless you want to be perfectly sure how your content looks exactly as dithered 8-bit
_wb_
2025-01-19 03:07:12
There are some bands in your example that are 2 sRGB values apart, but most are only 1 apart indeed. Probably the Y values in YUV are one value apart.
2025-01-19 03:07:54
It demonstrates that 8-bit is not really enough even for SDR images (though of course with dithering you can make it look good enough)
AccessViolation_
2025-01-19 03:08:36
Ah, yeah I didn't check every one of them, I checked a few and extrapolated, I shouldn't have confidently said 'every band' 😅
_wb_
2025-01-19 03:08:55
having more precision helps compression for such slow gradients since instead of sudden jumps at hard to to predict spots, you get a smooth gradient that can be predicted well
AccessViolation_
2025-01-19 03:09:58
Makes sense, I bet with how many pixels apart the edges of the bands are, the gradient predictor isn't actually even good on gradients like that
2025-01-19 03:12:04
It's counter-intuitive to me that higher bit depth images compress to smaller files, but when you consider predictors it makes perfect sense
_wb_
2025-01-19 03:15:02
well in VarDCT mode most of the gradient would likely be fully captured in the LF coefficients, which is at 1:8 scale. If the input is smooth then using relatively large block sizes and just the LF would probably suffice to capture the gradient pretty much completely. If the input is banded though, then preserving those bands will require HF and compression will suffer.
2025-01-19 03:18:07
in codecs like avif/av1, the prediction modes will probably do most of the job for such gradients, and they will work better if they have more precision bits to work with. In 8-bit, a slow gradient is too slow for prediction to help much since it becomes bands of solid color rather than a real gradient, while in 12-bit the values keep changing and you have a real gradient that can be predicted very well
AccessViolation_
2025-01-19 08:57:13
I decided to create a 1920 x 1080 16-bit per channel gradient image to experiment with this, decided to encode at effort 11 as well out of curiosity, forgot about it, came back 5 hours later, and it's still going <:KekDog:805390049033191445>
_wb_
2025-01-19 09:11:00
Effort 11 should add a warning when trying it on images larger than an icon
jonnyawsom3
2025-01-19 09:12:11
At least it doesn't outright kill your system anymore. Chunked encoding really took down the memory usage of it (Storing the image once for every encoding thread?)
AccessViolation_
2025-01-19 09:13:16
Oh yeah I remember that
jonnyawsom3
AccessViolation_ I decided to create a 1920 x 1080 16-bit per channel gradient image to experiment with this, decided to encode at effort 11 as well out of curiosity, forgot about it, came back 5 hours later, and it's still going <:KekDog:805390049033191445>
2025-01-19 09:13:29
Also, I found this nice image for testing. Unfortunately it seems to be scaled from 10-bit to 16-bit for the PNG or something, because overriding it to 10-bit with cjxl results in a Ssimulacra2 score of 90
AccessViolation_
AccessViolation_ Oh yeah I remember that
2025-01-19 09:14:40
https://discord.com/channels/794206087879852103/804324493420920833/1286228923520127058 but that was also a big ass image, so not exactly fair
jonnyawsom3
AccessViolation_ https://discord.com/channels/794206087879852103/804324493420920833/1286228923520127058 but that was also a big ass image, so not exactly fair
2025-01-19 09:15:19
Oh, neat thing about that... https://discord.com/channels/794206087879852103/804324493420920833/1330127476403343360
AccessViolation_
Also, I found this nice image for testing. Unfortunately it seems to be scaled from 10-bit to 16-bit for the PNG or something, because overriding it to 10-bit with cjxl results in a Ssimulacra2 score of 90
2025-01-19 09:16:21
Oh neat
jonnyawsom3
2025-01-19 09:29:08
Thing is, the JXL is actually larger, unless you use effort 10. Probably because the gradients are repeating rows that groups can't fully enclose
_wb_
2025-01-19 09:35:16
Also patch detection will not work when the background is not solid, while in PNG probably that repetitive text can still benefit from deflate...
jonnyawsom3
_wb_ Also patch detection will not work when the background is not solid, while in PNG probably that repetitive text can still benefit from deflate...
2025-01-19 09:41:31
Surprisingly... It actually did use Patches for the numbered scale
2025-01-19 09:44:10
Oh, yeah that didn't seem right... ```ssimulacra2 10-bitGradientTest.png Test.jxl 95.77740192```
2025-01-19 09:44:22
`-d 0` naturally, so might have to fix that
_wb_
2025-01-19 09:45:19
Ssimulacra2 is a bit excessively allergic to floating point shenanigans
jonnyawsom3
2025-01-19 09:45:53
This is 16bit int though
_wb_
2025-01-19 09:46:08
Well
2025-01-19 09:46:12
The first one is
2025-01-19 09:46:30
The jxl will be loaded as a float32 image
jonnyawsom3
2025-01-19 09:47:01
Riiight, yeah. decoding back to PNG is back to 100
2025-01-19 09:49:20
I know I made sure it didn't dither inside Ssimulacra2 earilier today, but never checked what format it *does* use
AccessViolation_
2025-01-19 10:54:29
The 16 bit gradient I made in GIMP is a 15.4 kB PNG and a 1.9 KB lossless JXL
2025-01-19 10:56:28
effort 9 gets it down to 1064 bytes
2025-01-19 10:58:12
embed
AccessViolation_
2025-01-19 10:58:24
https://embed.moe/https://cdn.discordapp.com/attachments/1288790874016190505/1330672692084609025/gradient-16-bit-e9.jxl?ex=678ed504&is=678d8384&hm=df427e4951ccb797b868c5f19672479b629ae3edb5fcf3944619d6e3e86aefd9&
jonnyawsom3
2025-01-19 11:00:45
I mean, I did make these. 16-bit and 32-bit
embed
I mean, I did make these. 16-bit and 32-bit
2025-01-19 11:00:59
https://embed.moe/https://cdn.discordapp.com/attachments/1288790874016190505/1330673333049626674/Gradient.jxl?ex=678ed59d&is=678d841d&hm=a2975fea874ff218f7d471271d6e5516062da9d4e4b130f4c9a1ad0a29e2d3f9& https://embed.moe/https://cdn.discordapp.com/attachments/1288790874016190505/1330673333460664400/32Bit-Gradient.jxl?ex=678ed59d&is=678d841d&hm=b372fba03f711259a9b71a7a7f5c2e908e67415e682234bf9917d5aabe72e16c&
jonnyawsom3
2025-01-19 11:01:17
Interesting
2025-01-19 11:04:12
Nevermin, they're both f32, no clue what colorspace I was using....
AccessViolation_
2025-01-19 11:04:46
The main thing I wanted to experiment with was comparing the same gradient in 8-bit and 16-bit, but I got distracted and completely forgot
https://embed.moe/https://cdn.discordapp.com/attachments/1288790874016190505/1330673333049626674/Gradient.jxl?ex=678ed59d&is=678d841d&hm=a2975fea874ff218f7d471271d6e5516062da9d4e4b130f4c9a1ad0a29e2d3f9& https://embed.moe/https://cdn.discordapp.com/attachments/1288790874016190505/1330673333460664400/32Bit-Gradient.jxl?ex=678ed59d&is=678d841d&hm=b372fba03f711259a9b71a7a7f5c2e908e67415e682234bf9917d5aabe72e16c&
2025-01-19 11:37:46
gradient.jxl seems dithered?
2025-01-19 11:38:16
hang on, maybe it's embed.moe doing that
jonnyawsom3
2025-01-19 11:41:48
Yeah, it sent a WebP which naturally doesn't support 32-bit float, so libjxl dithered it
AccessViolation_
2025-01-19 11:45:04
It seems like it's just Waterfox doing some weird dithering, the jxl looks fine on Thorium
2025-01-19 11:45:43
If Thorium does dithering, it's doing it a lot better
2025-01-19 11:46:14
It almost seems like Waterfox is doing dithering on the image level instead of display level?
jonnyawsom3
AccessViolation_ If Thorium does dithering, it's doing it a lot better
2025-01-19 11:48:27
Probably an outdated libjxl version without dithering at all
2025-01-19 11:48:50
I've mentioned it a lot before but the dithering can sometimes trigger when there wasn't any gradients before
AccessViolation_
2025-01-19 11:53:40
I don't get it, is Thorium doing any dithering at all? I don't see any banding
2025-01-19 11:59:24
Okay now on my gradient image Thorium is clearly not doing dithering because I see banding but Waterfox is doing that same dithering that appears to be on the image pixel level, just like it did in your in your gradient, interesting
2025-01-20 12:03:42
Waterfox's dithering feels... wrong? I guess it's relying on libjxl to do it, but the the result of that is that it gets more noticeable the more you zoom in. I feel like it would be better if instead the browser requested the high bit depth color values as they are and then the renderer in the browser dithered what is displayed in real time, so that the dither pattern doesn't become visible or less effective as you zoom in
2025-01-20 12:12:46
Well regardless I'm just glad that what I said earlier > I mean dithering itself is cursed, ideally people upload higher bit depth videos [and images] and the decoder/renderer dithers them only when necessary I guess? is apparently a thing that works at least on some browsers, because I know that from now on I'm going to be disappointed every time I see <:banding:804346788982030337>
jonnyawsom3
AccessViolation_ Waterfox's dithering feels... wrong? I guess it's relying on libjxl to do it, but the the result of that is that it gets more noticeable the more you zoom in. I feel like it would be better if instead the browser requested the high bit depth color values as they are and then the renderer in the browser dithered what is displayed in real time, so that the dither pattern doesn't become visible or less effective as you zoom in
2025-01-20 12:16:20
https://github.com/libjxl/libjxl/issues/3926#issuecomment-2572001006
2025-01-20 12:20:40
My previous testing https://discord.com/channels/794206087879852103/804324493420920833/1301726853123276851
AccessViolation_
2025-01-20 12:23:10
+1 for blue noise for sure, but I think the issue here is more that it's going "dither these pixels *of the image*" rather than "dither these pixels *of the screen*". If you dither on the screen pixel level, or the frame buffer rather, then if you somehow zoomed in on just one 16-bit pixel of the image that single pixel would still be dithered perfectly in the frame buffer instead of being an 8-bit pixel that it itself part of a dither pattern
jonnyawsom3
2025-01-20 12:24:13
That's way outside of libjxl's territory. That's browser/viewer level, maybe even OS level since you'd need the high bitdepth buffer anyway to do the dithering
AccessViolation_
2025-01-20 12:24:58
No I know, hence: > [...] I feel like it would be better if instead the browser requested the high bit depth color values as they are and then the renderer in the browser dithered what is displayed in real time, so that the dither pattern doesn't become visible or less effective as you zoom in
2025-01-20 12:25:23
I think it's great that libjxl can do this, but I don't think it's what browsers should be hooking in to
jonnyawsom3
2025-01-20 12:26:18
7/10 times libjxl dithers things nicely, but when there's a dark patch in an image or you want to zoom in, it'll dither unnecessarily and cause distracting patterns
Demiurge
2025-01-20 02:17:51
256x256 blue noise dither matrix would help... 👀
A homosapien
2025-01-20 02:22:26
In our testing a 64x64 LUT that we swapped out looked pretty good
2025-01-20 02:23:08
there are other smaller issues we need to iron out but we could just make a PR and tweak it later 😛
jonnyawsom3
2025-01-20 02:34:31
Using Gaussian Blue Noise, making sure it's scaled properly, finding the best size/quality tradeoff after those
Demiurge 256x256 blue noise dither matrix would help... 👀
2025-01-20 03:47:10
Speaking of, here's the one used in Source 2 and Half Life: Alyx
2025-01-20 03:50:26
Surprised there's a square in the top left
2025-01-20 04:02:41
Was watching a video and noticed it during a transition, then remembered I have both the game and an asset viewer installed, so just plucked it from the engine. Thankfully stored as RGBA8888 so it is actually lossless
VcSaJen
AccessViolation_ +1 for blue noise for sure, but I think the issue here is more that it's going "dither these pixels *of the image*" rather than "dither these pixels *of the screen*". If you dither on the screen pixel level, or the frame buffer rather, then if you somehow zoomed in on just one 16-bit pixel of the image that single pixel would still be dithered perfectly in the frame buffer instead of being an 8-bit pixel that it itself part of a dither pattern
2025-01-20 06:53:19
Dithering on the screen level is not app's job, it's OS' job. Windows ACM's documentation hinted that it's possible down the line.
username
Was watching a video and noticed it during a transition, then remembered I have both the game and an asset viewer installed, so just plucked it from the engine. Thankfully stored as RGBA8888 so it is actually lossless
2025-01-20 07:05:25
does it even have an alpha channel? RGBA8888 is wasteful if there's no alpha present and it would be better as RGB888
jonnyawsom3
VcSaJen Dithering on the screen level is not app's job, it's OS' job. Windows ACM's documentation hinted that it's possible down the line.
2025-01-20 07:11:32
Reminded me of this https://youtu.be/T3KjeNHF8Y0?t=1223
2025-01-20 07:12:12
The first and only time I've ever seen or heard of Windows outputting '8-bit with dithering'
username does it even have an alpha channel? RGBA8888 is wasteful if there's no alpha present and it would be better as RGB888
2025-01-20 07:13:06
A lot of GPUs and engines internally remap RGB to RGBA so that's probably what happened. You either get raw RGBA or one of the compressed formats
2025-01-20 07:13:53
Hmm... I wonder if I could swap out that texture with my own dithering pattern
Quackdoc
2025-01-20 07:33:01
gpu formats are weird
AccessViolation_
VcSaJen Dithering on the screen level is not app's job, it's OS' job. Windows ACM's documentation hinted that it's possible down the line.
2025-01-20 07:38:01
Hmm that's fair. Dare I even ask if there's any chance something like that would work on Linux with Wayland in the near future <:KekDog:805390049033191445>
2025-01-20 07:39:01
Time to pester Jeremy Soller
2025-01-20 07:45:29
for all I know it's already a thing, I just don't expect it to be
Erunur
2025-01-20 08:35:14
how can i produce a HALD image or LUT with all colors of the 32 bits per channel this format supports like this: https://allrgb.com/jxls-amazing-3 or this: http://www.brucelindbloom.com/index.html?RGB16Million.html i think this software can do it in few clicks https://lightillusion.com/reshade_guide.html but it costs thousand of dollars to buy...
2025-01-20 08:36:35
well not really 32 bits per channel since that requires alien hardware maybe maximum of 16,777,216 colors
jonnyawsom3
2025-01-20 08:51:39
16,777,216 *is* the first link you sent. Not sure if <@794558394219626547> still has the JXL file or I'm missing a download button on the site though
2025-01-20 08:54:13
I wanted to do the same thing in the past but with 16-bit, then realised the image would be so huge and require so much memory, I wouldn't be able to view it
Erunur
16,777,216 *is* the first link you sent. Not sure if <@794558394219626547> still has the JXL file or I'm missing a download button on the site though
2025-01-20 08:54:59
you can download it from the link
2025-01-20 08:55:55
yeah but it's only at 24-bit i wanted to produce a better one at 32 or 48 or more
2025-01-20 08:57:29
like this one: https://3dlutcreator.com/downloads/materials/Hald/HALD_256.png
2025-01-20 09:04:43
it's possible in davinci resolve so i'm buying that soon to test it
jonnyawsom3
Erunur yeah but it's only at 24-bit i wanted to produce a better one at 32 or 48 or more
2025-01-20 09:10:39
I think you underestimate how quickly the size grows. Every bit is multiplicative, so the image grows exponentially. 24-bit is 8bpc and 16 Million colors 48 MB (Megabytes) 48-bit is 16bpc and already 280 Trillion colors 1.5 PB (Petabytes) JXL can do 32bpc, or 80 Octillion Colors 7 ZiB (Zebibytes) So you physically won't be able to reach the limits of the format with current technology
Erunur
Erunur like this one: https://3dlutcreator.com/downloads/materials/Hald/HALD_256.png
2025-01-20 09:12:53
yeah i figured that already but how did they produce 281 trillion colors in this png file
2025-01-20 09:14:17
wait this is 68,719,476,736 not 281 trillion
2025-01-20 09:16:25
so 12 bits per channel
jonnyawsom3
2025-01-20 09:18:32
Are you sure? That image is only 4096 x 4096, so it can only hold 24-bit
Erunur
Are you sure? That image is only 4096 x 4096, so it can only hold 24-bit
2025-01-20 09:19:52
yeah but look at the depth
2025-01-20 09:20:01
2025-01-20 09:20:44
48 bits per pixel
2025-01-20 09:22:06
at least according to wiki
jonnyawsom3
Erunur yeah but look at the depth
2025-01-20 09:24:36
The channels increment in values of 257, meaning 255 total in 16-bits
2025-01-20 09:26:31
Either someone didn't understand saving as 48-bit doesn't magically *make* it 48-bit or the LUT is meant to be interpolated
Erunur
2025-01-20 09:28:51
oh totally forgot about interpolation
2025-01-20 09:29:02
i'm a noob lol
jonnyawsom3
2025-01-20 09:31:15
But... That still doesn't explain the exact 257 values, so I think they just saved it in the wrong bitdepth...
Erunur
2025-01-20 10:29:57
maybe to avoid quantization errors
jonnyawsom3
2025-01-20 10:36:07
Quantization errors from what though? It's a PNG
Erunur
2025-01-20 10:40:57
importing and exporting over and over i guess (yes adobe sucks)
damian101
VcSaJen Dithering on the screen level is not app's job, it's OS' job. Windows ACM's documentation hinted that it's possible down the line.
2025-01-20 10:51:08
GPU drivers could also offer this, so the OS would see for example a 12-bit screen while the display itself is only 8-bit, dithered down by the GPU.
spider-mario
2025-01-20 11:02:21
AFAIK, they do
2025-01-20 11:02:56
`nvidia-settings` exposes some related, well, settings
jonnyawsom3
2025-01-25 08:06:01
Just tried applying my monitor's manufacturer ICC profile to see if it made any difference... It turned grey into cream...
Quackdoc
2025-01-25 10:34:29
lmao
jonnyawsom3
2025-01-25 10:41:22
For whatever reason, it had deeply saturated reds, and caused Irfanview to decode JXLs differently to JPEGs *or* PNGs with ICC profiles. Usually it just ignores them
Quackdoc
2025-01-25 10:44:09
normally they are only worth a damn with pre calibrated displays
spider-mario
2025-01-26 08:15:32
sounds like an intriguing profile
jonnyawsom3
spider-mario sounds like an intriguing profile
2025-01-26 09:24:21
Go wild https://aoc.com/api/download/12660
spider-mario
2025-01-26 09:41:20
… what
2025-01-26 09:42:01
it’s not normalised so that (255, 255, 255) is L*=100?
jonnyawsom3
2025-01-26 09:44:57
That'd explain some things
spider-mario
2025-01-26 09:58:02
ah, I think the “absolute colorimetric” curve sheds some further light
2025-01-26 09:58:56
ah, wait, that’s what it shows even for relative now
2025-01-26 09:59:19
just what is going on with this profile, exactly
CrushedAsian255
spider-mario ah, I think the “absolute colorimetric” curve sheds some further light
2025-01-26 09:59:29
the light that just got shedded needs to be better colour managed
Demiurge
2025-01-26 11:05:08
Has anyone noticed XYB JPEGs seem to be noticeably darker than the source image? Or is that just me and a Linux thing
A homosapien
2025-01-26 12:14:12
If I had to guess something on Linux is not colormanged properly.
RaveSteel
Demiurge Has anyone noticed XYB JPEGs seem to be noticeably darker than the source image? Or is that just me and a Linux thing
2025-01-26 12:42:53
Would you mind sharing the original and converted image? I'd like to verify myself
Demiurge
RaveSteel Would you mind sharing the original and converted image? I'd like to verify myself
2025-01-26 09:19:19
Sure, I'll try to send an example later today
2025-01-27 03:00:21
ok, here's an example of what I mean.
2025-01-27 03:02:51
the PNG is the original, it has a color profile attached so there's hopefully no ambiguity about how to view and interpret the file, and I transcoded it to jxl and jpg using cjxl and cjpegli obtained from the latest libjxl commit on github
2025-01-27 03:03:33
the jpeg was made with `cjpegli --xyb --chroma_subsampling=444 -d 1.5` flags
2025-01-27 03:04:03
It looks massively darker to me compared to the other two files.
2025-01-27 03:21:15
oddly enough they look identical in firefox.
2025-01-27 03:23:33
but using gwenview or lximage-qt it looks much much darker...
RaveSteel
2025-01-27 03:37:11
The JXL is in the bt2020 colourrange
2025-01-27 03:39:37
How did you encode the JXL? If I use cjxl on the PNG I get a bt709 image as expected
Demiurge
2025-01-27 03:42:04
I just did `cjxl pngfile jxlfile`
2025-01-27 03:42:56
with 0.11 it simplifies the icc to an enum sRGB color profile
2025-01-27 03:43:06
but with the latest git it preserves the icc for some reason
2025-01-27 03:43:46
even though it's lossy
2025-01-27 03:44:52
also it's annoying how the version suffix in the .so filename keeps getting renamed all the time even when the abi hasn't changed
2025-01-27 03:46:49
it breaks all the dynamically linked software on my system that expects the library to be called `libjxl.so.0.11`
2025-01-27 03:49:47
maybe the `y` in `x.y.z` should stop getting incremented unless changes are made to the existing abi.
RaveSteel
Demiurge I just did `cjxl pngfile jxlfile`
2025-01-27 03:50:36
I did the same
2025-01-27 03:50:50
But I get a proper bt709 image, not a bt2020 image like you
Demiurge
2025-01-27 06:51:41
But it's not a bt2020 image...
2025-01-27 06:51:49
It has an embedded icc profile.
2025-01-27 06:52:21
and like I said with 0.11 I get an enum srgb image
2025-01-27 06:52:46
with the newer version it just preserves the profile for some reason instead of simplifying it.
2025-01-27 06:55:16
Where does it say bt2020?
2025-01-27 06:55:33
those are completely different color primaries with a wider gamut
RaveSteel
2025-01-27 07:43:20
indeed it is
2025-01-27 07:45:30
This is your JXL ``` Input #0, jpegxl_pipe, from 'malekithally.jxl': Duration: N/A, bitrate: N/A Stream #0:0: Video: jpegxl (libjxl), rgb24(pc, gbr/bt2020/iec61966-2-1), 1920x1200, 25 fps, 25 tbr, 25 tbn JPEG XL image, 1920x1200, lossy, 8-bit RGB Color space: 410-byte ICC profile, CMM type: "lcms", color space: "RGB ", rendering intent: 0 ``` This is mine ``` Input #0, jpegxl_pipe, from 'malekithally_o.jxl': Duration: N/A, bitrate: N/A Stream #0:0: Video: jpegxl (libjxl), rgb24(pc, gbr/bt709/iec61966-2-1), 1920x1200, 25 fps, 25 tbr, 25 tbn JPEG XL file format container (ISO/IEC 18181-2) JPEG XL image, 1920x1200, lossy, 8-bit RGB Color space: RGB, D65, sRGB primaries, sRGB transfer function, rendering intent: Perceptual Brotli-compressed Exif metadata: 32 compressed bytes ```
2025-01-27 07:45:48
I jut encoded from the PNG you posted earlier
2025-01-27 07:46:05
Maybe Discord stripped the PNG, which is why I have a diferent result?
A homosapien
2025-01-27 08:56:51
Unlikely, discord should keep ICC profiles
Demiurge
2025-01-27 09:10:48
the icc is 410 bytes...
RaveSteel This is your JXL ``` Input #0, jpegxl_pipe, from 'malekithally.jxl': Duration: N/A, bitrate: N/A Stream #0:0: Video: jpegxl (libjxl), rgb24(pc, gbr/bt2020/iec61966-2-1), 1920x1200, 25 fps, 25 tbr, 25 tbn JPEG XL image, 1920x1200, lossy, 8-bit RGB Color space: 410-byte ICC profile, CMM type: "lcms", color space: "RGB ", rendering intent: 0 ``` This is mine ``` Input #0, jpegxl_pipe, from 'malekithally_o.jxl': Duration: N/A, bitrate: N/A Stream #0:0: Video: jpegxl (libjxl), rgb24(pc, gbr/bt709/iec61966-2-1), 1920x1200, 25 fps, 25 tbr, 25 tbn JPEG XL file format container (ISO/IEC 18181-2) JPEG XL image, 1920x1200, lossy, 8-bit RGB Color space: RGB, D65, sRGB primaries, sRGB transfer function, rendering intent: Perceptual Brotli-compressed Exif metadata: 32 compressed bytes ```
2025-01-27 09:13:06
That looks like ffmpeg. it says mine has an ICC profile and yours has an enum color space. bt2020 is what ffmpeg is decoding it to I guess.
RaveSteel
2025-01-27 09:13:51
It indeed seems like discord stripped the ICC profile from the PNG
Demiurge
2025-01-27 09:13:54
But the ICC profile is...
RaveSteel It indeed seems like discord stripped the ICC profile from the PNG
2025-01-27 09:16:37
Oh that's weird
2025-01-27 09:16:54
It looks like the color profile is still there
2025-01-27 09:17:01
but they changed other things about the png
2025-01-27 09:18:39
`Warning: [minor] Text/EXIF chunk(s) found after PNG IDAT (may be ignored by some readers)`
Tirr
2025-02-13 12:55:44
Wayland color management protocol has been merged https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/14#note_7cbf668a65db5e91fd4e81c2c5493d42c92ccbef
Quackdoc
Tirr Wayland color management protocol has been merged https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/14#note_7cbf668a65db5e91fd4e81c2c5493d42c92ccbef
2025-02-13 04:54:41
YAY
Demiurge
2025-02-14 01:38:28
I wonder what Graeme Gill thinks about it. I remember she was critical of the wayland people allegedly not taking color management seriously or asking for advice from anyone who will be forced to use the API
2025-02-14 01:40:07
ideally I should also be able to unplug my monitor and plug in a different one while my machine is still on... and not have my apps crash
Quackdoc
2025-02-14 02:36:51
the API is ok for a v1. They had consulted troy for a good amount of the stuff here https://gitlab.freedesktop.org/pq/color-and-hdr/
2025-02-14 02:37:28
in the end, I don't super duper like it, but well, it will do the job
Demiurge
2025-02-14 07:08:11
Well the best way to find out how to improve a system is to be forced to use it 😿
jonnyawsom3
spider-mario I thought we did do YXB in jpegli?
2025-02-15 06:02:55
I don't suppose you could make a test image using that instead if it's not a huge hassle? I'm curious if it'll fix the color bleeding and quality issues with Discord previews and Telegram mobile
_wb_
2025-02-25 12:06:58
https://bsky.app/profile/hsivonen.mastodon.social.ap.brid.gy/post/3lic3kaabfat2
dogelition
2025-02-25 12:35:17
looks like the linked chrome document was written before windows hdr had a brightness slider? didn't even know that was a thing at some point
2025-02-25 12:37:12
there's also this https://docs.google.com/document/d/1_lJarjXlrYNq4cy0WB4BMTUrPpurNpcPPhp4xBtX5LY/edit
Traneptora
RaveSteel This is your JXL ``` Input #0, jpegxl_pipe, from 'malekithally.jxl': Duration: N/A, bitrate: N/A Stream #0:0: Video: jpegxl (libjxl), rgb24(pc, gbr/bt2020/iec61966-2-1), 1920x1200, 25 fps, 25 tbr, 25 tbn JPEG XL image, 1920x1200, lossy, 8-bit RGB Color space: 410-byte ICC profile, CMM type: "lcms", color space: "RGB ", rendering intent: 0 ``` This is mine ``` Input #0, jpegxl_pipe, from 'malekithally_o.jxl': Duration: N/A, bitrate: N/A Stream #0:0: Video: jpegxl (libjxl), rgb24(pc, gbr/bt709/iec61966-2-1), 1920x1200, 25 fps, 25 tbr, 25 tbn JPEG XL file format container (ISO/IEC 18181-2) JPEG XL image, 1920x1200, lossy, 8-bit RGB Color space: RGB, D65, sRGB primaries, sRGB transfer function, rendering intent: Perceptual Brotli-compressed Exif metadata: 32 compressed bytes ```
2025-02-25 10:22:46
JXL files don't report primaries if there's an embedded ICC profile and the image is XYB encoded (like most of them). ffmpeg falls back on bt2020 because it is the widest gamut it supports
RaveSteel
2025-02-25 10:23:51
Ah, good to know
2025-02-25 10:23:57
Thanks
2025-02-25 10:24:24
Which is then the best way to show possible differences?
2025-02-25 10:24:29
Just decoding to PNG?
Traneptora
2025-02-25 10:24:35
The way to determine the actual gamut is with a filter
2025-02-25 10:24:53
forget which one. I think iccdetect but but idk
RaveSteel
2025-02-25 10:25:21
I'll look it up, thank you for pointing me in the right direction
Traneptora
2025-02-25 10:25:37
If you know the original gamut you can just tonemap it down
2025-02-25 10:25:45
er, gamut map
2025-02-25 10:26:02
vf_libplacebo with relative gamut mapping mode
2025-02-25 10:26:27
you can also just view JXLs color-accurately with mpv
RaveSteel
2025-02-25 10:27:18
Does it report gamut correctly?
Traneptora
2025-02-25 10:27:31
mpv? it's a video player
2025-02-25 10:27:46
it also can just view still images
RaveSteel
2025-02-25 10:27:53
Yes, but the advanced stats I mean
2025-02-25 10:28:02
Does it show up there correctly
Traneptora
RaveSteel Yes, but the advanced stats I mean
2025-02-25 10:28:05
ye, somehow
RaveSteel
2025-02-25 10:28:08
Nice
Traneptora
2025-02-25 10:28:26
idk how to make the gpu debug mode visualization turn on
2025-02-25 10:28:31
but you can iirc
gb82
_wb_ https://bsky.app/profile/hsivonen.mastodon.social.ap.brid.gy/post/3lic3kaabfat2
2025-02-26 02:56:08
this is so unbelievably true, wow
Quackdoc
2025-02-26 03:42:38
tbf, numerous android phones can how capture in displayP3
2025-02-26 03:44:29
as for videos... I dunno. There are numerous phones that can now record log 10bit if you wanted to edit it into HDR tho
2025-02-26 03:45:46
and ofc, using "professional" camera apps like filmic or mcpro can help out a lot too
dogelition
2025-02-26 11:00:40
if anyone in EU is interested in picking up a colorimeter, you can get the Calibrite Display Plus HL (i.e. X-Rite i1Display Pro, except it goes up to 10k nits) for 50% off: https://mailchi.mp/calibrite/calibrite-display-plus-hl-upgrade-unknowns-feb25 (cranking up the maximum luminance made the near-black performance worse, so it's not ideal for measuring OLED displays, but other than that it's the best consumer option)
spider-mario
2025-02-26 11:32:09
here is some quantification of the light levels at which the HL models appear to lose precision https://hub.displaycal.net/forums/topic/is-it-wise-to-buy-x-rite-i1-display-pro-plus-now-in-2022/page/2/#post-139718
2025-02-26 11:32:24
> The new meters use the same L2F sensor as the old meters. But now the peak nits is rated for 3000 or 10,000 rather than 2000. So they reduced the sensitivity with some filter, meaning it’s less sensitive to low light patterns. And indeed in testing this has shown to be the case. > > If calibrating things like projectors and OLEDs, You are better off with e Calibrite Plus.
2025-02-26 11:34:09
I’ll probably stick to my good old i1Display Pro myself
0xC0000054
Traneptora JXL files don't report primaries if there's an embedded ICC profile and the image is XYB encoded (like most of them). ffmpeg falls back on bt2020 because it is the widest gamut it supports
2025-02-27 12:23:54
Is there a recommended order for checking `JXL_COLOR_PROFILE_TARGET_ORIGINAL` and `JXL_COLOR_PROFILE_TARGET_DATA`?
2025-02-27 12:26:33
I am in the process of updating my Paint.NET plugin to handle `JXL_COLOR_PROFILE_TARGET_ORIGINAL`. libjxl appears to only check `JXL_COLOR_PROFILE_TARGET_ORIGINAL` after `JXL_COLOR_PROFILE_TARGET_DATA`, but I think it makes more sense to check for `JXL_COLOR_PROFILE_TARGET_ORIGINAL` first and ignore the target data in that case.
2025-02-27 12:28:54
Krita appears to do some kind of conversion from `JXL_COLOR_PROFILE_TARGET_DATA` to `JXL_COLOR_PROFILE_TARGET_ORIGINAL` with a float32 intermediate. But I don't plan to implement something like that due to the complexity.
Traneptora
0xC0000054 Is there a recommended order for checking `JXL_COLOR_PROFILE_TARGET_ORIGINAL` and `JXL_COLOR_PROFILE_TARGET_DATA`?
2025-02-27 12:57:56
target_original is what's tagged in the file. target_data can be whatever you want for xyb
2025-02-27 12:58:23
a lot of the time you want whatvis tagged so you request data in the original space
0xC0000054
Traneptora a lot of the time you want whatvis tagged so you request data in the original space
2025-02-27 01:02:59
So it sounds like ignoring target_data when target_original is present is a reasonable approach?
Traneptora
0xC0000054 So it sounds like ignoring target_data when target_original is present is a reasonable approach?
2025-02-27 01:04:14
not always no
2025-02-27 01:04:34
there's the tagged space and there's the space you're requesting the pixels in
2025-02-27 01:04:47
that second one is target_data
2025-02-27 01:04:53
ultimately it's what you're getting pixels in
2025-02-27 01:06:26
this is how I do it in ffmpeg, fwiw
2025-02-27 01:06:27
https://github.com/FFmpeg/FFmpeg/blob/99e2af4e7837ca09b97d93a562dc12947179fc48/libavcodec/libjxldec.c#L241
0xC0000054
Traneptora https://github.com/FFmpeg/FFmpeg/blob/99e2af4e7837ca09b97d93a562dc12947179fc48/libavcodec/libjxldec.c#L241
2025-02-27 01:13:13
Thanks. I was looking for that code in ffmpeg, but I only fount the code stream parsing.
Traneptora
2025-02-27 01:13:31
in hindsight I'm very glad I left a bunch of comments here
_wb_
2025-02-27 07:44:27
Target_data should never be ignored since that's the space the decoded image buffer is in.
0xC0000054
_wb_ Target_data should never be ignored since that's the space the decoded image buffer is in.
2025-02-27 09:02:33
I find the target_original and target_data scheme to be complicated and confusing. The libjxl GIMP plugin appears to set the color profile twice, once for the [internal profile](<https://github.com/libjxl/libjxl/blob/9961fb4b15bc9ecc64d0d803fea2868f24a176e7/plugins/gimp/file-jxl-load.cc#L353>) and then overwriting that profile with the [ICC profile](<https://github.com/libjxl/libjxl/blob/9961fb4b15bc9ecc64d0d803fea2868f24a176e7/plugins/gimp/file-jxl-load.cc#L477>) (if present).
2025-02-27 09:03:49
I am not familiar with GIMP's API but that behavior seems strange, unless its set profile method is performing a conversion from the internal profile to the original profile.
2025-02-27 09:22:07
These questions were prompted by a [bug report](https://github.com/0xC0000054/pdn-jpegxl/issues/8) in my Paint.NET plugin.
2025-02-27 09:23:26
A lossless JXL image that uses a "DisplayP3" profile with a custom white point gets converted to linear sRGB when saving as lossy/XYB.
2025-02-27 09:25:18
I would have expected JxlEncoderSetICCProfile to use a color space with P3 primaries and a custom white point in that case, but for whatever reason it does not.
_wb_
2025-02-27 09:44:26
In recent versions of libjxl, there is `JxlDecoderSetOutputColorProfile` that should simplify things. First you have to do `JxlDecoderSetCms(dec, *JxlGetDefaultCms())` and then you can set the output color profile to the JXL_COLOR_PROFILE_TARGET_ORIGINAL space. If that doesn't return error then the target_data space should always end up being the same as the target_original space.
2025-02-27 09:46:24
I don't know why JxlEncoderSetICCProfile wouldn't produce an equivalent enum space for that particular icc profile, maybe the equivalence check is too strict for some reason. <@604964375924834314> any idea?
spider-mario
0xC0000054 These questions were prompted by a [bug report](https://github.com/0xC0000054/pdn-jpegxl/issues/8) in my Paint.NET plugin.
2025-02-27 01:22:10
FYI, that white point tag is D65 (https://en.wikipedia.org/wiki/Standard_illuminant#D65_values); the one you call D65 is D50
2025-02-27 01:22:44
(but indeed, for display profiles, the encoded white point should always be D50, along with a chromatic adaptation matrix that converts the actual white point to D50 https://www.color.org/whyd50.xalter)
2025-02-27 01:23:39
for lossy jxl encoding, the image will be converted to linear sRGB whether libjxl turns the ICC profile into an enum or not; the latter only affects whether decoding will be able to return it to the original colorspace or not
2025-02-27 01:23:59
if it doesn’t (TARGET_DATA ≠ TARGET_ORIGINAL), you would have to convert it yourself
2025-02-27 01:26:55
why this specific ICC profile is not identified as an enum profile is a separate question (I’ll try to look into it), but I would anyway advise against assuming that it will always happen
0xC0000054
spider-mario if it doesn’t (TARGET_DATA ≠ TARGET_ORIGINAL), you would have to convert it yourself
2025-02-27 02:04:31
My code currently ignores TARGET_ORIGINAL, which is probably the source of that bug. If I am understanding things correctly, TARGET_DATA and TARGET_ORIGINAL are intended to be treated as two ICC profiles, with TARGET_ORIGINAL being optional. The calling app is expected to perform a conversion from TARGET_DATA to TARGET_ORIGINAL when the the two profile do not match.
2025-02-27 02:06:07
As far as I can tell, Krita does what I described above.
spider-mario
2025-02-27 02:06:38
yes (if the app wants the image in the original profile, which seems to be what the author of that bug report expects)
2025-02-27 02:07:39
it seems that indeed, since that ICC profile erroneously encodes D65 instead of D50, libjxl then infers a different white point (0.28057, 0.295832) when undoing the chromatic adaptation
0xC0000054
2025-02-27 02:12:47
ICC profiles are complex. For one project I wrote a parser that gets the profile description, that was a lot of code. Even the header has a lot of nested types that makes it verbose to parse. My Jpeg XL plugin does ICC profile header parsing to ensure that the profile color space matches the image. Assigning a Grayscale profile to a RGB image would probably cause issues.
spider-mario
2025-02-27 02:16:14
yep, using a third-party library like lcms2 might be preferable over dealing with ICC profiles and colour conversions directly, if that’s an option
0xC0000054
spider-mario yep, using a third-party library like lcms2 might be preferable over dealing with ICC profiles and colour conversions directly, if that’s an option
2025-02-27 02:25:52
I am using [Windows Imaging Component](<https://learn.microsoft.com/en-us/windows/win32/wic/-wic-about-windows-imaging-codec>) (Microsoft's imaging API) for the color conversions, but it doesn't provide a way to get profile info without parsing the raw data. And at the time I wrote that code, I didn't want to pull in a lcms2 dependency for just the header parsing.
spider-mario
2025-02-27 02:37:29
ah, you might want WCS (Windows Color System)
2025-02-27 02:37:32
https://learn.microsoft.com/en-us/windows/win32/api/icm/nf-icm-opencolorprofilea
2025-02-27 02:38:07
https://learn.microsoft.com/en-us/windows/win32/api/icm/nf-icm-getcolorprofileheader
0xC0000054
2025-02-28 03:30:41
After implementing the target data (linear sRGB) to original ("DisplayP3") conversion for [this](<https://discord.com/channels/794206087879852103/1288790874016190505/1344600443879161908>) image. I get this mess of a result:
2025-02-28 03:34:59
Converting the uint8_t data to float for the color conversion doesn't change the result. The original code that only used the target data looked closer.
2025-02-28 03:53:06
The above images were using a manual color conversion, after switching to `JxlDecoderSetOutputColorProfile` the output is correct. That is also much less code.
Demiurge
2025-02-28 12:48:38
So that's a win for the new api then?
Joelo
0xC0000054 Converting the uint8_t data to float for the color conversion doesn't change the result. The original code that only used the target data looked closer.
2025-03-07 01:23:04
What program is this?
0xC0000054
Joelo What program is this?
2025-03-07 01:24:44
[Paint.NET](<https://www.getpaint.net/index.html>) the [5.1.5 beta](<https://forums.getpaint.net/topic/133371-paintnet-515-beta-build-9191/>) included JXL support by default.
Quackdoc
2025-03-27 04:16:35
https://gitlab.freedesktop.org/pq/color-and-hdr/-/issues/40#note_2838289
2025-03-27 04:16:44
I think I got my point across reasonably well here?
spider-mario
2025-03-27 07:34:55
<@184373105588699137> maybe https://www.itu.int/dms_pub/itu-r/opb/rep/R-REP-BT.2408-7-2023-PDF-E.pdf is relevant > (2) The signal level of “HDR Reference White” is not directly related to the signal level of SDR “peak white”.
2025-03-27 07:40:14
oops, that’s not the latest version
2025-03-27 07:40:27
https://www.itu.int/dms_pub/itu-r/opb/rep/R-REP-BT.2408-8-2024-PDF-E.pdf here
2025-03-27 07:40:57
that quote is still almost intact, they just changed the double quotes “” to simple quotes ‘’
2025-03-27 07:41:29
also, the guidance is only suggested now
Quackdoc
2025-03-27 07:42:38
yeah, I thought it would be best to go back to the basics and filed this ticket https://gitlab.freedesktop.org/pq/color-and-hdr/-/issues/42 which just reads as > HDR and SDR are vague terms that are subject to interpretation and confusing at best with many users across the internet having different interpretations of the terms. > > color-and-hdr should either point towards, or create a solid definition for the terms HDR and SDR, or failing that actively dissuade users and developers from using it, and only use it to provide historical or technical context and not in itself a technical capacity. > > The current status quo is confusing to say the least. the glossary entries for HDR and SDR provide no info other then the expanded name.
2025-03-27 07:42:47
to at least try to get on common ground
2025-03-27 07:43:32
> Pekka Paalanen > Pekka Paalanen > @pq > · 1 month ago > Owner > FWIW, the way to tell the difference between "SDR" and "HDR" is to compare the reference white level to the peak white level. If they are the same, it's SDR. If peak white is higher, it's HDR. is stated earlier which is a bit odd to me as it leaves out a ton of information
2025-03-27 07:44:05
for instance, sRGB technically has a reference level of around 80 nits but is commonly graded to 120 or so nits, does this make the typical sRGB grade HDR?
2025-03-27 07:45:02
obviously not what he was getting at, but it's just so weird of a statement to me
2025-03-27 07:45:49
he does elaborate more on "there is no fundemental difference between HDR and SDR" but there is no citation for this I can find
2025-03-27 07:46:40
this feels like a case of them perpetuating confusion based on half understandings and self found understandings of terms that have no real definition
2025-03-27 07:47:46
as far as I am concerned, HDR is a marketing term that is being used as a technical term, and not an actual technical term
A homosapien
2025-03-27 07:48:17
The actual technical term has 11 different definitions
Quackdoc
2025-03-27 07:48:56
thats the thing, does it? I have seen it used plenty in technical documentation, but never once have I actually seen a real definition for it
2025-03-27 07:51:02
I think there is a very valid quote from troy sobotka in his hitchhikers guide to digital color, https://hg2dc.com/2020/01/08/question-17/ > 2 Remember folks, friends don’t let friends say that wretchedly useless word “gamma”. Always remember that the actual specification of sRGB itself, which is referenced in Question #6, written over two decades ago, has a very important annex solely dedicated to destroying the term. The last sentence from that annex is:
2025-03-27 07:51:21
I believe this should apply to the terms HDR and SDR as well
spider-mario
2025-03-27 07:54:47
> FWIW, the way to tell the difference between "SDR" and "HDR" is to compare the reference white level to the peak white level. If they are the same, it's SDR. If peak white is higher, it's HDR. BT.2390: > In traditional imaging, the range allocated to these highlights was fairly low and the majority of the image range was allocated to the diffuse reflective regions of objects. For example, in hardcopy print the highlights would be 1.1x higher luminance than the diffuse white maximum. In traditional video, the highlights were generally set to be no higher than 1.25x the diffuse white. Of the various display applications, cinema allocated the highest range to the highlights, up to 2.7x the diffuse white.
2025-03-27 07:56:15
<@184373105588699137> “reference white” doesn’t mean the peak luminance of the reference display
2025-03-27 07:56:29
> In video, the system white is often referred to as reference white, and is neither the maximum white level of the signal nor that of the display. When calibration cards are used to set the reference white, it is a diffuse white (also called matte) that is placed on the card, and measured.
2025-03-27 07:59:03
reference/diffuse white is basically “how bright is a sheet of white paper?”
Quackdoc
2025-03-27 08:02:01
hmm, I dont think I articulated myself well, I don't believe that is what pekka was referencing, then again, Im not entirely sure *what* he was referencing. as to me, his interpetation doesn't make sense if he was talking about paper white, as that wont really match any commonly agreed upon definition of HDR
2025-03-27 08:03:38
edited above graphics/paper
spider-mario
2025-03-27 08:04:02
to some extent, arguably a defining feature of HDR is the larger headroom between diffuse white and peak white (as BT.2390 implies)
2025-03-27 08:04:12
but not to the point that they would be identical in SDR
Quackdoc
2025-03-27 08:06:30
yeah, I dunno how HDR could be defined, especially considering as I stated in the issue ticket, People all have different interpetations of what HDR means, some people state that it requires a transfer + gamut that are both larger then sRGB colorspace for instance. to me, it seems like the "minimum agreed upon definition of HDR" is "a transfer function specification that is intended to display at least 1000nits while being perceptually smooth across the luminance range at a defined bitdepth" which is... not really accurate to say the least
spider-mario
2025-03-27 08:06:54
(the relevant excerpt there is probably: > The misconception about HDR being simply brighter¹ pictures arises from the fact that the maximum luminance capability is indeed much higher than standard dynamic range (SDR) television. However, this higher maximum is primarily used by the highlight regions of images. While the highlights will indeed appear brighter [1], they are nearly always small in region, and the overall image may not necessarily appear brighter. This is because the overall appearance of an image’s brightness is dominated by the average brightness, not the small regions usually occupied by highlights. One type of highlight is the specular reflection. The advantages of having more accurate specular reflections enabled by HDR include better surface material identification [2] as well as in depth perception, even with 2D imagery [3] [4]. > […] > The more accurate presentation of specular highlights, (assuming the entire video pathway is also HDR), is one of the key distinctions of HDR. )
Quackdoc
2025-03-27 08:07:29
yeah, HDR is for sure better in the lower lows as well.
2025-03-27 08:08:00
this is why I am desperate for anyone to give us a defintion, or to simply stop using the term HDR
spider-mario
2025-03-27 08:09:05
I think one of the problems in the discussion above is the continuum fallacy (https://www.logicallyfallacious.com/logicalfallacies/Argument-of-the-Beard)
Quackdoc
2025-03-27 08:09:58
Yes! I didnt realize there was a specific term for this. but this seems exactly to be the case
2025-03-27 08:13:04
that being said, if the range is SDR <----> HDR, simply knowing what SDR and HDR even are is still important as there are some strong conflictions of it. we can see "ah yes this is for sure HDR" other people cannot and as color-and-hdr is intended to be a technical guidelines for developers, this ambiguioty is IMO unacceptable for this documents purpose
2025-03-27 08:13:34
to the extent that while this fallacy does apply at least partially, it does not wholly
CrushedAsian255
spider-mario (the relevant excerpt there is probably: > The misconception about HDR being simply brighter¹ pictures arises from the fact that the maximum luminance capability is indeed much higher than standard dynamic range (SDR) television. However, this higher maximum is primarily used by the highlight regions of images. While the highlights will indeed appear brighter [1], they are nearly always small in region, and the overall image may not necessarily appear brighter. This is because the overall appearance of an image’s brightness is dominated by the average brightness, not the small regions usually occupied by highlights. One type of highlight is the specular reflection. The advantages of having more accurate specular reflections enabled by HDR include better surface material identification [2] as well as in depth perception, even with 2D imagery [3] [4]. > […] > The more accurate presentation of specular highlights, (assuming the entire video pathway is also HDR), is one of the key distinctions of HDR. )
2025-03-27 10:14:41
The brighter picture thing I notice when I open an image on my computer, it starts as sdr and becomes hdr. Most of the image stays the same , it looks like the brightest parts of the image go from being clipped to actually having colour, while the darker parts stay the same
Quackdoc
CrushedAsian255 The brighter picture thing I notice when I open an image on my computer, it starts as sdr and becomes hdr. Most of the image stays the same , it looks like the brightest parts of the image go from being clipped to actually having colour, while the darker parts stay the same
2025-03-28 12:47:02
> it starts as sdr and becomes hdr. can you elaborate on what you mean, are you talking about your eyes adjusting?
CrushedAsian255
2025-03-28 12:49:39
no, when loading hdr image, the screen starts rendering it as sdr during the open animation, then once the animation finsishes the screen slowly increases its peak brightness
A homosapien
2025-03-28 12:53:06
For android I think it tonemaps HDR to SDR for preview images/thumbnails
2025-03-28 12:53:15
Might be the same for apple idk
Quackdoc
CrushedAsian255 no, when loading hdr image, the screen starts rendering it as sdr during the open animation, then once the animation finsishes the screen slowly increases its peak brightness
2025-03-28 12:54:47
thats the weirdest shit ever, what platform + viewer is this?
A homosapien For android I think it tonemaps HDR to SDR for preview images/thumbnails
2025-03-28 12:55:13
yeah, tho with A16 or A17 android is likely going to be going for an always on HDR experience
CrushedAsian255
Quackdoc thats the weirdest shit ever, what platform + viewer is this?
2025-03-28 12:58:02
macos
2025-03-28 12:58:07
when pressing spacebar to (pre)view an image
Quackdoc
2025-03-28 12:58:30
thats so weird, i mean, I guess it's better then just jumping straight over
2025-03-28 12:59:14
I mean I get why, its likely related to the same issues presented here https://www.youtube.com/watch?v=bYS-P2bF2TQ
2025-03-28 12:59:26
phenomenal talk btw, anyone interested in HDR mastering should watch
2025-03-28 01:00:25
the dude is also pretty entertaining, well woven fiction based on reality for the first part to explain concepts, then goes into actual HDR content in the second
_wb_
2025-03-28 10:32:29
Chrome does fade from SDR mode to HDR mode smoothly, I think <@604964375924834314> and/or <@179701849576833024> made it do that.
veluca
2025-03-28 10:33:08
I certainly didn't 🙂
spider-mario
2025-03-28 10:34:20
I did most of the implementation of the `dynamic-range-limit` CSS property, including making it transitionable, but as far as I know, that’s unrelated to whatever Chrome does when directly displaying an HDR image without that property (which predates its implementation, iirc)
_wb_
2025-03-28 12:01:10
Maybe it was <@795684063032901642> then?
Quackdoc
2025-03-28 07:20:22
interesting, I think I like that but honestly, im not sure lol
Quackdoc yeah, I thought it would be best to go back to the basics and filed this ticket https://gitlab.freedesktop.org/pq/color-and-hdr/-/issues/42 which just reads as > HDR and SDR are vague terms that are subject to interpretation and confusing at best with many users across the internet having different interpretations of the terms. > > color-and-hdr should either point towards, or create a solid definition for the terms HDR and SDR, or failing that actively dissuade users and developers from using it, and only use it to provide historical or technical context and not in itself a technical capacity. > > The current status quo is confusing to say the least. the glossary entries for HDR and SDR provide no info other then the expanded name.
2025-04-01 10:31:26
I give up after my latest reply on this. Like, if a user says they're having issues with HDR content and your thing is, well, HDR can have SDR content and it perfectly fine, so there's not a real meaningful distinction between HDR and SDR. you've lost the plot.
damian101
Quackdoc I give up after my latest reply on this. Like, if a user says they're having issues with HDR content and your thing is, well, HDR can have SDR content and it perfectly fine, so there's not a real meaningful distinction between HDR and SDR. you've lost the plot.
2025-04-01 12:16:09
I don't understand how one is the logical conclusion of the other?
2025-04-01 12:17:10
I mean, yes, HDR formats can have SDR content. But how is the logical conclusion from that that there is no meaningful distinction between HDR and SDR?