|
_wb_
|
2023-01-03 02:35:09
|
The fast palette detection code from e1 could be generalized a bit and used at the slower settings too
|
|
2023-01-03 02:37:26
|
The big difference between e2/3 and e4+ is that e2/3 use fixed MA trees while e4+ uses MA tree learning.
|
|
2023-01-03 02:38:59
|
Probably doing either some simpler kind of MA tree learning, or trying a few fixed trees and picking the best could give better speed/density trade-offs
|
|
|
|
afed
|
2023-01-03 02:39:42
|
so it's
`e4+: try both ClampedGradient and Weighted predictor, try global palette` and `MA tree learning`
|
|
|
_wb_
|
2023-01-03 02:41:40
|
Yes. e1 is no tree (technically it's a single-node tree), e2/3 is a fixed tree, and at e4 the tree learning algorithm starts getting used (with the number of decision node properties considered growing as effort grows)
|
|
2023-01-03 02:42:36
|
Also: e1 is huffman, e2+ is ANS. For fast encoding, huffman is better...
|
|
|
|
afed
|
|
_wb_
Select is probably a good predictor for nonphoto
|
|
2023-01-03 03:58:02
|
then why is this
`e4+: try both ClampedGradient and Weighted predictor, try global palette`
and not
`Select and Weighted predictor` (best nonphoto + best photo)
because ClampedGradient is faster?
|
|
|
_wb_
|
2023-01-03 04:04:09
|
ClampedGradient is also quite good for nonphoto
|
|
2023-01-03 04:04:24
|
Select is better for pixel art, I think
|
|
|
|
veluca
|
2023-01-03 04:04:45
|
(you're making me want to try a fjxl-with-select xD)
|
|
|
_wb_
|
2023-01-03 04:05:39
|
Select is similar to png's Paeth
|
|
|
|
veluca
|
2023-01-03 04:05:44
|
(actually, choosing the best of the two should be relatively fast, no?)
|
|
|
_wb_
|
2023-01-03 04:06:27
|
AvgW+N should also be quite good for photo, I think in png it is often the best one for photo
|
|
2023-01-03 04:06:49
|
(weighed is better but also much more complicated)
|
|
|
|
veluca
|
2023-01-03 04:07:41
|
maybe I should just quickly hack together a non-fast fjxl with select, clampedgradient, avgw+n and maybe some more and see if I can find a pareto optimal set of choices
|
|
2023-01-03 04:08:07
|
(although I suspect clampedgradient > avgw+n)
|
|
|
|
afed
|
2023-01-03 04:12:01
|
what does cwebp -z 0 use?
https://pbs.twimg.com/media/FHHLNbMWQAIzXAU?format=jpg&name=large
|
|
|
|
veluca
|
2023-01-03 04:22:16
|
so on a random rle-friendly nonphoto image select does almost exactly as well as clampedgradient
|
|
2023-01-03 04:22:31
|
does anybody have images that they'd think select would be useful for?
|
|
2023-01-03 04:23:19
|
<@794205442175402004> I guess
|
|
|
_wb_
|
2023-01-03 04:27:56
|
Any pixel art, I would expect. Especially if it has been NN upsampled
|
|
|
|
afed
|
2023-01-03 04:37:03
|
some big pixel art?
|
|
|
_wb_
|
2023-01-03 04:41:47
|
That fox has weird edges
|
|
|
|
afed
|
2023-01-03 04:44:02
|
yeah, and bad alpha cutting
|
|
|
|
veluca
|
|
afed
some big pixel art?
|
|
2023-01-03 05:02:06
|
I'm trying the first one of those, it's maybe a 1% difference xD
|
|
2023-01-03 05:03:21
|
fox: 0.330bpp clampedgradient -> 0.317bpp select
|
|
2023-01-03 05:03:25
|
so that's a bit more
|
|
|
|
afed
|
2023-01-03 05:03:44
|
maybe for fast modes it doesn't have much effect <:FeelsSadMan:808221433243107338>
|
|
|
|
veluca
|
2023-01-03 05:04:55
|
-e 2 is 0.211, -e 4 is 0.1
|
|
2023-01-03 05:05:10
|
I wonder what tree it is learning...
|
|
2023-01-03 05:13:03
|
ah, the tree is not it, it's just doing good lz77
|
|
|
|
afed
|
2023-01-03 05:15:12
|
lz77 is also different for these modes?
|
|
|
|
veluca
|
2023-01-03 05:53:41
|
e4 does lz77, e1 doesn't
|
|
|
|
afed
|
2023-01-03 06:05:44
|
I mean e2+
also does it make sense to use simpler png-like filters, or can they only be faster (and choosing the best one will be slower), but not better?
|
|
|
|
veluca
|
2023-01-03 06:09:51
|
I think e2 and e3 also don't lz77
|
|
2023-01-03 06:10:13
|
clampedgradient is not significantly slower than png filters so...
|
|
|
_wb_
|
2023-01-03 06:41:57
|
All predictors are cheap except Weighed
|
|
2023-01-03 06:42:43
|
AvgAll is maybe a bit more work than the rest of the simple ones
|
|
|
|
afed
|
2023-01-04 12:33:42
|
on this e1 is about 2x better than e2
because good for rle?
|
|
2023-01-04 12:57:40
|
though, something weird
cjxl latest build with this pr <https://github.com/libjxl/libjxl/pull/2024>
|
|
2023-01-04 01:50:51
|
something different for processing palette images for cjxl and fast_lossless?
```png:IHDR.bit-depth-orig: 4
png:IHDR.bit_depth: 4
png:IHDR.color-type-orig: 3
png:IHDR.color_type: 3 (Indexed)
png:IHDR.interlace_method: 0 (Not interlaced)
png:IHDR.width,height: 1920, 960
png:PLTE.number_colors: 15```
|
|
|
Traneptora
|
|
afed
something different for processing palette images for cjxl and fast_lossless?
```png:IHDR.bit-depth-orig: 4
png:IHDR.bit_depth: 4
png:IHDR.color-type-orig: 3
png:IHDR.color_type: 3 (Indexed)
png:IHDR.interlace_method: 0 (Not interlaced)
png:IHDR.width,height: 1920, 960
png:PLTE.number_colors: 15```
|
|
2023-01-04 02:05:43
|
how are you calling cjxl?
|
|
2023-01-04 02:07:35
|
it's possible that fjxl read the palette and preserved it with a palette transform and cjxl -e 1 is not
|
|
|
|
afed
|
2023-01-04 02:13:40
|
as usual `cjxl -q 100 -e 1 ...`
|
|
2023-01-04 02:18:51
|
maybe it's libpng vs lodepng?
don't remember what cjxl uses by default
|
|
2023-01-04 02:24:11
|
yeah, cjxl uses libpng and fjxl uses lodepng
|
|
2023-01-04 02:43:46
|
and yeah, similar results for all other palette pngs
|
|
2023-01-04 03:49:43
|
when converted to ppm the fjxl results become worse, similar to -e 1, so needs some palette checks, because this is a very big compression loss, 2-2.5x worse on average
for -e 4 the sizes are almost similar for ppm and png
|
|
|
_wb_
|
2023-01-04 05:06:39
|
Is the fjxl one actually lossless? Maybe it got confused by the bit_depth 4....
|
|
|
|
afed
|
2023-01-04 05:11:29
|
yes, it's lossless
|
|
|
|
veluca
|
2023-01-04 01:08:12
|
mhhh weird
|
|
|
_wb_
|
2023-01-04 01:11:05
|
Do fjxl and cjxl -e 1 use the same fast-lossless effort?
|
|
|
|
veluca
|
2023-01-04 01:18:34
|
they ought to
|
|
|
_wb_
|
2023-01-04 01:37:06
|
Ah, I think palette detection depends on whether input is given as RGB vs RGBA
|
|
|
|
afed
|
2023-01-04 03:09:43
|
so, cjxl accepts everything as RGBA?
|
|
|
_wb_
|
2023-01-04 04:23:41
|
No, fjxl does, I think.
|
|
|
|
veluca
|
|
_wb_
No, fjxl does, I think.
|
|
2023-01-04 04:24:08
|
only if input is PNG
|
|
|
_wb_
|
2023-01-04 04:28:21
|
https://github.com/libjxl/libjxl/blob/main/lib/jxl/enc_fast_lossless.cc#L3478
|
|
2023-01-04 04:29:25
|
It only does palette detection when input is 8-bit rgba (so it can just use uint32 per pixel)
|
|
|
|
afed
|
2023-01-04 04:31:40
|
I think it's needed for all inputs, because the difference is pretty big
image from the qoi set
|
|
2023-01-04 04:44:11
|
and if the same image as ppm
|
|
|
_wb_
|
2023-01-04 04:46:47
|
Yeah palette can make a pretty big difference...
|
|
|
|
afed
|
2023-01-04 06:24:48
|
perhaps cjxl e2 would also be better with this palette detection
|
|
|
_wb_
|
2023-01-06 04:15:19
|
https://twitter.com/juliangough/status/1611031552472793089?t=JfdOz4XNlqSXGaVKc_mjSQ&s=19 I am very happy that Chrome didn't use this strategy to block jxl. There is basically no way to do anything when lawyers say something ambiguous or say nothing at all, that can put anything in "legal limbo" where nothing at all can be done.
|
|
2023-01-06 04:29:17
|
That's how these 'transfer of copyright' contracts often work. They have to put some number there. If you sign, they likely won't even bother to actually pay that 1 dollar (or pound or whatever).
|
|
|
yurume
|
2023-01-06 05:16:35
|
to be accurate, the actual commission was 20k EUR, but this didn't actually cover the copyright assignment (as they never fully signed the contract)
|
|
2023-01-06 05:18:54
|
so legally speaking, Gough can't retract one's piece from Minecraft (as the commission was paid) but can put the work into the public domain
|
|
2023-01-06 05:19:07
|
which was what Gough has done
|
|
2023-01-06 05:20:15
|
the overwhelming majority in HN thought this end poem is only a very small part of the game, which is true (I never saw it by myself, for the record, because I never got into the ender dragon battle...), but that's not the point
|
|
2023-01-06 05:21:31
|
no matter whether Gough is an attention seeker or not (in some sense, one is), the situation is quite disheartening
|
|
|
Fox Wizard
|
2023-01-06 07:49:29
|
That moment when e 10 fails after a few hours <:Cheems:884736660707901470>
|
|
|
|
veluca
|
|
Fox Wizard
That moment when e 10 fails after a few hours <:Cheems:884736660707901470>
|
|
2023-01-06 09:05:53
|
ehhhh
|
|
|
Fox Wizard
|
2023-01-06 09:12:00
|
No idea what caused the crash though. The image was only 1920x1080 and I have 32GB RAM, so doubt it didn't have enough RAM
|
|
2023-01-06 09:12:15
|
After an hour it was only using 4GB - 5GB
|
|
|
Traneptora
|
2023-01-06 02:17:08
|
it can't be free because then the contract is not legally enforceable, so it's essentially a placeholder value
|
|
2023-01-06 02:46:46
|
👍
|
|
|
|
afed
|
2023-01-06 04:09:58
|
https://youtu.be/oba_Y9fNeFg
|
|
2023-01-06 04:10:20
|
<:KekDog:805390049033191445>
|
|
|
Demiurge
|
2023-01-06 06:04:58
|
native decoder or libjxl?
|
|
|
username
|
2023-01-06 06:05:26
|
libjxl i'm pretty sure
|
|
2023-01-06 06:05:49
|
also why does it say JPEG-XL "decoding" they let you encode jxl files
|
|
|
Demiurge
|
2023-01-06 06:05:50
|
I think so too, otherwise they would probably say native
|
|
|
|
afed
|
|
joppuyo
this is more related to video than photos but does anyone know what's the difference between 60 fps video and 59.94 fps video in practice, when talking about digital? I know the 59.94 fps comes from some weird analog quirk but you still see this in many digital video files, same with 29.97 fps and 23.98 when compared to 30 fps and 24 fps respectively.
|
|
2023-01-06 06:14:43
|
related to the fractional frames discussion
https://youtu.be/RDHgSbmJvjs
|
|
|
Fraetor
|
2023-01-06 11:22:36
|
Are video decoders just really fast? A quick and dirty djxl reports 110 MP/s on my laptop (8 core Ryzen 7 PRO 6850U), but a 4K60 video would require 498 MP/s to decode. And an 8K60 requires nearly 2000 MP/s. Am I missing something?
|
|
|
_wb_
|
2023-01-06 11:31:17
|
Well hw decode is of course very fast, but also for sw decode: it helps that they typically use yuv420 (so only half the pixel data compared to 444), and that quality is typically quite low so there isn't a lot of entropy decoding needed (compared to doing intra only at high quality)
|
|
|
BlueSwordM
|
|
Fraetor
Are video decoders just really fast? A quick and dirty djxl reports 110 MP/s on my laptop (8 core Ryzen 7 PRO 6850U), but a 4K60 video would require 498 MP/s to decode. And an 8K60 requires nearly 2000 MP/s. Am I missing something?
|
|
2023-01-07 03:10:10
|
Yes: that 4k60 video is 4:2:0 <:YEP:808828808127971399>
|
|
|
Demiurge
|
2023-01-07 01:06:30
|
That makes sense and also partially explains why video based codecs get faster at lower qualities.
|
|
|
_wb_
|
2023-01-07 01:19:22
|
Also jpeg is faster at lower quality. Basically the transforms have the same cost regardless of quality, but entropy coding cost is more or less proportional to compressed filesize.
|
|
2023-01-07 01:27:27
|
In jxl the effect is less pronounced, I think because 1) higher quality uses more small blocks, which is slightly cheaper than big blocks, 2) lower quality uses more epf iterations, which is slower to decode, 3) entropy decode in jxl is less dependant on quality thanks to hybriduint, which uses more raw bits at higher quality.
|
|
|
|
veluca
|
2023-01-07 01:30:02
|
I don't think the effect of 3 is particularly pronounced
|
|
2023-01-07 01:30:09
|
Of 2 OTOH absolutely yes
|
|
2023-01-07 01:30:36
|
In fact, I believe if you disable restoration filters then JXL also becomes significantly faster at lower qualities
|
|
|
fab
|
2023-01-07 02:32:04
|
Video codec if you watch the video in vertical you get ugly distorted video
|
|
2023-01-07 02:32:37
|
Especially using AV1 and open source codecs
|
|
|
_wb_
|
|
veluca
In fact, I believe if you disable restoration filters then JXL also becomes significantly faster at lower qualities
|
|
2023-01-07 03:13:29
|
EPF is decoder-only though, right? Encode side it doesn't affect speed...
|
|
|
|
veluca
|
2023-01-07 03:13:38
|
Correct
|
|
|
joppuyo
|
|
afed
related to the fractional frames discussion
https://youtu.be/RDHgSbmJvjs
|
|
2023-01-07 03:24:50
|
ooh, thank you. I will have to give this a try
|
|
|
Traneptora
|
|
Demiurge
native decoder or libjxl?
|
|
2023-01-07 04:07:16
|
libjxl-based
|
|
2023-01-07 04:07:33
|
native decoder is something on Lynne's todo list but she's still busy and hasn't gotten around to it
|
|
|
username
also why does it say JPEG-XL "decoding" they let you encode jxl files
|
|
2023-01-07 04:08:34
|
you'd have to blame jb ig, since encode via libjxl is also supported
|
|
|
|
afed
|
2023-01-07 04:23:25
|
also JPEG-XL, not JPEG XL, needs some sort of FAQ, with correct and incorrect naming/spelling
|
|
|
Demiurge
|
2023-01-07 05:39:32
|
If ffmpeg makes a native decoder I'm sure everyone will start using it instead of libjxl, like how everyone uses dav1d
|
|
2023-01-07 05:40:15
|
And I'm sure it will have such ludicrously blazing fast performance that "hardware support" will sound even more like a joke than the running gag it already is
|
|
|
|
afed
|
2023-01-07 06:10:22
|
only if it will be better, ffmpeg has its own encoders/decoders which are worse than external ones and which are only used when needed less extra dependencies or for some other reason when external ones have not been linked
dav1d is some independent open source decoder, but it is not an ffmpeg decoder, though supported and sponsored by VideoLAN (who are now leading ffmpeg development?)
|
|
|
Traneptora
|
|
afed
only if it will be better, ffmpeg has its own encoders/decoders which are worse than external ones and which are only used when needed less extra dependencies or for some other reason when external ones have not been linked
dav1d is some independent open source decoder, but it is not an ffmpeg decoder, though supported and sponsored by VideoLAN (who are now leading ffmpeg development?)
|
|
2023-01-07 06:27:49
|
videolan are not leading FFmpeg development
and usually the internal decoders in FFmpeg are faster than the reference implementation, especially cause FFmpeg has the fastest DCT code on the planet right now
|
|
2023-01-07 06:28:16
|
typically FFmpeg relies on external libraries to do encoding, but usually uses internal decoders if present
|
|
|
|
afed
|
2023-01-07 06:37:05
|
yeah, I didn't mean all of them are worse, but that doesn't automatically make them better, especially encoders for non-exotic formats
for VideoLAN this is mostly a thought and a question, because judging from the presentation Jean-Baptiste Kempf seems to be making a lot of quite important decisions for ffmpeg development
|
|
|
BlueSwordM
|
|
afed
only if it will be better, ffmpeg has its own encoders/decoders which are worse than external ones and which are only used when needed less extra dependencies or for some other reason when external ones have not been linked
dav1d is some independent open source decoder, but it is not an ffmpeg decoder, though supported and sponsored by VideoLAN (who are now leading ffmpeg development?)
|
|
2023-01-07 06:39:30
|
Internal decoders aren't always faster than external ones.
For example, a recent development in libvpx-vp9 decoding has made it faster than ffvp9 in 8-bit decode.
|
|
|
Traneptora
|
2023-01-07 06:46:02
|
I hadn't heard about this, huh
|
|
|
|
afed
|
2023-01-07 06:46:30
|
also internal hevc decoder, but openhevc was faster (although now they have merged, if I am not confused), but ffh264 is still faster, for opus not sure, but the encoder is bad and etc.
maybe integrate fpnge as a fast ffmpeg png encoder? <:FeelsAmazingMan:808826295768449054>
then it would be more widely used
does ffmpeg even have an internal png encoder/decoder?
|
|
|
Traneptora
|
2023-01-07 06:46:57
|
yes it has an internal decoder and encoder for png and for apng
|
|
2023-01-07 06:47:25
|
opus encoder is experimental, they recommend you use the libopus wrapper, and you can't use teh internal one without explicitly turning on experimental flag
|
|
|
_wb_
|
2023-01-07 06:53:36
|
If there's another encoder/decoder for jxl that is doing something better/faster than libjxl, we'll likely want to port that to libjxl 🙂
|
|
|
Traneptora
|
2023-01-07 06:55:29
|
FFmpeg is LGPLv2 for most of its internal stuff
|
|
2023-01-07 06:55:36
|
which could possibly be an issue
|
|
|
|
afed
|
2023-01-07 06:59:15
|
hmm, yeah, or maybe dual licensing
|
|
2023-01-07 07:09:59
|
I thought that ffmpeg uses libpng and libjpeg-turbo or something like that because everyone uses them, although I haven't really looked into this because I don't use ffmpeg for image manipulation more than as an intermediate for importing/exporting <:Thonk:805904896879493180>
|
|
|
_wb_
|
|
Traneptora
FFmpeg is LGPLv2 for most of its internal stuff
|
|
2023-01-07 07:14:11
|
In that case we would either need the author of that fragment of code to also contribute it to libjxl, or we need to reimplement the same thing with new code.
|
|
2023-01-07 07:14:47
|
Since libjxl has a BSD license which is more permissive than LGPL...
|
|
|
Traneptora
|
|
_wb_
In that case we would either need the author of that fragment of code to also contribute it to libjxl, or we need to reimplement the same thing with new code.
|
|
2023-01-07 07:15:19
|
it would depend on libavutil/tx for its DCT/FFT/etc. code, which is faster than libjxl's DCT code, and it would be written in pure C.
|
|
2023-01-07 07:15:25
|
also LGPL
|
|
2023-01-07 07:15:42
|
so it would be difficult to port over directly
|
|
2023-01-07 07:16:04
|
also FFmpeg tends not to support features like progressive decode (including for things like JPEG that can do it)
|
|
2023-01-07 07:16:14
|
it works on the frame-level for those sorts of things
|
|
2023-01-07 07:16:34
|
and won't have any kind of render pipeline
|
|
2023-01-07 07:16:49
|
so porting the code over without doing render pipeline would be possibly quite difficult
|
|
|
_wb_
|
2023-01-07 07:17:45
|
Yes, I agree
|
|
2023-01-07 07:19:38
|
If libavutil has a faster dct, we may want to use something like that in libjxl(-tiny)...
|
|
2023-01-07 07:20:42
|
I suppose it is faster because it's handwritten simd using integer arithmetic only?
|
|
|
BlueSwordM
|
|
_wb_
I suppose it is faster because it's handwritten simd using integer arithmetic only?
|
|
2023-01-07 10:14:32
|
Yes.
|
|
|
|
veluca
|
2023-01-07 11:27:30
|
we've been thinking of making integer-only decoding paths for a while, but that's significant work
|
|
|
Demiurge
|
|
_wb_
If there's another encoder/decoder for jxl that is doing something better/faster than libjxl, we'll likely want to port that to libjxl 🙂
|
|
2023-01-09 11:24:00
|
like being written from scratch in C and integrated into libavcodec?
|
|
|
veluca
we've been thinking of making integer-only decoding paths for a while, but that's significant work
|
|
2023-01-09 11:30:14
|
Aren't there any BSD licensed libraries that implement integer only dct?
|
|
|
|
veluca
|
2023-01-09 11:32:33
|
That would surprise me, but who knows
|
|
2023-01-09 11:32:49
|
Everyone tends to have a slightly different definition of integer dct...
|
|
|
DZgas Ж
|
2023-01-11 10:55:49
|
It's funky how recently I wanted to add QOI inside the libjxl decoder. And already now libjxl has fjxl which is faster and stronger than QOI
|
|
|
Jyrki Alakuijala
|
2023-01-11 11:08:23
|
fjxl is cool
|
|
|
spider-mario
|
2023-01-11 11:17:29
|
maybe djxl could use fpnge to write the decoded output
|
|
|
_wb_
|
2023-01-11 11:47:07
|
That would be a good idea. I'm already seeing people measure jxl decode time including the output writing, which is of course just bad benchmarking but with fpnge we could avoid it having too much impact.
|
|
2023-01-11 11:48:31
|
(just yesterday I saw someone claim jxl decodes slower than j2k, which was essentially because djxl is slower at encoding a png than the j2k decoder is at writing a bmp)
|
|
|
|
afed
|
2023-01-11 12:54:30
|
yeah, that would be cool
because djxl does not need a full png encoder like libpng, but fpnge at least needs animation support
and jpegli isn't already used for encoding/decoding?
not for speed though, but for quality
also is jpegli a completely separate codec for now or does jpegli+libjpxl together have a smaller binary size than using separately?
|
|
|
Kampidh
|
2023-01-11 02:10:47
|
had a quick build and gotta say fjxl is indeed amazing~
|
|
|
spider-mario
|
2023-01-12 04:16:05
|
> It’s worth noting video images require only eight bits of digital information compared to audio which requires twenty-four bits for full fidelity.
<:Thonk:805904896879493180> a very strange claim
|
|
|
Demiurge
|
2023-01-12 04:25:07
|
8 per channel you mean?
|
|
2023-01-12 04:25:41
|
also audio only requires about 16 bits for good dynamic range.
|
|
|
spider-mario
|
|
Demiurge
8 per channel you mean?
|
|
2023-01-12 04:26:33
|
to be clear, that quote is not from me
|
|
2023-01-12 04:26:51
|
that it’s 8 per component is indeed one of the problems with it
|
|
2023-01-12 04:28:07
|
also, it’s at least 10 for decent dynamic range even with non-linear encoding, and ideally with millions of samples per frame, of which there should be at the very least ~20 per second or ideally even more
|
|
|
improver
|
2023-01-12 04:47:11
|
it would be pretty cool if images were composed of adequate precision of sampling of all the frequencies actually involved in making colors appear as they are instead of results of 3 types of sensors per pixel but that's not really needed for us as receivers, though would probably aid non-human receivers with different cone configurations
|
|
2023-01-12 04:48:41
|
i suspect image format supporting such stuff would be only useful for astronomy purposes where they capture much wider range of frequencies and need to analyze it
|
|
2023-01-12 04:52:16
|
https://www.tandfonline.com/doi/abs/10.1080/00387010.2021.1931788?journalCode=lstl20 wow it's actually a thing
|
|
|
_wb_
|
2023-01-13 04:20:11
|
sigh, the ISOBMF spec disappeared from the page of publicly available specs, luckily you don't need it for jxl (we don't reference it normatively, we just copied the description of the box format and informatively say it's the same as in ISOBMF, since it's simple enough)
|
|
2023-01-13 04:20:47
|
there's still a copy here: https://mpeg.chiariglione.org/standards/mpeg-4/iso-base-media-file-format/text-isoiec-14496-12-5th-edition but that's not the most recent version
|
|
2023-01-13 04:21:39
|
really annoying how at ISO sometimes you can somehow get something to be publicly available, but then a new edition gets made and they remove the old one without making the new one publicly available too
|
|
2023-01-13 04:26:24
|
the full ISOBMF spec is over 200 pages, twice as long as the jxl spec, but we only really use the box structure itself, which is just half a page to describe, not all the stuff they have in ISOBMF to represent and reference multiple streams and mux them together
|
|
|
yurume
|
2023-01-13 04:44:01
|
I think that's actually better for everyone else, last time we had people thinking JPEG XL is possibly patent encumbered because ISOBMFF is, we only concern about the physical structure itself here so this hopefully reduces an overall misconception
|
|
|
_wb_
|
2023-01-13 04:51:03
|
I don't think ISOBMFF is patent-encumbered since generally 'containers' are not assumed to be patentable (though Nokia might disagree with that since they do claim patents on HEIF) and since it is quite old (the first version of mp4 is from 2001 and it was based on QuickTime which dates back to 1991), though of course there are still new editions being made so who knows what the patent status of that is. Just parsing the box format should be fine though — if there would be anything patent-encumbered, it would have to be related to the payload of boxes that have been defined more recently.
|
|
|
yurume
|
2023-01-13 05:25:44
|
I agree so much, but sometimes misconceptions can be only solved by irrational measures...
|
|
|
sklwmp
|
2023-01-15 06:41:28
|
I'm getting weird behavior with ffmpeg and yt-dlp (YouTube) downloaded videos exporting as libjxl (as I mentioned in <#806898911091753051>):
I downloaded Big Buck Bunny at 4K with AV1 encoding via yt-dlp and extracted one frame like so:
PNG: `ffmpeg -ss 03:28.367 -i bbb-yt.mp4 -frames:v 1 03-bbbyt-ffmpeg.png`
JXL: `ffmpeg -ss 03:28.367 -i bbb-yt.mp4 -frames:v 1 -distance 0 -effort 3 03-bbbyt-ffmpeg.jxl`
When I look at the extracted frames, however, the JXL looks washed out compared to the PNG, even after decoding with djxl, which I assume reads colors properly:
|
|
2023-01-15 06:42:37
|
(It's a bit hard to see at small sizes, you have to open the original file)
|
|
2023-01-15 06:42:56
|
Weirdly, imagemagick says that the two images are identical... what?
|
|
2023-01-15 06:45:57
|
For reference, here's the encoded JXL file from ffmpeg:
|
|
2023-01-15 06:46:35
|
I can't replicate this using avifenc-encoded AVIF files, nor by converting PNG images to JXL via ffmpeg.
|
|
2023-01-15 06:48:05
|
Okay, on Chrome they look identical, but on Firefox and Gwenview they are not.
|
|
2023-01-15 06:48:31
|
I think something's going wrong with the ICC color profiles somewhere...
|
|
|
sklwmp
Okay, on Chrome they look identical, but on Firefox and Gwenview they are not.
|
|
2023-01-15 07:02:51
|
The PNGs look identical, but the JXL still looks washed out...
|
|
2023-01-15 07:02:56
|
I'm so confused.
|
|
|
Kampidh
|
|
sklwmp
For reference, here's the encoded JXL file from ffmpeg:
|
|
2023-01-15 07:32:40
|
Oh, now the profile from JXL and PNG from djxl have a more reasonable trc/gamma: rec709.
While the PNG from ffmpeg didn't have ICC profile attached, and usually assumed as sRGB.
|
|
2023-01-15 07:34:46
|
And it seems like if you strip the ICC profile from JXL and PNG[djxl], results in a same pixel values as PNG[ffmpeg] one. Thus maybe why imagemagick says that two images are identical.
|
|
|
sklwmp
|
2023-01-15 07:41:13
|
Maybe something funky is going on with ffmpeg's libjxl integration.
|
|
2023-01-15 07:41:22
|
Also, what do you happen to use to inspect ICC profiles?
|
|
2023-01-15 07:44:22
|
Encoding the PNG[ffmpeg] file via cjxl results in an ICC profile of RGB_D65_SRG_Per_SRG, according to `magick -identify`.
For the JXL[ffmpeg] and PNG[djxl], magick reports an ICC of RGB_D65_SRG_Rel_709.
|
|
|
Kampidh
|
|
sklwmp
Also, what do you happen to use to inspect ICC profiles?
|
|
2023-01-15 07:47:02
|
for jxl, the `jxlinfo` is enough to give profile info if enum values is used rather than ICC:
```JPEG XL image, 3840x2160, (possibly) lossless, 8-bit RGB
Color space: RGB, D65, sRGB primaries, 709 transfer function, rendering intent: Relative```
|
|
|
sklwmp
|
2023-01-15 12:20:08
|
Okay, I've narrowed it down to this:
- FFmpeg recognizes AV1 YouTube videos as `av1 (Main), yuv420p(tv, bt709)`.
- When you encode a video in that format to JXL, ffmpeg reports encoding in `rgb24(pc, gbr/bt709/bt709, progressive)`.
- jxlinfo reports: `Color space: RGB, D65, sRGB primaries, 709 transfer function, rendering intent: Relative` (note the 709 transfer function)
- magick says ICC is: `RGB_D65_SRG_Rel_709`
- FFmpeg recognizes yuv420 8-bit avifenc output as `av1 (Main), yuv420p(pc, smpte170m/bt709/iec61966-2-1)`.
- When you encode that to JXL, ffmpeg reports `rgb24(pc, gbr/bt709/iec61966-2-1, progressive)`.
- jxlinfo reports `Color space: RGB, D65, sRGB primaries, sRGB transfer function, rendering intent: Relative`
- magick says ICC is: `RGB_D65_SRG_Rel_SRG`
|
|
2023-01-15 12:20:42
|
In short, AV1 YouTube encodes show this:
Source: `av1 (Main), yuv420p(tv, bt709)`
JXL: `gb24(pc, gbr/bt709/bt709, progressive)`
The output JXL then has a 709 transfer function.
|
|
2023-01-15 12:20:52
|
If you encode other files, you just get an sRGB transfer function.
|
|
2023-01-15 12:27:53
|
Seems that ffmpeg is, for some inexplicable reason, *sometimes* encoding a JXL file as sRGB, but with Rec.709 transfer functions??
|
|
|
w
|
2023-01-15 12:58:20
|
what if you compare it to the avif
|
|
2023-01-15 12:59:30
|
because video is video, i'd say keeping the bt709 trc is correct
|
|
2023-01-15 01:04:32
|
video is video... can it even be compared when bt 1886 is a thing
|
|
|
sklwmp
|
2023-01-15 01:21:47
|
aight i had to do some reading on Rec 709 and things, and yeah, you're probably right about that, the 709 transfer function should be correct
|
|
|
w
video is video... can it even be compared when bt 1886 is a thing
|
|
2023-01-15 01:22:00
|
but, what do you mean by this?
|
|
|
w
|
2023-01-15 01:24:52
|
how video in sdr is displayed always *depends*
|
|
|
sklwmp
|
2023-01-15 01:35:15
|
seems like Chrome and Firefox handle ICC profiles differently, as well as mpv
|
|
2023-01-15 01:35:37
|
for mpv, it's displaying both the keyframe copied AVIF and the JXL with BT.1886
|
|
2023-01-15 01:36:41
|
Chrome shows the AVIF similarly to mpv, so it might be using the same
|
|
2023-01-15 01:36:55
|
But for Firefox, it shows the AVIF as more washed out
|
|
2023-01-15 01:38:10
|
Here's a keyframe copied `-noaccurate_seek -ss [time] -c:v copy` AVIF
|
|
2023-01-15 01:38:30
|
Okay, that's annoying, Discord shows an AVIF preview when uploading but doesn't show anything on embed.
|
|
2023-01-15 01:54:07
|
It seems that the JXL is being rendered "correctly" using the inverse 709 transfer function, instead of BT.1886.
|
|
|
Kampidh
|
2023-01-15 05:02:05
|
IIRC firefox (nightly) doesn't color manage JXL yet, and rendered as default sRGB instead.
|
|
|
daniilmaks
|
|
sklwmp
Okay, that's annoying, Discord shows an AVIF preview when uploading but doesn't show anything on embed.
|
|
2023-01-15 05:37:19
|
just discord being discord
|
|
|
_wb_
|
2023-01-16 12:54:26
|
One of the JPEG projects will be discussing a document called "Proposed updates to the proposed draft call for proposals"
|
|
2023-01-16 12:54:47
|
Committees are fun
|
|
|
Traneptora
|
|
sklwmp
I'm getting weird behavior with ffmpeg and yt-dlp (YouTube) downloaded videos exporting as libjxl (as I mentioned in <#806898911091753051>):
I downloaded Big Buck Bunny at 4K with AV1 encoding via yt-dlp and extracted one frame like so:
PNG: `ffmpeg -ss 03:28.367 -i bbb-yt.mp4 -frames:v 1 03-bbbyt-ffmpeg.png`
JXL: `ffmpeg -ss 03:28.367 -i bbb-yt.mp4 -frames:v 1 -distance 0 -effort 3 03-bbbyt-ffmpeg.jxl`
When I look at the extracted frames, however, the JXL looks washed out compared to the PNG, even after decoding with djxl, which I assume reads colors properly:
|
|
2023-01-16 02:14:11
|
looks like a range issue
|
|
2023-01-16 02:14:50
|
FFmpeg reports a warning if you try to pass a partial range input to its libjxl encoder but it will encode it, but assume it's a full range
|
|
2023-01-16 02:17:42
|
update: it looks like FFmpeg isn't changing the pixels and just using BT.709
|
|
2023-01-16 02:17:50
|
which is correct
|
|
|
sklwmp
Okay, on Chrome they look identical, but on Firefox and Gwenview they are not.
|
|
2023-01-16 02:22:12
|
looks like a bug with ffmpeg's png encoder. it's taking BT.709 video and not tagging it at all, which is causing most viewers to assume it's sRGB colors, which it is not.
|
|
2023-01-16 02:22:53
|
the `03-11-bbbyt.png` file doesn't have any color tags
|
|
2023-01-16 02:23:41
|
if you inspect the PNG, it has a IHDR, pHYs, and IDAT with no other chunks
|
|
2023-01-16 02:24:02
|
(other than IEND)
|
|
2023-01-16 02:24:11
|
which is causing viewers to assume it's sRGB, when it shouldn't be
|
|
2023-01-16 02:25:59
|
you could fix this, possibly, by inserting a scale filter `-vf scale=t=iec61966-2-1`
|
|
|
sklwmp
|
|
Traneptora
looks like a bug with ffmpeg's png encoder. it's taking BT.709 video and not tagging it at all, which is causing most viewers to assume it's sRGB colors, which it is not.
|
|
2023-01-16 02:40:48
|
Sorry, it seems like I somehow stripped some metadata while optimizing the PNG to get it under 8MB. Here's a version that actually has the metadata, with a gAMA and cHRM tag:
```
Gamma: 0.50994
Chromaticity:
red primary: (0.64,0.33)
green primary: (0.3,0.6)
blue primary: (0.15,0.06)
white point: (0.3127,0.329)
png:cHRM: chunk was found (see Chromaticity, above)
png:gAMA: gamma=0.50994 (See Gamma, above)
```
|
|
|
Traneptora
|
|
sklwmp
Sorry, it seems like I somehow stripped some metadata while optimizing the PNG to get it under 8MB. Here's a version that actually has the metadata, with a gAMA and cHRM tag:
```
Gamma: 0.50994
Chromaticity:
red primary: (0.64,0.33)
green primary: (0.3,0.6)
blue primary: (0.15,0.06)
white point: (0.3127,0.329)
png:cHRM: chunk was found (see Chromaticity, above)
png:gAMA: gamma=0.50994 (See Gamma, above)
```
|
|
2023-01-16 03:07:16
|
it's not possible to represent BT.709 in PNG without an ICC profile
|
|
2023-01-16 03:07:34
|
gAMA approximation of BT.709 would produce the slight difference you see
|
|
|
sklwmp
|
2023-01-16 04:27:24
|
To move some discussion away from <#1021189485960114198>, how should we deal with JXL images with a 709 transfer function (as those exported by FFmpeg)?
If you just use the inverse OETF to display the image, it will look "washed out".
If you use the EOTF in BT.1886 to display the image, it will look "correct", but since libjxl doesn't target displays, this can mess up calculations.
So, should *image viewers* implement a special case for 709-tf images and decode them with BT.1886?
Should *libjxl* handle this, since AFAIU libjxl tries to handle color management for you?
Or should everyone just use the inverse 709 OETF, like the situation right now?
To a normal user who knows nothing about this, I don't think it's optimal to see a "washed out" JXL from FFmpeg.
Or at least, it should by default show a JXL that looks "the same" as the video frame when played in a video player.
|
|
2023-01-16 04:28:10
|
AFAIK, video players decode BT.709 video with BT.1886 transfer funcs since that's what's recommended.
For images, I'm not sure how common images are in 709 colorspace.
|
|
|
w
|
2023-01-16 06:34:33
|
bt1886 only works properly if youre profiled and managed
|
|
|
Traneptora
|
|
sklwmp
To move some discussion away from <#1021189485960114198>, how should we deal with JXL images with a 709 transfer function (as those exported by FFmpeg)?
If you just use the inverse OETF to display the image, it will look "washed out".
If you use the EOTF in BT.1886 to display the image, it will look "correct", but since libjxl doesn't target displays, this can mess up calculations.
So, should *image viewers* implement a special case for 709-tf images and decode them with BT.1886?
Should *libjxl* handle this, since AFAIU libjxl tries to handle color management for you?
Or should everyone just use the inverse 709 OETF, like the situation right now?
To a normal user who knows nothing about this, I don't think it's optimal to see a "washed out" JXL from FFmpeg.
Or at least, it should by default show a JXL that looks "the same" as the video frame when played in a video player.
|
|
2023-01-16 10:08:56
|
keep in mind that the tagged transfer function is a suggestion if the image is XYB encoded
|
|
2023-01-16 10:09:38
|
so the image is actually linear light, and can be decoded to sRGB or any other color space, ignoring the tag
|
|
2023-01-16 10:09:59
|
so we deal with them ideally the same way we deal with anything else
|
|
2023-01-16 10:10:58
|
> To a normal user who knows nothing about this, I don't think it's optimal to see a "washed out" JXL from FFmpeg.
> Or at least, it should by default show a JXL that looks "the same" as the video frame when played in a video player.
it does actually, if you use a video player that's properly color managed, like mpv
|
|
2023-01-16 10:11:50
|
but again, this is not an FFmpeg issue, since it just passes 709-encoded pixels to libjxl and tells libjxl that they're 709-encoded.
|
|
2023-01-16 10:12:28
|
and AFAIK libjxl encode just lets LittleCMS handle all its color happenings
|
|
|
_wb_
|
2023-01-16 10:27:17
|
So is the issue that some video players are just not displaying the colors correctly?
|
|
|
sklwmp
|
2023-01-16 10:30:29
|
Not video, but image players. MPV does happen to show the JXL via BT.1886, and FFmpeg decodes it as such too.
|
|
2023-01-16 10:30:51
|
In Chrome, for example, opening an ffmpeg-encoded JXL would show different results than opening an ffmpeg-encoded PNG.
|
|
2023-01-16 10:31:47
|
I think they're displaying the JXL colors correctly, though. mpv and ffmpeg are just making a special "case" for 709 and display it via BT.1886 instead of the inverse 709, if I understand correctly, though I may be wrong.
|
|
|
_wb_
|
2023-01-16 10:50:04
|
Oh. Feels like a similar issue as the one with ImageMagick (until recently) somehow confusing sRGB with gamma 2.2, i.e. when producing a png it would write a gAMA chunk without an sRGB chunk, and when reading that it would pretend like that's the same thing as sRGB.
|
|
|
joppuyo
|
2023-01-16 11:19:08
|
ah, did they finally fix this thing? https://github.com/ImageMagick/ImageMagick/issues/4375
|
|
|
spider-mario
|
|
Traneptora
it's not possible to represent BT.709 in PNG without an ICC profile
|
|
2023-01-16 11:52:05
|
strictly speaking, there is now a cICP chunk that allows this (https://w3c.github.io/PNG-spec/#cICP-chunk), but it will likely be a while before most applications implement it
|
|
2023-01-16 11:52:21
|
(although Chrome does!)
|
|
2023-01-16 11:52:31
|
(and libjxl too!)
|
|
|
Traneptora
|
|
spider-mario
strictly speaking, there is now a cICP chunk that allows this (https://w3c.github.io/PNG-spec/#cICP-chunk), but it will likely be a while before most applications implement it
|
|
2023-01-16 01:49:08
|
<@604964375924834314> oooo I should add this to FFmpeg
|
|
|
spider-mario
strictly speaking, there is now a cICP chunk that allows this (https://w3c.github.io/PNG-spec/#cICP-chunk), but it will likely be a while before most applications implement it
|
|
2023-01-16 08:05:42
|
update: send a patch to the FFmpeg mailing list to support cICP <:poggies:853085814032302122>
|
|
|
sklwmp
|
2023-01-17 01:08:06
|
<@853026420792360980> sorry about the ping, but I think for gamma 2.2 and 2.8, you need to do 1 / 2.2 and 1/ 2.8 instead of 2.2 and 2.8 (see https://github.com/libjxl/libjxl/blob/3b026cebd995c9e98b68fc295cac83613924eb38/lib/extras/dec/apng.cc#L186)
Otherwise, gamma 2.2 and 2.8 encoding is broken:
|
|
|
Traneptora
|
|
sklwmp
<@853026420792360980> sorry about the ping, but I think for gamma 2.2 and 2.8, you need to do 1 / 2.2 and 1/ 2.8 instead of 2.2 and 2.8 (see https://github.com/libjxl/libjxl/blob/3b026cebd995c9e98b68fc295cac83613924eb38/lib/extras/dec/apng.cc#L186)
Otherwise, gamma 2.2 and 2.8 encoding is broken:
|
|
2023-01-17 01:15:36
|
thanks for the report, will investigate
|
|
2023-01-17 07:23:14
|
turns out, FFmpeg doesn't support sRGB on decode either
|
|
2023-01-17 07:23:18
|
so I had to add that support too <:KEKW:643601031040729099>
|
|
2023-01-17 07:23:27
|
it writes sRGB chunks on encode but doesn't understand them on decode
|
|
|
sklwmp
<@853026420792360980> sorry about the ping, but I think for gamma 2.2 and 2.8, you need to do 1 / 2.2 and 1/ 2.8 instead of 2.2 and 2.8 (see https://github.com/libjxl/libjxl/blob/3b026cebd995c9e98b68fc295cac83613924eb38/lib/extras/dec/apng.cc#L186)
Otherwise, gamma 2.2 and 2.8 encoding is broken:
|
|
2023-01-17 10:09:25
|
I can reproduce this, using this image:
|
|
2023-01-17 10:09:46
|
|
|
2023-01-17 10:10:15
|
It contains a gAMA chunk equal to 0.45455 but no sRGB, iCCP, or cHRM chunk
|
|
2023-01-17 10:10:48
|
this produces gAMA.jxl that's tagged as Gamma=0.45455
|
|
2023-01-17 10:11:00
|
and decoding this with ffmpeg fails to assign gamma22
|
|
2023-01-17 10:11:04
|
and falls back on sRGB
|
|
2023-01-17 10:11:17
|
which would not be a problem in this case because it's XYB
|
|
2023-01-17 10:11:21
|
but if it wasn't XYB it would cry
|
|
2023-01-17 10:12:25
|
but yes, I can reproduce this, and I should brew up and send a patch shortly
|
|
|
bonnibel
|
2023-01-18 12:22:30
|
urgh super annoying firefox mobile still doesnt support icc
|
|
2023-01-18 12:22:43
|
would love to be able to use xyb jpegs
|
|
|
w
|
2023-01-18 12:40:53
|
Works for me
|
|
|
bonnibel
|
2023-01-18 12:42:49
|
doesnt for me on android 12
|
|
2023-01-18 12:44:29
|
i have to download firefox beta or nightly so i can go into about:config and manually enable colour management to get it to work
|
|
|
w
|
2023-01-18 12:45:23
|
I guess that's why
|
|
2023-01-18 12:45:26
|
I only use nightly
|
|
|
bonnibel
|
2023-01-18 12:47:40
|
srgb input, xyb jpeg
|
|
|
w
|
2023-01-18 12:47:48
|
strange that mode is 0 on mobile by default but is 2 by default on desktop
|
|
|
bonnibel
|
2023-01-18 12:48:08
|
https://bugzilla.mozilla.org/show_bug.cgi?id=1412350
|
|
2023-01-18 12:48:31
|
theres a bug for it thats just been untouched for 3 years except a bot changing the severity
|
|
|
w
|
2023-01-18 12:49:39
|
Firefox team is dead <:sadge:1060773081007784006>
|
|
|
|
afed
|
2023-01-18 12:54:16
|
> Mozilla Corporation, the for-profit side of the overall Mozilla organization, generated $585 million from its search partnerships, subscriptions and ad revenue in 2021 — up 25% from the year before
<:Stonks:806137886726553651> not enough to pay some devs
|
|
|
bonnibel
|
2023-01-18 12:55:25
|
anyone here w a bugzilla account or a firefox contributor who could give this a poke?
|
|
|
w
|
2023-01-18 12:55:47
|
I blame the metaverse thing they have been doing
|
|
|
yurume
|
2023-01-18 05:14:53
|
I think Mozilla does have Mozilla Connect for those kind of discussions, and in fact it seems JPEG XL was well received there, so there is indeed no reason to poke them at the bug tracker.
|
|
2023-01-18 05:15:29
|
it seems to me that Chrome has no similar venue for discussion.
|
|
|
Demiurge
|
2023-01-18 06:50:26
|
You could say "If there are no objections to this patch, please merge."
|
|
2023-01-18 06:52:05
|
Bug trackers are meant for testing and patching
|
|
2023-01-18 06:53:09
|
They are not forums for chit chat, so if you want to say something, it should be patches and/or test results
|
|
|
Traneptora
|
|
sklwmp
<@853026420792360980> sorry about the ping, but I think for gamma 2.2 and 2.8, you need to do 1 / 2.2 and 1/ 2.8 instead of 2.2 and 2.8 (see https://github.com/libjxl/libjxl/blob/3b026cebd995c9e98b68fc295cac83613924eb38/lib/extras/dec/apng.cc#L186)
Otherwise, gamma 2.2 and 2.8 encoding is broken:
|
|
2023-01-18 02:24:33
|
update: sent a bug fix to the mailing list
|
|
|
|
afed
|
2023-01-19 03:44:58
|
https://servo.org/blog/2023/01/16/servo-2023/
|
|
2023-01-19 03:45:06
|
```We would like to share some exciting news about the Servo project. This year, thanks to new external funding, a team of developers will be actively working on Servo. The first task is to reactivate the project and the community around it, so we can attract new collaborators and sponsors for the project.
The focus for 2023 is to improve the situation of the layout system in Servo, with the initial goal of getting basic CSS2 layout working. Given the renewed activity in the project, we will keep you posted with more updates throughout the year. Stay tuned!```
|
|
|
yurume
|
2023-01-19 04:09:09
|
AFAIK it's from Igalia https://en.wikipedia.org/wiki/Igalia
|
|
2023-01-19 04:09:28
|
which existence itself is amazing to me
|
|
|
Demiurge
|
2023-01-19 08:15:56
|
No thanks to mozilla
|
|
2023-01-19 08:16:27
|
Remember when they actually used to have software developers on their payroll?
|
|
2023-01-19 08:17:45
|
They fired all of them so they can give themselves more money :)
|
|
|
joppuyo
|
|
yurume
which existence itself is amazing to me
|
|
2023-01-19 11:42:01
|
spain actually has a number of famous worker co-ops, like mandragon
|
|
|
spider-mario
|
2023-01-19 09:49:11
|
a friend would like to convert a passport photo into a PDF file with reasonable file size, what’s a good encoding approach that one can implement with free software?
|
|
2023-01-19 09:49:31
|
is `pdfjam passport.jpg -o passport.pdf` close to the best one can do with reasonable ease?
|
|
|
Fraetor
|
2023-01-19 11:16:56
|
That should be fine. PDF more or less stores JPEGs as is, so the size should be the size of the image plus a small amount of overhead.
|
|
|
spider-mario
|
2023-01-20 08:52:56
|
that was my impression as well
|
|
2023-01-20 08:53:12
|
but I was wondering whether perhaps trying some JPEG2000 would make sense, or something like that
|
|
2023-01-20 08:58:12
|
```
pdfjam ERROR: no PDF/JPG/PNG file found at test.jp2
```
not this way, then, I guess
|
|
2023-01-20 08:59:25
|
ah https://github.com/josch/img2pdf
|
|
2023-01-20 09:03:21
|
colorspace is wrong in the jpeg2000 (image too dark) and quality is worse than with jpeg at that filesize target
|
|
2023-01-20 09:03:32
|
I’m clearly doing something wrong
|
|
2023-01-20 09:03:35
|
I guess jpeg will do
|
|
|
_wb_
|
2023-01-22 09:05:49
|
I'm considering to buy a phone with a thermal camera. I could use it to make some test images for jxl files with a kThermal channel. Any suggestions on which one to get?
|
|
|
Fraetor
|
2023-01-22 02:33:52
|
Do many phones come with one? I thought it tended to be an addon that you plug into the USB port.
|
|
|
spider-mario
|
2023-01-22 03:21:24
|
I have a Cat S61, I can make those test images if you want
|
|
|
bonnibel
|
2023-01-22 03:23:30
|
i know at least the latest one (s62 pro) is advertised with a feature that overlays regular & thermal imaging, but no clue how its stored
|
|
|
_wb_
|
|
spider-mario
I have a Cat S61, I can make those test images if you want
|
|
2023-01-22 03:32:52
|
How does it store the thermal data? Do you have a way to extract it so we can make some jxl bitstreams with thermal channels?
|
|
2023-01-22 03:34:20
|
(i also still may want such a phone to find cold bridges in my home, but that's another thing)
|
|
|
Traneptora
|
|
sklwmp
<@853026420792360980> sorry about the ping, but I think for gamma 2.2 and 2.8, you need to do 1 / 2.2 and 1/ 2.8 instead of 2.2 and 2.8 (see https://github.com/libjxl/libjxl/blob/3b026cebd995c9e98b68fc295cac83613924eb38/lib/extras/dec/apng.cc#L186)
Otherwise, gamma 2.2 and 2.8 encoding is broken:
|
|
2023-01-22 05:57:42
|
http://git.videolan.org/?p=ffmpeg.git;a=commit;h=9d5e66942c5bae578926e29efebec348199798df
|
|
|
|
paperboyo
|
|
_wb_
How does it store the thermal data? Do you have a way to extract it so we can make some jxl bitstreams with thermal channels?
|
|
2023-01-22 10:14:14
|
Wasn’t thermal, but I’ve seen 2MB+ depth images being stored in JPEGs XMP as binary blobs.
|
|
|
Kampidh
|
2023-01-23 02:47:42
|
Speaking of extra thermal/depth channel, is there any JXL sample images for that?
|
|
|
_wb_
|
2023-01-23 09:05:26
|
Not afaik, though shouldn't be too hard to produce one using the encode api. But it would be nice to have some based on what real thermal cameras produce.
|
|
2023-01-23 09:06:06
|
(also it would be cool to have foss viewers that can actually visualize such extra channels)
|
|
|
Kampidh
|
2023-01-23 11:49:24
|
hmm, trying to fabricate one
|
|
2023-01-23 11:49:42
|
|
|
|
Traneptora
|
2023-01-25 02:17:29
|
and cICP support in FFmpeg's PNG encoder/decoder is now merged :)
|
|
|
|
veluca
|
2023-01-25 06:57:27
|
great!
|
|
|
Demiurge
|
2023-01-26 06:31:38
|
Practical tooling facilitates adoption.
|
|
|
Kampidh
|
2023-01-26 12:09:36
|
I uh-- may went a bit too far with extras <:KekDog:805390049033191445>
|
|
|
|
JendaLinda
|
2023-01-26 12:35:36
|
Extra channels can be used to store all sorts of data. Pixel data are usually unsigned but arbitrary data can be signed as well. How does JXL handle that?
|
|
|
_wb_
|
2023-01-26 01:06:16
|
it can store signed data but it can only signal either uint or float types to be the nominal sample type.
|
|
2023-01-26 01:07:07
|
when the nominal sample type is uint8, that doesn't mean that the actual data is all in range 0..255 — it's perfectly possible to store out-of-range values
|
|
2023-01-26 01:07:26
|
you should expect them to get clamped to the nominal range though
|
|
2023-01-26 01:09:17
|
I suppose in the current decoder api you would get clamped values when requesting the data in a uint pixel format, and unclamped ones when requesting the data as floats
|
|
|
Yari-nyan
|
2023-01-26 07:56:14
|
i asked ChatGPT to write a rap about JPEG XL, with lots of rhymes
```
(Verse 1)
JPEG XL, the new image king
With compression that'll make your heart sing
Smaller file size, better quality too
This format's got it all, what more can you do?
(Chorus)
JPEG XL, JPEG XL
The future of image tech, no time to dwell
JPEG XL, JPEG XL
Upgrade now, and take your photography to the next level
(Verse 2)
From photography to graphic design
JPEG XL's got your back, it's one of a kind
Wider color range, better options too
This format's got it all, nothing to do
(Chorus)
JPEG XL, JPEG XL
The future of image tech, no time to dwell
JPEG XL, JPEG XL
Upgrade now, and take your photography to the next level
(Bridge)
Mobile support, it's a breeze
With JPEG XL, your pictures will never freeze
Faster loading times, smoother scrolling too
JPEG XL, the format you never knew you knew
(Chorus)
JPEG XL, JPEG XL
The future of image tech, no time to dwell
JPEG XL, JPEG XL
Upgrade now, and take your photography to the next level
(Outro)
So don't be left behind, join the trend
Upgrade to JPEG XL, and watch your images ascend
Smaller files, better quality, what more can you ask?
JPEG XL, the future of image technology is here at last.```
|
|
|
_wb_
|
|
2023-01-26 07:57:42
|
beautiful
|
|
|
zamfofex
|
|
Yari-nyan
i asked ChatGPT to write a rap about JPEG XL, with lots of rhymes
```
(Verse 1)
JPEG XL, the new image king
With compression that'll make your heart sing
Smaller file size, better quality too
This format's got it all, what more can you do?
(Chorus)
JPEG XL, JPEG XL
The future of image tech, no time to dwell
JPEG XL, JPEG XL
Upgrade now, and take your photography to the next level
(Verse 2)
From photography to graphic design
JPEG XL's got your back, it's one of a kind
Wider color range, better options too
This format's got it all, nothing to do
(Chorus)
JPEG XL, JPEG XL
The future of image tech, no time to dwell
JPEG XL, JPEG XL
Upgrade now, and take your photography to the next level
(Bridge)
Mobile support, it's a breeze
With JPEG XL, your pictures will never freeze
Faster loading times, smoother scrolling too
JPEG XL, the format you never knew you knew
(Chorus)
JPEG XL, JPEG XL
The future of image tech, no time to dwell
JPEG XL, JPEG XL
Upgrade now, and take your photography to the next level
(Outro)
So don't be left behind, join the trend
Upgrade to JPEG XL, and watch your images ascend
Smaller files, better quality, what more can you ask?
JPEG XL, the future of image technology is here at last.```
|
|
2023-01-26 08:19:35
|
This is amazing, I love it! 😄
|
|
|
|
JendaLinda
|
2023-01-26 08:27:56
|
I think AVIF would be a perfect fit for AI generated images. 😉
|
|
|
|
afed
|
2023-01-27 01:58:32
|
<@853026420792360980> does jxl use multithreading to encode screenshots in mpv (encoding feels slower than through cjxl)?
I also did some investigation for png screenshots with `screenshot-high-bit-depth=yes` for 8 bpc video
``` png:cHRM: chunk was found (see Chromaticity, above)
png:gAMA: gamma=0.45455 (See Gamma, above)
png:IHDR.bit-depth-orig: 16
png:IHDR.bit_depth: 16
png:IHDR.color-type-orig: 6
png:IHDR.color_type: 6 (RGBA)
png:IHDR.interlace_method: 0 (Not interlaced)
png:IHDR.width,height: 1920, 1080
png:pHYs: x_res=0, y_res=1, units=0
png:sRGB: intent=1 (Relative Intent)```
after ect optimization
``` png:cHRM: chunk was found (see Chromaticity, above)
png:gAMA: gamma=0.45455 (See Gamma, above)
png:IHDR.bit-depth-orig: 16
png:IHDR.bit_depth: 16
png:IHDR.color-type-orig: 2
png:IHDR.color_type: 2 (Truecolor)
png:IHDR.interlace_method: 0 (Not interlaced)
png:IHDR.width,height: 1920, 1080
png:pHYs: x_res=0, y_res=1, units=0
png:sRGB: intent=1 (Relative Intent)```
is RGBA really needed?
|
|
2023-01-27 07:26:57
|
after some experiments found that for losssless 8-bpc screenshots it's worth using either e1 for fast encoding or e4 for better compression, e3 is surprisingly not good even for movie/live content, and other efforts are too slow or very unstable in compression level
same for ffmpeg, but not only jxl e1 is better and faster than internal png with default settings, but even fpnge have much better compression for video screenshots, even if not counting much higher encoding speed
<@794205442175402004> I wonder if jxl would accept 10-bit (maybe through some intermediate buffers) and yuv420 directly, might that give some extra compression (and maybe a bit more speed)?
|
|
|
|
veluca
|
2023-01-27 07:28:52
|
jxl *can* accept 10 bit, but not yuv420
|
|
2023-01-27 07:29:11
|
I think we may be able to make it accept yuv420 but don't really see a reason to
|
|
2023-01-27 07:29:26
|
fpnge being better than internal png is *very* surprising though
|
|
|
|
afed
|
2023-01-27 07:39:33
|
10-bit can be useful for 10-bit video for screenshots (it's very common, even without hdr) because 16 bpc screenshots are very bloated not only for png, but also for jxl
yuv420 is also very common for video (and lossy image formats), although I don't know how much it will improve something
|
|
|
_wb_
|
2023-01-27 07:50:52
|
jxl can only do JPEG-style yuv420: full range, interstitial siting of subsampled chroma
|
|
2023-01-27 07:52:06
|
in video codecs, it's typically tv-range and a weird siting where horizontally samples are cosited (at the positions of luma samples) while vertically they're interstitial.
|
|
2023-01-27 07:57:02
|
for screenshots of video, does this get integrated into the movie player so it has access to the yuv420 data? because what's on the screen will be rgb data, and probably rescaled to fit the screen too
|
|
2023-01-27 07:58:23
|
avoiding the rescaling is probably the main thing you'll want to do — if it's upscaling, you'll encode too many pixels, if it's downscaling you're losing information
|
|
|
|
afed
|
2023-01-27 08:02:07
|
frames from some random youtube trailer
ffmpeg (2263180)
fpnge (1611574)
just for comparison (for other movies, animations and various content fpnge was also better)
|
|
|
_wb_
for screenshots of video, does this get integrated into the movie player so it has access to the yuv420 data? because what's on the screen will be rgb data, and probably rescaled to fit the screen too
|
|
2023-01-27 08:03:10
|
most likely, but mpv uses ffmpeg
at least if ffmpeg can do it, so can many other players and tools
|
|
2023-01-27 08:18:55
|
and as I understand it ffmpeg cannot directly accept anything between 8 or 16 bit for jxl
https://discord.com/channels/794206087879852103/794206170445119489/1065821078120824954
|
|
|
Traneptora
|
|
afed
<@853026420792360980> does jxl use multithreading to encode screenshots in mpv (encoding feels slower than through cjxl)?
I also did some investigation for png screenshots with `screenshot-high-bit-depth=yes` for 8 bpc video
``` png:cHRM: chunk was found (see Chromaticity, above)
png:gAMA: gamma=0.45455 (See Gamma, above)
png:IHDR.bit-depth-orig: 16
png:IHDR.bit_depth: 16
png:IHDR.color-type-orig: 6
png:IHDR.color_type: 6 (RGBA)
png:IHDR.interlace_method: 0 (Not interlaced)
png:IHDR.width,height: 1920, 1080
png:pHYs: x_res=0, y_res=1, units=0
png:sRGB: intent=1 (Relative Intent)```
after ect optimization
``` png:cHRM: chunk was found (see Chromaticity, above)
png:gAMA: gamma=0.45455 (See Gamma, above)
png:IHDR.bit-depth-orig: 16
png:IHDR.bit_depth: 16
png:IHDR.color-type-orig: 2
png:IHDR.color_type: 2 (Truecolor)
png:IHDR.interlace_method: 0 (Not interlaced)
png:IHDR.width,height: 1920, 1080
png:pHYs: x_res=0, y_res=1, units=0
png:sRGB: intent=1 (Relative Intent)```
is RGBA really needed?
|
|
2023-01-27 09:01:18
|
mpv uses FFmpeg to encode screenshots, which defaults to autothreads
|
|
2023-01-27 09:02:18
|
as for alpha channel, that's because of the frame buffer. try setting screenshot-sw=yes and see what happens
|
|
2023-01-27 09:04:15
|
either way, that might change when haasn overhauls the screenshot code
|
|
|
afed
after some experiments found that for losssless 8-bpc screenshots it's worth using either e1 for fast encoding or e4 for better compression, e3 is surprisingly not good even for movie/live content, and other efforts are too slow or very unstable in compression level
same for ffmpeg, but not only jxl e1 is better and faster than internal png with default settings, but even fpnge have much better compression for video screenshots, even if not counting much higher encoding speed
<@794205442175402004> I wonder if jxl would accept 10-bit (maybe through some intermediate buffers) and yuv420 directly, might that give some extra compression (and maybe a bit more speed)?
|
|
2023-01-27 09:07:39
|
I'm planning on changing the default to e4
|
|
|
afed
10-bit can be useful for 10-bit video for screenshots (it's very common, even without hdr) because 16 bpc screenshots are very bloated not only for png, but also for jxl
yuv420 is also very common for video (and lossy image formats), although I don't know how much it will improve something
|
|
2023-01-27 09:11:27
|
16bpc is only bloated for lossless. unfortunately this is a limitation of libjxl
|
|
|
_wb_
avoiding the rescaling is probably the main thing you'll want to do — if it's upscaling, you'll encode too many pixels, if it's downscaling you're losing information
|
|
2023-01-27 09:12:22
|
mpv screenshots are pre-scaling
|
|
2023-01-27 09:12:42
|
unless you push Ctrl+s, then it screenshots the actual window
|
|
|
|
veluca
|
|
Traneptora
16bpc is only bloated for lossless. unfortunately this is a limitation of libjxl
|
|
2023-01-27 09:29:27
|
wdym?
|
|
|
Traneptora
|
2023-01-27 09:30:51
|
I mean libjxl is limited to accepting 16-bit buffers or 8-bit buffers
|
|
2023-01-27 09:30:58
|
you can't pass a 10-bit RGB buffer to libjxl
|
|
|
_wb_
|
2023-01-27 09:31:12
|
it can take 16-bit buffers and treat it as 10-bit though
|
|
2023-01-27 09:31:28
|
(ignoring the 6 lsb, basically)
|
|
|
Traneptora
|
2023-01-27 09:32:00
|
how does that work? 1023 doesn't divide 65535
|
|
2023-01-27 09:33:01
|
65535 factors into 3, 5, 17, and 257
|
|
2023-01-27 09:33:55
|
1023 factors into 3, 11, 31
|
|
|
_wb_
|
2023-01-27 09:33:57
|
not sure if we already have a way to pass data using only the lower bits (so you're using uint16 but the range is 0..1023)
|
|
|
Traneptora
|
2023-01-27 09:34:34
|
basically I guess that's how you'd do it
|
|
2023-01-27 09:34:54
|
you'd have to left-pad 10-bit and tell libjxl it's 10-bit with the JxlBasicInfo
|
|
|
_wb_
|
2023-01-27 09:36:00
|
but can also right-pad, take the 10-bit data, do `* 65535 / 1023`, and send it as uint16 with bitdepth 10
|
|
|
Traneptora
|
2023-01-27 09:36:36
|
how does libjxl know which one it is?
|
|
|
_wb_
|
2023-01-27 09:38:12
|
ah you can do either
|
|
2023-01-27 09:38:12
|
https://github.com/libjxl/libjxl/blob/main/lib/include/jxl/types.h#L113
|
|
|
Traneptora
|
2023-01-27 09:38:46
|
oh, good
|
|
|
_wb_
|
2023-01-27 09:39:08
|
JXL_BIT_DEPTH_FROM_PIXEL_FORMAT means uint16 buffers have range 0..65535 regardless of bitdepth, so things are lsb-padded
|
|
2023-01-27 09:39:38
|
JXL_BIT_DEPTH_FROM_CODESTREAM means uint16 buffers have range 0..(2^bitdepth)-1, so things are msb-padded
|
|
2023-01-27 09:43:09
|
and then you can even do JXL_BIT_DEPTH_CUSTOM, to e.g. decode a 12-bit image to uint16 with a 10-bit range (0..1023)
|
|
|
Traneptora
|
2023-01-27 09:46:52
|
hm
|
|
2023-01-27 09:47:09
|
looks like FFmpeg doesn't define a pixel format which is 10-bit RGB packed into 16
|
|
2023-01-27 09:47:42
|
it does define 10-bit *planar* formats
|
|
2023-01-27 09:48:12
|
which just makes me feel like libjxl should accept planar input
|
|
|
_wb_
|
2023-01-27 10:03:48
|
how does the 10-bit planar of ffmpeg work? no padding except at the very end of the plane?
|
|
2023-01-27 10:05:33
|
i mean, does it do 4 samples in 5 bytes? or just 2 bytes per sample?
|
|
|
Traneptora
|
2023-01-27 10:10:54
|
I don't know
|
|
2023-01-27 10:11:04
|
I could check
|
|
|
|
afed
|
2023-01-27 04:58:59
|
also if using ffmpeg to make screenshots/thumbnails:
jxl `-vf thumbnail -distance 0 -effort 1 thumb%04d.jxl`
png `-vf thumbnail -compression_level 100 thumb%04d.png`
and for jxl there are some warnings (but not for png, webp, bmp, tiff, jpg):
10-bit bt709 av1
```[libjxl @ 00000150256f52c0] Unknown transfer function, assuming IEC61966-2-1/sRGB. Colors may be wrong.
[libjxl @ 00000150256f52c0] Unknown primaries, assuming BT.709/sRGB. Colors may be wrong.```
10-bit bt709 hevc
```[libjxl @ 0000024ed1d7dfc0] Unknown transfer function, assuming IEC61966-2-1/sRGB. Colors may be wrong.
[libjxl @ 0000024ed1d7dfc0] Unknown primaries, assuming BT.709/sRGB. Colors may be wrong.```
even if ffmpeg accepts it correctly, i think it would be nice to handle the most common color primaries and video transfers for jxl (or the same as for png)
but it seems that ffmpeg creates 8 bpc jxl and png for 10-bit video, which is bad <:PepeSad:815718285877444619>
|
|
2023-01-28 02:47:42
|
<:FeelsReadingMan:808827102278451241>
https://trac.ffmpeg.org/ticket/7978
|
|
|
diskorduser
|
2023-01-29 02:03:39
|
how to use xyb-jpeg encoder?
|
|
2023-01-29 02:09:06
|
is it included in cjxl 0.8?
|
|
|
fab
|
2023-01-29 02:36:20
|
C:\Users\Use\Documents\basando benchmark_xl --input bhby.png --output_dir . --codec=jpeg:enc-jpegli:q90 --save_compressed
|
|
|
diskorduser
|
2023-01-29 02:49:02
|
thanks fab
|
|
|
fab
C:\Users\Use\Documents\basando benchmark_xl --input bhby.png --output_dir . --codec=jpeg:enc-jpegli:q90 --save_compressed
|
|
2023-01-29 04:36:55
|
how do you confirm encoded jpg is xyb?
|
|
|
fab
|
2023-01-29 04:37:16
|
Xyb is not
|
|
2023-01-29 04:37:30
|
Then you should add xyb
|
|
|
diskorduser
|
2023-01-29 04:39:01
|
How?
|
|
2023-01-29 04:39:05
|
where?
|
|
|
DZgas Ж
|
|
fab
C:\Users\Use\Documents\basando benchmark_xl --input bhby.png --output_dir . --codec=jpeg:enc-jpegli:q90 --save_compressed
|
|
2023-01-29 07:29:58
|
yeh. windows build moment
|
|
|
sklwmp
|
|
diskorduser
how do you confirm encoded jpg is xyb?
|
|
2023-01-30 04:08:14
|
check `magick identify -verbose` for an ICC profile i think
|
|
|
|
afed
|
|
diskorduser
how do you confirm encoded jpg is xyb?
|
|
2023-01-30 04:18:54
|
`benchmark_xl --input=x --codec=jpeg:enc-jpegli:q90,jpeg:enc-jpegli:q90:xyb --save_compressed --output_dir=.`
https://discord.com/channels/794206087879852103/803645746661425173/1067878025716305930
|
|
|
|
JendaLinda
|
2023-01-30 08:55:57
|
Many image editing programs are pretty stupid and they are encoding fully opaque images as RGBA PNGs. I think libjxl could provide a way to detect and automatically choose the appropriate pixel format. Developers of those editing programs are apparently unable to do it so the encoder could do it for them.
|
|
|
diskorduser
|
|
spider-mario
|
2023-02-03 11:21:07
|
https://youtu.be/YW26YMe8iUQ?t=3m56s
|
|
2023-02-03 11:21:14
|
quite high quality
|
|
|
sklwmp
|
2023-02-03 12:18:04
|
Hm, `cjxl` v0.8.0 can only beat an `ect -9 -strip` PNG r/place by a little bit, even at `-e 9`:
```
1.1M final_place.e7.jxl
916K final_place.e9.jxl
956K final_place.png
```
|
|
2023-02-03 12:18:17
|
a very unique picture, but interesting nonetheless
|
|
2023-02-03 12:20:25
|
as mentioned before by Hitori, `cwebp -z 9` beats both JXL and PNG by a good amount:
`888K final_place.z9.web`
|
|
|
_wb_
|
2023-02-03 04:20:24
|
yeah that's a rather particular image
|
|
2023-02-03 04:20:58
|
|
|
2023-02-03 04:21:18
|
I can beat webp but it requires some funky options
|
|
|
dormosaurus
|
|
_wb_
I can beat webp but it requires some funky options
|
|
2023-02-03 09:20:41
|
are there recommended options for screenshots with text (e.g. terminal)? I noticed lossless webp is usually better than jxl for such images
|
|
|
_wb_
|
2023-02-03 09:26:26
|
`-I 0 -P 0 -e 9 -g 3` is a way to make jxl more png/webp-like, i.e. it will learn no MA tree but do lz77 search instead.
|
|
2023-02-03 09:26:49
|
Usually that's worse but for things like screenshots and pixel art it can be better
|
|
|
|
JendaLinda
|
2023-02-03 09:27:37
|
Can confirm, in special cases, this is worth trying.
|
|
|
_wb_
|
2023-02-03 09:28:16
|
Though for screenshots in particular, patches might be more effective than lz77 to get rid of duplication like repeated letters. But then again our current patch heuristics catch only some percentage of those.
|
|
2023-02-03 09:29:40
|
(when doing the -I 0 thing, it's probably better to disable patches altogether because it kind of interferes with the lz77)
|
|
2023-02-03 09:31:01
|
Did I mention that there's room for improvement in various parts of lossless jxl, and even e10 is quite far from exhaustive/optimal?
|
|
2023-02-03 09:32:13
|
It's just such an extremely expressive bitstream that it might take AI heuristics to really get close to optimal lossless jxl encoding
|
|
|
|
JendaLinda
|
2023-02-03 09:32:32
|
I can imagine that deep search for patches would be pretty time consuming. Solution might be a way to give a set of patches, like a font, to the encoder, so it knows what to look for.
|
|
|
_wb_
|
2023-02-03 09:34:24
|
Yeah if the application that drew the text (or other repetitive elements, like icons or profile pictures in a chat or whatever) could tell some stuff to the encoder, it could be made more effective
|
|
2023-02-03 09:34:36
|
Who knows libjxl 3.0 will have an api for that 🙂
|
|
|
username
|
2023-02-04 05:36:24
|
<@274048677851430913> I went to https://kampidh.saklistudio.com/ and noticed that jxl files are shown to browsers that support jpeg-xl however I went and compared a couple of the images and noticed that in all the ones I tested the jxls ended up lower quality then the jpegs
|
|
2023-02-04 05:36:47
|
JPEG:
|
|
2023-02-04 05:36:59
|
JXL:
|
|
2023-02-04 05:37:32
|
JPEG:
|
|
2023-02-04 05:37:37
|
JXL:
|
|
2023-02-04 05:38:22
|
aaaaa i'm not sure if the image editor i'm using is copying the layers correctly into discord
|
|
2023-02-04 05:38:29
|
I should have checked first (edit: I just checked and they are correct)
|
|
|
Kampidh
|
2023-02-04 05:39:16
|
I shall update those images in that comm page, those are made on earlier build of krita which doesn't use xyb~
|
|
2023-02-04 05:41:11
|
Plus that jpeg is at q100 if I remember correctly..
|
|
|
username
|
2023-02-04 05:45:02
|
speaking of q100 does krita support doing q100 lossy vardct jxl(s) or does putting the quality slider to 100 set it to be lossless? (I don't use krita so I wouldn't know)
|
|
|
Kampidh
|
2023-02-04 05:48:10
|
current krita (5.1.5) doesn't have that quality slider, only exporting to default -d 1 with original profile set to true. the nightly / upcoming 5.2.0 will have that q slider and xyb optimization
|
|
2023-02-04 05:57:14
|
(I might have to update those comm images as well since those refs are old haha)
|
|
|
username
|
|
Kampidh
(I might have to update those comm images as well since those refs are old haha)
|
|
2023-02-04 06:08:42
|
I've noticed they aren't listed in your artwork gallery
|
|
|
Kampidh
|
|
username
|
2023-02-04 06:13:23
|
any specific reason? I can see the one under special tier not being listed since it's a collab however the rest seem fine
|
|
|
dormosaurus
|
|
_wb_
`-I 0 -P 0 -e 9 -g 3` is a way to make jxl more png/webp-like, i.e. it will learn no MA tree but do lz77 search instead.
|
|
2023-02-04 06:14:07
|
I see, good to know.
|
|
|
Kampidh
|
|
username
any specific reason? I can see the one under special tier not being listed since it's a collab however the rest seem fine
|
|
2023-02-04 06:15:30
|
nope, just still focused to put personal artworks first on the main gallery page~
|
|
2023-02-04 06:37:02
|
and done updating those images~ some still use old ones but reencoded properly
|
|
|
username
|
2023-02-04 06:46:37
|
just checked and not only are they higher quality they are also smaller in file size 👍 (only was able to compare with the tier 0 image since I didn't download the tier 2 image for testing and all the other ones are changed to different images)
|
|
2023-02-04 06:51:09
|
actually I do see a problem and that is that the colors between the jpeg and jpeg-xl are now out of sync
|
|
|
Kampidh
|
2023-02-04 06:51:24
|
oh?
|
|
2023-02-04 06:51:52
|
~~maybe because of jxl one have 16 bit depth?~~ scratch that, its 8 bit
|
|
|
username
|
2023-02-04 06:51:59
|
JPEG and old JXL (old JXL was sent for this example but the colors are the same between the JPEG and old JXL it's just the quality is lower as previously discussed):
|
|
2023-02-04 06:52:06
|
new JXL:
|
|
|
Kampidh
|
2023-02-04 06:53:16
|
ohh, the old one kinda had an edge sharpening there
|
|
2023-02-04 07:10:45
|
Interesting, the jpeg one has differences as well compared to the old one.. pretty sure I'm using lanczos as well for resizing back there (or it was resized somewhere else)
|
|
|
_wb_
|
2023-02-04 07:29:01
|
A lot depends on what colorspace you resize in
|
|
2023-02-04 07:30:41
|
Resizing in linear space is 'correct', but it looks brighter than resizing in nonlinear space and most people are used to nonlinear space resizing (since that's what browsers and many viewers do)
|
|
|
Kampidh
|
2023-02-04 08:02:05
|
gotta say the 0.8.0 improvement on vardct with anime went quite nice as well
|
|
|
_wb_
|
2023-02-04 08:10:43
|
On anime, codecs with directional prediction (like webp and avif) have an advantage. Though that's mostly only really true in the lower quality range, where angles can get rounded to the nearest supported direction.
|
|
|
spider-mario
|
2023-02-05 08:53:55
|
https://pony.social/@cadey/109813678329119959
|
|
2023-02-05 08:54:00
|
creative use of video compression artifacts
|
|
|
bonnibel
|
2023-02-06 11:03:20
|
https://twitter.com/palsnurseoutfit/status/1622541981737177096
|
|
|
Demiurge
|
2023-02-07 09:54:11
|
what it ect
|
|
2023-02-08 03:47:01
|
https://www.color.org/images/browsertest.jpg
|
|
2023-02-08 03:47:39
|
lol, neat.
|
|
|
w
|
2023-02-08 04:33:15
|
interesting... this also does the gray-white test which chrome still fails
|
|
2023-02-08 04:36:40
|
seems discord thumbnails dont do icc, but if the image is small enough it doesnt generate a thumbnail
|
|
|
DZgas Ж
|
|
Traneptora
|
|
DZgas Ж
|
|
2023-02-08 01:36:38
|
is this an XYB jpeg?
|
|
|
Kleis Auke
|
|
Traneptora
is this an XYB jpeg?
|
|
2023-02-08 01:52:16
|
I think so: ```console
$ exiftool -icc_profile:"ProfileCreator" -icc_profile:"ProfileDescription" IMG_20230208_104324_041.jpeg
Profile Creator : Unknown (jxl )
Profile Description : XYB_Per
```
|
|
|
Traneptora
|
2023-02-08 01:54:10
|
makes sense
|
|
|
_wb_
|
2023-02-08 02:32:17
|
|
|
2023-02-08 02:33:00
|
(scaled it up to make discord generate a thumbnail)
|
|
|
Dolphin
|
2023-02-08 06:58:23
|
Hey, is there any good resource about how JPEG XL does entropy coding? In particular I'm interested in how MA trees and context clustering with histograms work in jxl. I tried to look through the iso spec but I found it quite cumbersome. How does jxl come up with distributions it uses for ANS (I've read about predictors, but how does it translate into actual distribution)?
|
|
|
_wb_
|
2023-02-08 07:25:05
|
Distributions are easy: just count. For ANS the encoder needs to collect all tokens first anyway before it can write bitstream (since the encode side of ANS is LIFO), so the distributions used are just the histograms of symbols that occur in the image (though similar distributions do get clustered to reduce signaling cost, so after clustering it won't be exact anymore, but it doesn't need to be exact)
|
|
2023-02-08 07:49:43
|
The hard part is coming up with an MA tree that ends up being a good ctx model. FLIF and libjxl do that in two different ways, and both ways are basically a greedy algorithm that grows a tree one decision node at a time, which means it likely only finds some local optimum but not a global one.
E.g. if the optimal thing is to split a property range into three, say distribution A is good when N < 50 and when N > 150, while distribution B is good when N is between 50 and 150, then likely neither flif nor libjxl will discover the appropriate MA tree, since in a single binary decision node you can't make a very good split.
|
|
|
Dolphin
|
2023-02-08 09:24:36
|
So what do use for tokens, DCT coefficients or just channel values, and how do you bundle them (histogram for each DCT freq)? Also what role do context play in encoding? As I understand it each context comes with predictor, which you use to get residues. Do you count histograms after getting residues, or how do they relate to histograms?
|
|
|
_wb_
|
2023-02-08 09:31:11
|
The entropy coded symbols are residues.
|
|
|
Dolphin
|
2023-02-08 09:34:17
|
That makes perfect sense, thanks!
|
|
|
Demiurge
|
2023-02-14 01:06:33
|
I wonder how well JXL can compress this image...
|
|
2023-02-14 01:13:03
|
What the hell? Apparently waterfox has gfx.color_management.enablev4 set to false
|
|
|
username
|
2023-02-14 01:15:12
|
that's the firefox default and waterfox has not changed it
|
|
2023-02-14 01:15:42
|
only the newest versions of firefox have it on
|
|
2023-02-14 01:15:53
|
and waterfox is based on firefox esr
|
|
2023-02-14 01:16:02
|
which is a bit behind
|
|
|
Demiurge
|
2023-02-14 01:18:26
|
I heard that v4 profiles are very ancient
|
|
2023-02-14 01:18:38
|
Wonder why it was ever off by default to begin with
|
|
2023-02-14 01:20:55
|
oh wait, the question answers itself again. Mozilla
|
|
|
username
|
2023-02-14 01:21:38
|
firefox 3 introduced support and firefox 108 turns it on by default
|
|
2023-02-14 01:21:54
|
current firefox esr is based on version 102
|
|
2023-02-14 01:22:06
|
so waterfox is on firefox 102 right now
|
|
|
Demiurge
|
2023-02-14 01:27:22
|
|
|
2023-02-14 01:27:42
|
lmao it's been around since version 3 and they waited until 108(!) to turn it on for some reason
|
|
2023-02-14 01:28:55
|
Why are they so terrible... Not enough manpower to flick a switch to the on position?
|
|
|
username
|
2023-02-14 01:31:48
|
it was slightly messed up in firefox 3 so they fixed it in firefox 3.5
|
|
2023-02-14 01:32:14
|
and I think the reason they didn't flip it on was because they where worried about security or something
|
|
2023-02-14 01:32:32
|
not sure what made them flip it on recently but i'm glad they did
|
|
2023-02-14 01:34:53
|
found the but report it's from 14 years and was only closed 4 months ago for firefox 108 https://bugzilla.mozilla.org/show_bug.cgi?id=488800
|
|
2023-02-14 01:36:55
|
oh wow did they turn it on because xyb jpegs where not working?
|
|
2023-02-14 01:37:28
|
this is what got them to turn on support i'm pretty sure
|
|
|
Demiurge
|
|
190n
|
|
Demiurge
|
|
2023-02-14 03:49:03
|
safari for windows 🧓
|
|
|
_wb_
|
|
Demiurge
I wonder how well JXL can compress this image...
|
|
2023-02-14 06:29:16
|
In lossless mode, it should compress quite well.
|
|
2023-02-14 07:28:42
|
yeah we need to improve e2 - e10 lossless in terms of speed and compression
|
|
2023-02-14 07:33:34
|
```
cjxl Mozilla.png -d 0 M.jxl -e 9 -g 3 --patches 0
JPEG XL encoder v0.9.0 1ff5061f [SSE4,SSSE3,Unknown]
./lib/extras/dec/color_hints.cc:54: No color_space/icc_pathname given, assuming sRGB
Read 786x539 image, 72542 bytes, 153.7 MP/s
Encoding [Container | Modular, lossless, effort: 9 | 14-byte Exif],
Compressed to 19380 bytes including container (0.366 bpp).
786 x 539, 0.25 MP/s [0.25, 0.25], 1 reps, 4 threads.
```
|
|
|
Demiurge
|
2023-02-15 04:57:07
|
https://littlecms.com/img/blog/stress.jpg
|
|
2023-02-15 04:59:35
|
lmao... Firefox still does not support v4
|
|
2023-02-15 05:00:05
|
If you set enablev4=true, all it does is cause v2 profiles to be correct
|
|
2023-02-15 05:00:10
|
not v4
|
|
2023-02-15 05:00:13
|
How stupid
|
|
2023-02-15 05:00:22
|
Otherwise it doesn't even do v2 profiles right lmao
|
|
2023-02-15 05:00:48
|
What's funnier is I think it's literally the only browser that has this problem
|
|
2023-02-15 05:00:55
|
Every other browser works, even vivaldi
|
|
2023-02-15 05:05:39
|
> Fixefox folks argue color management is a thoughput killer, so in order to accelerate things, V4 is de-activated by default and has to be enabled by using an arcane combination. Ok, no problem, I did the gfx.color_management.enableV4=true trick, and tried again. Nope, it still does not work. Using default settings it fails on the 15-years-old test we used to check V2 compatibility. Now on V4 with all bells and whistles activated, Firefox keeps ignoring profiles otherwise fully V4 compliant and valid. It is fast, sure, blazingly fast. But color management doesn’t work. Worst, it works a little bit. That means, you are not sure if the color you see is correct. Which is indeed a very bad situation for color pros. I think it would be better to deactivate completely color correction and specialize this browser on tasks where speed is the main requirement.
|
|
2023-02-15 05:31:57
|
I can convert the v4 test into a jxl but cjxl gives me an error if I try to convert the other 2 v2 tests
|
|
2023-02-15 05:34:10
|
`JxlEncoderAddJPEGFrame() failed.`
`JxlEncoderSetICCProfile() failed.` if `-j 0`
|
|
|
_wb_
|
2023-02-15 08:25:37
|
Oh, interesting. Can you open an issue for that? Or get a more informative error from a debug build?
|
|
|
Peter Samuels
|
|
Demiurge
Every other browser works, even vivaldi
|
|
2023-02-15 08:41:13
|
> even Vivaldi
Is vivaldi's color management somehow different from chromium's?
|
|
|
username
|
|
Peter Samuels
> even Vivaldi
Is vivaldi's color management somehow different from chromium's?
|
|
2023-02-15 08:55:40
|
nope vivaldi is pretty much just chromium but with it's own ui
|
|
|
Peter Samuels
|
2023-02-15 08:56:03
|
That's what I thought
|
|
|
_wb_
|
2023-02-15 09:23:19
|
Is there already a jxl issue for vivaldi?
|
|
|
username
|
2023-02-15 09:31:53
|
I don't think there is a issue filed for adding back in jxl support for vivaldi
|
|
|
Demiurge
|
2023-02-15 09:37:45
|
I don't think vivaldi even has a public issue tracker at all. They just have a forum and someone already made a forum post.
|
|
|
_wb_
Oh, interesting. Can you open an issue for that? Or get a more informative error from a debug build?
|
|
2023-02-15 09:39:06
|
I don't have access to a debug build rn.
|
|
|
username
|
2023-02-15 09:39:33
|
yeah I'm pretty sure vivaldi's issue tracker is private. also what forum post do you see?
|
|
|
Demiurge
|
2023-02-15 09:57:28
|
https://forum.vivaldi.net/topic/61006/support-for-jxl-image-format/
|
|
|
username
|
2023-02-15 09:58:13
|
oh that thread....
|
|
|
Demiurge
|
2023-02-15 09:58:48
|
The image they are referring to is a losslessly-transcoded JPEG
|
|
|
username
|
2023-02-15 09:59:18
|
that thread is very old and the 2 people in it don't know really anything about jxl and they think it's larger then jpeg and webp
|
|
|
Demiurge
|
2023-02-15 09:59:47
|
The reason why it's so large is because the camera's quality settings and quantization tables
|
|
2023-02-15 10:00:03
|
Since it's an original from a camera
|
|
2023-02-15 10:01:02
|
Also they think Ghent is the same as "Gwent," the Witcher card game
|
|
|
Peter Samuels
|
2023-02-15 10:45:26
|
or Welsh county of Gwent perhaps
|
|
|
DZgas Ж
|
2023-02-18 11:35:49
|
while I was fighting with AOM in 2 days, I mastered MSYS2 and now I can build Windows Jpeg XL builds myself <:Windows:806135372298977342> <:JXL:805850130203934781>
|
|
2023-02-19 12:09:58
|
although the received cjxl size 90 megabytes, and requires mingw libraries in same folder. I think it's not that important.
|
|
|
sklwmp
|
2023-02-19 12:18:57
|
that doesn't seem right, why is it so large?
|
|
2023-02-19 12:19:56
|
for example, this static build of cjxl v0.8.1 i compiled yesterday is less than 8MB
|
|
2023-02-19 12:24:07
|
oops, this is an O3 march=native build, right
|
|
2023-02-19 12:37:13
|
what CPU are you running, so I can maybe attempt to make a build for you?
|
|
|
_wb_
|
2023-02-19 07:20:25
|
90 megabytes sounds like it has debug symbols
|
|
|
spider-mario
|
2023-02-19 07:45:48
|
you can change `CMAKE_BUILD_TYPE` to `Release` in `CMakeCache.txt` directly and then rebuild
|
|