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

other-codecs

DZgas Ж
2024-09-02 11:51:38
https://github.com/xiph/opus https://github.com/xiph/opus-tools https://github.com/xiph/opusfile https://github.com/xiph/ogg in 2023, I somehow managed to compile it on windows, but I didn't write how. And now I'm sitting here, I don't even understand.
CrushedAsian255 ```➜ ~ opusenc --version opusenc opus-tools 0.2 (using libopus 1.5.2) Copyright (C) 2008-2018 Xiph.Org Foundation```
2024-09-02 11:52:15
opus tools 2018
CrushedAsian255
2024-09-02 11:53:02
i guess opus-tools doesn't need updates?
DZgas Ж
2024-09-02 11:54:34
here it was impossible to do everything in one project, it was necessary to take everything apart so that later I would assemble everything like a matryoshka: ogg --> opusfile --> flac (for decode input) --> opus --> opus-tools
CrushedAsian255
2024-09-02 11:56:20
or just ffmpeg your way to victory
DZgas Ж
2024-09-02 11:58:31
due to the availability of ready-made ffmpeg build tools, it is really easier to compile (only on Linux)
2024-09-02 11:59:02
Still, I compiled it more than 100 times while doing my svt-av1 fork.
2024-09-02 11:59:37
what? oh go fuck
CrushedAsian255
2024-09-02 12:00:02
C++ really needs a package manager
2024-09-02 12:00:10
nah, screw it, rewrite it in Rust
DZgas Ж
2024-09-02 12:00:17
I think I'm using opus 1.4, which I did from the past
RaveSteel
DZgas Ж the official page is certainly completely abandoned
2024-09-02 12:21:30
I don't know what URL the page you linked has, but https://opus-codec.org/ lists the newest opus 1.5.2
2024-09-02 12:21:51
Although no binary release
DZgas Ж
RaveSteel Although no binary release
2024-09-02 12:21:57
.
RaveSteel
2024-09-02 12:22:33
For windows users I recommend the binary releases by NetRanger https://hydrogenaud.io/index.php/topic,125801.0.html
JendaLinda
2024-09-02 12:35:45
All 32 bit builds should be i386 compatible. Only retro PC enthusiasts like me are using 32 bit systems at this point.
2024-09-02 12:41:01
And if somebody is using a 32 bit system to do real work, they apparently don't care about speed. 😄
DZgas Ж
RaveSteel For windows users I recommend the binary releases by NetRanger https://hydrogenaud.io/index.php/topic,125801.0.html
2024-09-02 12:46:26
FINnALY thanks
JendaLinda And if somebody is using a 32 bit system to do real work, they apparently don't care about speed. 😄
2024-09-02 12:47:19
true anti-capitalist people <:galaxybrain:821831336372338729>
DZgas Ж I'm fucked right now at what I'm getting at with the fork super placebo. From how super complicated the encoded picture, it completely breaks legacy-level-profile. It decodes 2-3 times slower than standard presets
2024-09-02 12:56:26
my super-placebo fork work It took 9 hours to encode the full episode, but I want to share an excerpt with a bitrate of 447 kb/s (720p) (non-audio) ||I apologize in advance for the choice of content for tests and coding. But it is extremely indicative of the perfect color transfer and the complete absence of artifacts.|| I don't want to brag, but it seems like a simple increase in some encode parametersr, and disabling some parameters. At the moment, this is the best quality/bitrate that can be.
2024-09-02 12:57:49
the MPC-HC windwos player makes the best 10 bit dithering I've ever seen
RaveSteel
DZgas Ж my super-placebo fork work It took 9 hours to encode the full episode, but I want to share an excerpt with a bitrate of 447 kb/s (720p) (non-audio) ||I apologize in advance for the choice of content for tests and coding. But it is extremely indicative of the perfect color transfer and the complete absence of artifacts.|| I don't want to brag, but it seems like a simple increase in some encode parametersr, and disabling some parameters. At the moment, this is the best quality/bitrate that can be.
2024-09-02 12:58:07
How large was the original?
dogelition
DZgas Ж the MPC-HC windwos player makes the best 10 bit dithering I've ever seen
2024-09-02 12:58:42
using madvr or just the default renderer?
DZgas Ж
RaveSteel How large was the original?
2024-09-02 12:59:07
full episode with original audio 100 855 536 bytes
RaveSteel
DZgas Ж full episode with original audio 100 855 536 bytes
2024-09-02 12:59:24
same resolution as output?
DZgas Ж
RaveSteel same resolution as output?
2024-09-02 01:00:03
I cut a piece from the finished file because the discord is 25 megabytes
2024-09-02 01:00:55
if you're talking about the original original. From which I was encoding, it is 235 mb of the same 7 min part
RaveSteel
2024-09-02 01:01:08
Not bad
DZgas Ж
2024-09-02 01:01:17
that is, I compressed it 10 times
2024-09-02 01:03:07
afed
2024-09-04 01:00:36
i wonder what it would be like if JPEG XL and JPEG AI were a combined format with modes for low fidelity and very low bpp and high fidelity and higher bpp so there would be no advantages for video based formats https://youtu.be/gA9s9CUHMDc
CrushedAsian255
2024-09-04 01:01:14
JXL bitstream is frozen and changing things would cause more adoption issues but could be interesting
2024-09-04 01:01:56
Also AI would could actually cause problems with CPU so theo would have an argument
username
2024-09-04 01:02:54
breaking backwards compatibility is AVIF's job \😉
afed
2024-09-04 01:04:41
i mean from the beginning, but yeah, it takes a lot longer for JPEG AI to be ready when JPEG XL was already available, but anyway
2024-09-04 01:04:59
there's even a progressive mode
2024-09-04 01:05:41
CrushedAsian255
2024-09-04 01:06:10
Looks interesting
afed
2024-09-04 01:06:58
DZgas Ж
afed i mean from the beginning, but yeah, it takes a lot longer for JPEG AI to be ready when JPEG XL was already available, but anyway
2024-09-04 01:07:43
hahah
CrushedAsian255
2024-09-04 01:08:21
Is this like an actual format with a defined bitstream or still experimentation?
DZgas Ж
2024-09-04 01:08:22
super mega ultra Classic - use formats that were released 20+ years ago for comparison. Neither AVIF nor JXL
2024-09-04 01:09:02
This usually means that the format is bullshit now
CrushedAsian255 Is this like an actual format with a defined bitstream or still experimentation?
2024-09-04 01:11:05
most likely, the development of the Jpeg AI format has been going on for so long, as far as I know, longer than Jpeg XL - that it managed to become outdated before its release
afed
2024-09-04 01:11:11
<https://gitlab.com/wg1/jpeg-ai/jpeg-ai-reference-software>
DZgas Ж
2024-09-04 01:11:13
<:galaxybrain:821831336372338729>
CrushedAsian255
DZgas Ж most likely, the development of the Jpeg AI format has been going on for so long, as far as I know, longer than Jpeg XL - that it managed to become outdated before its release
2024-09-04 01:11:48
Wdym outdated
2024-09-04 01:11:53
Is it beaten by JXL ?
DZgas Ж
CrushedAsian255 Is it beaten by JXL ?
2024-09-04 01:12:32
If they compare it to JPEG 2000. Probably not.
CrushedAsian255
2024-09-04 01:13:48
If JPEG AI is good for low bpp, you could put a JPEG AI bitstream in a box at the front of a JPEG XL? As a different form of progressive decoding?
2024-09-04 01:13:56
Like a preview file
2024-09-04 01:14:44
Although I’m guessing weight files are significantly bigger than normal image format libraries
afed
2024-09-04 01:16:51
though these are quite different directions for codecs, one has very low fidelity (maybe even mostly fake, but visually looks good) but is great for very high compression, the other for high fidelity and lossless but could compensate the weaknesses of each other and jpeg ai doesn't beat jpeg xl because it has different goals, jpeg ai is probably pretty bad for high fidelity, doesn't have lossless and has many other limitations
DZgas Ж
2024-09-04 01:18:01
looks like scam
afed
2024-09-04 01:19:03
not a scam, just typical low fidelity ai compression visually looks good, but may have some generated fake details and bad for image credibility but it's enough for some previews or when high fidelity is not needed and most people compare and hype only at very low bitrates/bpp if they don't notice any artifacts
DZgas Ж
afed not a scam, just typical low fidelity ai compression visually looks good, but may have some generated fake details and bad for image credibility but it's enough for some previews or when high fidelity is not needed and most people compare and hype only at very low bitrates/bpp if they don't notice any artifacts
2024-09-04 01:21:34
not a scam? They stupidly wrote Classic - WTF - what is it? Jpeg 1992 ? hevc key-frame? what? oh look this. AI better! look!
CrushedAsian255
2024-09-04 01:23:41
Classic is probably jpeg 1
DZgas Ж
2024-09-04 01:23:53
Absolutely all tests are divorced from reality, VVC, hevc, jpeg2000, old jpeg what use Encoders - are not written. There is not a single relevant format. Even WEBP. This is definitely a scam. Because they don't show the advantages of quality. Show the speed advantage over the codec that no one has ever seen in their eyes.
afed
2024-09-04 01:26:51
because vvc currently is the strongest format for low bitrate compression of any non-experimental codecs
DZgas Ж
afed because vvc currently is the strongest format for low bitrate compression of any non-experimental codecs
2024-09-04 01:27:02
and dead
CrushedAsian255
2024-09-04 01:31:04
Yeah VVC sound DoA unless Apple leans heavily into it
2024-09-04 01:31:22
They’re the only company I can think of who would care about it
afed
2024-09-04 01:31:48
no, but also it doesn't matter as it's just a reference point for comparison, other finalized formats are much worse for such strong compression
DZgas Ж
CrushedAsian255 Yeah VVC sound DoA unless Apple leans heavily into it
2024-09-04 01:32:31
but apple is a AV1 dev too
afed
2024-09-04 01:33:01
not a dev, just a member
DZgas Ж
2024-09-04 01:33:12
governing member
CrushedAsian255
2024-09-04 01:33:49
Has anyone here tested VVC against AV1?
DZgas Ж
afed not a dev, just a member
2024-09-04 01:34:02
"just a member", this is another list that just gave away their patents
2024-09-04 01:34:13
https://en.wikipedia.org/wiki/Alliance_for_Open_Media
CrushedAsian255
2024-09-04 01:35:13
I’m starting the Alliance for Closed Media pushing xHE-AAC and VVC
DZgas Ж
CrushedAsian255 Has anyone here tested VVC against AV1?
2024-09-04 01:36:03
I did it. Yes. The quality of CRF 63 smoothes artifacts a little better than AV1.... That is all... In large tests, the test results were... um...... 1% superior
CrushedAsian255
2024-09-04 01:36:46
What about for high bitrate high quality?
2024-09-04 01:36:59
Like iPhone 4k camera video
DZgas Ж
2024-09-04 01:37:28
considering that VVC encoding takes about 5 times longer for the same quality, this is dead. The lack of a wide variety of encoders killed optimizations.
2024-09-04 01:37:50
there is no point in switching from HEVC if it already exists.
CrushedAsian255
2024-09-04 01:37:52
I’m guessing is it even more of a patent mess than HEVC?
afed
2024-09-04 01:37:53
members mainly join for protection from patent claims and to use these formats without problems or to get some documentation and help for hw decoders/ encoders implementation etc.
CrushedAsian255
DZgas Ж there is no point in switching from HEVC if it already exists.
2024-09-04 01:38:21
Is there significant improvement over HEVC or is it like 12%
DZgas Ж
2024-09-04 01:39:28
full VVC ... hw
2024-09-04 01:40:13
av1 hw
2024-09-04 01:41:15
and full series
2024-09-04 01:41:31
There are hundreds of real devices individually
CrushedAsian255 Is there significant improvement over HEVC or is it like 12%
2024-09-04 01:43:19
I don't think the overhead of encoding and decoding will be worth it. This is not as strong as in the case of AVC -- > HEVC And even more so AVC -- > AV1
afed
CrushedAsian255 Is there significant improvement over HEVC or is it like 12%
2024-09-04 01:44:35
50% is claimed as for any new formats, but that's with perfectly good encoders and only for specific cases, like low bitrates, very high resolution, etc.
DZgas Ж
2024-09-04 01:45:05
av1 can 16k
2024-09-04 01:45:16
hevc can 8k
2024-09-04 01:46:11
Both can use all the technologies. 10 bit. HDR. I don't see the point in VVC at all. And I'm not the only one, as see.
2024-09-04 01:48:49
In fact, it's hard for me to imagine how powerful the AV1 16k playback hardware should be. Even if the RTX 3090 IT can only AV1 8k
afed
2024-09-04 01:51:48
i'm only not happy that in each new format generation is very much suffering high fidelity because the industry is more focused on streaming low bitrate quality
CrushedAsian255
2024-09-04 01:52:32
yeah, not everything is a streaming service
2024-09-04 01:52:54
there is also good reason to have high res video
yoochan
afed i'm only not happy that in each new format generation is very much suffering high fidelity because the industry is more focused on streaming low bitrate quality
2024-09-04 01:52:55
hence the VVC, advertised as the codec of crappy videos 😄
CrushedAsian255
2024-09-04 02:01:43
VVC: Versatile Video Codec, as long as your videos are planned to be put on 8k streaming at 8 mbps
afed
2024-09-04 02:02:24
basically all the following codecs after avc are either worse for high fidelity and high bitrates or very marginally better, partly the fault is the encoders, but partly it's the format design because larger transform blocks are used, entropy encoder is more designed for smoother content, very heavy focus on filtering, etc
CrushedAsian255
2024-09-04 02:03:06
I’d say h265 is decent at high quality
2024-09-04 02:03:17
But yeah, formats after that all do smoothing to the extreme
2024-09-04 02:03:40
Like how AVIF smooths images
afed
2024-09-04 02:17:32
even hevc at sufficient bitrate loses to avc for noisy or grainy content, though mostly not bad with enough tuning and can use 10-bit not as an extension of the standard
jonnyawsom3
2024-09-05 06:28:45
Is it just me, or does this video have some horrible compression artifacts in the dark areas? I could've sworn it wasn't that bad when it was new https://youtu.be/FoSe_KAQEr8
A homosapien
Is it just me, or does this video have some horrible compression artifacts in the dark areas? I could've sworn it wasn't that bad when it was new https://youtu.be/FoSe_KAQEr8
2024-09-05 08:09:42
It's hard to tell what is actually detail and what is a compression artifact faking detail. I downloaded all versions of the video: VP9 (both regular and premium bitrates), AV1, and H264. Here are my subjective opinions. The VP9 versions perceptually look worse in the shadowed areas. The AV1 version smooths the blockiness and H264 adds additional noise. In my opinion the H264 looks the best likely due to x264 being insanely cracked at handling dark areas <:H264_AVC:805854162079842314> <:Stonks:806137886726553651>. AV1 is easier on the eyes <:AV1:805851461774475316> <:avif:1280859209751334913> but might be smoothing some detail. And finally VP9 just looks awful in shadows <:VP9:981490623452430376> <:banding:804346788982030337>. It's also possible that since the 4 years after the video's release you became more preceptive to compression artifacts? And also you might be rewatching the same video on a larger/better screen which could exacerbate the artifacts.
_wb_
2024-09-05 08:18:16
Screens have become brighter, while video for some reason largely kept doing the 8-bit tv-range yuv thing, which basically gives you 6.5-bit precision _before_ compression...
RaveSteel
A homosapien It's hard to tell what is actually detail and what is a compression artifact faking detail. I downloaded all versions of the video: VP9 (both regular and premium bitrates), AV1, and H264. Here are my subjective opinions. The VP9 versions perceptually look worse in the shadowed areas. The AV1 version smooths the blockiness and H264 adds additional noise. In my opinion the H264 looks the best likely due to x264 being insanely cracked at handling dark areas <:H264_AVC:805854162079842314> <:Stonks:806137886726553651>. AV1 is easier on the eyes <:AV1:805851461774475316> <:avif:1280859209751334913> but might be smoothing some detail. And finally VP9 just looks awful in shadows <:VP9:981490623452430376> <:banding:804346788982030337>. It's also possible that since the 4 years after the video's release you became more preceptive to compression artifacts? And also you might be rewatching the same video on a larger/better screen which could exacerbate the artifacts.
2024-09-05 08:22:35
Let's not forget that Youtube has been turning down video quality more and more for years now
jonnyawsom3
2024-09-05 08:30:59
I don't recall how I watched it all those years ago, but watching it on my phone and comparing to my desktop (Both the same for 8 years, so if anything should be dimmer and less noticeable) I think it's either screen technology or tonemapping. My OLED phone, the blacks are still completely black, with only faint blurring at max brightness My desktop has obvious artifacts at only half brightness (The default) but also looks much less saturated, as if it's been artificially brightened
2024-09-05 08:35:24
Same image output between Android app and Desktop website, so it must just be the OLED screen cutting off the blacks before the artifacs can show
A homosapien It's hard to tell what is actually detail and what is a compression artifact faking detail. I downloaded all versions of the video: VP9 (both regular and premium bitrates), AV1, and H264. Here are my subjective opinions. The VP9 versions perceptually look worse in the shadowed areas. The AV1 version smooths the blockiness and H264 adds additional noise. In my opinion the H264 looks the best likely due to x264 being insanely cracked at handling dark areas <:H264_AVC:805854162079842314> <:Stonks:806137886726553651>. AV1 is easier on the eyes <:AV1:805851461774475316> <:avif:1280859209751334913> but might be smoothing some detail. And finally VP9 just looks awful in shadows <:VP9:981490623452430376> <:banding:804346788982030337>. It's also possible that since the 4 years after the video's release you became more preceptive to compression artifacts? And also you might be rewatching the same video on a larger/better screen which could exacerbate the artifacts.
2024-09-05 08:37:41
Guessing the 'High Bitrate' VP9 didn't help much? And yeah, it's possible since diving into all these image and video compression methods I've just gained an eye for the artifacts now, although the evidence is pointing that I watched it on my phone that hides almost all compression
A homosapien
2024-09-05 08:42:13
The High Bitrate VP9 didn't make much of a difference, the orignal video is just that bad I guess ¯\_(ツ)_/¯
jonnyawsom3
2024-09-05 08:42:25
Yeah, maybe
Demiurge
Is it just me, or does this video have some horrible compression artifacts in the dark areas? I could've sworn it wasn't that bad when it was new https://youtu.be/FoSe_KAQEr8
2024-09-06 10:28:39
That whole video looks like "Do I look like I know what a JPEG is?"
CrushedAsian255
Demiurge That whole video looks like "Do I look like I know what a JPEG is?"
2024-09-06 10:32:47
Demiurge
2024-09-06 10:44:13
thanks, that's what I was looking for
afed
2024-09-07 11:39:11
https://www.reddit.com/r/programming/comments/1fb5pzh/webp_the_webpage_compression_format/
2024-09-07 11:54:22
```Typically, Brotli is better than gzip, and gzip is better than nothing. gzip is so cheap everyone enables it by default, but Brotli is way slower.``` but, brotli also has faster modes and also <https://github.com/google/rbrotli-enc> `At the moment, quality 5 is the recommended setting. It achieves roughly the same compression ratio as quality 5 of the C Brotli encoder, but with 1.5-2x the performance depending on the machine.` or is it about decompression speed? it would be nice to have also a faster (rust?) decoder, though not sure how optimized the current one is
Meow
2024-09-08 07:12:07
CrushedAsian255
2024-09-08 07:18:13
what data is that?
2024-09-08 07:19:36
it's a bit corrupted becaue of JPEG artifacting
2024-09-08 07:25:23
Meow
2024-09-08 07:39:01
The original is on that website
CrushedAsian255
2024-09-08 07:41:01
i know
spider-mario
2024-09-09 08:12:58
https://news.ycombinator.com/item?id=41475124
veluca
2024-09-09 08:15:52
I almost want to try that out with jxl xD
2024-09-09 08:15:58
in principle it should just do better
jonnyawsom3
2024-09-09 08:26:02
Direct link https://purplesyringa.moe/blog/webp-the-webpage-compression-format/
2024-09-09 08:27:00
> Umm, apparently WebP only supports pictures up to 16383x16383. We can do that. <:JXL:805850130203934781>
afed
2024-09-09 08:27:16
also https://canary.discord.com/channels/794206087879852103/805176455658733570/1282123030113292311
yurume
veluca I almost want to try that out with jxl xD
2024-09-09 08:31:38
depends, as it requires an encoder to be good at compressing an "image" with pathological dimensions (one-pixel high in this case)
jonnyawsom3
2024-09-09 08:31:54
Wasn't there an 'ultra data saving mode' or something for Opera mobile that pre-rendered websites and sent an image instead? Kinda just re-invented it thinking of how well patches would work for a webpage :P
yurume
2024-09-09 08:32:28
I'm actually surprised to see a claim that webp lossless is good at brotli, as it wasn't never the case in my old testing
2024-09-09 08:32:40
the likely cause should be the input size
jonnyawsom3
2024-09-09 08:32:42
1.2x worse from that post
yurume
2024-09-09 08:33:10
ah indeed
2024-09-09 08:33:20
I should have mentally swapped the header...?
2024-09-09 08:34:03
anyway I expect jxl to be similar as brotli as its inherent similarity in the core lossless coding algorithm
jonnyawsom3
yurume depends, as it requires an encoder to be good at compressing an "image" with pathological dimensions (one-pixel high in this case)
2024-09-09 08:34:53
Doesn't have to be, also on that site they change to a 16k width and height (separately)
yurume
2024-09-09 08:35:22
in that case you lose a large portion of possible backreferences
2024-09-09 08:35:40
that said, I never tried that with webp (I did try that back then with png)
jonnyawsom3
2024-09-09 08:35:54
JXL can only reference the same group anyway, so your limit is 1024 pixels
yurume
2024-09-09 08:36:15
yeah that's another issue
jonnyawsom3
2024-09-09 08:37:06
Alternate idea, the 12 byte smallest JXL file, just with the website stored in a Brotli box
2024-09-09 08:37:16
*Technically* it's JXL ;P
CrushedAsian255
2024-09-09 08:37:31
Is JXLC mandatory?
yurume
2024-09-09 08:37:51
unless web browsers expose an API to read arbitrary boxes...
veluca
2024-09-09 08:37:51
I mean it doesn't have to be 1px wide
jonnyawsom3
2024-09-09 08:38:33
This would be an ideal case for your LZ77 based patch finding idea, to cross group boundaries
CrushedAsian255
JXL can only reference the same group anyway, so your limit is 1024 pixels
2024-09-09 08:38:46
Maybe limit the image to 1024xNN so it can reference up to 1048576 back?
jonnyawsom3
2024-09-09 08:39:07
Yeah, that's what I was saying
veluca
2024-09-09 08:39:25
I can imagine a few places where MA trees could help
CrushedAsian255
2024-09-09 08:39:28
Sorry, don’t back read
2024-09-09 08:39:42
Maybe JXL audio compression isn’t as bad of an idea as I think?
jonnyawsom3
2024-09-09 08:39:54
It'd be very rare for cjxl to choose only LZ77 too
yurume
2024-09-09 08:41:18
audio compression needs subtle changes to what lossy jxl already does, though
2024-09-09 08:41:42
they typically need lapped transforms
CrushedAsian255
2024-09-09 08:41:53
EPF/ Gaborish?
yurume
2024-09-09 08:42:08
not sure if that's sufficient for audio signals?
jonnyawsom3
CrushedAsian255 Maybe JXL audio compression isn’t as bad of an idea as I think?
2024-09-09 08:42:11
It's not bad, especially if you keep the quality high. I'll try and find my old test files, or just searching for `FLAC from: jonnyawsom3` might come up with them
yurume
2024-09-09 08:42:21
(actually I have no idea whether that is okay or not)
CrushedAsian255
It's not bad, especially if you keep the quality high. I'll try and find my old test files, or just searching for `FLAC from: jonnyawsom3` might come up with them
2024-09-09 08:42:35
Oh yeah I tested this with you I think
2024-09-09 08:42:39
I keep forgetting
yurume
2024-09-09 08:44:24
what I'm aware of is that MDCT, the lapped transform of choice for audio compression, is easy to analyze and prove mathematically that it preserves some important audio features at edge (specifically, minimal phase distortion)
_wb_
2024-09-09 09:30:50
In jxl you could cheat by making a tiny jpeg and concatenating whatever you want to it, then do lossless jpeg recompression on it 🙂
2024-09-09 09:31:24
that will effectively just do brotli compression on that jpeg tail data
jonnyawsom3
Here's the first tile from both bayer lossy and standard lossy DNGs Bayer ```[SubIFD] ImageWidth : 4032 [SubIFD] ImageHeight : 3008 [SubIFD] BitsPerSample : 16 [SubIFD] Compression : JPEG XL [SubIFD] PhotometricInterpretation : Color Filter Array [SubIFD] SamplesPerPixel : 1 [SubIFD] PlanarConfiguration : Chunky [SubIFD] TileWidth : 672 [SubIFD] TileLength : 752 [SubIFD] JXLDistance : 0.200000002980232 [SubIFD] JXLEffort : 7 [SubIFD] JXLDecodeSpeed : 4``` Standard ```[SubIFD] ImageWidth : 3952 [SubIFD] ImageHeight : 2960 [SubIFD] BitsPerSample : 16 16 16 [SubIFD] Compression : JPEG XL [SubIFD] PhotometricInterpretation : Linear Raw [SubIFD] SamplesPerPixel : 3 [SubIFD] PlanarConfiguration : Chunky [SubIFD] TileWidth : 400 [SubIFD] TileLength : 432 [SubIFD] JXLDistance : 0.5 [SubIFD] JXLEffort : 7 [SubIFD] JXLDecodeSpeed : 4```
2024-09-10 09:09:06
<@532010383041363969> referring from X, here's the exiftool outputs for lossy bayer, lossy linear, and lossless bayer underneath https://discord.com/channels/794206087879852103/805176455658733570/1259094540082741338
2024-09-10 09:10:12
Lossy tile JXL files are in the message above, and the jxlinfo output for one of the lossless tiles is at https://discord.com/channels/794206087879852103/822105409312653333/1252968284702380083
dogelition
2024-09-10 06:59:20
https://www.androidauthority.com/android-15-performance-class-ultra-hdr-3480620/
_wb_
2024-09-10 07:03:33
ugh, that's a rather heavyhanded way of promoting a rather questionable way of doing HDR.
2024-09-10 07:07:05
Why are Android and Chrome being so paternalistic about what image formats should or should not be used. They don't have the expertise in that domain to actually make good choices, yet they seem to feel it's their job to force adoption of some formats and to block adoption of others. It is quite strange.
Quackdoc
_wb_ Why are Android and Chrome being so paternalistic about what image formats should or should not be used. They don't have the expertise in that domain to actually make good choices, yet they seem to feel it's their job to force adoption of some formats and to block adoption of others. It is quite strange.
2024-09-11 12:54:05
you can look through the document and find a lot of changes regarding HDR which is pretty much all pointing to one thing which is HDR by default.
2024-09-11 12:54:49
it's not all the way there in the 15 design document, but I would say it looks like 90% of the groundwork is layed, the 16 design document is probably going to make android fully HDR by default
_wb_
2024-09-11 05:17:09
Pushing HDR support is fine. Pushing Ultra HDR as a capture format, not so much.
CrushedAsian255
2024-09-11 05:23:02
Ultra HDR is SDR + sdr->hdr gainmap?
_wb_
2024-09-11 05:23:17
Yes
CrushedAsian255
2024-09-11 05:23:43
🤦‍♂️this wouldn't be a problem if they adopted <:JXL:805850130203934781>
Quackdoc
CrushedAsian255 🤦‍♂️this wouldn't be a problem if they adopted <:JXL:805850130203934781>
2024-09-11 05:44:29
it would, the explicit point of this is that you have images that look right on both HDR and SDR formats which is necessary for a transitory period which android is evidently pushing into now
CrushedAsian255
2024-09-11 05:49:23
Can’t HLG tone map to SDR?
2024-09-11 05:49:33
Isn’t that the whole point of it?
Quackdoc
2024-09-11 05:52:31
can it? yes. can it do it good? no.
2024-09-11 05:53:39
PQ can also tonemap to SDR with one of many functions, but again, none of them are actually good, they are just "acceptable" at best
_wb_
2024-09-11 06:02:29
If a phone can produce a nice tone mapped image at capture time to produce SDR+gainmap, then a phone can also produce a nice tone mapped image when rendering an HDR image.
CrushedAsian255
2024-09-11 06:06:50
When capturing the phone is converting the HDR data from the camera into SDR+Gain map, can’t you just reuse that process but instead give it a HDR image buffer instead of the camera buffer?
2024-09-11 06:07:40
HDR videos play fine on SDR displays without needing a gainmap
2024-09-11 06:07:54
Inbuilt tone mapping does it for you
Quackdoc
_wb_ If a phone can produce a nice tone mapped image at capture time to produce SDR+gainmap, then a phone can also produce a nice tone mapped image when rendering an HDR image.
2024-09-11 06:17:07
It may be possible if you save a bunch of metadata with the image that can be used in processing, but it still likely wouldn't be as good especially if you are targeting a fixed mapper
2024-09-11 06:17:22
ofc this is assuming you actually have tonemapping, which in most cases you don't
2024-09-11 06:20:26
keep in mind, you are doing SDR -> HDR tonemapping, not the other way around. SDR is the minimum bar, and tonemapping support is not given. so we need a base SDR image, and tonemapping that to HDR. In terms of potential, (whether or not camera apps actually do this is up to the vendor itself) When a camera is taking a picture in ultraHDR or whatever it's called, it's creating the SDR rendition, and then using the extra data the camera can take to generate the HDR data.
2024-09-11 06:22:59
Even disregarding the tonemapping, the format alone is still an issue here. the SDR image, is still going to work on say an android 7 phone, windows 7 PC, or maybe even a windows XP pc. etc, let alone 10-11-12 etc. if they had swapped to JXL, they only get compatibility with devices still getting support, which at most is android 11 where they could update the system to add jxl images.
username
2024-09-11 06:26:11
It feels like a doubled edged sword. like sure you get maximum compat with old software and such but at the same time this could be used as one of those things that cause companies to be like "see? we don't have to stop using JPEG **ever**!"
2024-09-11 06:29:16
can also affect newer formats negatively as well which in an of themselves don't have compat with older software, like why are there SDR to HDR gainmapped AVIFs around the place now?
2024-09-11 06:31:13
sure there is software that support modern formats yet can't handle HDR or high bit depth images properly at all but I think at that point it's kinda the fault of the software
_wb_
2024-09-11 06:33:16
I can see the usefulness of the gain maps approach from the interop / web delivery point of view: if you want to send a single image that will work in legacy software and looks OK in SDR, while also allowing an enhancement when viewed in updated software and on an HDR display, it's a reasonable thing to do. The main problem I see with these "graceful degradation" approaches though is that you'll end up wasting bytes on the enhancement while most end-users will just get the degraded experience and not even know their software needs updating — the image will load, it will look OK, just it will look like an SDR image that is not very well compressed. I don't really see the usefulness of the gain maps approach as a capture format though. To me it makes more sense to capture in full HDR, and then you can generate SDR versions, SDR+gainmap versions, or lower fidelity HDR versions from that master image, depending on what is needed.
2024-09-11 06:37:20
As an analogy: imagine your camera would produce a huge "Ultra TrueColor" file: the main image has been reduced to 256 colors and is encoded as a GIF, but there's a blob at the end that's another GIF which can be used to magically restore some of the original colors (not perfectly but it looks OK most of the time). That way it is easy to display the image on an old VGA screen that can only do 256 colors, and GIF is universally supported so it is very interoperable. Do you think this is a good idea?
Quackdoc keep in mind, you are doing SDR -> HDR tonemapping, not the other way around. SDR is the minimum bar, and tonemapping support is not given. so we need a base SDR image, and tonemapping that to HDR. In terms of potential, (whether or not camera apps actually do this is up to the vendor itself) When a camera is taking a picture in ultraHDR or whatever it's called, it's creating the SDR rendition, and then using the extra data the camera can take to generate the HDR data.
2024-09-11 06:45:42
I don't think this is how it works. More likely, the camera will natively have HDR data (14-bit sensor data or whatever), which can be tone mapped to SDR or just preserved in HDR. For UltraHDR you'd store the SDR version as the main image and add a gain map that can be used to approximately reconstruct the HDR image (not perfectly, since for that you'd need a full-res 3-channel gain map and here they're using a subsampled 1-channel gain map to avoid file sizes blowing up too much).
Quackdoc
_wb_ I don't think this is how it works. More likely, the camera will natively have HDR data (14-bit sensor data or whatever), which can be tone mapped to SDR or just preserved in HDR. For UltraHDR you'd store the SDR version as the main image and add a gain map that can be used to approximately reconstruct the HDR image (not perfectly, since for that you'd need a full-res 3-channel gain map and here they're using a subsampled 1-channel gain map to avoid file sizes blowing up too much).
2024-09-11 06:52:40
this may be the case on flagship phones, but a lot of phones are still creating HDR images via capturing multiple images in close succsession then squashing them together
username It feels like a doubled edged sword. like sure you get maximum compat with old software and such but at the same time this could be used as one of those things that cause companies to be like "see? we don't have to stop using JPEG **ever**!"
2024-09-11 06:54:14
ultraHDR by design is oriented around being a transitory format. it could be expanded to other formats without issue
_wb_
Quackdoc this may be the case on flagship phones, but a lot of phones are still creating HDR images via capturing multiple images in close succsession then squashing them together
2024-09-11 06:59:07
either way, whether created in one shot or using multi-exposure, what you get is an HDR image that is then used to derive a nice tone mapped SDR image.
Quackdoc
2024-09-11 07:01:18
in the former is this true, but when using multi exposure, you simply save the processing to the HDR gainmap. This would be higher quality then tonemapping to an SDR image down the line if it is even possible for the app to do so in the first place
CrushedAsian255
Quackdoc ultraHDR by design is oriented around being a transitory format. it could be expanded to other formats without issue
2024-09-11 07:21:09
Can you convert UltraHDR to true HDR (like JXL or whatever)?
Quackdoc
2024-09-11 07:21:26
you would need to "render" it but yes
CrushedAsian255
2024-09-11 07:21:49
Looks good?
Quackdoc
2024-09-11 07:21:58
as food as the ultraHDR image looks
CrushedAsian255
2024-09-11 07:27:17
Still trying to find a way to properly tonemap my iPhone HDR HEIC images to JPEG XL
Quackdoc
2024-09-11 07:29:32
arent they just HLG images?
CrushedAsian255
2024-09-11 07:35:59
No they’re SDR + gainmap
2024-09-11 07:36:27
Video is Dolby Vision/HLG
Quackdoc
2024-09-11 07:38:16
ah, I don't know of any apps that can render them
2024-09-11 07:38:55
iirc they use their own gainmap spec
2024-09-11 07:43:42
~~ https://github.com/grapeot/AppleJPEGGainMap ~~
2024-09-11 07:43:53
ah crap wrong one
2024-09-11 07:44:05
https://github.com/m13253/heif-hdrgainmap-decode
dogelition
CrushedAsian255 Isn’t that the whole point of it?
2024-09-11 08:06:31
not quite, the backwards compatibility aspect of HLG just means that it looks alright when interpreted as BT.2020 (wide gamut SDR) apart from that, there's not really a difference when actually converting HLG or PQ content for SDR output (though PQ can go brighter and more saturated)
Quackdoc
2024-09-11 08:09:02
bt2020 uses rec709 transfer right?
CrushedAsian255
2024-09-11 08:11:24
i thought bt.2020 was the colour space, and bt.2100 was the HLG specification
2024-09-11 08:11:47
nvm just checked, it uses the same transfer function
2024-09-11 08:11:56
i was confusing transfer function with colour primaries
dogelition
Quackdoc bt2020 uses rec709 transfer right?
2024-09-11 08:13:14
both specify BT.1886 (which is just 2.4 gamma on a display with 0 black level) as the EOTF
Quackdoc
2024-09-11 08:13:41
ye thats what i thought
CrushedAsian255 i thought bt.2020 was the colour space, and bt.2100 was the HLG specification
2024-09-11 08:13:51
both are colorspaces
2024-09-11 08:14:04
a color space is defined as gamut + transfer + whitepoint
CrushedAsian255
2024-09-11 08:14:11
i meant primaries *
Quackdoc
2024-09-11 08:14:33
bt.2020 is typically used to refer specifically to the gamut
2024-09-11 08:14:46
but in reality, it does define all three
dogelition
Quackdoc both are colorspaces
2024-09-11 08:14:46
BT.2100 defines 2 color spaces, one with PQ and one with HLG
Quackdoc
dogelition BT.2100 defines 2 color spaces, one with PQ and one with HLG
2024-09-11 08:15:02
yeah I never liked that lmao
CrushedAsian255
dogelition BT.2100 defines 2 color spaces, one with PQ and one with HLG
2024-09-11 08:15:12
i thought bt.2100 *was* the HLG transfer function?
Quackdoc
2024-09-11 08:15:26
no thats arri something,
CrushedAsian255
2024-09-11 08:15:42
ARIB STD-B67 (2015)?
2024-09-11 08:16:13
btw im getting my info of [the codec wiki from AV1 for dummies](<https://wiki.x266.mov/docs/colorimetry/transfer>)
Quackdoc
2024-09-11 08:16:19
`ARIB STD-B67 (2015)` `Rec. ITU-R BT.2100-2 HLG...`
jonnyawsom3
CrushedAsian255 Can you convert UltraHDR to true HDR (like JXL or whatever)?
2024-09-11 08:16:30
It might eventually be possible to transcode them https://github.com/libjxl/libjxl/pull/3552
CrushedAsian255
2024-09-11 08:16:39
not losslessly im guessing?
2024-09-11 08:16:47
or yes?
2024-09-11 08:17:03
is the gainmap a JXL codestream?
Quackdoc
2024-09-11 08:17:35
keep in mind, that a gainmap may need to be converted into different formats depending on how it's handled
CrushedAsian255 ARIB STD-B67 (2015)?
2024-09-11 08:18:34
yeah thats right
2024-09-11 08:18:50
video/color specifications are a fucking mess in case you havent figured it out [av1_dogelol](https://cdn.discordapp.com/emojis/867794291652558888.webp?size=48&quality=lossless&name=av1_dogelol)
CrushedAsian255
2024-09-11 08:19:01
do both define it the same?
Quackdoc
2024-09-11 08:19:08
they should
CrushedAsian255
2024-09-11 08:19:08
or are they *very slightly* different
2024-09-11 08:19:24
i could imagine them being different by like 0.01% just to be annoying
Quackdoc
2024-09-11 08:19:29
they might operate on different bitdepths, but the overall function should be the same
CrushedAsian255
2024-09-11 08:20:14
like how Bt.2020 has two transfer functions, 10 bit (exactly the same as BT.1886) and 12 bit (the same thing but with extra precision in the constants) ?
Quackdoc keep in mind, that a gainmap may need to be converted into different formats depending on how it's handled
2024-09-11 08:20:47
> different formats Different formats like codecs? or different interpretation of values? If the latter, shouldn't it all be standardised?
Quackdoc
2024-09-11 08:21:01
interpetation of values
2024-09-11 08:21:11
> shouldn't it all be standardised HA
2024-09-11 08:21:28
standardization in colour? heresy
CrushedAsian255
Quackdoc > shouldn't it all be standardised HA
2024-09-11 08:21:35
oh yeah, forgot that we're talking about colour science
dogelition
Quackdoc `ARIB STD-B67 (2015)` `Rec. ITU-R BT.2100-2 HLG...`
2024-09-11 08:26:40
interesting, don't think i've heard of that before, but here's that standard: https://www.arib.or.jp/english/html/overview/doc/2-STD-B67v2_0.pdf seems like it just defines the HLG OETF and not the EOTF?
CrushedAsian255
2024-09-11 08:27:23
is EOTF from gamma to linear?
2024-09-11 08:27:28
also wouldn't it just be the inverse function?
2024-09-11 08:27:39
shouldn't be too hard to just derive it mathematically?
dogelition
CrushedAsian255 also wouldn't it just be the inverse function?
2024-09-11 08:29:19
every (?) standard has a deliberate mismatch between the OETF and EOTF due to... some effect(s) that i forgot the name of, basically things look different in the lighting of your living room than if you actually are outside
CrushedAsian255 is EOTF from gamma to linear?
2024-09-11 08:29:41
yes, it's the "gamma" applied by the display when viewing content whereas the OETF is the "camera gamma"
dogelition every (?) standard has a deliberate mismatch between the OETF and EOTF due to... some effect(s) that i forgot the name of, basically things look different in the lighting of your living room than if you actually are outside
2024-09-11 08:30:04
e.g. 2.4 gamma is definitely not the inverse of the rec.709 OETF
CrushedAsian255
2024-09-11 08:30:27
i don't understand digital colour theory and don't think I ever will
dogelition
dogelition every (?) standard has a deliberate mismatch between the OETF and EOTF due to... some effect(s) that i forgot the name of, basically things look different in the lighting of your living room than if you actually are outside
2024-09-11 08:33:06
<https://en.wikipedia.org/wiki/Rec._709> ctrl-f for "dim surround" here
CrushedAsian255 i don't understand digital colour theory and don't think I ever will
2024-09-11 08:35:10
if you only care about signal reproduction on a display, you can pretty much ignore OETFs
Quackdoc
CrushedAsian255 is EOTF from gamma to linear?
2024-09-11 08:38:08
no!
2024-09-11 08:38:31
EOTF defines how a **display** device should treat the image, NOT how to convert it to linear!
2024-09-11 08:39:13
this is a *crucially* important distinction as to convert sRGB to linear you need to apply the inverse transform
CrushedAsian255
2024-09-11 08:39:30
so gamma to linear is OETF^-1 ?
Quackdoc
2024-09-11 08:39:56
https://www.youtube.com/watch?v=NzhUzeNUBuM
2024-09-11 08:40:16
I reccomend watching this video as a primer since it actually does a good job at not being too confusing
CrushedAsian255
2024-09-11 08:40:36
also just wondering what transfer does JXL's XYB use?
2024-09-11 08:40:57
at least the Y channel, X/B are chroma
Quackdoc
dogelition every (?) standard has a deliberate mismatch between the OETF and EOTF due to... some effect(s) that i forgot the name of, basically things look different in the lighting of your living room than if you actually are outside
2024-09-11 08:41:03
this is not true, and it depends on the format itself, some specs don't even specify an oetf/eotf
2024-09-11 08:42:01
for instance rec 709 does not specify an eotf, and one was only specified latter in bt.1886
2024-09-11 08:42:39
I think it's 709 im thinking of anyways
dogelition
Quackdoc this is a *crucially* important distinction as to convert sRGB to linear you need to apply the inverse transform
2024-09-11 08:45:47
i can understand why people argue that sRGB should not be displayed with the inverse OETF based on what it says in the standard, but from an ICC color management point of view that makes no sense, so i disagree with that (i think it's easier to argue that some standard is "wrong", i.e. not what should actually be done in practice, rather than arguing that everyone using an ICC color managed workflow is doing it wrong)
CrushedAsian255
2024-09-11 08:47:22
oe maybe that the standards is not "wrong" but more just "outdated / obsolete"
2024-09-11 08:47:31
with a "revision" or something
Quackdoc
2024-09-11 08:47:43
to convert to linear, means to undo the encoding function, if you apply the inverse eotf (which is a 2.2) this actually causes further degradation of the image, not undoing it. This is why tooling like OCIO "undoes" the sRGB encode
2024-09-11 08:47:57
troy sobotka had a good write up somewhere if I can find it
CrushedAsian255
2024-09-11 08:48:18
are cameras linear?
Quackdoc
2024-09-11 08:48:31
no
CrushedAsian255
2024-09-11 08:48:36
then what do they use?
Quackdoc
2024-09-11 08:48:57
they use whatever the fuck they want to
dogelition
Quackdoc to convert to linear, means to undo the encoding function, if you apply the inverse eotf (which is a 2.2) this actually causes further degradation of the image, not undoing it. This is why tooling like OCIO "undoes" the sRGB encode
2024-09-11 08:49:01
typo, meant inverse OETF (the piecewise function)
2024-09-11 08:49:05
unless i confused something again "those" people are arguing that sRGB content is encoded with the piecewise function but should be displayed with 2.2, right? my argument is that it's both encoded and decoded with the piecewise function, to clarify
CrushedAsian255
2024-09-11 08:49:12
this is such a mess :/
Quackdoc
CrushedAsian255 this is such a mess :/
2024-09-11 08:49:23
this is why DNG exists
CrushedAsian255
2024-09-11 08:49:49
but is OETF from linear to gamma?
Quackdoc
2024-09-11 08:50:34
camera's do one of two things A) save into raw, typically some kind of DNG now B) pre-process the image into a jpeg or png or something
CrushedAsian255 but is OETF from linear to gamma?
2024-09-11 08:50:39
more or less
CrushedAsian255
Quackdoc camera's do one of two things A) save into raw, typically some kind of DNG now B) pre-process the image into a jpeg or png or something
2024-09-11 08:51:25
so RAW then has the "linearisation table" that converts into true linear?
2024-09-11 08:51:47
and then after you edit, then the output gets chucked through the OETF to get the data stored in the file?
2024-09-11 08:51:59
then when viewing the EOTF converts that back into display pixels?
2024-09-11 08:52:30
(after going through whatever transfer function / colour space the image format uses)
2024-09-11 08:52:34
or is this still wrong?
Quackdoc
2024-09-11 08:52:38
for color management, you typically undo the encoding (OETF optical > electro transfer function) since the EOTF is typically designed around how a display handles output.
2024-09-11 08:53:08
sRGB is the greatest example of this because if you use the EOTF to convert to linear, it fucks things up because of the intentional mismatch that was designed for the displays of the era
spider-mario
dogelition interesting, don't think i've heard of that before, but here's that standard: https://www.arib.or.jp/english/html/overview/doc/2-STD-B67v2_0.pdf seems like it just defines the HLG OETF and not the EOTF?
2024-09-11 08:53:20
you get an HLG EOTF by applying the inverse OETF followed by the OOTF, which is a power function applied to the luminance, with the exponent γ equal to 1.2 if the target peak luminance is 1000 nits (with a formula to adjust it if it’s not 1000 nits)
2024-09-11 08:53:53
(actually two possible formulae but one pretty much supersedes the other)
2024-09-11 08:54:27
https://github.com/libjxl/libjxl/blob/a4f67292d1cd99f969ad86aa5ceb272a6bec737a/lib/extras/hlg.cc#L14-L51
dogelition
spider-mario you get an HLG EOTF by applying the inverse OETF followed by the OOTF, which is a power function applied to the luminance, with the exponent γ equal to 1.2 if the target peak luminance is 1000 nits (with a formula to adjust it if it’s not 1000 nits)
2024-09-11 08:58:40
right, i was just pointing out that that part is missing from the ARIB standard
spider-mario
2024-09-11 08:58:50
ah, right
2024-09-11 09:00:12
it is in BT.2100, though (at least the part that relates to the peak luminance)
2024-09-11 09:00:27
2024-09-11 09:01:50
also mentioned by one of the inventors of HLG here (excellent video, by the way) https://youtu.be/XmZMyLOXB28?t=6m45s
Quackdoc
2024-09-11 09:02:45
I really need to learn more about HLG, I keep putting it off because i'm in love with absolute nit values from pq lol
spider-mario
2024-09-11 09:03:24
while I can’t guarantee that the video will make you a complete HLG convert, I think it might at least give you some appreciation for HLG’s philosophy
CrushedAsian255
spider-mario while I can’t guarantee that the video will make you a complete HLG convert, I think it might at least give you some appreciation for HLG’s philosophy
2024-09-11 09:05:00
Are you team HLG or PQ?
spider-mario
2024-09-11 09:05:48
is it a cop-out if I say that it depends on the use case?
2024-09-11 09:06:04
I admit that I do have a bit of a soft spot for HLG
2024-09-11 09:07:00
but it’s not clear to me that current implementations of it take advantage of its properties
2024-09-11 09:07:19
it seems to be frequently misunderstood
2024-09-11 09:07:26
maybe it’s too clever for its own good
spider-mario it seems to be frequently misunderstood
2024-09-11 09:08:02
(see for example: all the people who claim that it has a 1000-nit peak)
CrushedAsian255
2024-09-11 09:08:41
Can’t it go arbitrarily high?
Quackdoc
2024-09-11 09:08:42
how *does* one define the nit peak in hlg anyways? is it left to metadata?
spider-mario
2024-09-11 09:09:18
there isn’t one
2024-09-11 09:09:23
the peak is that of the target display
2024-09-11 09:10:19
it’s relative like SDR TRCs, just with the gamma adjustment on top
dogelition
spider-mario also mentioned by one of the inventors of HLG here (excellent video, by the way) https://youtu.be/XmZMyLOXB28?t=6m45s
2024-09-11 09:10:47
very nice video indeed, haven't seen it before
Quackdoc
spider-mario the peak is that of the target display
2024-09-11 09:11:47
that seems like it would be nice for lower end HDR systems, but a nightmare to edit for hmm, I guess context can make up for that though.
spider-mario
2024-09-11 09:11:57
part of the 1000-nit confusion is that, as BT.2408 (https://www.itu.int/dms_pub/itu-r/opb/rep/R-REP-BT.2408-7-2023-PDF-E.pdf#page=29) puts it, there is an industry consensus that when converting between HLG and PQ, the peak luminance at which the renditions should coincide is 1000 nits
Quackdoc
2024-09-11 09:12:34
that seems a bit generic, but I guess in the end, the person trying to mix them could easily decide otherwise
spider-mario
Quackdoc that seems like it would be nice for lower end HDR systems, but a nightmare to edit for hmm, I guess context can make up for that though.
2024-09-11 09:12:34
on the contrary, the idea is that you can grade it on whatever display you have, and it should automatically adapt to look good on displays with different capabilities
dogelition
spider-mario while I can’t guarantee that the video will make you a complete HLG convert, I think it might at least give you some appreciation for HLG’s philosophy
2024-09-11 09:12:46
i respect what they're trying to do, but the EOTF seems needlessly weird in the sense that it's not just a per-channel function
spider-mario
spider-mario part of the 1000-nit confusion is that, as BT.2408 (https://www.itu.int/dms_pub/itu-r/opb/rep/R-REP-BT.2408-7-2023-PDF-E.pdf#page=29) puts it, there is an industry consensus that when converting between HLG and PQ, the peak luminance at which the renditions should coincide is 1000 nits
2024-09-11 09:14:15
(also reflected in the fact that “The reference level, HDR Reference White, is defined in this Report as the nominal signal level obtained from an HDR camera and a 100% reflectance white card resulting in a nominal luminance of 203 cd/m² on a PQ display or on an HLG display that has a nominal peak luminance capability of 1 000 cd/m².”)
2024-09-11 09:15:24
(this could be seen as hardcoding the amount of highlight headroom that HLG allows for, except that the use of “HDR Reference White” as a reference is more of a guidance than anything mandatory)
2024-09-11 09:17:26
> Creatives making programme content may choose to encode content at differing levels, i.e. a dark indoor drama may put a grey card (and thus skin tones) at a lower level than shown in Table 1. Also, some productions may employ higher/brighter levels for outdoor scenes or for dramatic effect. However, significant deviation from the Table 1 nominal levels, in particular HDR Reference White, may lead to difficulties such as loss of important detail with static HDR to SDR down-mappers, which are usually optimised around these reference levels. When a static HDR to SDR down-mapper is used for transmission, it is therefore advisable to check for any detail loss in the derived SDR (for example in skin tones and/or displayed text) to ensure that the SDR image meets requirements and expectations.
lonjil
_wb_ I don't think this is how it works. More likely, the camera will natively have HDR data (14-bit sensor data or whatever), which can be tone mapped to SDR or just preserved in HDR. For UltraHDR you'd store the SDR version as the main image and add a gain map that can be used to approximately reconstruct the HDR image (not perfectly, since for that you'd need a full-res 3-channel gain map and here they're using a subsampled 1-channel gain map to avoid file sizes blowing up too much).
2024-09-11 09:18:12
Also not perfectly since you're multiplying two low bit depth images together, there will be large quantization errors.
dogelition
dogelition i respect what they're trying to do, but the EOTF seems needlessly weird in the sense that it's not just a per-channel function
2024-09-11 09:24:24
``` >>> import colour >>> colour.models.eotf_BT2100_HLG([1,1,1]) array([ 1000.00003232, 1000.00003232, 1000.00003232]) >>> colour.models.eotf_BT2100_HLG([1,0,0]) array([ 765.40629303, 0. , 0. ]) ``` in any "normal" color space, EOTF([1, 0, 0])[0] (peak red in linear light) would be the same as EOTF([1, 1, 1])[0], i.e. the red component of peak white in linear light. but in HLG it's less, which makes the gamut pretty strange
Quackdoc
2024-09-11 09:30:12
so I guess to convert HLG to linear, you need to apply the inverse oetf, then apply the ootf on top of it?
2024-09-11 09:30:57
so in this case the eotf = linearization here
dogelition
Quackdoc so I guess to convert HLG to linear, you need to apply the inverse oetf, then apply the ootf on top of it?
2024-09-11 09:34:40
pretty much, though the spec also includes a "variable for user black level lift" in the EOTF
Quackdoc
2024-09-11 09:35:36
fuck I hate color
spider-mario
2024-09-11 09:36:34
it helps to be explicit on what we call “linear”, since in the OOTF, both the source and the output are linear
2024-09-11 09:36:51
but the first O is scene-referred whereas the second O is display-referred
2024-09-11 09:37:18
or to be more accurate, the O in first position (as in OETF) vs the O in second position (as in EOTF)
dogelition
Quackdoc fuck I hate color
2024-09-11 09:37:33
understandable, the HLG spec is definitely hard to parse
Tirr
2024-09-11 09:39:36
hlg was the most confusing one while writing transfer curve stuff for jxl-oxide
Quackdoc
2024-09-11 09:40:42
speaking of scene-referred vs display-referred we finally have a good document talking about it courtesy of exr
2024-09-11 09:40:47
https://openexr.com/en/latest/SceneLinear.html
2024-09-11 09:41:15
it's not too indepth, but it gives enough context
spider-mario
2024-09-11 09:42:44
nice page, shows the orthogonality between linear/nonlinear and scene/display
Quackdoc
2024-09-11 09:44:56
It certainly beats the snot out of their old documentation.
_wb_
2024-09-11 10:40:25
In theory, PQ represents absolute nits, but in practice, e.g. when viewing PQ images in Chrome or in Lightroom on macOS, they are always rendered relatively to the overall display brightness setting. When thinking about HDR in terms of "some number of stops of headroom above SDR white" (where on a macbook, you only get 1 stop when the brightness slider is at the maximum, but 4 stops if you make SDR white less bright), then that's basically the HLG philosophy, right? It seems like it gets applied in practice to both PQ and HLG — presumably because it's the only thing that makes sense if you want to have adjustable overall display brightness / variable ambient lighting conditions.
CrushedAsian255
2024-09-11 10:41:43
> you only get 1 stop when the brightness slider is at the maximum No wonder why HDR was clipping
spider-mario
_wb_ In theory, PQ represents absolute nits, but in practice, e.g. when viewing PQ images in Chrome or in Lightroom on macOS, they are always rendered relatively to the overall display brightness setting. When thinking about HDR in terms of "some number of stops of headroom above SDR white" (where on a macbook, you only get 1 stop when the brightness slider is at the maximum, but 4 stops if you make SDR white less bright), then that's basically the HLG philosophy, right? It seems like it gets applied in practice to both PQ and HLG — presumably because it's the only thing that makes sense if you want to have adjustable overall display brightness / variable ambient lighting conditions.
2024-09-11 10:57:52
in HLG, the headroom in scene light would be constant
2024-09-11 10:58:18
in display light, increasing display brightness would _amplify_ the headroom, because reference white would be brightened comparatively less than the peak
_wb_
2024-09-11 11:00:17
You mean when e.g. replacing a 600 nits screen by a 1000 nits one?
2024-09-11 11:02:08
But on a MacBook, the screen will always go up to 1600 nits regardless of what the brightness slider is set to...
Quackdoc
_wb_ But on a MacBook, the screen will always go up to 1600 nits regardless of what the brightness slider is set to...
2024-09-11 11:02:36
thats messed up lmao
_wb_
2024-09-11 11:17:08
Well not really, the SDR brightness still moves with the brightness slider. You just get more HDR headroom available when lowering the SDR max brightness.
2024-09-11 11:18:12
(when moving the brightness slider below some point, it also starts lowering how bright HDR can go. It never gives you more than 4 stops of headroom)
dogelition
_wb_ In theory, PQ represents absolute nits, but in practice, e.g. when viewing PQ images in Chrome or in Lightroom on macOS, they are always rendered relatively to the overall display brightness setting. When thinking about HDR in terms of "some number of stops of headroom above SDR white" (where on a macbook, you only get 1 stop when the brightness slider is at the maximum, but 4 stops if you make SDR white less bright), then that's basically the HLG philosophy, right? It seems like it gets applied in practice to both PQ and HLG — presumably because it's the only thing that makes sense if you want to have adjustable overall display brightness / variable ambient lighting conditions.
2024-09-11 11:23:06
interestingly, dolby vision hlg video played back with the dolby vision plugin on windows is always output with the same luminance and not affected by the sdr brightness slider (which is the only option windows gives you for controlling brightness with hdr enabled) not sure about non-dolby-vision hlg video, haven't tested that
spider-mario
_wb_ But on a MacBook, the screen will always go up to 1600 nits regardless of what the brightness slider is set to...
2024-09-11 11:24:23
it’s always capable of it, but for HLG content, it arguably shouldn’t
2024-09-11 11:24:36
since with HLG, the peak is what the setting is supposed to change
2024-09-11 11:25:25
if you increase the brightness of a given signal level (e.g. SDR white), it should increase the brightness of _all_ signal levels (albeit not equally), including 100%
2024-09-11 11:28:26
(in fact, the peak should increase more)
2024-09-11 11:28:47
(e.g. 203 nits at a peak of 1000 should become 289 at a peak of 1600)
2024-09-11 11:29:40
well, unless the increase in mid-tone level is because of an increase in surround luminance
2024-09-11 11:33:04
right, that actually invalidates quite a lot of what I’ve just said
lonjil
_wb_ Well not really, the SDR brightness still moves with the brightness slider. You just get more HDR headroom available when lowering the SDR max brightness.
2024-09-11 12:31:31
arguably, it's incorrect to always use the same HDR brightness because viewing conditions are important, and dimmer viewing conditions cause people to lower brightness. HDR content will be overbright.
CrushedAsian255
2024-09-11 12:32:51
Imo, HDR should have more dynamic range than SDR, it shouldn't be forcing specific absolute nit values.
lonjil
2024-09-11 01:46:27
Is there am open source Lossless JPEG encoder I can run on Linux? Google is being immensely unhelpful.
_wb_
lonjil arguably, it's incorrect to always use the same HDR brightness because viewing conditions are important, and dimmer viewing conditions cause people to lower brightness. HDR content will be overbright.
2024-09-11 01:58:03
well it does actually lower the brightness of HDR too when lowering the display brightness, so that's not really a problem. It just has more range available, i.e. less soft-clamping is going on. E.g. if you have a foreground at 100 nits, a sky at 1000 nits and a sun at 10000 nits, then it would be something like this: at maximum brightness, the foreground is 500 nits, the sky is 1400 nits and the sun is 1600 nits. at just-below-mid-brightness brightness, the foreground is 100 nits, the sky is 900 nits, and the sun is 1600 nits. at very low brightness, the foreground is 10 nits, the sky is 100 nits, the sun is 500 nits.
2024-09-11 01:58:57
(just making up the numbers here)
lonjil
2024-09-11 01:59:02
hm
_wb_
lonjil Is there am open source Lossless JPEG encoder I can run on Linux? Google is being immensely unhelpful.
2024-09-11 02:00:14
https://github.com/thorfdbg/libjpeg implements the full jpeg spec
lonjil
2024-09-11 02:00:28
ah, thanks :)
_wb_
2024-09-11 02:01:24
https://github.com/thorfdbg/libjpeg/blob/master/README#L102
2024-09-11 02:01:53
I guess what you're looking for is what you get with this command line: `jpeg -p -c infile.ppm out.jpg`
lonjil
2024-09-11 02:03:07
thanks
spider-mario
2024-09-11 02:03:34
in terms of decoding, what implementations exist?
2024-09-11 02:03:41
also pretty much only this?
lonjil
2024-09-11 02:05:28
I'm gonna do some quick and dirty tests on my own photos to see how it compares to cjxl -e 1 -d 0
RaveSteel
lonjil Is there am open source Lossless JPEG encoder I can run on Linux? Google is being immensely unhelpful.
2024-09-11 02:29:32
libjpeg-turbo also does include a switch for lossless JPEG, at least on arch
lonjil
2024-09-11 02:30:10
ah, so it does!
spider-mario
2024-09-11 02:40:48
Chrome can’t open the result; neither can Eye of GNOME
2024-09-11 02:40:50
2024-09-11 02:41:56
nor GIMP (same error, so presumably same decoder)
2024-09-11 02:41:58
2024-09-11 02:42:52
interoperability-wise, it seems that there is little point in using this
2024-09-11 02:43:00
worse software support than jxl
lonjil
2024-09-11 02:44:04
I'm just interested in how it might compare in ProRaw
2024-09-11 02:44:42
Though the comparison I'm running atm is completely invalid since ProRaw uses 12-bit images and I'm using 8-bit images in the form of "high quality" JPEGs from my DSLR
RaveSteel
spider-mario interoperability-wise, it seems that there is little point in using this
2024-09-11 02:45:41
It is also larger than png
2024-09-11 02:45:50
2024-09-11 02:46:41
``` ExifTool Version Number : 12.96 File Name : losslesstest.jpg File Size : 4.1 MB File Permissions : -rw-r--r-- File Type : JPEG File Type Extension : jpg MIME Type : image/jpeg DCT Encode Version : 100 APP14 Flags 0 : (none) APP14 Flags 1 : (none) Color Transform : Unknown (RGB or CMYK) Image Width : 2048 Image Height : 1152 Encoding Process : Lossless, Huffman coding Bits Per Sample : 8 Color Components : 3 Y Cb Cr Sub Sampling : YCbCr4:4:4 (1 1) Image Size : 2048x1152 Megapixels : 2.4 ```
lonjil
2024-09-11 02:47:33
``` % du -sh * 181M originals 1.1G uncompressed 672M jpegll 385M jxld0e1 333M jxld0e2 319M jxld0e3 314M jxld0e4 186M jxld0.1e1 186M jxld0.1e2 175M jxld0.1e3 178M jxld0.1e4 205M jxld0.1e5 205M jxld0.1e6 207M jxld0.1e7 139M jxld0.2e1 139M jxld0.2e2 131M jxld0.2e3 133M jxld0.2e4 149M jxld0.2e5 149M jxld0.2e6 151M jxld0.2e7 ``` 35 photographs in each folder, mostly birds in a zoo and nature images (forest, ponds, streams, sky), but there are a couple of pictures of signs and random rocks too.
RaveSteel
spider-mario nor GIMP (same error, so presumably same decoder)
2024-09-11 02:48:42
I was able to open the resulting file in GIMP, may be due to OS differences though
lonjil
2024-09-11 02:51:12
so for my images, jxl d0 e1 gave a 43% reduction in file size over thorfdbg/libjpeg
_wb_
2024-09-11 04:14:05
yeah it is one of the worst lossless formats that exist — remember it was created end of the 1980s / early 1990s
JendaLinda
2024-09-11 05:03:20
I guess a fair comparison would be to LZW TIFF.
2024-09-11 05:06:17
Or patent-free alternatives based on RLE (TGA, PCX etc.)
spider-mario
2024-09-11 06:03:12
the later JPEG-LS might also be worth a try
RaveSteel
2024-09-11 06:15:23
Just did a short comparison for fun, lossless JPEG does indeed beat LZW compressed TIFF
2024-09-11 06:15:29
``` 2,1M losslesstest_e10.jxl 2,5M losslesstest_z9.webp 2,6M losslesstest_s0.avif 3,4M original.png 3,7M losslesstest.jp2 4,0M losslesstest.jpg 4,2M losslesstest_LZW.tif 6,4M losslesstest_RLE.tga 6,8M losslesstest.bmp 6,8M losslesstest.pnm ```
spider-mario
2024-09-11 06:22:00
when outputting from PTGui, I’ve always wondered whether to pick LZW or “PackBits” with TIFF
2024-09-11 06:22:04
maybe I should test them
_wb_
2024-09-11 06:30:56
PackBits is just RLE, LZW should be a bit better. Both are only useful for nonphoto.
spider-mario
2024-09-11 06:32:24
ah, good to know, thanks
2024-09-11 06:32:36
might at least be fast, I guess
2024-09-11 06:33:38
eh, not that much faster
2024-09-11 06:34:02
and yeah, 561 MB instead of 456 MB
2024-09-11 06:37:00
… it’s 418 MB as PPM
2024-09-11 06:37:04
presumably because of this: ``` Alpha: min: 0 (0) max: 65535 (1) mean: 65533.9 (0.999983) median: 65535 (1) standard deviation: 272.945 (0.00416488) kurtosis: 57643.5 skewness: -240.095 entropy: 0.000299361 ```
_wb_
2024-09-11 06:47:54
TIFF can do planar so for that alpha channel it could be useful to do some RLE 🙂
spider-mario
2024-09-11 06:49:42
``` -rw-r--r-- 1 Sami Aucun 362351930 11 sept. 20:42 Rechberggarten.png -rw-r--r-- 1 Sami Aucun 277367458 11 sept. 20:48 Rechberggarten-e1.jxl -rw-r--r-- 1 Sami Aucun 272951639 11 sept. 20:49 Rechberggarten-e2.jxl -rw-r--r-- 1 Sami Aucun 248467798 11 sept. 20:49 Rechberggarten-e3.jxl -rw-r--r-- 1 Sami Aucun 456215281 11 sept. 20:33 Rechberggarten-lzw.tif -rw-r--r-- 1 Sami Aucun 561300484 11 sept. 20:33 Rechberggarten-packbits.tif ```
2024-09-11 06:49:52
those are all with that alpha
2024-09-11 06:50:15
note: the png took over two minutes to create from the tiff
2024-09-11 06:50:24
compressing the png to jxl e3 took 15 seconds
2024-09-11 06:50:44
(the image is 12040×5784)
jonnyawsom3
2024-09-11 09:43:15
Reminds me of when I was compressing a gigapixel image. Was done in under 20 seconds but also used 12 GB of memory, so my computer was... *Unhappy*, for about an hour after while it slowly recovered the swapfile
JendaLinda
2024-09-11 11:13:27
JPEG at the time of its release was actually quite CPU heavy in comparison to other formats used back then.
Quackdoc
_wb_ (when moving the brightness slider below some point, it also starts lowering how bright HDR can go. It never gives you more than 4 stops of headroom)
2024-09-12 12:09:40
this is fine I suppose, I don't care how HDR an image wants to be, if im in a dark room, I don't want an image getting anywhere near 1000 nits let alone 1600. however you really should ideally have an individual total brightness control and a SDR brightness control like KDE.
RaveSteel
2024-09-12 12:18:45
https://github.com/xiph/opus/releases/tag/v1.5.2
2024-09-12 12:18:55
"Newly" released
2024-09-12 12:21:24
Let's see if the website's downloads will be updated
CrushedAsian255
_wb_ (when moving the brightness slider below some point, it also starts lowering how bright HDR can go. It never gives you more than 4 stops of headroom)
2024-09-12 12:30:03
so is it like this? red = sdr max blue = hdr max green = display max x = brightness setting y = output
_wb_
2024-09-12 04:54:36
Something like that, no idea what the actual curves are
CrushedAsian255
_wb_ Something like that, no idea what the actual curves are
2024-09-12 05:12:22
nor do i, oversimplification
2024-09-12 05:20:05
i personally wish there was a way to lower the HDR headroom so I still get some hdr benefits but don't blind myself at half brightness going up to 1600 nits
DZgas Ж
2024-09-12 04:23:34
-c:v libvpx-vp9 -g 600 -crf 35 -deadline realtime -row-mt 1 -cpu-used 8 -aq-mode 3 best way to maximum fast reencode 4k videos. For work (or upload on youtube) x264 bad quality, same speed (need more bitrate) x265 ultrafast 0.5x speed of vp9
Jyrki Alakuijala
_wb_ https://github.com/thorfdbg/libjpeg/blob/master/README#L102
2024-09-13 12:41:28
I don't like JPEG XT, I like Jpegli 🙂
jonnyawsom3
_wb_ I can see the usefulness of the gain maps approach from the interop / web delivery point of view: if you want to send a single image that will work in legacy software and looks OK in SDR, while also allowing an enhancement when viewed in updated software and on an HDR display, it's a reasonable thing to do. The main problem I see with these "graceful degradation" approaches though is that you'll end up wasting bytes on the enhancement while most end-users will just get the degraded experience and not even know their software needs updating — the image will load, it will look OK, just it will look like an SDR image that is not very well compressed. I don't really see the usefulness of the gain maps approach as a capture format though. To me it makes more sense to capture in full HDR, and then you can generate SDR versions, SDR+gainmap versions, or lower fidelity HDR versions from that master image, depending on what is needed.
2024-09-13 02:17:25
Seeing the [question](https://discord.com/channels/794206087879852103/848189884614705192/1284152529747312661) in <#848189884614705192> after the massive discussion the other day makes me feel bad for him having to type it out again
RaveSteel
2024-09-13 02:23:52
Seeing that it has been asked multiple times, it should probably be added to <#822120855449894942> ?
jonnyawsom3
2024-09-13 02:27:09
I'm not sure how many actually read or see that, maybe on the new website
DZgas Ж
2024-09-13 11:39:22
svt-av1 by default (and in all ffmpeg builds) compiles without AVX512, although many optimizations are written in the source code. When compiling, it is necessary to add -DENABLE_AVX512=ON otherwise the AVX2 will be compiled as maximum. Svt[info]: [asm level on system : up to avx512] Svt[info]: [asm level selected : up to avx512] 👍
BabylonAS
2024-09-14 07:18:41
Does the jpegli encoder allow some sort of lossless optimization of existing JPEG files?
_wb_
2024-09-14 07:24:42
there's not really much more to do than what the existing `jpegtran` tools can already do. Besides optimizing the huffman tables, the only thing you can do is try different progressive scan scripts.
jonnyawsom3
2024-09-14 07:25:14
Might be worth a look for more details https://github.com/google/jpegli/issues/10
BabylonAS
_wb_ there's not really much more to do than what the existing `jpegtran` tools can already do. Besides optimizing the huffman tables, the only thing you can do is try different progressive scan scripts.
2024-09-14 07:41:32
Which JPEG optimization tool would you recommend?
_wb_
2024-09-14 08:30:40
I guess the jpegtran from mozjpeg should be good?
jonnyawsom3
2024-09-14 08:51:08
I use https://github.com/fhanau/Efficient-Compression-Tool
_wb_
2024-09-15 01:32:11
looks like Safari treats HDR PNG/AVIF images with CICP correctly (that is, it tone maps them to SDR), but not PNG/AVIF images without CICP but with an ICC profile that has a CICP tag , where it shows something near-black
AccessViolation_
2024-09-17 10:13:04
I think I just found a something pretending to be a PNG file, which was actually a TIFF file, using JPEG encoding, either in a PNG container or with a PNG file extension (???)
CrushedAsian255
2024-09-17 10:14:05
Could have been a JNG
AccessViolation_
2024-09-17 10:14:14
Imagine my confusion when I tried to convert a PNG file and it said `Must not set non-zero distance in combination with --lossless_jpeg=1, which is set by default.`
2024-09-17 10:14:54
`IMG_2151.png: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=1, orientation=upper-left], baseline, precision 8, 3000x2000, components 3`
CrushedAsian255
2024-09-17 10:15:31
It’s just a JPEG renamed as PNG
2024-09-17 10:15:48
The “TIFF” there is talking about the Exif metadata structure
AccessViolation_
2024-09-17 10:16:02
Ohh
CrushedAsian255
2024-09-17 10:16:30
You can treat it the same as any other JPEG
AccessViolation_
2024-09-17 10:16:44
It's digital art, I'm guessing it was direct output from some program
CrushedAsian255
AccessViolation_ Imagine my confusion when I tried to convert a PNG file and it said `Must not set non-zero distance in combination with --lossless_jpeg=1, which is set by default.`
2024-09-17 10:17:14
How are JPEGs lossless?
2024-09-17 10:17:44
Oh, JXL lossless transcoding
AccessViolation_
2024-09-17 10:17:49
Yeah
2024-09-17 10:19:47
Lol I wonder if this is just a case of "pepsi tastes better if you tell people it's coca cola" but with jpeg and png instead. Better perceived quality if you trick people into thinking it's a png? <:galaxybrain:821831336372338729>
CrushedAsian255
2024-09-17 10:23:00
PNG and JPEG taste the same to me
2024-09-17 10:23:11
<:JPEG_XL:805860709039865937> 😋
2024-09-17 10:23:27
<:pancakexl:1283670260209156128>
jonnyawsom3
2024-09-17 10:31:31
Probably someone exporting it and calling it a png thinking that would change the encoding
frep
AccessViolation_ Lol I wonder if this is just a case of "pepsi tastes better if you tell people it's coca cola" but with jpeg and png instead. Better perceived quality if you trick people into thinking it's a png? <:galaxybrain:821831336372338729>
2024-09-17 10:04:48
paint.net has this weird thing where the export dialog does not care what extension you use, the codec dropdown dictates the file contents. the default is JPEG output iirc, so you'll instinctively name the output file with ".png", but oh well, you actually just put a jpeg in a png-themed giftwrap box
2024-09-17 10:05:19
it used to get me 8 years ago, it got me when i started using it again a month ago, and it's probably gonna get me in the future
CrushedAsian255
2024-09-18 08:54:31
I’m thinking about trying to use ProRes as an image format, like as a competitor to AVIF but for higher quality targets, what’s the best way to test visual quality currently?
spider-mario
2024-09-18 09:05:46
looking at the images
HCrikki
2024-09-18 09:14:26
afaik ProRes works only for video/animation. Did you mean ProRaw ?
2024-09-18 09:17:21
ProRes uses a number of codecs so you can directly compare the result they give. highest compatibility is oldschool JPEG, high efficiency HEIF (h265-based single frame) and now either lossy or lossless JPEGXL
2024-09-18 09:21:20
ProRaw is consistently 10x bigger than jpeg/heif so if your workflow requires minimizing loss, perhaps EXR could suit you better (its basically PNG but better, well supported in the film industry)
CrushedAsian255
HCrikki afaik ProRes works only for video/animation. Did you mean ProRaw ?
2024-09-18 09:22:49
ProRes is mezzanine so each frame is individually stored, like WebP lossy or AVIF
2024-09-18 09:23:41
You can tell ffmpeg to save a single frame with no container
2024-09-18 09:24:09
The format has a simple header in each frame
Quackdoc
CrushedAsian255 I’m thinking about trying to use ProRes as an image format, like as a competitor to AVIF but for higher quality targets, what’s the best way to test visual quality currently?
2024-09-18 09:40:44
That sounds absolutely horrid. Try dnxhd and cineform too
2024-09-18 09:40:47
xD
HCrikki
2024-09-18 09:40:48
your reference for comparing would be the original image or a lossless export for your highest quality target (png or jxl if you exceed its limits)
2024-09-18 09:41:41
i personally diff images and normalize versions at the same factor, massively amplifies differences that wouldve otherwise been almost imperceptible
Quackdoc
HCrikki ProRaw is consistently 10x bigger than jpeg/heif so if your workflow requires minimizing loss, perhaps EXR could suit you better (its basically PNG but better, well supported in the film industry)
2024-09-18 09:57:07
>Basically PNG I could not imagine insulting EXR this hard. EXR is the furthest thing from PNG. It does lossless. It does loss. It has associated alpha. It does not truncate out of scope data. It's extremely fast to use. It has one single, well-documented library that nobody else cares to re-implement because it actually just fucking works. It does not require hacks to support proper colourimetry data.
2024-09-18 09:57:14
It's basically TIFF, but good.
2024-09-18 09:57:46
Also, EXR can store a more than just raster data.
CrushedAsian255
2024-09-18 10:00:38
yeah, it just sounds like TIFF if it was designed with interop in mind
Quackdoc
CrushedAsian255 yeah, it just sounds like TIFF if it was designed with interop in mind
2024-09-18 10:04:18
Yep, EXR is literally what came of every single professional usecase that deals with picture or still imagery data, needed a high fidelity interchange format got together designed one format and said, hey, you're good for a long time.
Demiurge
_wb_ there's not really much more to do than what the existing `jpegtran` tools can already do. Besides optimizing the huffman tables, the only thing you can do is try different progressive scan scripts.
2024-09-19 09:30:08
https://github.com/MegaByte/jpegultrascan
2024-09-19 09:30:32
for trying different progressive scan scripts
2024-09-19 09:37:17
I wish libjxl had a "lossy jpeg" mode similar to the lossless mode, that never ever results in a larger file
jonnyawsom3
2024-09-19 10:32:39
So lossy jpeg transcoding
CrushedAsian255
2024-09-19 11:56:19
does it sometimes make it bigger?
HCrikki
2024-09-20 12:19:58
pick a very small distance (ie 0.1 or even lower, or q99 since people mistakenly assume things work like with jpeg) and it *can* make lossy output even several times larger than lossless. just tried with a spritesheet (transparency, lots of repeat patterns)
CrushedAsian255
2024-09-20 12:21:56
i thought we were talking jpeg to jxl transcoding
HCrikki
2024-09-20 12:22:06
issue is nonsense selection of parameters by user. only way to guarantee a jxl is smaller than a jpg is reconstructible transcoding
CrushedAsian255
2024-09-20 12:22:54
so convert from PNG -> JPG -> JXL?
HCrikki
CrushedAsian255 i thought we were talking jpeg to jxl transcoding
2024-09-20 12:23:33
same situation. only lossless transcode guarantees smaller size without degradation, full lossless reencode can multiply filesize (same for jxl as avif and webp, thats how it works unless you sacrifice even more quality lossily until it fits target filesize)
jonnyawsom3
2024-09-20 12:44:46
I think you're just confusing them. Right now the transcode is lossless, so you get 20% smaller. I assume Pashi means a lossy transcode option, that uses the same techniques but does extra quantization, ect so that filesize doesn't bloat
CrushedAsian255
2024-09-20 12:45:28
with 20% lower, why would it bloat?
lonjil
CrushedAsian255 with 20% lower, why would it bloat?
2024-09-20 12:49:18
that's lossless transcode, which takes the same DCT coefficients and simply does better entropy coding with them. if you decode to pixels and recompress, you get further loss, but you don't necessarily get a smaller file. the distortions from the original jpeg would be compounded by new distortions. what pashifox is asking for is a mode where libjxl would take the DCT coefficients and do additional quantization to them to reduce the file size. the file would be smaller and the quality reduction highly controllable.
DZgas Ж
2024-09-20 01:26:01
an interesting observation is that the difference in the real encoding speed is SVT-AV1 (av1) on my ryzen 5 7600, with multithreading enabled, with frequency "acceleration" to the limit of the board, and a temperature limit of 85 degrees, as well as overclocked memory up to (in my case) EXPO 5200. Gives an encoding speed of x0.181 While acceleration is completely disabled, completely, multithreading disabled, and CPU without frequency boost at all, and memory with just JEDEC 4800. The processor temperature is 41 degrees and its fan completely silent, gives a speed of x0.142
frep
DZgas Ж an interesting observation is that the difference in the real encoding speed is SVT-AV1 (av1) on my ryzen 5 7600, with multithreading enabled, with frequency "acceleration" to the limit of the board, and a temperature limit of 85 degrees, as well as overclocked memory up to (in my case) EXPO 5200. Gives an encoding speed of x0.181 While acceleration is completely disabled, completely, multithreading disabled, and CPU without frequency boost at all, and memory with just JEDEC 4800. The processor temperature is 41 degrees and its fan completely silent, gives a speed of x0.142
2024-09-20 11:23:57
what res/bitrate/preset?
2024-09-20 11:25:18
regardless, you've just made an observation most programmers have already thought over
2024-09-20 11:26:01
the software speed problem is just that, a problem with *software*. computers today are plenty fast, software is just not built in a way to maximize speed
A homosapien
2024-09-20 11:27:51
It still boggles my mind that any modern software is *still* single threaded
frep
2024-09-20 11:28:48
Good thing SVT means Scalable Video Technology, and that it has very fast (but blocky) presets
CrushedAsian255
2024-09-20 11:28:52
some things have to be single threeaded
2024-09-20 11:29:04
but most things can easily be multi threaded, programmers are just lazy
frep
2024-09-20 11:30:21
adding naive but relatively correct multithreading to a program that can benefit from it is a cheap speed boost
CrushedAsian255
2024-09-20 11:31:27
doesn't have to be amazing, but anything is usually better than nothign
A homosapien
2024-09-20 11:31:40
Ah yes, another """performant""" algorithm using only 1/12th of my computer's processing power
CrushedAsian255
2024-09-20 11:32:05
1/14th in my case
2024-09-20 11:32:17
imagine the people with threadrippers
A homosapien
2024-09-20 11:32:38
1/128th 😭
frep
CrushedAsian255 imagine the people with threadrippers
2024-09-20 11:32:45
they open 15 programs at startup to justify their purchase 😆
2024-09-20 11:33:35
most "common" software has multithreading today, but there's still a surprising amount that don't
2024-09-20 11:34:10
electron programs get multithreaded rendering for free :^)
lonjil
2024-09-20 11:34:20
someone needs to make a CPU with like, 8 to 16 "big" cores, and like 64 small cores for background processes
A homosapien
2024-09-20 11:35:25
And then the scheduler puts all of the intensive tasks on the little cores 😭
frep
2024-09-20 11:35:44
xD god
CrushedAsian255
2024-09-20 11:40:24
so like P and E cores?
2024-09-20 11:40:31
but with a ton of E-cores
A homosapien
2024-09-20 11:41:56
Yeah
CrushedAsian255
2024-09-20 11:42:24
sounds like something apple would do on ower core devices
A homosapien
2024-09-20 11:43:16
Mobile phones have had a P & E core system for a while now