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

lonjil
2024-06-13 11:35:04
Like when he calls new instructions from Intel useless, which then end up being used by tons and tons of software and actually very useful (like CMOV, or AVX512)
2024-06-13 11:41:38
Incidentally, CHERI would allow for what Torvalds wants, without any of the issues of monolithic kernels. Different parts could still talk with each other however they want, but you'd have perfect control over which part can interact with which other parts and have this be enforced.
VcSaJen
lonjil also I just saw that the pledge port to Linux was done by Justine Tunney, an actual honest to goodness fascist ๐Ÿคข
2024-06-13 12:49:10
I would still use software even if it was written by Satan himself, as long as there's no history of sneaking malware into it.
a goat
lonjil Like when he calls new instructions from Intel useless, which then end up being used by tons and tons of software and actually very useful (like CMOV, or AVX512)
2024-06-13 04:50:56
In fairness, intel abandoned AVX512 for some kind of variable width revamp. Linus was technically right on that front because now only AMD cpus have access to its instructions, specifically, and who knows if future AMD cpus will. Abandoned instruction sets are such an awful thing
lonjil
a goat In fairness, intel abandoned AVX512 for some kind of variable width revamp. Linus was technically right on that front because now only AMD cpus have access to its instructions, specifically, and who knows if future AMD cpus will. Abandoned instruction sets are such an awful thing
2024-06-13 04:54:18
no. AVX512 is too big for small cores, so Intel is making a 256-bit version for regular consumer CPUs. But AVX512 is going strong on servers. And since AMD isn't doing anything like big.LITTLE, they don't need to care about that and can put AVX512 in everything. Intel's biggest misssteps was treating it like some special feature for servers, instead of getting it onto consumer products.
2024-06-13 04:54:50
But what Linus said was that AVX512 is basically useless for anything other than benchmarks, which is trivially false regardless of whether it's worth the die area to implement it.
a goat
2024-06-13 04:55:24
Ah, I wasn't aware it was still on server CPUs. How annoying
2024-06-13 04:55:38
I hate big.LITTLE so much ughh
lonjil
2024-06-13 04:56:49
AVX10/256 and AVX10/512 will be in future products, and the latter is the same thing as AVX512 just with a bunch of the various extensions to AVX512 made into baseline defaults.
w
2024-06-13 04:57:29
wasnt amd's avx512 also just 256 x 2
lonjil
2024-06-13 04:57:43
The original AVX10 spec also included AVX10/128, but they thankfully removed that ๐Ÿ˜„
a goat
2024-06-13 04:57:45
Oh, I also wasn't aware AVX10 wasn't variable width. I assumed it was like ARM's vector extensions
w wasnt amd's avx512 also just 256 x 2
2024-06-13 04:58:50
It is, but due to weird CPU die power management shenanigans it's actually slightly faster than Intel's implementations
2024-06-13 05:00:26
Intel had this nasty issue where it required underclocking the CPU every time you ran it
2024-06-13 05:00:38
Part of the reason why they took it off the desktop
lonjil
w wasnt amd's avx512 also just 256 x 2
2024-06-13 05:03:15
Zen 4 has two 256-bit FMA units, and four 256-bit non-mul ALUs
2024-06-13 05:04:08
So you get 1.0 512-bit FMA ops per cycle
2024-06-13 05:04:23
plus whatever other misc vector ops you may be doing
a goat Intel had this nasty issue where it required underclocking the CPU every time you ran it
2024-06-13 05:04:33
only for the first generation or so
2024-06-13 05:04:38
they fixed it pretty much immediately
a goat Oh, I also wasn't aware AVX10 wasn't variable width. I assumed it was like ARM's vector extensions
2024-06-13 05:05:45
it just makes the newer instructions available when you use the 256-bit registers instead of the 512-bit ones.
a goat
2024-06-13 05:06:14
Oh I see
Demiurge
2024-06-13 06:48:17
I think it's very easy and it looks very bad to just randomly call some random person a fascist without providing any explanation or evidence or in a context where they can't explain themselves.
JendaLinda
2024-06-14 08:12:09
Vector formats WMF/EMF were the main formats used for cliparts in MS Office. Curiously, MS Office online doesn't seem to support WMF/EMF images.
lonjil
2024-06-14 08:14:51
Apparently iOS 18 encodes HEIC images in a new way, which is incompatible with libheif, so nothing outside the Apple ecosystem can decode those new images. Oops!
a goat
lonjil Apparently iOS 18 encodes HEIC images in a new way, which is incompatible with libheif, so nothing outside the Apple ecosystem can decode those new images. Oops!
2024-06-14 08:22:34
New exclusive picture sharing feature, update to iOS 18โ„ข๏ธ today!
JendaLinda
2024-06-14 09:16:58
HEIC, the image format nobody asked for.
Meow
2024-06-14 10:23:02
HEIC, the image format not for the rest of us
_wb_
lonjil Apparently iOS 18 encodes HEIC images in a new way, which is incompatible with libheif, so nothing outside the Apple ecosystem can decode those new images. Oops!
2024-06-14 11:07:21
Interesting. Are they deviating from the HEIF/HEVC standards, or staying within them but just using stuff that libheif doesn't implement?
lonjil
2024-06-14 11:09:31
I don't know at this time, but that is what's being reported by people who are trying to iOS 18 beta
_wb_
2024-06-14 11:23:22
Can you find a sample file?
lonjil
2024-06-14 11:52:39
I asked for one, we'll see.
JendaLinda
2024-06-14 12:41:54
It seems that multiple versions of jpegtran and tools based on them produce non-compliant EXIF jpegs. jpegtran will automatically insert JFIF marker even if there's already EXIF marker present. However, both EXIF and JFIF specs require their marker being the first at the beginning of the jpeg file. So, if EXIF marker exists in the jpeg file, JFIF simply cannot be inserted, because there's no room for it.
KKT
2024-06-14 07:29:37
Has anyone found any mention of JPEG XL from WWDC? This is the only one I've found so far: https://developer.apple.com/wwdc24/10177 I noticed they were doubling down on HEIC for Apple Vision Pro stereoscopic images and spatial videos are built on top of MVHEVC.
2024-06-14 07:30:44
"And a spatial photo is a stereo HEIC, with two images in a stereo group, along with some spatial metadata. To understand how to read and write these files, we have two sample code projects and an article, on developer.apple.com. Now, letโ€™s take a deeper look at the spatial metadata, common to both file formats. Spatial metadata comprises of a few things. Thereโ€™s the projection. That defines the relationship between objects in the world, and pixels in the image. Spatial photos and videos always use the rectilinear projection." from here: https://developer.apple.com/wwdc24/10166
lonjil
_wb_ Can you find a sample file?
2024-06-14 07:35:17
I haven't heard back yet, but I upgraded my iPad to the beta and took a photo, and it opens just fine on Linux ๐Ÿคทโ€โ™€๏ธ
Meow
2024-06-15 03:13:44
Is a spatial photo still an image?
KKT
Meow Is a spatial photo still an image?
2024-06-15 11:14:06
"Spatial photos and videos are stereo media with additional spatial metadata: A spatial photo is a multi-image HEIC file containing a left-eye image and a right-eye image, a stereo pair group, plus spatial metadata."
Quackdoc
2024-06-15 11:21:39
so... a 3d images
Cacodemon345
2024-06-17 06:36:13
jxrlib is pretty mature, and the JPEG XR format hasn't been altered in ages.
username
2024-06-17 06:37:54
I've heard the encoder in it is pretty mediocre
dogelition
2024-06-17 02:50:57
that doesn't seem right, it definitely supports writing and includes `JxrEncApp` as a command line encoder
username
2024-06-18 01:49:39
there's random mistakes all over Wikipedia, this is probably just a case of that
2024-06-18 01:50:55
I remember one time I was on a Wikipedia page/article about something related to MS Windows and the version of Windows 10 it listed something as first appearing in was just completely wrong
w
2024-06-18 01:55:32
just fix it yourself
2024-06-18 01:56:12
also looking at the history it looks like this page was destroyed
spider-mario
2024-06-18 08:17:39
yeah, sometimes thereโ€™s just plain incorrect stuff (see e.g. antimuscarinic effects before my fix: https://en.wikipedia.org/w/index.php?title=Loratadine&oldid=1220582216#Adverse_effects after my fix: https://en.wikipedia.org/w/index.php?title=Loratadine&oldid=1223946960#Adverse_effects)
jonnyawsom3
2024-06-18 12:39:21
I was just on the wiki page for GIF and a lot of the descriptions say "In 2013 there are plans to release webp", definitely in need of an update
Demiurge
2024-06-19 07:01:02
When I first heard of avif and jxl I was looking forward to both of them becoming adopted and popular. But after what Jim Bankowski did, telling Facebook and Shopify and Intel that there's not enough interest for jxl to remain in the browser, while at the same time being the same person who is responsible for breaking youtube thumbnails in firefox to force them to add support for webp, after that BS and hypocrisy I am extremely anti AVIF :(
2024-06-19 07:04:14
At this point I actually want avif to go the way of j2k
Cacodemon345
2024-06-19 07:14:27
AVIF isn't patent-encumbered the same way JPEG 2000 is. And the companies part of AOM have more than enough money to defend themselves.
Demiurge
2024-06-19 07:22:24
I thought the reasons j2k failed is because it was very slow compared to existing codecs while not a significant enough jump compared to them either.
2024-06-19 07:23:38
Even though it had a much more graceful quality dropoff at low bitrates compared to jpeg
2024-06-19 07:24:08
I was not even aware that j2k was patented
a goat
2024-06-19 11:49:16
Saying you want AVIF to fail is somewhat of a pointless gesture as AVIF is just AV1, which is here to stay. It requires even less effort to maintain than webp
CrushedAsian255
2024-06-19 12:08:44
It canโ€™t really completely โ€œfailโ€ because of what <@334064731604385814> said but JPEG XL still has a chance to become more popular and widely used
damian101
2024-06-19 01:56:48
Once web browsers and popular image editors support JPEG XL, camera manufacturers might start supporting JPEG XL. JPEG XL is way more suited than AVIF to replace JPEG throughout the entire pipeline.
VcSaJen
Demiurge When I first heard of avif and jxl I was looking forward to both of them becoming adopted and popular. But after what Jim Bankowski did, telling Facebook and Shopify and Intel that there's not enough interest for jxl to remain in the browser, while at the same time being the same person who is responsible for breaking youtube thumbnails in firefox to force them to add support for webp, after that BS and hypocrisy I am extremely anti AVIF :(
2024-06-19 02:47:37
That's nothing to do with the format itself, tho?
_wb_
Demiurge When I first heard of avif and jxl I was looking forward to both of them becoming adopted and popular. But after what Jim Bankowski did, telling Facebook and Shopify and Intel that there's not enough interest for jxl to remain in the browser, while at the same time being the same person who is responsible for breaking youtube thumbnails in firefox to force them to add support for webp, after that BS and hypocrisy I am extremely anti AVIF :(
2024-06-19 03:06:40
I don't think youtube thumbnails were broken in firefox, do you have more info about that? I myself thought youtube was pushing webp since its thumbnails break if you disable webp support in chrome devtools, but the thumbnails do actually work in browsers without webp support (so I guess they're just not using the proper way to detect webp support, i.e. they probably look at user agent strings instead of accept headers).
Cacodemon345 AVIF isn't patent-encumbered the same way JPEG 2000 is. And the companies part of AOM have more than enough money to defend themselves.
2024-06-19 03:08:16
JPEG 2000 is not patent encumbered, or at least not more so than JPEG is. Even if it was, the year 2000 is more than 20 years ago so....
2024-06-19 03:09:17
I think AVIF is a great GIF replacement.
2024-06-19 03:11:55
It would be cleaner if Chrome would just support video containers in an <img> tag, like Safari does, instead of requiring everyone to jump through hoops and wrap their AV1 payloads in AVIF.
Demiurge I thought the reasons j2k failed is because it was very slow compared to existing codecs while not a significant enough jump compared to them either.
2024-06-19 03:30:16
J2K didn't really fail, it is the main codec used in digital cinema and in medical imaging. But yes, those are niche applications, and it did fail to get the ubiquitous support that JPEG enjoys. The main reasons for that are, imo, the following: - No good FOSS implementation available. It took until 2004 until there was any FOSS implementation (JasPer), and it was a very slow implementation. It took until 2014 before there was a FOSS implementation that was both conformant and reasonably fast (OpenJPEG). When the only decent implementations are proprietary, widespread adoption is unlikely imo. - For most 'normal' use cases (like web images or consumer photography), the compression performance of JPEG 2000 is not spectacularly better than that of a good JPEG encoder. So in practice it was mostly slower but not really better โ€” why would you bother? - JPEG 2000 has a LOT of functionality, which is nice but also makes it hard to make a full implementation.
spider-mario
_wb_ I think AVIF is a great GIF replacement.
2024-06-19 03:45:24
I can imagine AVIF fans getting somewhat offended by the insinuation that this is all it can be
2024-06-19 03:45:59
I think it would be an effective sentence if one wanted to do that on purpose
2024-06-19 03:46:13
(I donโ€™t think you did)
_wb_
2024-06-19 04:23:46
Any video codec is a great GIF replacement, really. And AVIF can be useful for still images, I suppose, but only for a fairly narrow use case imo (the lower end of the web delivery quality spectrum, mostly).
Demiurge
a goat Saying you want AVIF to fail is somewhat of a pointless gesture as AVIF is just AV1, which is here to stay. It requires even less effort to maintain than webp
2024-06-19 04:34:33
It's just a heic container with av1 payload and heic is kinda a dumb format.
VcSaJen That's nothing to do with the format itself, tho?
2024-06-19 04:35:06
Correct
2024-06-19 04:53:12
https://github.com/webcompat/web-bugs/issues/13886 https://www.reddit.com/r/firefox/comments/7g0xor/firefox_has_stopped_showing_youtube_thumbnails/
_wb_
Demiurge It's just a heic container with av1 payload and heic is kinda a dumb format.
2024-06-19 06:24:39
The container is HEIF. HEIC is when the payload of a HEIF is HEVC (technically it has to conform to the Main profile, so 8-bit yuv420, too to be called HEIC; the 10-bit variant is called HEIX).
2024-06-19 06:25:52
AVIF uses the MIAF container, which is a subset of HEIF, which is an extension of ISOBMFF.
Demiurge https://github.com/webcompat/web-bugs/issues/13886 https://www.reddit.com/r/firefox/comments/7g0xor/firefox_has_stopped_showing_youtube_thumbnails/
2024-06-19 06:28:50
That was one specific day where YouTube was broken, the next day it worked again. I don't think this was intentional.
Demiurge
2024-06-19 07:51:22
And ISOBMFF is a fancy name for MP4 right?
2024-06-19 07:51:29
or MOV
2024-06-19 07:53:47
Well, intentional or not, YT was sending webp thumbnails to firefox for whatever reason, and I think it reoccured several times, and I think it was a big factor in them deciding to add support for webp, surprisingly even long before safari did.
2024-06-19 07:54:00
For some reason sites were breaking in firefox but not in safari.
2024-06-19 07:54:22
Almost like it was intentional or something.
Quackdoc
2024-06-19 07:56:55
web compatibility issues may be rare now, but in the past they certainly were not.
_wb_
Demiurge And ISOBMFF is a fancy name for MP4 right?
2024-06-19 08:27:57
Yeah, basically just PNG chunks without the CRCs ๐Ÿ™‚
VEG
Demiurge Well, intentional or not, YT was sending webp thumbnails to firefox for whatever reason, and I think it reoccured several times, and I think it was a big factor in them deciding to add support for webp, surprisingly even long before safari did.
2024-06-20 03:57:58
I think the main factor was Chrome finally supporting APNG so Firefox could support WebP in response ๐Ÿ˜†
JendaLinda
2024-06-20 05:59:07
Using Paeth filter for the first row of pixels in PNG is an interesting choice.
lonjil
_wb_ Interesting. Are they deviating from the HEIF/HEVC standards, or staying within them but just using stuff that libheif doesn't implement?
2024-06-20 12:32:21
Apparently it's this issue: https://github.com/strukturag/libheif/issues/1190
jonnyawsom3
2024-06-20 02:18:15
I'm not home at the moment, but yesterday a friend tried to use Discord's server profile feature. For some reason, the file got corrupted and resulted in a 127 byte WebP image with a grid pattern. I'll upload it here later since it's accidental WebP art haha
_wb_
lonjil Apparently it's this issue: https://github.com/strukturag/libheif/issues/1190
2024-06-20 03:23:30
Looks like HEIF is becoming the new TIFF...
spider-mario
2024-06-20 04:19:27
and not in a good way
jonnyawsom3
I'm not home at the moment, but yesterday a friend tried to use Discord's server profile feature. For some reason, the file got corrupted and resulted in a 127 byte WebP image with a grid pattern. I'll upload it here later since it's accidental WebP art haha
2024-06-20 05:50:05
274 bytes, but still :P
2024-06-20 05:50:11
Even has alpha
_wb_ Looks like HEIF is becoming the new TIFF...
2024-06-20 05:51:03
Everything becomes TIFF if you look hard enough
Quackdoc
2024-06-20 05:59:40
You aren't truly TIFF unless you have really absurd flag names for various things.
spider-mario
2024-06-20 07:39:46
Any sufficiently complicated image container format contains an ad hoc, informally-specified, bug-ridden, slow implementation of a quarter of TIFF
Quackdoc
2024-06-20 08:04:56
Ive always hated tiff stupid names for stuff, why is associated alpha's flag called `ExtraSamples`
_wb_
2024-06-20 08:09:34
TIFF is what happens if you define a format based on what is convenient for an encoder
2024-06-20 08:10:53
Like: whatever memory layout you're using for your images, chances are you can just write some TIFF headers and dump it to a file.
cutename
2024-06-20 08:13:04
I'd say there's some value in preserving many layouts
Quackdoc
2024-06-20 08:13:09
well, at least we have a real alternative now
cutename
2024-06-20 08:13:13
do we?
_wb_
2024-06-20 08:13:24
Big endian, little endian, planar, interleaved, whole buffers or tiles or slices? 0 is black or 0 is white? RGB or BGR? Don't worry, whatever you happen to do, TIFF has you covered.
2024-06-20 08:13:58
Encoder convenience comes at the cost of decoder inconvenience though.
cutename
2024-06-20 08:14:06
entirely fair
2024-06-20 08:14:35
at least it didn't make the mistake of limiting itself to one alpha encoding
Quackdoc
cutename do we?
2024-06-20 08:15:03
there isn't really much we need now outside of JXL and EXR, most bases are covered
cutename
_wb_ Encoder convenience comes at the cost of decoder inconvenience though.
2024-06-20 08:15:06
(and yes, I have tasted this myself, I wrote a (non-compliant, obviously) TIFF decoder in python (never again) for a school project a few years back and it barely worked)
2024-06-20 08:15:41
the format with the pointers to the data is absolutely bonkers
_wb_
2024-06-20 08:16:17
I like having bitstream expressivity so you have degrees of freedom when compressing, and all functionality is covered. But I don't like having many options that are basically equivalent in terms of compression or functionality. Just pick something and make it the convention.
lonjil
2024-06-20 08:16:55
Blender's .blend files are basically straight dumps of Blender's in-memory data structures, and you can still open 20 year old .blend files in modern Blender.
_wb_
2024-06-20 08:17:08
TIFF even allows the f'ing _headers_ to be either big endian or little endian
cutename
lonjil Blender's .blend files are basically straight dumps of Blender's in-memory data structures, and you can still open 20 year old .blend files in modern Blender.
2024-06-20 08:17:09
how the fuck
_wb_ TIFF even allows the f'ing _headers_ to be either big endian or little endian
2024-06-20 08:17:15
MM :P
lonjil
cutename how the fuck
2024-06-20 08:17:57
it writes out a detailed description of the structures, which Blender has a parser for. So it's the same thing, decoder has to be way more complicated.
Quackdoc
2024-06-20 08:18:07
TIFF: the image format for literally every use ever
cutename
lonjil it writes out a detailed description of the structures, which Blender has a parser for. So it's the same thing, decoder has to be way more complicated.
2024-06-20 08:18:08
that's smart
Quackdoc TIFF: the image format for literally every use ever
2024-06-20 08:18:15
even geotiff
2024-06-20 08:18:42
I like TIFF, but it is like, the 15 competing standards meme in an image format
_wb_ I like having bitstream expressivity so you have degrees of freedom when compressing, and all functionality is covered. But I don't like having many options that are basically equivalent in terms of compression or functionality. Just pick something and make it the convention.
2024-06-20 08:19:49
alpha encoding and chroma location are examples of things you can't just fix with some simple reordering in the encoder, some things just require a lossy conversion
lonjil
2024-06-20 08:19:52
Though modern blender ofc won't *have* all the same structures as old blender, features have been removed. In that case, Blender can still parse that structure and see how it's linked to other stuff, just can't use it. The GUI will just be like, yeah here's a "foobar" structure with these members.
Quackdoc
2024-06-20 08:19:53
"This swiss army knife contains a pipewrench and a soldering iron"
cutename
lonjil Though modern blender ofc won't *have* all the same structures as old blender, features have been removed. In that case, Blender can still parse that structure and see how it's linked to other stuff, just can't use it. The GUI will just be like, yeah here's a "foobar" structure with these members.
2024-06-20 08:20:59
it's a clever design, maybe a bit too clever
_wb_
2024-06-20 08:21:03
TIFF also went through this weird trajectory of being 'owned' (in terms of spec authority) by Adobe, then being 'released' from being a proprietary format and becoming an ISO standard, and then becoming something 'owned' by Adobe again. If I understand correctly.
cutename
2024-06-20 08:21:52
i love format politics
_wb_
cutename alpha encoding and chroma location are examples of things you can't just fix with some simple reordering in the encoder, some things just require a lossy conversion
2024-06-20 08:23:12
Yeah when it makes a semantic/functional difference it makes sense to support multiple things. We also have both kinds of alpha in jxl.
2024-06-20 08:25:08
But supporting both min_is_white and min_is_black, big endian and little endian, etc: that's just silly imo. Way easier for an encoder to just take what it has and write it in whatever way is the convention, than for a decoder to have to deal with all possible things.
Quackdoc
2024-06-20 08:25:51
this is a large reason why I hate cmyk lol
cutename
_wb_ But supporting both min_is_white and min_is_black, big endian and little endian, etc: that's just silly imo. Way easier for an encoder to just take what it has and write it in whatever way is the convention, than for a decoder to have to deal with all possible things.
2024-06-20 08:27:15
I agree
2024-06-20 08:32:29
I actually have no clue how inkjet printers deal with this, but IMO, the amount of actual ink flowing out of the head ought to be controllable (and not abstracted over a generic color space), that would move complexity to the computer, but it would also allow for good color management (and bad color management, unfortunately)
_wb_
2024-06-20 08:32:50
Fundamentally I think CMYK should not be needed in image authoring. It should be the task of the printer to figure out how best to reproduce a given image, not the image author. Sure, authoring tools can help you to do things like gamut proofing, but editing directly in CMYK feels like it's too low level and trying to solve a problem at the wrong system layer.
cutename
2024-06-20 08:33:45
that seems agreeable, but actually converting to the printing device's particular color space should be handled by the OS printing abstraction (and not by the printer) (yes, this means the OS needs to do color management, but desktop computers are more powerful than whatever tiny thing printers have)
_wb_
2024-06-20 08:36:49
If printers want to move on to 7-color CMYKOGV, just let them do that. It should be done at the level of printer drivers or even inside the printer itself, and you should be able to just send an RGB image in some gamut to a printer and it just does its best to reproduce the colors, according to the given rendering intent.
JendaLinda
2024-06-21 05:43:36
Printers have tendency to darken everything. I was using inkjet printers from two manufacturers and they both used very crude conversion formula from RGB to CMYK, like: rgb (255,255,0) becomes full density yellow ink rgb(255,0,255) becomes full density magenta ink rgb(0,255,255) becomes full density cyan ink If you colored a row of cells in Excel with rgb(0,255,0) it became dark green and the paper was wrinkling how wet it got.
_wb_ Big endian, little endian, planar, interleaved, whole buffers or tiles or slices? 0 is black or 0 is white? RGB or BGR? Don't worry, whatever you happen to do, TIFF has you covered.
2024-06-21 06:12:56
Does TIFF support paletted planar format used in EGA and VGA? PCX does ๐Ÿ™‚ This format uses four bit planes, each of them is 1 bit monochrome. With the default palette, the planes correspond to blue channel, green channel, red channel and intensity The latter chooses between darker and lighter version of the color.
_wb_
JendaLinda Does TIFF support paletted planar format used in EGA and VGA? PCX does ๐Ÿ™‚ This format uses four bit planes, each of them is 1 bit monochrome. With the default palette, the planes correspond to blue channel, green channel, red channel and intensity The latter chooses between darker and lighter version of the color.
2024-06-21 08:36:37
I think it does, at least it does support 4-bit palettes.
JendaLinda Printers have tendency to darken everything. I was using inkjet printers from two manufacturers and they both used very crude conversion formula from RGB to CMYK, like: rgb (255,255,0) becomes full density yellow ink rgb(255,0,255) becomes full density magenta ink rgb(0,255,255) becomes full density cyan ink If you colored a row of cells in Excel with rgb(0,255,0) it became dark green and the paper was wrinkling how wet it got.
2024-06-21 08:43:42
So that's just interpreting RGB with 0-is-black as CMY with 0-is-full-ink. That's a very poor way of doing it, not even trying to use the K and avoiding to use more ink than the paper can handle. Let alone taking into account that the RGB primaries are not at all identical to (M+Y), (C+Y), (C+M), and that inks combine in much more complicated ways than light does.
JendaLinda
_wb_ I think it does, at least it does support 4-bit palettes.
2024-06-21 09:39:13
I didn't see anything that would suggest 4bit planar in TIFF. 4bit chunky is nothing unusual. 4bit planar is closely related to EGA/VGA hardware so it was commonly used by programs and games in DOS, but it is only useful if the software interacts with hardware directly. CGA format is also interesting. It is 2bit chunky, paletted, but it is interlaced so odd and even lines are stored separately. Anyway. couldn't libtiff be used to decode any compliant TIFF image?
_wb_ So that's just interpreting RGB with 0-is-black as CMY with 0-is-full-ink. That's a very poor way of doing it, not even trying to use the K and avoiding to use more ink than the paper can handle. Let alone taking into account that the RGB primaries are not at all identical to (M+Y), (C+Y), (C+M), and that inks combine in much more complicated ways than light does.
2024-06-21 09:51:20
I know, right? Black ink seems to be used only for full black or for grayscale. And there is no doubt that inks printed on paper have completely different response curves than electronic displays.
_wb_
2024-06-21 09:59:09
Baseline TIFF is one thing, there are also lots of extensions and I dunno how well libtiff covers those, but definitely not everything.
2024-06-21 10:06:09
Oh, 4 bit planar with the 1 bit for intensity would indeed not be supported by TIFF, I think. I think you can do planar 1-bit RGB, and I suppose you could have a 1-bit extra sample, but to make it be interpreted as an intensity modifier, I don't think you can do that โ€” but maybe it is possible, e.g. interpreting it as alpha with an unusual range so 0 means 0.5 and 1 means 1, or something.
2024-06-21 10:06:30
(and then having an implicit black background somehow)
JendaLinda
_wb_ Oh, 4 bit planar with the 1 bit for intensity would indeed not be supported by TIFF, I think. I think you can do planar 1-bit RGB, and I suppose you could have a 1-bit extra sample, but to make it be interpreted as an intensity modifier, I don't think you can do that โ€” but maybe it is possible, e.g. interpreting it as alpha with an unusual range so 0 means 0.5 and 1 means 1, or something.
2024-06-21 10:18:53
In practice, the RGBI scheme is the default palette but if using a custom palette, the four bits become an index to the palette.
2024-06-21 10:19:47
Also the default VGA palette is not strictly RGBI.
_wb_
2024-06-21 10:20:52
How weird to use planar bitplanes for palette indices. I wonder why EGA/VGA did that, it seems rather inpractical
JendaLinda
_wb_ How weird to use planar bitplanes for palette indices. I wonder why EGA/VGA did that, it seems rather inpractical
2024-06-21 10:32:14
It was done because in 16bit systems, the memory could be accessed only inside 64kB segments. The video memory was mapped to the CPU address space as well. 640x480 4bit does not fit in 64kB so it had to be split somehow. The solution was to split it to four bit planes that overlap inside the same address space. Access to the individual bit planes can be tuned on or off in the control register, so one or more bit planes can be written at once. That was useful for rendering text on screen in graphics modes, for example.
2024-06-21 10:33:40
One would just set the bitplaness according to the desired color and render the characters.
2024-06-21 10:42:33
Also, I suppose, splitting pixels into bit planes simplified the circuity pushing the pixels to the monitor. Early graphics adapters were implemented entirely in logic.
Demiurge
2024-06-22 08:40:30
lonjil
2024-06-22 08:49:13
wat
JendaLinda
2024-06-22 09:18:39
Meanwhile, AVIF decoding in Windows 11 is still broken.
2024-06-22 09:30:09
MS Edge seems to be OK, but MS Paint and Photo App show incorrect colors.
cutename
2024-06-22 09:38:42
considering the hatred that webp is getting, I think jxl will never take off
2024-06-22 09:38:53
google tried to make it a thing, and in the eyes of many, still failed
jonnyawsom3
2024-06-22 09:42:03
WebP has it's reputation because of it's slow adoption, JXL is already in most major places (bar Chrome) with Windows hinting at adding it soon too
Quackdoc
WebP has it's reputation because of it's slow adoption, JXL is already in most major places (bar Chrome) with Windows hinting at adding it soon too
2024-06-22 09:42:45
webp has its reputation because most implantations were massively buggy and some still are
2024-06-22 09:43:29
I still to this day occasionally find webp images that render incorrectly depending on the app
cutename
2024-06-22 09:44:45
I mostly see/saw people complaining about not being able to open ones in e.g. photoshop, but perhaps jxl will fare better
Quackdoc
2024-06-22 09:46:11
well I would say it already has comparable adoption in terms of applications lol
jonnyawsom3
2024-06-22 09:49:14
Yeah, Adobe are some of the people pushing for it, even if they're a bit misguided in their implementations *ahem DNG*, but it's also in multiple image libaries which immediately expands support to any application using them
JendaLinda
2024-06-23 05:34:05
Well, there are still websites focused on hosting images that don't allow uploads in WebP.
spider-mario
2024-06-23 09:09:20
https://www.threads.net/@stopsatgreen/post/C8MyOUDI6F6
Quackdoc
2024-06-23 09:17:36
oof
JendaLinda
2024-06-23 01:06:44
I was quite surprised when I found out that WebP uses RIFF file structure established and used by Microsoft.
CrushedAsian255
JendaLinda I was quite surprised when I found out that WebP uses RIFF file structure established and used by Microsoft.
2024-06-23 01:26:30
i guess it's a simple TLV-based container
2024-06-23 01:26:36
so it's a reasonable choice
2024-06-23 01:27:00
licensing shouldn't be a problem for such an old/simple format
2024-06-23 01:27:08
also i think all patents would have expired
2024-06-23 01:27:57
it would be way weirder if they used ASF for it
JendaLinda
CrushedAsian255 licensing shouldn't be a problem for such an old/simple format
2024-06-23 02:38:45
Licences wouldn't be a problem, RIFF is based on IFF format from Amiga.
2024-06-23 02:42:13
Using RIFF header seems kinda unnecessary as WebP doesn't utilize any RIFF features like LIST for grouping subchunks or INFO for metadata.
2024-06-23 06:59:28
There are now three RIFF based formats for motion pictures - AVI, ANI and WebP.
jonnyawsom3
2024-06-23 08:17:03
I was checking some release notes for Unreal Engine 5.4, then I noticed some dithering in one of their videos... Lo and behold, the entire thing is using 5fps GIFs limited to 3 seconds because of filesize. With some juicy metadata too https://dev.epicgames.com/documentation/en-us/unreal-engine/unreal-engine-5.4-release-notes#clonersandeffectors https://d1iv7db44yhgxn.cloudfront.net/documentation/images/fc598aec-4852-47e5-86a0-de15406860d2/image_2.gif
2024-06-23 08:17:26
Nothing quite says 'The future of graphics' like that
A homosapien
2024-06-24 12:41:21
> "Hey guys, look at the next generation of graphics" *Shows new features using an image format from 1987*
JendaLinda
2024-06-24 06:30:27
GZDoom recently added support for graphics in WebP and QOI formats.
jonnyawsom3
2024-06-24 01:09:32
<@365045091951312897> added them about a year ago along with JXL support https://github.com/ZDoom/gzdoom/pull/2131 https://github.com/ZDoom/gzdoom/pull/2124 https://github.com/ZDoom/gzdoom/pull/2133
2024-06-24 01:09:52
But JXL was pulled due to broken vcpkg files https://github.com/ZDoom/gzdoom/commit/53d8a5bb2cb3b4f5576d9286731ad5a4bd972949
username
2024-06-24 01:11:21
iirc JXL support was also dropped since it was considered a little bit too early too add/keep it plus the binary size being a bit too large for libjxl
2024-06-24 01:15:06
I think the vcpkg stuff ended up getting fixed at some point, forgot if it was on libjxl's side or vcpkg's side but I remember fixes being proposed for both sides
JendaLinda
2024-06-24 05:16:02
Interesting. I wonder if decode only version of libjxl can be compiled and if so, how much lighter the binary is.
2024-06-24 05:17:30
Or perhaps some independent decoding library might be a better solution.
_wb_
2024-06-24 05:33:13
There is a libjxl_dec compile option that does that. I think that one is about 200k on Android, iirc.
JendaLinda
2024-06-25 11:02:53
I suppose 2 bpp pngs are pretty rare.
_wb_
2024-06-25 01:29:27
you mean 2-bit grayscale? Yeah I suppose that must be one of the rarest kinds of pngs
2024-06-25 01:30:18
though 2-bit palette images might be a bit more common, like for CGA screenshots or something
JendaLinda
2024-06-25 01:49:26
CGA screenshots could be 2 bit palette as long as they are optimized.
2024-06-25 01:50:18
AFAIK there are not many programs that can write 2 bit PNGs by themselves.
_wb_
2024-06-25 02:24:29
I guess most wouldn't bother to implement that specific bit packing, no.
JendaLinda
2024-06-25 03:00:23
It is an emulator, the pixels in CGA framebuffer are already conveniently packed.
jonnyawsom3
2024-06-25 03:02:19
There was a discussion about emulators using JXL patches to essentially re-render game frames using the sprites, but no one's taken up the challenge yet
JendaLinda
2024-06-25 03:03:14
CGA doen't have sprites but patches could be used to render text modes.
jonnyawsom3
2024-06-25 03:06:20
The heat must be getting to me, for some reason I was interpreting CGA as Color Gameboy Advance... Whatever that would mean... Nevermind
JendaLinda
2024-06-25 03:08:19
No problem, patches would be useful for good old MS-DOS as well.
2024-06-25 03:09:27
Regarding grayscale PNGs, these must be very rare in general as grayscale images are often encoded as paletted.
2024-06-25 03:14:36
That's it, paletted images where the palette is 256 steps from rgb(0,0,0) to rgb(255,255,255).
2024-06-25 06:28:31
I guess one reason could be that GIF and BMP don't support grayscale at all.
Posi832
I was checking some release notes for Unreal Engine 5.4, then I noticed some dithering in one of their videos... Lo and behold, the entire thing is using 5fps GIFs limited to 3 seconds because of filesize. With some juicy metadata too https://dev.epicgames.com/documentation/en-us/unreal-engine/unreal-engine-5.4-release-notes#clonersandeffectors https://d1iv7db44yhgxn.cloudfront.net/documentation/images/fc598aec-4852-47e5-86a0-de15406860d2/image_2.gif
2024-06-26 08:27:46
Jesus christ. That page loaded 113 MB of images in total.
CrushedAsian255
2024-06-26 08:28:44
Someone forgot to tell them what an mp4 is?
HCrikki
2024-06-26 08:41:07
epic serves its web content like its running on intranet
JendaLinda
2024-06-26 10:09:41
I was going to say they didn't even try to optimize the gifs but these can't be optimized. Lossy LZW decreased the file size significantly, though. With such distracting dithering, a little bit more noise won't hurt.
jonnyawsom3
I was checking some release notes for Unreal Engine 5.4, then I noticed some dithering in one of their videos... Lo and behold, the entire thing is using 5fps GIFs limited to 3 seconds because of filesize. With some juicy metadata too https://dev.epicgames.com/documentation/en-us/unreal-engine/unreal-engine-5.4-release-notes#clonersandeffectors https://d1iv7db44yhgxn.cloudfront.net/documentation/images/fc598aec-4852-47e5-86a0-de15406860d2/image_2.gif
2024-06-26 10:17:46
Running that GIF through this reveals it even has Adobe edit history metadata too, so not only did they not bother optimising, but it's actually even worse than just a plain GIF https://compress-or-die.com/analyze
JendaLinda
2024-06-26 10:21:39
Form 2953991 bytes to 1905150 bytes using `gifsicle -b -O3 --lossy image_2.gif`
2024-06-26 10:22:39
gifsicle removed the XMP tag automatically
2024-06-26 10:23:29
Could save even more by trying different values for lossy.
2024-06-26 09:31:23
Most modern programs always write GIF89a even if GIF87a would do. Ancient software often supports only GIF87a as it doesn't understand transparency and animation. Luckily, gifsicle automatically converts non-transparent, non-animated GIFs to GIF87a.
spider-mario
2024-06-26 09:33:21
why would someone ever use GIF for such images in the first place?
JendaLinda
2024-06-26 09:35:11
As I said, ancient software. It's fun playing with historic computer stuff.
2024-06-28 12:01:29
ECT for some reason likes using PNG filters Up and Paeth on the first scanline.
TheBigBadBoy - ๐™ธ๐š›
2024-06-28 07:46:56
<@219525188818042881> gonna move here to not pollute <#1256302117379903498> <:KekDog:805390049033191445> 200 bytes smaller than befoer
Fox Wizard
2024-06-28 08:07:01
Nice. Gotta make it even smallerโ„ข๏ธ
JendaLinda
2024-06-29 07:51:48
This toolset for APNG doesn't seem to be able to produce pngs under 8 bpp. https://apngasm.sourceforge.net/
2024-06-29 07:55:25
I was testing this on black and white 1 bit pixel art and the best it could do was 8 bpp palette. Too bad ECT doesn't support APNG.
jonnyawsom3
2024-06-29 08:48:30
Oxipng does to a limited extent
A homosapien
2024-06-29 09:00:58
pingo does as well
JendaLinda
2024-06-29 10:22:20
oxipng only compresses the first frame and the rest is just copied. pingo still produces just 8 bit palette.
2024-06-29 02:25:02
APNG has a serious flaw. It doesn't support local palettes. GIF using local palettes needs to be converted to 24 bpp APNG and the file size of the resulting APNG is about the size of the original GIF.
A homosapien
2024-06-29 06:15:17
It's a shame Mozilla didn't think local palettes were a good feature to keep. It kind of invalidates the point of apng replacing gif.
JendaLinda
2024-06-29 09:22:26
They thought it's not necessary because anybody can just use 24 ppp or 32 bpp.
TheBigBadBoy - ๐™ธ๐š›
JendaLinda oxipng only compresses the first frame and the rest is just copied. pingo still produces just 8 bit palette.
2024-06-30 07:34:37
same for `ect --reuse`
2024-06-30 07:34:54
well the "only 1st frame compression"
JendaLinda
TheBigBadBoy - ๐™ธ๐š› well the "only 1st frame compression"
2024-06-30 07:40:03
I'd expect at least zopflify all deflate streams in the file.
TheBigBadBoy - ๐™ธ๐š›
2024-06-30 07:51:38
yeah, but unfortunately ECT's dev don't want APNG support https://github.com/fhanau/Efficient-Compression-Tool/issues/130
2024-06-30 07:51:51
<:FeelsSadMan:808221433243107338>
JendaLinda
2024-06-30 08:02:52
ECT is using zopflipng internally so I suppose as long as zopflipng doesn't support apng, ECT will not as well.
2024-06-30 08:09:53
Has anybody any idea which compression library pingo uses? The source code doesn't seem to be available. The fact that there are several different projects called pingo doesn't help.
TheBigBadBoy - ๐™ธ๐š›
2024-06-30 08:13:41
I've seen on encode.su forums that a image optimizer was stealing code from others and just do small changes but can't remember if it was pingo ๐Ÿค”
JendaLinda
2024-06-30 08:37:00
APNG tools are not that great in general. The available tools will encode animations like this using 8 bit palette.
TheBigBadBoy - ๐™ธ๐š›
2024-06-30 08:50:40
makes me think of flipnote studio <:KekDog:805390049033191445>
2024-06-30 08:55:02
wait, it is from flipnote studio x)
JendaLinda
2024-06-30 09:20:24
Interesting, I didn't know the app. I think i found the gif on some forum years ago.
Crite Spranberry
2024-06-30 09:27:59
Dumb idea I've had What if there was a codec that just had a byte to identify if image was 24 or 32 bit, then just the colors for every pixel in hexadecimal with no spacing or anything. It would use the information from the first byte to identify where each pixel begins and ends. And then it's compressed with something, 7z or whatever would work the best in this case
JendaLinda
Crite Spranberry Dumb idea I've had What if there was a codec that just had a byte to identify if image was 24 or 32 bit, then just the colors for every pixel in hexadecimal with no spacing or anything. It would use the information from the first byte to identify where each pixel begins and ends. And then it's compressed with something, 7z or whatever would work the best in this case
2024-06-30 09:29:56
You also need to specify the image dimensions.
Crite Spranberry
2024-06-30 09:30:11
Oh yeah, I should've thought about that
JendaLinda
2024-06-30 09:31:22
PAM format is probably the closest to this idea. It has a simple text header followed by raw bytes of pixel data.
w
2024-06-30 09:33:33
bmp with bitmap
2024-06-30 09:33:50
tiff
JendaLinda
w tiff
2024-06-30 09:35:20
TIFF can be very complex. There are just too many options how pixels can be encoded.
2024-06-30 09:36:27
BMP can be tricky as well, if you consider the full spec and not just the version from Windows 3.x
2024-06-30 09:41:05
And the simple BMP doesn't support alpha.
TheBigBadBoy - ๐™ธ๐š›
Fox Wizard Nice. Gotta make it even smallerโ„ข๏ธ
2024-06-30 10:36:39
๐Ÿ•
2024-06-30 10:36:47
<:KekDog:805390049033191445>
VEG
TheBigBadBoy - ๐™ธ๐š› yeah, but unfortunately ECT's dev don't want APNG support https://github.com/fhanau/Efficient-Compression-Tool/issues/130
2024-06-30 12:28:31
I wonder why, do they think that it's not popular enough? ๐Ÿค”
2024-06-30 12:31:54
It's actually used in some popular places. For example, Steam uses it for all animations here https://store.steampowered.com/points/shop/
2024-06-30 12:33:07
I would tell that I see it more often than animated WebP
JendaLinda
2024-06-30 12:33:40
I t would be too much work because the underlying zopflipng doesn't support APNG. Perhaps this will change as APNG is becoming part of the official spec.
_wb_
Crite Spranberry Dumb idea I've had What if there was a codec that just had a byte to identify if image was 24 or 32 bit, then just the colors for every pixel in hexadecimal with no spacing or anything. It would use the information from the first byte to identify where each pixel begins and ends. And then it's compressed with something, 7z or whatever would work the best in this case
2024-06-30 12:36:06
That is what we call an "uncompressed image buffer" ๐Ÿ™‚
CrushedAsian255
_wb_ That is what we call an "uncompressed image buffer" ๐Ÿ™‚
2024-06-30 01:45:25
so just ```cpp fwrite(image.buffer, image.width*image.height*image.bpp/8, 1, output_file); ```?
_wb_
2024-06-30 02:27:17
Some header for width/height/bitdepth/nbchans and then that, yes
JendaLinda
2024-06-30 02:44:47
Title screens in DOS games were often made as raw pixel arrays that were simply copied into video memory. The images were often stored uncompressed in the game files. The fancier ones used RLE compression.
2024-06-30 03:05:12
JXL supports the appropriate bit depths for old PC graphics. 2 bpc for CGA/EGA and 6 bpc for VGA/MCGA
_wb_
2024-06-30 03:48:18
2 bpp for CGA, 4 bpp for EGA, 8 bpp for VGA, iirc?
JendaLinda
_wb_ 2 bpp for CGA, 4 bpp for EGA, 8 bpp for VGA, iirc?
2024-06-30 04:50:02
That's correct. These are all paletted. In EGA and VGA, the palette can be freely changed. For JXL, the color indexes are expanded to RGB pixels according to the palette. The size of VGA palette entry is 18 bits, 6 bits per channel. The size of EGA palette entry is 6 bits, 2 bits per channel. CGA can actually do 16 colors in text mode, so the video hardware is 4 bpp. The default 16 color palettes in both EGA and VGA are equivalent to the CGA 16 colors.
A homosapien
JendaLinda APNG tools are not that great in general. The available tools will encode animations like this using 8 bit palette.
2024-06-30 11:14:57
animated webp does a proper 1-bit encode btw, the resulting file is much smaller
Fox Wizard
TheBigBadBoy - ๐™ธ๐š› <@219525188818042881> gonna move here to not pollute <#1256302117379903498> <:KekDog:805390049033191445> 200 bytes smaller than befoer
2024-06-30 11:19:27
<:KittyPizza:1147750033018605680>
CrushedAsian255
2024-07-01 12:04:13
Is the site available anywhere
TheBigBadBoy - ๐™ธ๐š›
Fox Wizard <:KittyPizza:1147750033018605680>
2024-07-01 06:15:47
```format error: incorrect number of xref entries in trailer, repairing warning: trying to repair broken xref warning: repairing PDF document```but I checked and yeah it's lossless <:FeelsSadMan:808221433243107338>
JendaLinda
A homosapien animated webp does a proper 1-bit encode btw, the resulting file is much smaller
2024-07-01 08:54:01
This is not problem with APNG, it's a problem with tools. I know WebP is much better than APNG but sometimes I can't use WebP.
2024-07-01 09:09:36
That's annoying, `apngopt` is splitting IDAT and fdAT chunks into several smaller chunks.
A homosapien
2024-07-01 11:35:27
yeah, since APNG was not part of the spec for many years, there was no desire to really implement quality tools
JendaLinda
2024-07-01 12:14:08
I couldn't even find any tool that would do a very simple task. Split APNG to individual frames and combine frames to APNG, without touching the compressed data.
2024-07-01 12:23:44
This tool is very useful for hacking PNGs https://entropymine.com/jason/tweakpng/
jonnyawsom3
JendaLinda I couldn't even find any tool that would do a very simple task. Split APNG to individual frames and combine frames to APNG, without touching the compressed data.
2024-07-01 04:30:10
Only way I can think of would be using tweakPNG or something to manually replace and merge the IDAT chunks
2024-07-01 04:30:28
Okay I should've scrolled down an inch more....
JendaLinda
2024-07-01 04:33:16
That's what I'm doing now. Additionally I have to add/remove chunk numbers. APNG chunks are numbered. So yeah, TweakPNG and HxD are the tools for managing APNGs.
2024-07-02 09:13:04
Anyway, `apngopt` does inter-frame optimizatios, which is good, but doesn't do the extra step to reduce bit depth in very low color animations. So the solution would be extract the frames and use dedicated PNG optimizer. Doing manual extraction is time consuming.
2024-07-02 09:16:21
Also `pngout` has a very useful feature which I didn't see in other PNG optimizers. It can select a specific color type and bit depth and it will use it as long as it's lossless. This is especially handy for making sure all frames in APNG will be compatible.
Demiurge
2024-07-03 11:30:19
I wonder how JXL in DNG with bayer encoding works...
jonnyawsom3
2024-07-03 07:52:13
I'll let you know in a week when I get the conversion tool to actually give an output
CrushedAsian255
2024-07-03 11:16:31
Hereโ€™s what I have
2024-07-03 11:16:33
https://discord.com/channels/794206087879852103/1255149718078619662/1255150125559320727
2024-07-03 11:16:57
<@238552565619359744>
2024-07-03 11:17:10
Oh nvm youโ€™re the one with me in that thread
2024-07-03 11:17:16
lol
A homosapien
A homosapien > "Hey guys, look at the next generation of graphics" *Shows new features using an image format from 1987*
2024-07-04 06:25:04
https://dolphin-emu.org/blog/2024/07/02/dolphin-releases-announcement/
2024-07-04 06:25:38
Ironically an emulator website has the best practices, a looping av1 video
Crite Spranberry
Crite Spranberry Dumb idea I've had What if there was a codec that just had a byte to identify if image was 24 or 32 bit, then just the colors for every pixel in hexadecimal with no spacing or anything. It would use the information from the first byte to identify where each pixel begins and ends. And then it's compressed with something, 7z or whatever would work the best in this case
2024-07-04 07:22:37
<@1072709049310785637> maybe look at this idk
TheBigBadBoy - ๐™ธ๐š›
2024-07-04 10:57:03
lately, I find myself removing JPG artifacts from PNG in a weird way Let's say someone converts an ugly JPG to PNG (using djpeg-like), and sends only the PNG. There are noticeable artifacts near sharp edges/borders/etc, and to remove them I'm currently encoding the PNG to JPG (using `cjpegli -d 1`), then `jpeg2png` This works really well as I don't see anymore tha JPG compression artifacts (the quality can only be better, tested on dozen files), but that way of doing feels weird, no?
Crite Spranberry
2024-07-04 11:23:24
Hmm I've never really bothered to try it, but what about waifu2x (one of the many websites that offer it for free), no upscaling, and just JPEG noise reduction
jonnyawsom3
TheBigBadBoy - ๐™ธ๐š› lately, I find myself removing JPG artifacts from PNG in a weird way Let's say someone converts an ugly JPG to PNG (using djpeg-like), and sends only the PNG. There are noticeable artifacts near sharp edges/borders/etc, and to remove them I'm currently encoding the PNG to JPG (using `cjpegli -d 1`), then `jpeg2png` This works really well as I don't see anymore tha JPG compression artifacts (the quality can only be better, tested on dozen files), but that way of doing feels weird, no?
2024-07-05 12:53:38
Well, if you can match the quality, and the encoder, then re-encoding jpeg artefacts should incurr no loss, and then jpeg2png would work 'perfectly', so you're essentially cheating that system a bit
2024-07-05 12:54:16
Most common situation is right click copy turning jpegs into bitmaps which are then pasted as PNG
TheBigBadBoy - ๐™ธ๐š›
Crite Spranberry Hmm I've never really bothered to try it, but what about waifu2x (one of the many websites that offer it for free), no upscaling, and just JPEG noise reduction
2024-07-05 06:27:06
wow, this works pretty well indeed But seems to be for anime content only ๐Ÿค”
jonnyawsom3
2024-07-05 07:06:39
It comes with a few different models ranging from photos to art
TheBigBadBoy - ๐™ธ๐š›
2024-07-05 07:32:25
<:FeelsReadingMan:808827102278451241>
JendaLinda
TheBigBadBoy - ๐™ธ๐š› lately, I find myself removing JPG artifacts from PNG in a weird way Let's say someone converts an ugly JPG to PNG (using djpeg-like), and sends only the PNG. There are noticeable artifacts near sharp edges/borders/etc, and to remove them I'm currently encoding the PNG to JPG (using `cjpegli -d 1`), then `jpeg2png` This works really well as I don't see anymore tha JPG compression artifacts (the quality can only be better, tested on dozen files), but that way of doing feels weird, no?
2024-07-05 07:39:50
This is interesting. I was trying to just use `cjpegli` for artwork but it seems to be blurring chroma too much. Isn't it a problem in this process?
TheBigBadBoy - ๐™ธ๐š›
2024-07-05 07:45:34
in my samples at least I don't see any problem
2024-07-05 07:46:43
and I zoomed quite a lot to perfectly compare source and "cjpegliโ†’jpeg2png" image
2024-07-05 07:47:30
Maybe give your sample? Mines are digital cover arts (anime-like)
JendaLinda
2024-07-05 10:58:08
It's doing similar desaturation effect like chroma subsampling around black lines but that also depends on the particular color.
CrushedAsian255
2024-07-06 03:02:59
Is lossless jpeg and Jpeg Ls different?
jonnyawsom3
2024-07-06 07:16:25
Jpeg-LL is the original lossless jpeg, Jpeg-LS was a later replacement for it, as far as I can find
_wb_
2024-07-06 08:38:57
Yes, lossless jpeg is basically the same as the DC coding of lossy jpeg. Not great in terms of compression. JPEG LS performs better โ€” similar to lossless J2K: sometimes a little better, sometimes a little worse, in general quite good for photographic images (better than PNG) and bad for non-photo (worse than PNG).
jonnyawsom3
Demiurge I wonder how JXL in DNG with bayer encoding works...
2024-07-06 09:41:20
I'm digging into the files right now... And somehow it seems worse than I expected...
2024-07-06 09:42:20
I think they're storing the raw bayer grid as 16bit grayscale tiles, then re-assigning the color on decode
2024-07-06 10:17:08
Scratch that, yet again I have no idea what they're doing
2024-07-06 10:32:11
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-07-06 10:32:51
Interesting that the Bayer has a very slightly off Distance value... Makes me wonder where they get it from
2024-07-06 10:36:10
Although, that low distance value actually makes it even larger than JXL lossless :P
2024-07-06 10:37:14
```[SubIFD] ImageWidth : 3968 [SubIFD] ImageHeight : 2976 [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 [SubIFD] JXLEffort : 7 [SubIFD] JXLDecodeSpeed : 4```
2024-07-06 10:38:22
Lossless: 5.25 MB Lossy: 3.16 MB Bayer Lossy: 5.76 MB
2024-07-06 10:40:37
Does make you wonder if they ever actually tested it, as opposed to just plugging it in instead of the Jpeg encoder
CrushedAsian255
_wb_ Yes, lossless jpeg is basically the same as the DC coding of lossy jpeg. Not great in terms of compression. JPEG LS performs better โ€” similar to lossless J2K: sometimes a little better, sometimes a little worse, in general quite good for photographic images (better than PNG) and bad for non-photo (worse than PNG).
2024-07-06 11:23:53
then jxl is better im guessing?
Demiurge
Interesting that the Bayer has a very slightly off Distance value... Makes me wonder where they get it from
2024-07-06 12:29:10
That's just floating point encoding to decimal conversion
2024-07-06 12:29:27
0.5 perfectly translates to decimal but 0.2 does not
jonnyawsom3
2024-07-06 12:30:33
Ah
lonjil
2024-07-06 12:33:00
more like 0.5 translates to binary perfectly but 0.2 doesn't
Demiurge
2024-07-06 12:34:20
Yeah. That's a better and more accurate way of saying it
2024-07-06 12:40:17
When it's translated back to decimal again, it's revealed to be an approximation due to the limitations of binary float encoding
2024-07-06 12:40:56
Decimal has the same limitations too of course
2024-07-06 12:41:40
Some values can't be expressed in decimal perfectly like 0.333333
lonjil
2024-07-06 01:50:53
notably though, all values that can be expressed exactly in binary can be expressed exactly in decimal
yoochan
2024-07-06 07:14:29
I find sad that the decimal fraction notation is not used, and never used in any programming language. Like when 0.3 with the 3 overlined means 0.3 with an infinitely repeating 3, which is a perfect representation of 1/3 https://en.m.wikipedia.org/wiki/Repeating_decimal
dogelition
2024-07-06 07:20:35
not quite the same thing, but python has this https://docs.python.org/3/library/fractions.html
JendaLinda
2024-07-06 07:33:40
In APNG, frame delays are represented as fractions, so animation with perfect 60fps can be created.
yoochan
dogelition not quite the same thing, but python has this https://docs.python.org/3/library/fractions.html
2024-07-06 07:42:45
indeed, but not repeating decimal notation (yet ?)
lonjil
2024-07-06 08:34:59
Instead of repeating decimal how about we get continued fractions?
Cool Doggo
yoochan indeed, but not repeating decimal notation (yet ?)
2024-07-06 10:36:19
repeating decimals can be represented as a fraction
2024-07-06 10:36:41
you just have something like 123/999 instead of 0.123123...
spider-mario
2024-07-06 10:44:42
it can get a bit annoying with preceding digits, though, e.g. 0.471[32] is 0.471 + 32/99000 = 46661 / 99000
lonjil
2024-07-06 10:52:25
hm, continued fraction [0; 2, 8, 4, 1, 1, 2, 3, 1, 1, 1, 9, 2]
_wb_
CrushedAsian255 then jxl is better im guessing?
2024-07-06 10:59:31
Yes, both for photo and nonphoto, jxl is better than older jpeg codecs. For nonphoto by a lot.
JendaLinda
2024-07-07 09:59:50
GIF can do anything from 2bpp to 8bpp. 1bpp is actually encoded as 2bpp. It's quite flexible, frames inside animation can use different number of bpp. I have a GIF, where some frames are 7bbp and the others are 8bpp.
_wb_
2024-07-10 12:52:44
So it looks like the AVIF support in Android 12 is not very complete, and only in Android 14+ it works properly. Does someone happen to know what exactly the limitations are of the initial Android AVIF support? As far as I understand: no alpha, only 4:2:0, only 8-bit. But there seem to be more limitations than only those (there are avif files with those properties that still don't decode in Android 12 even though they decode just fine with more recent avif decoders).
Quackdoc
_wb_ So it looks like the AVIF support in Android 12 is not very complete, and only in Android 14+ it works properly. Does someone happen to know what exactly the limitations are of the initial Android AVIF support? As far as I understand: no alpha, only 4:2:0, only 8-bit. But there seem to be more limitations than only those (there are avif files with those properties that still don't decode in Android 12 even though they decode just fine with more recent avif decoders).
2024-07-10 01:09:05
resource limitations
2024-07-10 01:09:39
it uses gav1 for decoding which quite unoptimized to say the least, so heavier files will get android to kill the process
JendaLinda
2024-07-10 01:43:04
Does AVIF have reference encoder and decoder? Several implementations being so bad and unreliable really limit the usability of the format.
_wb_
2024-07-10 01:45:05
libaom is the reference implementation afaiu
Quackdoc it uses gav1 for decoding which quite unoptimized to say the least, so heavier files will get android to kill the process
2024-07-10 01:46:00
I have here a 600x600 8-bit yuv420 image without alpha or anything special, and it does not decode on Android 12...
Quackdoc
2024-07-10 01:46:44
well thats odd, if you can share it I can give it a test, I still have the dev stuff enabled on my device
_wb_
2024-07-10 01:47:26
Quackdoc
2024-07-10 01:50:18
hm, its working on A13 for me, Ill spin up a VM to test a12 specifically
2024-07-10 02:11:56
``` 07-10 14:11:31.239 3475 3985 W DocumentsContract: Failed to load thumbnail for content://com.android.externalstorage.documents/document/primary%3Awb.avif: android.graphics.ImageDecoder$DecodeException: Failed to create image decoder with message 'invalid input'Input contained an error. 07-10 14:11:31.251 3475 3985 W DocumentsContract: Failed to load thumbnail for content://com.android.externalstorage.documents/document/primary%3Awb.avif: android.graphics.ImageDecoder$DecodeException: Failed to create image decoder with message 'invalid input'Input contained an error. ``` well this is a totally useful error
2024-07-10 02:18:12
ah looks like the decoder is actually just outright crashing with this
JendaLinda
_wb_
2024-07-10 02:19:18
This is interesting. Windows decodes this AVIF file correctly. Windows AVIF decoder has problems with images created by Gimp, it decodes them with incorrect colors.
Quackdoc
2024-07-10 02:21:01
interestingly, the android build im using has a gallery app that tries to fall back to FFMpeg which also reports an issue
CrushedAsian255
2024-07-10 02:39:33
also decodes fine on MacOS
Quackdoc
2024-07-10 02:44:50
yeah I think this is a issue specific to the versions of the encoder being shipped, in theory google could push an update for them using project mainline for A13 at least
2024-07-10 02:45:01
I think a12 can too? cant confirm though
CrushedAsian255
Quackdoc yeah I think this is a issue specific to the versions of the encoder being shipped, in theory google could push an update for them using project mainline for A13 at least
2024-07-10 02:48:02
Kind of funny that the format they love so much is broken on their own operating system
2024-07-10 02:48:12
Or at least was
Quackdoc
2024-07-10 02:49:32
android never really cared about avif or av1 to be fair
_wb_
2024-07-10 03:41:45
It's a bit of a practical problem for android app developers: they assume Android 12+ supports AVIF, but some of the AVIF files produced by current versions of libavif/libaom don't decode on Android 12. So for interoperability it would be good to know what exactly is causing the problem. I would like to understand if it is something that can be circumvented by using specific bug-avoiding encode options, or if we should be advising android app devs that they shouldn't assume system-level AVIF support on Android 12 (and fall back to webp or jpeg on Android 12 or ship their own decoder or whatever).
Quackdoc
2024-07-10 03:48:16
uhh, I might be able to look a bit more indepth later to see if I can get a backtrace, but honestly, even if the issue is found, the chances that an update gets pushed is low since the decoders clearly havent been updated anyways, so advising that system level AVIF support is bad on A12 is necessary regardless. enabling and disabling encoding options only sometimes works with av1 encoders in a lot of cases I find. I can probably find the decoder versions in A12 though
_wb_
2024-07-10 03:54:19
It's kind of disappointing that the same annoying thing happened as what happened when WebP was added to Android: it was rushed, done at a time when the file format spec was not even fully frozen yet, and support was announced but the actual implementation was buggy and only had partial support for some kind of MVP subset of the format. Both for WebP and AVIF, it looks like the initial Android version that 'supports' the format, has no support for alpha and does not decode at least some valid files. That kind of thing is pretty annoying: it causes apps that work fine on Android 14 to have broken or wrong images on Android 12. It sometimes feels like the proponents of WebP and AVIF don't really understand the basic principles of standardization and interoperability, that is, concepts like freezing a bitstream specification and decoder conformance.
2024-07-10 03:56:04
The end result is that there is not really a single AVIF image format, but there is some variant that corresponds to what Android 12 can decode, another variant that corresponds to what works on Windows, etc. That is exactly the opposite of how interoperable, standardized formats are supposed to work.
Quackdoc
2024-07-10 03:57:51
in theory, Android 13 at the very least should be able to be upgraded to a newer libavif+dav1d. android 12 is a tossup. custom roms could potentially push fixed for them since iirc A12 is still in update range
2024-07-10 04:03:07
actually, I wonder if this is just in general a libgav1 issue, I suppose bisecting via libavif could find that out
novomesk
2024-07-10 04:42:04
I guess that Android AVIF support was made by re-using existing HEIF parser. It supported only most common HEIC files, only some of the HEIF features worked. So the limitations of previous HEIF implementation were copied to AVIF parser too. On the other hand, different implementations are good thing for new formats. Its true that interoperability suffers in the beginning but it is easier to see differences between implementations and to observe problems.
afed
2024-07-10 04:45:49
ISO 23001-17 <:Thonk:805904896879493180> ```support ISO 23001-17 version 1 uncC minimized headers support ISO 23001-17 images with 'deflate', 'zlib' and Brotli compression``` https://github.com/strukturag/libheif/releases/tag/v1.18.0
JendaLinda
2024-07-11 10:09:00
Couldn't HEIF carry anything that MP4 can? Including MPEG1, MPEG2, DivX/XviD, h263, h264 and even JPEG?
damian101
JendaLinda This is interesting. Windows decodes this AVIF file correctly. Windows AVIF decoder has problems with images created by Gimp, it decodes them with incorrect colors.
2024-07-11 04:40:39
Some AVIF decoders ignore color matrix metadata, and always default to BT.601.
2024-07-11 04:41:32
those also always decode as full-range usually, regardless of metadata
JendaLinda
2024-07-11 05:12:40
Gimp is using full range of course, and by default it also writes sRGB ICC profile to the file. That should be enough to correctly decode an image in sRGB color space.
jonnyawsom3
2024-07-17 06:40:20
A few months ago there was an issue open for [adding AVIF support](<https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/880>) to a game, I had made an issue [requesting JXL](<https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/1562>) too, but both were put on hold unless they changed image library from FreeImage I check again just now and suddenly they're halfway done implementing AVIF
JendaLinda
2024-07-17 07:11:00
FFmpeg doesn't seem to understand animated WebP, it does understand APNG though.
2024-07-17 07:37:01
That's weird. ffmpeg can write animated webp but can't read them.
Quackdoc
2024-07-17 07:58:14
ffmpeg has a lot of issues like that
RaveSteel
2024-07-17 08:00:10
There is an old bug report regarding that and no progress to it
2024-07-17 08:02:38
https://trac.ffmpeg.org/ticket/4907
JendaLinda
2024-07-17 08:04:48
It's funny that ffmpeg can't even read files produced by ffmpeg itself.
RaveSteel
2024-07-17 08:04:54
indeed
2024-07-17 08:05:07
also annoying for players which use ffmpeg in the backend such as mpv
JendaLinda
2024-07-17 08:14:12
It shouldn't be that hard. libwebp even has an example program for decoding animation frames. libwebp does pretty much all the work.
SwollowChewingGum
2024-07-18 01:00:24
Do you think HEICv2 with VVC instead of HEVC will ever become a thing ?
2024-07-18 01:00:59
I hope not, AVIF and JXL donโ€™t need more competition
A homosapien
SwollowChewingGum I hope not, AVIF and JXL donโ€™t need more competition
2024-07-18 01:11:32
It's not competition I'm worried about. It's more like we don't need *another* video codec mangled into a subpar image format again...
๐‘›๐‘ฆ๐‘•๐‘ฃ๐‘ธ๐‘ฅ๐‘ฉ๐‘ฏ๐‘ฆ | ๆœ€ไธ่ชฟๅ’Œใฎไผๆ’ญ่€… | ็•ฐ่ญฐใฎๅ…ƒ็ด 
2024-07-18 07:06:44
Is JXL going to improve its lossless compression ratio? Looks like AVIF (`libvips`) currently still beats JPEG XL...
Quackdoc
2024-07-18 07:07:16
can you provide a test image?
๐‘›๐‘ฆ๐‘•๐‘ฃ๐‘ธ๐‘ฅ๐‘ฉ๐‘ฏ๐‘ฆ | ๆœ€ไธ่ชฟๅ’Œใฎไผๆ’ญ่€… | ็•ฐ่ญฐใฎๅ…ƒ็ด  Is JXL going to improve its lossless compression ratio? Looks like AVIF (`libvips`) currently still beats JPEG XL...
2024-07-18 07:40:28
this is not something i've been able to replicate off hand, can you provide a test image where this is the case, and the resulting encoded images? I don't personally use libvips, but I would assume that it doing something strange or you have an outlier image
Tirr
2024-07-18 07:53:19
it might be doing near lossless for avif. ffmpeg lossless avif was quite bloated last time I tested
๐‘›๐‘ฆ๐‘•๐‘ฃ๐‘ธ๐‘ฅ๐‘ฉ๐‘ฏ๐‘ฆ | ๆœ€ไธ่ชฟๅ’Œใฎไผๆ’ญ่€… | ็•ฐ่ญฐใฎๅ…ƒ็ด 
Tirr it might be doing near lossless for avif. ffmpeg lossless avif was quite bloated last time I tested
2024-07-18 07:55:50
I used libvips for AVIF codec
Tirr
2024-07-18 07:56:18
yeah, so libvips might be doing something different
๐‘›๐‘ฆ๐‘•๐‘ฃ๐‘ธ๐‘ฅ๐‘ฉ๐‘ฏ๐‘ฆ | ๆœ€ไธ่ชฟๅ’Œใฎไผๆ’ญ่€… | ็•ฐ่ญฐใฎๅ…ƒ็ด 
Quackdoc this is not something i've been able to replicate off hand, can you provide a test image where this is the case, and the resulting encoded images? I don't personally use libvips, but I would assume that it doing something strange or you have an outlier image
2024-07-18 07:56:23
https://github.com/PoneyClairDeLune/derpi-image-corpus/ Here is the whole corpus
2024-07-18 07:57:14
https://le-m.ltgc.cc/derpi-image-corpus/data/derpi.lossless.size.tsv The last test run. There's a new run currently going on.
2024-07-18 07:58:00
JXL: `cjxl --num_threads -1 -j 0 -d 0 -e 7 "$file" "test.${id}.d0.jxl" 2> /dev/null` AVIF: `vips copy "${file}" "test.${id}.d0.avif[compression=av1,lossless=true]"`
2024-07-18 08:00:54
darn it, can't find the lossless test results... gotta wait until the new run's finished
2024-07-18 08:04:31
and JPEG XL progressive's larger than non-progressive, while also taking longer to encode... somehow?
Quackdoc
2024-07-18 08:08:08
uh, I would highly reccomend verifying that libvips is *actually* lossless
2024-07-18 08:08:12
``` โžœ test ffmpeg -hide_banner -loglevel error -i 2877671.png -c:v ppm -f image2pipe - | b3sum 2981e5e7390773871d8c8ab09f1c20d059951c64f6e299073b56c5d4990ee8ae - โžœ test ffmpeg -hide_banner -loglevel error -i sample.jxl -c:v ppm -f image2pipe - | b3sum 2981e5e7390773871d8c8ab09f1c20d059951c64f6e299073b56c5d4990ee8ae - โžœ test ffmpeg -hide_banner -loglevel error -i testout.avif -c:v ppm -f image2pipe - | b3sum 130df0235c005ffdd8a997b43284c19745b8d941acd309ddb60996387ea6a17a - ```
2024-07-18 08:09:11
I would verify first that it is using aomenc since svtav1 cant actually do lossless
2024-07-18 08:09:31
the result of the command you provided is a yuv420p file
๐‘›๐‘ฆ๐‘•๐‘ฃ๐‘ธ๐‘ฅ๐‘ฉ๐‘ฏ๐‘ฆ | ๆœ€ไธ่ชฟๅ’Œใฎไผๆ’ญ่€… | ็•ฐ่ญฐใฎๅ…ƒ็ด 
Quackdoc uh, I would highly reccomend verifying that libvips is *actually* lossless
2024-07-18 08:11:59
maybe it's a bug in libvips and the SSIM CLI util I'm using, but the SSIM indexes of the results I got from the libvips command provided were all 1, so I just assumed it was lossless
Quackdoc
2024-07-18 08:13:15
if you want to verify true losslessness, you should always decode and hash
๐‘›๐‘ฆ๐‘•๐‘ฃ๐‘ธ๐‘ฅ๐‘ฉ๐‘ฏ๐‘ฆ | ๆœ€ไธ่ชฟๅ’Œใฎไผๆ’ญ่€… | ็•ฐ่ญฐใฎๅ…ƒ็ด 
2024-07-18 08:13:16
how should I encode the lossless AVIF files then? cavif-rs doesn't support lossless encoding
Quackdoc
2024-07-18 08:13:35
avifenc directly I guess
2024-07-18 08:15:31
avifenc has some really dumb defaults sometimes, but `avifenc 2877671.png -q 100 --lossless out-avifenc.avif` ```ps โžœ test l Permissions Size User Date Modified Name .rw-r--r-- 2.3M quack 18 Jul 04:07 2877671.png .rw-r--r-- 1.8M quack 18 Jul 04:15 out-avifenc.avif .rw-r--r-- 1.6M quack 18 Jul 04:07 sample.jxl ```
2024-07-18 08:16:05
q 100 isnt needed, it was just a left over
2024-07-18 08:17:57
yeah even `"testout.avif[compression=av1,lossless=true,encoder=aom,subsample_mode=off]"` is not true lossless with vips, so im assuming this is 100% a bug in libvips, though this could be an issue with their RGB -> YUV pipeline
๐‘›๐‘ฆ๐‘•๐‘ฃ๐‘ธ๐‘ฅ๐‘ฉ๐‘ฏ๐‘ฆ | ๆœ€ไธ่ชฟๅ’Œใฎไผๆ’ญ่€… | ็•ฐ่ญฐใฎๅ…ƒ็ด 
2024-07-18 08:23:30
the bugged-out results here for archival
Quackdoc avifenc directly I guess
2024-07-18 08:33:54
and may I ask about the cause behind the bloated size when JPEG XL lossless has progressive enabled? does progressive encoding breaks something in the encoding pipeline of the non-progressive JXL lossless?
Quackdoc
2024-07-18 08:35:33
I couldn't say, I never use it since jxl is capable of the old school "dumb" progressive regardless (though for some reason libjxl *sometimes* doesn't work unless you add --progressive_dc=1, this doesn't add much if any data size so I just always do it in lossless mod)
Kleis Auke
Quackdoc yeah even `"testout.avif[compression=av1,lossless=true,encoder=aom,subsample_mode=off]"` is not true lossless with vips, so im assuming this is 100% a bug in libvips, though this could be an issue with their RGB -> YUV pipeline
2024-07-18 08:40:18
libvips still needs to save with `matrix_coefficients=0` for true lossless, see: <https://github.com/libvips/libvips/blob/93088ba9f054b222d47d10b3ef626db0baea997f/test/test-suite/test_foreign.py#L1442-L1444> In the meantime, the `heif-enc` tool could help here, e.g. `heif-enc -L x.png -o x.avif`.
Quackdoc
Kleis Auke libvips still needs to save with `matrix_coefficients=0` for true lossless, see: <https://github.com/libvips/libvips/blob/93088ba9f054b222d47d10b3ef626db0baea997f/test/test-suite/test_foreign.py#L1442-L1444> In the meantime, the `heif-enc` tool could help here, e.g. `heif-enc -L x.png -o x.avif`.
2024-07-18 08:43:53
that;s fairly annoying
Kleis Auke
Quackdoc that;s fairly annoying
2024-07-18 08:46:48
Indeed, I'll have a look at fixing that today.
Quackdoc
๐‘›๐‘ฆ๐‘•๐‘ฃ๐‘ธ๐‘ฅ๐‘ฉ๐‘ฏ๐‘ฆ | ๆœ€ไธ่ชฟๅ’Œใฎไผๆ’ญ่€… | ็•ฐ่ญฐใฎๅ…ƒ็ด  and may I ask about the cause behind the bloated size when JPEG XL lossless has progressive enabled? does progressive encoding breaks something in the encoding pipeline of the non-progressive JXL lossless?
2024-07-18 08:47:37
currently libjxl isn't the *best* at progressive decoding files I find, jxl-oxide takes the crown for that I do have better videos then this to showcase it, but this is jxl-oxide vs libjxl
2024-07-18 08:47:57
oh, these videos are yuv444p so firefox will break with them incase you use ff as a discord client xD
๐‘›๐‘ฆ๐‘•๐‘ฃ๐‘ธ๐‘ฅ๐‘ฉ๐‘ฏ๐‘ฆ | ๆœ€ไธ่ชฟๅ’Œใฎไผๆ’ญ่€… | ็•ฐ่ญฐใฎๅ…ƒ็ด 
2024-07-18 08:48:58
I'm on Vesktop XD, though Firefox is the main browser I use
Quackdoc
2024-07-18 08:50:04
but sometimes libjxl will outright fail to decode an image progressively unless it;s been encoded with progressive_dc
2024-07-18 08:50:24
https://discord.com/channels/794206087879852103/1065165415598272582/1257212537859084318
2024-07-18 08:50:55
this is an example, progressive_dc=1 is normally within a hair in cjxl so I just always use it
2024-07-18 08:55:05
here is a back to back picture comparing the two, nodc completely fails to load progressively at all, but with dc libjxl can start decoding with 1% of the file downloaded
๐‘›๐‘ฆ๐‘•๐‘ฃ๐‘ธ๐‘ฅ๐‘ฉ๐‘ฏ๐‘ฆ | ๆœ€ไธ่ชฟๅ’Œใฎไผๆ’ญ่€… | ็•ฐ่ญฐใฎๅ…ƒ็ด 
Quackdoc here is a back to back picture comparing the two, nodc completely fails to load progressively at all, but with dc libjxl can start decoding with 1% of the file downloaded
2024-07-18 09:00:28
should progressive_ac also be enabled?
Quackdoc
2024-07-18 09:02:41
I don't personally touch progressive_ac so I can't comment, but last time I did try it, it ballooned images
2024-07-18 09:06:36
the only other things I really touch regardless of lossy or lossless are `-d 0 -e 10 --brotli_effort=[0..11] -x strip=all -I [0..100] -g NUM -E NUM --faster_decoding=[0..4]` of special note faster_decoding 1 and 2 are borked on lossless, so if you wanna use it, use 3 or 4, not sure there is an actuall difference between 1 and 2, or a difference between 3 or 4 though, none that I have noticed
JendaLinda
2024-07-18 09:24:37
I've just tried `avifenc`. The encoded AVIF is significantly larger than the source PNG, that's not a good start. However, programs I tested were able to decode the image losslessly.
SwollowChewingGum
Quackdoc the only other things I really touch regardless of lossy or lossless are `-d 0 -e 10 --brotli_effort=[0..11] -x strip=all -I [0..100] -g NUM -E NUM --faster_decoding=[0..4]` of special note faster_decoding 1 and 2 are borked on lossless, so if you wanna use it, use 3 or 4, not sure there is an actuall difference between 1 and 2, or a difference between 3 or 4 though, none that I have noticed
2024-07-18 09:26:23
Is faster_decoding enabling progressive ?
JendaLinda
2024-07-18 09:52:39
Testing another image with `avifenc`. This time the file size of the encoded AVIF is slightly smaller than the source PNG. Still not great, lossless WebP smashes it. Lossless decoding seems to be working OK, at least.
2024-07-18 10:01:33
It's an improvement. When I was testing lossless AVIF last time. Lossless decoding was very unreliable.
_wb_
2024-07-18 11:54:29
AVIF can do lossless but it's more like a "feature box checked" thing than something actually useful. No real improvement vs PNG (your mileage might vary depending on image content).
SwollowChewingGum
_wb_ AVIF can do lossless but it's more like a "feature box checked" thing than something actually useful. No real improvement vs PNG (your mileage might vary depending on image content).
2024-07-18 12:06:54
How exactly does it work? Is it just lossy AVIF with residuals, or is it its own seperate spec like WebP?
_wb_
2024-07-18 12:17:25
As far as I understand it's just lossy AVIF using only the subset of transforms that is reversible. Similar to how JPEG 2000 does it, basically.
SwollowChewingGum
2024-07-18 12:17:44
And im guessing no quantisation
_wb_
2024-07-18 12:19:05
Yes. It works, for some image content it even works well, but it's not great. At least JPEG 2000 put some more thought into it and also defined a reversible color transform; in AVIF they forgot about that until it was too late.
2024-07-18 12:22:13
BTW, I just found out the hard way (customer complaining about images looking wrong) that the system AVIF support in Android 12 and 13 is making the hardcoded assumption that the YCbCr is tv-range, regardless of what is signalled. So if the AVIF uses full range (which is the sensible thing to do, and the default of current avifenc), the image will look somewhat contrast-stretched (dark gray becomes black, light gray becomes white) and oversaturated.
2024-07-18 12:23:11
I wouldn't be surprised if they just thought "nice, the image looks better in AVIF!" and called it a day
2024-07-18 12:25:50
Anyway it means basically you cannot use AVIF on Android < 14 in mobile app frameworks that rely on system libraries.
JendaLinda
2024-07-18 12:33:08
I'm not sure if AVIF can be used for anything at this point. Lossless is underwhelming and lossy is too unpredictable.
SwollowChewingGum
2024-07-18 12:33:47
And letโ€™s not forget about encoding speed shenanigans
๐‘›๐‘ฆ๐‘•๐‘ฃ๐‘ธ๐‘ฅ๐‘ฉ๐‘ฏ๐‘ฆ | ๆœ€ไธ่ชฟๅ’Œใฎไผๆ’ญ่€… | ็•ฐ่ญฐใฎๅ…ƒ็ด 
JendaLinda I'm not sure if AVIF can be used for anything at this point. Lossless is underwhelming and lossy is too unpredictable.
2024-07-18 01:01:28
Well AVIF lossy has some advantanges at least. If the source image has flatter colours, AVIF lossy is going to have less observable artifacts. The observable artifacts are somewhat more apparent in JPEG XL lossy.
2024-07-18 01:04:09
Though for anything photographic or relatively detailed... AVIF is going to be beaten by JPEG XL.
2024-07-18 01:04:34
And AVIF encoding speed is *abysmal*
JendaLinda
2024-07-18 01:26:29
AVIF may have less visible artifact but the color reproduction is likely to be messed up. Different decoders will decode the same image with visibly different colors.
jonnyawsom3
๐‘›๐‘ฆ๐‘•๐‘ฃ๐‘ธ๐‘ฅ๐‘ฉ๐‘ฏ๐‘ฆ | ๆœ€ไธ่ชฟๅ’Œใฎไผๆ’ญ่€… | ็•ฐ่ญฐใฎๅ…ƒ็ด  Well AVIF lossy has some advantanges at least. If the source image has flatter colours, AVIF lossy is going to have less observable artifacts. The observable artifacts are somewhat more apparent in JPEG XL lossy.
2024-07-18 01:26:38
Generally modular mode can be better for that, or just lossless
_wb_
JendaLinda AVIF may have less visible artifact but the color reproduction is likely to be messed up. Different decoders will decode the same image with visibly different colors.
2024-07-18 01:45:15
Those are just decoder bugs then, no? AVIF is supposed to be fully specified (as is usual for video codecs), so there is no decoder freedom at all.
2024-07-18 01:46:37
But I have noticed that default avifenc does seem to be relatively sloppy on the chroma, even at quite high quality settings I tend to see substantial tone shifts and chroma macroblocking
๐‘›๐‘ฆ๐‘•๐‘ฃ๐‘ธ๐‘ฅ๐‘ฉ๐‘ฏ๐‘ฆ | ๆœ€ไธ่ชฟๅ’Œใฎไผๆ’ญ่€… | ็•ฐ่ญฐใฎๅ…ƒ็ด 
Generally modular mode can be better for that, or just lossless
2024-07-18 03:12:38
where could it be turned on? and how does that affect the overall filesize?
jonnyawsom3
2024-07-18 03:13:25
-m 1 when using cjxl
2024-07-18 03:14:33
Modular is what's used in Lossless, but it can do lossy too with different artifacts than VarDCT which is default
๐‘›๐‘ฆ๐‘•๐‘ฃ๐‘ธ๐‘ฅ๐‘ฉ๐‘ฏ๐‘ฆ | ๆœ€ไธ่ชฟๅ’Œใฎไผๆ’ญ่€… | ็•ฐ่ญฐใฎๅ…ƒ็ด 
-m 1 when using cjxl
2024-07-18 04:04:43
~~Turns out the decoder came with NixOS cannot decode modularized JXL~~ Edit: Looks like some weird bugs that's only present in terminal
2024-07-18 04:12:26
Another interesting observation is that modularized JPEG XL takes less space than VarDCT, at the same distance value and effort level
jonnyawsom3
2024-07-18 04:13:46
Generally it's worse quality or larger than VarDCT due to not being tuned, but for non-photo images it can look better
๐‘›๐‘ฆ๐‘•๐‘ฃ๐‘ธ๐‘ฅ๐‘ฉ๐‘ฏ๐‘ฆ | ๆœ€ไธ่ชฟๅ’Œใฎไผๆ’ญ่€… | ็•ฐ่ญฐใฎๅ…ƒ็ด 
Generally it's worse quality or larger than VarDCT due to not being tuned, but for non-photo images it can look better
2024-07-18 04:14:50
Just tested, seems like it's not the case... The file size is smaller, yes, but for non-photo images it's more miss than hit. I think I'll stick with VarDCT.
Tirr
2024-07-18 04:15:18
lossy modular is quite inconsistent in quality
๐‘›๐‘ฆ๐‘•๐‘ฃ๐‘ธ๐‘ฅ๐‘ฉ๐‘ฏ๐‘ฆ | ๆœ€ไธ่ชฟๅ’Œใฎไผๆ’ญ่€… | ็•ฐ่ญฐใฎๅ…ƒ็ด 
2024-07-18 04:17:08
`-m 0 -d 1 -e 7`
2024-07-18 04:17:59
`-m 1 -d 1 -e 7` Noticeably more spots of discolouration
JendaLinda
_wb_ Those are just decoder bugs then, no? AVIF is supposed to be fully specified (as is usual for video codecs), so there is no decoder freedom at all.
2024-07-18 04:44:23
Yes, this is true, but there are decoders that would use incorrect range or incorrect conversion matrix and that is the problem.
๐‘›๐‘ฆ๐‘•๐‘ฃ๐‘ธ๐‘ฅ๐‘ฉ๐‘ฏ๐‘ฆ | ๆœ€ไธ่ชฟๅ’Œใฎไผๆ’ญ่€… | ็•ฐ่ญฐใฎๅ…ƒ็ด 
2024-07-18 04:44:40
Comparison between several lossless codecs.
gb82
_wb_ BTW, I just found out the hard way (customer complaining about images looking wrong) that the system AVIF support in Android 12 and 13 is making the hardcoded assumption that the YCbCr is tv-range, regardless of what is signalled. So if the AVIF uses full range (which is the sensible thing to do, and the default of current avifenc), the image will look somewhat contrast-stretched (dark gray becomes black, light gray becomes white) and oversaturated.
2024-07-19 12:55:51
I've had major issues viewing AVIF on Android. It used to not open at all & crash the viewer as recently as Android 13
_wb_
2024-07-19 12:57:45
Yes, basically only on Android 14+, the system library version of avif is not buggy
2024-07-19 12:59:35
As far as I can tell, in Android 12 and 13, there are various issues, including: - no alpha support - only 8-bit 4:2:0 support - only tv-range YCbCr (full-range will be misinterpreted)
damian101
2024-07-19 01:34:00
wtf, full-range 4:4:4 is avifenc default...
JendaLinda
2024-07-19 08:38:31
I don't understand why tv-range is still a thing. I would just ditch this nonsense.
SwollowChewingGum
JendaLinda I don't understand why tv-range is still a thing. I would just ditch this nonsense.
2024-07-19 08:39:26
old legacy nonsense ๐Ÿคทโ€โ™‚๏ธ
JendaLinda
2024-07-19 08:51:08
But computer images have nothing to do with analog video so why anybody sane would use it? JPEG doesn't even support tv-range.
SwollowChewingGum
JendaLinda But computer images have nothing to do with analog video so why anybody sane would use it? JPEG doesn't even support tv-range.
2024-07-19 08:51:44
because AV1 is a video codec, the AVIF decoder was probably just using a video av1 decoder that only supports what's used in video
JendaLinda
2024-07-19 08:56:46
Today's video is produced digitally so video should also default to full range.
2024-07-19 09:07:29
Even analog video could be sampled in 12 bits with current technology. So no need for tv range anymore.
_wb_
2024-07-19 09:58:32
Lossy webp has forced 8-bit tv-range YCbCr 4:2:0. I would assume that the initial Android AVIF integration was done by the same team and they reused some existing code.
JendaLinda
2024-07-19 10:33:42
That team should know better.
SwollowChewingGum
JendaLinda That team should know better.
2024-07-19 10:34:05
it's the google codec team ๐Ÿคทโ€โ™‚๏ธ
spider-mario
JendaLinda Even analog video could be sampled in 12 bits with current technology. So no need for tv range anymore.
2024-07-19 11:14:40
analog video could overshoot due to processing; that was the purpose of the limited range AFAIU
2024-07-19 11:14:48
> (*) BTB and WTW in 16-235 video shouldn't contain picture content on properly mastered material - but they should ideally be preserved to allow overshoot and undershoot on sharp transitions (particularly in analogue sourced content) to be preserved without clipping to avoid ringing.
afed
2024-07-19 11:22:28
it's not even gone for hdr, even though it was the best moment to change that <https://forum.doom9.org/showthread.php?p=1945682#post1945682>
JendaLinda
2024-07-19 11:42:51
So sample the video with overshoots and then do the clipping in software and convert it to full range. Clipping in software is being done all the time without issues. I don't think video codecs are the right tool for preserving exactly analog signal, you could as well preserve contents during blanking intervals, exact timing of sync pulses, the modulated color signal etc.
2024-07-19 11:43:20
As I said, because most video production is being done digitally, full range should be the default.
spider-mario
2024-07-19 12:14:11
I donโ€™t disagree with โ€œdefaultโ€
2024-07-19 12:14:16
but I would be careful with โ€œnot neededโ€
JendaLinda
2024-07-19 01:34:31
There is really no need for limited range in modern codecs because these are intended for playback on digital devices and have to be converted to full range during playback anyway. Also analog video is being processed even further like deinterlacing of upscaling, to better fit modern displays, so conversion to full range can be done at the same time. If somebody really really needs to preserve video as close to analog as possible, they should use some different type of signal processing. For example, I've seen people archiving laserdisks capturing the raw modulated signal from the laser pickup and sampling it with much higher bitrate than any video codec could, getting as much information from the disk surface as possible. The captured signal can be later decoded to video and audio using software.
Demiurge
2024-07-20 12:51:03
If someone figures out an algorithm to subtract splines from an image, and adds it to libjxl, it will finally blow avif out of the water...
A homosapien
2024-07-20 04:48:27
along with actually tuning it for low quality images of course
Demiurge
2024-07-20 11:34:02
Better to lower the bitrate without lowering the quality :)
DZgas ะ–
2024-07-21 12:29:27
better to have pixels with information <:JXL:805850130203934781>
SwollowChewingGum
2024-07-21 12:35:09
Better to just use PPM for everything
DZgas ะ–
SwollowChewingGum Better to just use PPM for everything
2024-07-21 12:51:07
๐Ÿ’€ ๐Ÿ’€ ๐Ÿ’€ ๐Ÿ’€
2024-07-21 12:53:04
nice parallelization great low ram usage
SwollowChewingGum Better to just use PPM for everything
2024-07-21 12:54:05
and brotli better for text and lzma2 better for not text
๐‘›๐‘ฆ๐‘•๐‘ฃ๐‘ธ๐‘ฅ๐‘ฉ๐‘ฏ๐‘ฆ | ๆœ€ไธ่ชฟๅ’Œใฎไผๆ’ญ่€… | ็•ฐ่ญฐใฎๅ…ƒ็ด 
Demiurge If someone figures out an algorithm to subtract splines from an image, and adds it to libjxl, it will finally blow avif out of the water...
2024-07-22 05:20:29
hopefully it will land sooner too, though spline extraction may be quite expensive in terms of computation?
SwollowChewingGum
2024-07-22 05:22:27
p*n*e*Wf
Demiurge
๐‘›๐‘ฆ๐‘•๐‘ฃ๐‘ธ๐‘ฅ๐‘ฉ๐‘ฏ๐‘ฆ | ๆœ€ไธ่ชฟๅ’Œใฎไผๆ’ญ่€… | ็•ฐ่ญฐใฎๅ…ƒ็ด  hopefully it will land sooner too, though spline extraction may be quite expensive in terms of computation?
2024-07-22 05:45:42
So is avif encoding ๐Ÿ˜‚
๐‘›๐‘ฆ๐‘•๐‘ฃ๐‘ธ๐‘ฅ๐‘ฉ๐‘ฏ๐‘ฆ | ๆœ€ไธ่ชฟๅ’Œใฎไผๆ’ญ่€… | ็•ฐ่ญฐใฎๅ…ƒ็ด 
Demiurge So is avif encoding ๐Ÿ˜‚
2024-07-22 05:56:57
I know AVIF is expensive, but JXL encoding shouldn't be more expensive than that, just saying
2024-07-22 07:47:54
Not sure if I did something wrong, but AVIF (libvips) at quality 90 has a higher [SSIMULACRA 2](https://github.com/cloudinary/ssimulacra2) score than JPEG XL d 1.0 (effort 7, progressive, VarDCT) while being smaller... Should the effort value be turned up?
yoochan
2024-07-22 07:48:45
can you share the pic ?
๐‘›๐‘ฆ๐‘•๐‘ฃ๐‘ธ๐‘ฅ๐‘ฉ๐‘ฏ๐‘ฆ | ๆœ€ไธ่ชฟๅ’Œใฎไผๆ’ญ่€… | ็•ฐ่ญฐใฎๅ…ƒ็ด 
yoochan can you share the pic ?
2024-07-22 07:50:45
https://github.com/PoneyClairDeLune/derpi-image-corpus/ If you're up to downloading 106 images all at once, sure \;)
Quackdoc
๐‘›๐‘ฆ๐‘•๐‘ฃ๐‘ธ๐‘ฅ๐‘ฉ๐‘ฏ๐‘ฆ | ๆœ€ไธ่ชฟๅ’Œใฎไผๆ’ญ่€… | ็•ฐ่ญฐใฎๅ…ƒ็ด  Not sure if I did something wrong, but AVIF (libvips) at quality 90 has a higher [SSIMULACRA 2](https://github.com/cloudinary/ssimulacra2) score than JPEG XL d 1.0 (effort 7, progressive, VarDCT) while being smaller... Should the effort value be turned up?
2024-07-22 07:51:45
thats not too uncommon, it can for sure start to trade blows depending on the image
๐‘›๐‘ฆ๐‘•๐‘ฃ๐‘ธ๐‘ฅ๐‘ฉ๐‘ฏ๐‘ฆ | ๆœ€ไธ่ชฟๅ’Œใฎไผๆ’ญ่€… | ็•ฐ่ญฐใฎๅ…ƒ็ด 
๐‘›๐‘ฆ๐‘•๐‘ฃ๐‘ธ๐‘ฅ๐‘ฉ๐‘ฏ๐‘ฆ | ๆœ€ไธ่ชฟๅ’Œใฎไผๆ’ญ่€… | ็•ฐ่ญฐใฎๅ…ƒ็ด  Not sure if I did something wrong, but AVIF (libvips) at quality 90 has a higher [SSIMULACRA 2](https://github.com/cloudinary/ssimulacra2) score than JPEG XL d 1.0 (effort 7, progressive, VarDCT) while being smaller... Should the effort value be turned up?
2024-07-22 07:53:15
Though I guess I need to split the metric into categories to see the specifics... ~~That's being done in the meanwhile~~
Demiurge
2024-07-22 07:53:23
libaom has gotten a lot better at preserving texture recently. libjxl still has a lot of blur and smudge. Also libjxl has some really severe color desaturation problems, but in the past libjxl used to be better than libaom at preserving texture and details...
Quackdoc
2024-07-22 07:54:55
if that is an average, you should for sure be trying to find the best and the worst of the images either way to compare against them manually as that can really show which types of images are favoured by which encoder
Demiurge
2024-07-22 07:55:21
Idk how that translates to metrics though. (But frankly, I don't care, and metrics don't matter. What matters is your eyes can clearly see a lot more detail and texture and color in libaom now than libjxl)
2024-07-22 07:56:30
libaom improved a lot
yoochan
2024-07-22 07:56:37
when ?
2024-07-22 07:56:46
(i'll pull the last version)
๐‘›๐‘ฆ๐‘•๐‘ฃ๐‘ธ๐‘ฅ๐‘ฉ๐‘ฏ๐‘ฆ | ๆœ€ไธ่ชฟๅ’Œใฎไผๆ’ญ่€… | ็•ฐ่ญฐใฎๅ…ƒ็ด 
Quackdoc if that is an average, you should for sure be trying to find the best and the worst of the images either way to compare against them manually as that can really show which types of images are favoured by which encoder
2024-07-22 07:57:05
yup the data is publically available with categorization already done, I just need to import it to graphs and find out how the extreme cases affected the whole thing
2024-07-22 07:57:06
https://discord.com/channels/794206087879852103/803645746661425173/1263025254339580027
Demiurge
2024-07-22 07:57:34
Not sure when exactly, but I remember older comparisons showed libaom having serious problems with blurring/smoothing. Now libjxl is the worst offender at blurring/smoothing.
๐‘›๐‘ฆ๐‘•๐‘ฃ๐‘ธ๐‘ฅ๐‘ฉ๐‘ฏ๐‘ฆ | ๆœ€ไธ่ชฟๅ’Œใฎไผๆ’ญ่€… | ็•ฐ่ญฐใฎๅ…ƒ็ด 
2024-07-22 07:57:58
though JXL d 2.0 being far smaller than mozJPEG q95 while still having a better objective score...
Demiurge
2024-07-22 07:58:33
Mozjpeg is not tuned for q95
๐‘›๐‘ฆ๐‘•๐‘ฃ๐‘ธ๐‘ฅ๐‘ฉ๐‘ฏ๐‘ฆ | ๆœ€ไธ่ชฟๅ’Œใฎไผๆ’ญ่€… | ็•ฐ่ญฐใฎๅ…ƒ็ด 
Demiurge Not sure when exactly, but I remember older comparisons showed libaom having serious problems with blurring/smoothing. Now libjxl is the worst offender at blurring/smoothing.
2024-07-22 07:58:34
I think older blog posts comparing AVIF with JPEG XL between 2021 and 2023 all shared the same findings
Demiurge Mozjpeg is not tuned for q95
2024-07-22 08:00:51
if that's the case, I'm seriously questioning JPEG being one of the most widely used lossy formats in the wild
yoochan
๐‘›๐‘ฆ๐‘•๐‘ฃ๐‘ธ๐‘ฅ๐‘ฉ๐‘ฏ๐‘ฆ | ๆœ€ไธ่ชฟๅ’Œใฎไผๆ’ญ่€… | ็•ฐ่ญฐใฎๅ…ƒ็ด  https://github.com/PoneyClairDeLune/derpi-image-corpus/ If you're up to downloading 106 images all at once, sure \;)
2024-07-22 08:01:55
it is mainly donkey focused ! and mainly drawings or 3d, no photos ?
๐‘›๐‘ฆ๐‘•๐‘ฃ๐‘ธ๐‘ฅ๐‘ฉ๐‘ฏ๐‘ฆ | ๆœ€ไธ่ชฟๅ’Œใฎไผๆ’ญ่€… | ็•ฐ่ญฐใฎๅ…ƒ็ด 
yoochan it is mainly donkey focused ! and mainly drawings or 3d, no photos ?
2024-07-22 08:02:50
no the corpus mainly focuses on non-photographic content
2024-07-22 08:03:15
though devided into several subcategories already
2024-07-22 08:03:28
the results from `3d` and `cshd` could be higher
yoochan
2024-07-22 08:03:55
and here we see a bias toward photography in the optimization of the jxl encoder... but cjxl have room for improvement ! ๐Ÿ™‚
2024-07-22 08:05:46
nonetheless it's an amazing job you did here ๐Ÿ™‚ where can I find the meaning of **nl** ? like in nl.jxl ?
๐‘›๐‘ฆ๐‘•๐‘ฃ๐‘ธ๐‘ฅ๐‘ฉ๐‘ฏ๐‘ฆ | ๆœ€ไธ่ชฟๅ’Œใฎไผๆ’ญ่€… | ็•ฐ่ญฐใฎๅ…ƒ็ด 
yoochan nonetheless it's an amazing job you did here ๐Ÿ™‚ where can I find the meaning of **nl** ? like in nl.jxl ?
2024-07-22 08:06:46
near lossless for WebP it's `-near_lossless 60 -m 6`, for JPEG XL it's `-m 1 -d 0.1 -e 7`
2024-07-22 08:07:56
also JPEG XL with those params are smaller than WebP near lossless, just saying
Quackdoc
2024-07-22 08:08:27
I only use webp never [av1_dogelol](https://cdn.discordapp.com/emojis/867794291652558888.webp?size=48&quality=lossless&name=av1_dogelol)
2024-07-22 08:08:48
sometimes I will use lossless when I need support for something old
yoochan
2024-07-22 08:08:49
yep, for lossy, given the fact the distance setting can be very precise with cjxl, it is sometimes good to try to match the size before doing a ssimulacra
Demiurge
๐‘›๐‘ฆ๐‘•๐‘ฃ๐‘ธ๐‘ฅ๐‘ฉ๐‘ฏ๐‘ฆ | ๆœ€ไธ่ชฟๅ’Œใฎไผๆ’ญ่€… | ็•ฐ่ญฐใฎๅ…ƒ็ด  if that's the case, I'm seriously questioning JPEG being one of the most widely used lossy formats in the wild
2024-07-22 08:08:57
mozjpeg is tuned for lower fidelity, q95 is too high and jpegturbo is better at that setting
๐‘›๐‘ฆ๐‘•๐‘ฃ๐‘ธ๐‘ฅ๐‘ฉ๐‘ฏ๐‘ฆ | ๆœ€ไธ่ชฟๅ’Œใฎไผๆ’ญ่€… | ็•ฐ่ญฐใฎๅ…ƒ็ด 
Demiurge mozjpeg is tuned for lower fidelity, q95 is too high and jpegturbo is better at that setting
2024-07-22 08:09:14
I'll try that later then
Demiurge
yoochan yep, for lossy, given the fact the distance setting can be very precise with cjxl, it is sometimes good to try to match the size before doing a ssimulacra
2024-07-22 08:09:56
it's better to not trust computer scores at all...
yoochan
2024-07-22 08:09:57
in local.lossy.ssim.tsv can you add a column for the resulting size ?
2024-07-22 08:11:19
(and which effort did you used ? sometime higher efforts are detrimental)
๐‘›๐‘ฆ๐‘•๐‘ฃ๐‘ธ๐‘ฅ๐‘ฉ๐‘ฏ๐‘ฆ | ๆœ€ไธ่ชฟๅ’Œใฎไผๆ’ญ่€… | ็•ฐ่ญฐใฎๅ…ƒ็ด 
yoochan yep, for lossy, given the fact the distance setting can be very precise with cjxl, it is sometimes good to try to match the size before doing a ssimulacra
2024-07-22 08:11:34
the goal of near lossless isn't to have a better quality at smaller sizes (though won't complain if that's the case), but to shave off some space before visible artifacts that could be observed with bare eyes when zoommed in appears