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

BlueSwordM
Scope I'm not sure about hardware encoding (as far as I know the grid implementation is also much simpler), but tiles cannot be used to increase the resolution, for example if the image needs more than 8k
2021-02-25 05:27:00
True. The max pixel resolution for AV1 is 35MP. I had also forgotten about that.
_wb_
BlueSwordM I think it's that: 1. 10-bit support max, while AVIF actually supports 12-bit natively just fine. It just needs better tagging support. Of course, the fact that the AVIF spec didn't explicitly show that, which is odd. 2. Decoding speed isn't actually much of an issue if you use say dav1d. It not only scales very well with resolution, but single-threaded decoding performance is quite good(I still haven't found a way to test out decoding speed with avidec yet though). 3. AVIF doesn't actually use purely independent tiles unlike HEIF. It's actually an AV1 feature that tiles can still access a lot of information from other tiles IIRC. That means that at higher resolution, it doesn't actually pose much of a problem(Scope provides a better explanation in this regard.) 4. You only tested AVIF using the reference encoder. That's not much of a problem when there's only one encoder(in the case of JPEG-XL for example... for now <:Stonks:806137886726553651> ), but there are encoders that actually do a better job in some scenarios in the case of AV1.
2021-02-25 05:29:50
About 4: I have looked at AVIF results with libaom, rav1e, SVT, and at Cloudinary we use Aurora because it's currently the best one available.
2021-02-25 05:32:15
The 10-bit limit I assumed was intentional. WebP2 also has that limit, for example. If you're aiming for the web delivery use case, it seems unlikely that more than 10-bit will be needed anytime soon.
2021-02-25 05:35:24
I knew that tools can handle 12-bit, but I assumed that's just because they simply call the av1 decoder and have no reason to actually check if the profile actually matches the one specified at the container level.
2021-02-25 05:37:39
Dav1d is indeed fast enough in practice for still images, I think. Still, in single-core decode speed, I think at least on x86, jxl is about twice as fast.
Crixis
_wb_ About 4: I have looked at AVIF results with libaom, rav1e, SVT, and at Cloudinary we use Aurora because it's currently the best one available.
2021-02-25 06:29:42
damn proprietary
_wb_
2021-02-25 06:32:22
yes, I really hope at some point the best AVIF encoder will be a FOSS one again
Crixis
_wb_ yes, I really hope at some point the best AVIF encoder will be a FOSS one again
2021-02-25 06:34:48
netflix need put money
Nova Aurora
2021-02-25 06:53:08
Who funds AOM development?
2021-02-25 06:53:31
is it AOmedia or just developers hired by various companies
BlueSwordM
2021-02-25 06:54:04
Members of AOMedia mainly, so Google, Ittiam, Intel, and some others at various times.
Nova Aurora
2021-02-25 07:05:27
I'm suprised google hosts them
2021-02-25 07:05:54
I thought with Microsoft in AOM GitHub would have been a more attractive option
_wb_
2021-02-25 07:23:56
https://aomedia.googlesource.com/aom/ https://github.com/AOMediaCodec https://gitlab.com/AOMediaCodec
2021-02-25 07:24:08
They're everywhere
Nova Aurora
2021-02-25 07:29:15
https://tenor.com/view/starship-troopers-traitor-of-mars-starship-troopers-gifs-they-are-everywhere-everywhere-gif-9385373
Scope
2021-02-25 11:34:52
<https://github.com/mozilla/mozjpeg/commit/9f01177f72ad55acf98c0160a9ddbe67ea3271ff> > Default to single-scan DC > People don't like green faces <https://github.com/mozilla/mozjpeg/releases> `mozjpeg-v4.0.3`
_wb_
2021-02-26 06:57:28
"People don't like green faces"
Nova Aurora
2021-02-26 06:58:31
suit yourself
_wb_
2021-02-26 06:59:08
https://cloudinary.com/blog/progressive_jpegs_and_green_martians
Pieter
2021-02-26 07:00:37
Nova Aurora
2021-02-26 09:10:09
ISO/IEC AWI 19566-8 Information technologies โ€” JPEG systems โ€” Part 8: JPEG Snack What I think of:
2021-02-26 09:10:50
https://tenor.com/view/chips-and-dip-salsa-chips-chip-and-dip-day-happy-chip-and-dip-day-gif-16658338
Pieter
2021-02-26 09:12:32
Does it support encryption with Salsa20?
_wb_
2021-02-26 09:21:30
I didn't go to the meetings about it, they were usually at ungodly hours when both the US and Asia are awake.
Nova Aurora
_wb_ I didn't go to the meetings about it, they were usually at ungodly hours when both the US and Asia are awake.
2021-02-26 09:22:04
So the majority of the world ๐Ÿ™‚
_wb_
2021-02-26 09:22:35
Yes but not me
2021-02-26 09:23:25
4 am meetings about JPEG Snack, no thanks
Nova Aurora
2021-02-26 09:24:00
But I hear their food its ๐Ÿ‘Œ
_wb_
2021-02-26 09:24:45
Back when we did physical meetings, there was sometimes food during coffee breaks
2021-02-26 09:24:56
Maybe that were the JPEG snacks
lonjil
2021-02-26 09:25:20
4 hour meetings to decide the first post-corona break snacks
Nova Aurora
2021-02-26 09:25:36
An international standard on ISO committee meeting refreshments? <:kekw:808717074305122316>
_wb_
2021-02-26 09:26:09
You overestimate the efficiency of a committee - they could never decide such a pressing matter in a mere 4 hours
lonjil
2021-02-26 09:26:25
aye
2021-02-26 09:26:34
4 hour meetings plural
_wb_
2021-02-26 09:26:54
Ah yes
2021-02-26 09:27:00
That sounds more like it
Nova Aurora
2021-02-26 09:27:01
in that amount of time they would designate subcommittees to explore their options
_wb_
2021-02-26 09:28:51
Just deciding the name of the explorative project that will come up with the study text of the draft proposal for a new work item is probably something that could take several meeting cycles.
2021-02-26 09:31:59
anyway, this is what the Snack in JPEG Snack refers to: https://en.wikipedia.org/wiki/Snack_culture
2021-02-26 09:32:33
I suppose it's mostly a Korean thing, I dunno
Nova Aurora
2021-02-26 09:37:50
I think it's a domain specific codec for images of food
2021-02-26 09:38:14
To go with JPEG Cat, and JPEG meme
2021-02-26 09:39:44
By optimizing our codecs for the some of the most popular uses on the internet, we expect efficientcy improvements of up to 50%
Deleted User
2021-02-26 10:03:58
Just save the most popular memes directly in the decoder and if someone tries to encode it, just send its byte identifier to the decoder and output it directly. That thing would not only compress majority of memes to just a few bytes, but also be *completely* generation loss-resilient! ๐Ÿ˜‰
Master Of Zen
2021-02-26 10:06:15
<@!794205442175402004> where Aurora AV1 encoder really shines?
_wb_
2021-02-26 10:14:26
Well we mostly care about relatively fast encoding, otherwise latency of first request becomes too much of an issue. Libaom and rav1e are too slow for us atm. SVT gets close, but uses a lot of memory, which is also a problem when you want to do things at scale. Aurora is about twice as fast as SVT for a result that is a few percent better, with a much better memory footprint.
Scope
2021-02-27 05:43:58
https://github.com/AOMediaCodec/libavif/pull/526
_wb_
2021-02-27 03:34:32
https://youtu.be/z6stCw1g3BE
2021-02-27 03:34:57
Looks like someone remixed my generation loss comparisons
Scope
2021-02-27 05:20:07
4chan ||https://boards.4channel.org/g/thread/80409625||
Deleted User
2021-02-27 05:32:52
> 4chan
2021-02-27 05:33:10
DON'T. Lmao
Scope
2021-02-27 05:35:27
Sometimes there are much worse comments and understanding on reddit than 4chan (also the dumbest posts on 4chan are mostly trolling)
_wb_
2021-02-27 05:35:37
Have to love that mix of trollish rudeness, strong opinions based on very poor understanding, and the occasional brave knowledgeable person trying to educate the masses.
2021-02-27 05:36:10
Reddit tends to have the same kind of mix, just more politely phrased.
lonjil
2021-02-27 05:42:39
And HN is that plus silicon valley smugness.
Scope
_wb_ https://youtu.be/z6stCw1g3BE
2021-02-27 07:02:35
After some more YouTube re-uploads it will become a video generation loss comparison
spider-mario
2021-02-28 08:03:17
I get a video description that looks automatically translated to French
Scope
2021-02-28 09:38:52
<https://forum.doom9.org/showthread.php?p=1936981#post1936981> https://i.imgur.com/FljFaaR.png
2021-03-02 10:44:20
https://www.meetup.com/JAMstack-Toronto/events/275601729/
2021-03-03 09:22:18
https://github.com/facebook/zstd/releases/tag/v1.4.9
Nova Aurora
Scope https://github.com/facebook/zstd/releases/tag/v1.4.9
2021-03-07 10:32:46
Whats the word on getting this in the linux kernel?
2021-03-07 10:33:03
I hope they update it's implementation at some point
Master Of Zen
2021-03-09 11:27:30
<@!794205442175402004> Rav1e adaptive quantization pull request
2021-03-09 11:27:31
https://github.com/xiph/rav1e/pull/2682#issuecomment-793602488
Scope
2021-03-09 01:58:49
https://www.reddit.com/r/AV1/comments/m15fu3/avif_decoding_support_merged_into_apples_webkit/
_wb_
2021-03-09 02:19:11
Always a surprise when something happens in webkit
2021-03-09 02:22:07
It's good that AVIF gets close to universal support now (in the near future). I just hope it will not be a reason to not support JXL too.
Scope
2021-03-10 02:30:19
https://youtu.be/MZhZ5OHpg74
2021-03-10 02:30:44
> The debug images from the **SSIMULACRA** metric are displayed with SSIM heatmap on the left and edge differences on the right. SSIMULACRA and Butteraugli are increasingly being used for video ๐Ÿค”
BlueSwordM
Scope > The debug images from the **SSIMULACRA** metric are displayed with SSIM heatmap on the left and edge differences on the right. SSIMULACRA and Butteraugli are increasingly being used for video ๐Ÿค”
2021-03-10 02:40:02
Ah, you found his video. ๐Ÿ˜›
_wb_
2021-03-10 06:18:13
๐Ÿ†’
Jim
2021-03-10 11:39:01
๐Ÿฅถ
Scope
2021-03-10 06:15:50
<https://encode.su/threads/3589-GDCC-port-mortem>
2021-03-10 06:16:34
> **mpais** > I started with LEA for the Balanced image compression test, a poorly hacked together entry. It's just about 700 LOC, and that includes an LZW compression engine for non-image content, since I thought the rule about being able to compress all datasets meant I couldn't just store them. > It should honestly be at least 3x faster, but it got the job done > > For the HCR image compression test, the approach used in LEA doesn't really scale well to really high compression ratios, so I used a plain old boring context-mixer and reused the name EMMA. > Again, it's fairly poor code, unnecessarily slow, but honestly the prize money didn't justify spending much time on each entry.
2021-03-12 09:24:43
https://www.reddit.com/r/AV1/comments/m3dt54/avif_hits_6282_on_caniuse/
2021-03-12 03:56:27
https://chromium.googlesource.com/codecs/libwebp2/+/4f423d5e2f11924bab6683c112a0d6b17e943f38
2021-03-12 03:57:01
> av1enc: add -tune {vmaf, bufferaugli} to aom encoding > > since it's experimental and not always included in local aom.h, > we drop the typed enum for 'tuning' and use 'int' instead, relying > on aom_codec_control(). > > tune butteraugli only works with YUV420 for some reason, so one need to > use '-420' option
_wb_
2021-03-12 04:37:16
https://libspng.org/
lithium
Scope > av1enc: add -tune {vmaf, bufferaugli} to aom encoding > > since it's experimental and not always included in local aom.h, > we drop the typed enum for 'tuning' and use 'int' instead, relying > on aom_codec_control(). > > tune butteraugli only works with YUV420 for some reason, so one need to > use '-420' option
2021-03-12 05:09:03
Butteraugli don't like YUV 420, I think use YUV 420 on Butteraugli isn't a good idea.
Scope
2021-03-12 05:10:41
Yes, it is strange why only YUV420, but apparently it is the initial implementation
2021-03-12 06:24:34
And Libspng is also interesting, libvips uses it currently (but which does not yet support Jpeg XL https://github.com/libvips/libvips/discussions/2055 )
_wb_
2021-03-13 07:14:11
https://twitter.com/parker_gibbons/status/1301310949073121281?s=19
190n
2021-03-13 07:44:27
> telling people to use something other than jpeg ๐Ÿ™‚ > it's png ๐Ÿ™
2021-03-13 07:49:53
i was gonna go off about jpeg xl but then noticed it's from september
2021-03-13 07:50:06
didn't want to bump such an old post
2021-03-13 07:50:15
and iirc jxl wasn't frozen then
_wb_
2021-03-13 07:53:39
It was unofficially frozen in Dec 2020 and officially in Jan 2021
190n
2021-03-13 07:54:41
we did have webp and avif at that point tho
2021-03-13 07:54:54
and iirc animated pngs aren't supported everywhere
_wb_
2021-03-13 08:20:43
https://caniuse.com/apng
2021-03-13 08:21:11
Only GIF actually works everywhere though
2021-03-13 08:21:53
APNG will often be first-frame-only, AWebP will often not work at all
2021-03-13 08:23:22
It's kind of annoying from an application point of view when you make something that is intended for still images, and then it turns out you need to support animation too
190n
2021-03-13 08:57:42
yeah hopefully no one ships partial jxl support
2021-03-13 08:57:48
would fuck up the ecosystem real quick
_wb_
2021-03-13 09:04:40
It will probably be kind of inevitable that some applications will mess things up
2021-03-13 09:05:09
Like when you make a word processor which is meant mostly to produce documents that you can print
2021-03-13 09:05:28
Would you implement animation support in that?
2021-03-13 09:05:55
It's likely not to happen
Jim
2021-03-13 10:35:11
Quick, someone invent digital paper that can change what is displayed.
Crixis
2021-03-13 10:37:55
I think it exist
_wb_
2021-03-13 10:50:05
https://c.tenor.com/1OjK5twN340AAAAM/ahh-screaming.gif
Jim
2021-03-13 11:13:04
https://syncedreview.com/2021/03/12/stanford-novel-image-compression-method-coin-better-than-jpeg-at-low-bitrates/
Scientia
2021-03-14 01:18:20
This is good but is it useful
2021-03-14 01:18:29
Like surely from a research standpoint
2021-03-14 01:18:56
But not practically
2021-03-14 01:19:53
It's certainly interesting
2021-03-14 01:22:32
I just don't see the need for a neural network when the only range of usage is from 0 to 0.3 bpp
_wb_
2021-03-14 06:55:36
That's probably also the worst possible jpeg, not mozjpeg or some other good jpeg encoder.
2021-03-14 06:56:10
Also PSNR is not a very good metric
2021-03-14 06:33:06
Fox Wizard
2021-03-14 06:35:15
<:AV1stonks:781612882176507915>
2021-03-14 06:35:56
Disappointed, you didn't use one of the best jpg encoders >:(
_wb_
2021-03-14 06:37:42
Maybe we need to make jxl t-shirts too ๐Ÿค”
2021-03-14 06:37:53
<:JXL:805850130203934781>
Fox Wizard
2021-03-14 06:39:03
Yes
2021-03-14 06:39:08
<a:CatYes:806636752952754186>
BlueSwordM
_wb_ Maybe we need to make jxl t-shirts too ๐Ÿค”
2021-03-14 06:44:26
Make one and I will probably order one. <:megapog:816773962884972565>
Jim
2021-03-14 06:46:37
A shirt that has jpeg, gif, png, webp, and avif crossed out and circles jxl
_wb_
2021-03-14 07:03:44
Nah, no need to diss the shoulders of the giants we're standing on
BlueSwordM Make one and I will probably order one. <:megapog:816773962884972565>
2021-03-14 08:26:05
I got my AV1 t-shirt for free from Nathan. It was 2.5 years ago. The shirt has mozilla stuff on the back.
2021-03-14 08:26:50
Maybe I can get Cloudinary to make <:JXL:805850130203934781> tshirts that I can give to people for free, that would be cool
Nova Aurora
_wb_ Maybe I can get Cloudinary to make <:JXL:805850130203934781> tshirts that I can give to people for free, that would be cool
2021-03-14 08:33:02
How would those be given away?
Jim
2021-03-14 08:33:28
Just hope they don't say <:JPEG_XL:805860709039865937> only
Fox Wizard
2021-03-14 08:33:35
Gimme dem <a:ajxl:806626687130533959> shirts <a:dogeevil:749457940041302078>
_wb_
Nova Aurora How would those be given away?
2021-03-14 08:36:17
No idea, normally that would be at conferences and events and stuff, but with covid that's of course not happening anymore.
Pieter
2021-03-14 08:37:12
Any day now!
BlueSwordM
2021-03-14 08:37:40
Anyway, make a TShirt design with JPEG-XL and I will buy it. ๐Ÿ’ธ
Fox Wizard
2021-03-14 08:54:42
<:WhiteFoxMoney:785018275762405387>
Master Of Zen
_wb_
2021-03-14 09:21:29
Is this real)?
Pieter
2021-03-14 09:23:48
What is real? How do you define real?
bonnibel
2021-03-14 09:24:10
no sorry weve all been living in the matrix
2021-03-14 09:24:20
we're like 3 nested matrixes deep in fact
Pieter
2021-03-14 09:24:35
bold of you to assume it's a finite number
2021-03-14 09:24:42
it's matrices all the way down
Master Of Zen
Pieter What is real? How do you define real?
2021-03-14 09:25:00
This is photo that he take or this is "photoshop"
bonnibel
2021-03-14 09:25:08
thats why better jpeg compression is so important actually. because it gets applied over and over again for each layer
2021-03-14 09:25:27
so we're pushing the infinity down to a smaller infinity. much more manageable
Pieter
Master Of Zen This is photo that he take or this is "photoshop"
2021-03-14 09:25:48
i guess it's real
Master Of Zen
2021-03-14 09:26:06
๐Ÿ‘
Pieter
bonnibel so we're pushing the infinity down to a smaller infinity. much more manageable
2021-03-14 09:26:46
i was going to say that that violates information theory but then again, maybe the same rules of physics don't apply to the outer layers
Scope
2021-03-14 09:27:19
Not photoshopped
Master Of Zen
Scope Not photoshopped
2021-03-14 09:29:45
https://tenor.com/view/star-wars-you-were-the-chosen-one-scream-gif-16055856
Scope
2021-03-15 12:14:39
<https://github.com/AOMediaCodec/libavif/commit/d2340b4e8bff90a72fcb6f2c303ee6f66b5e9fa7> > // a 12 hour AVIF image sequence, running at 60 fps (a basic sanity check as this is quite ridiculous) ๐Ÿค”
spider-mario
_wb_ Maybe we need to make jxl t-shirts too ๐Ÿค”
2021-03-15 11:02:37
can we use the animated logo? ๐Ÿ˜„
_wb_
2021-03-15 11:03:40
https://tenor.com/view/wow-spin-shake-human-hamsterwheel-gif-3957046
2021-03-15 11:03:55
sure, just wear it and then do <:This:805404376658739230>
2021-03-15 04:32:35
trying to make the smallest possible single-pixel image in AVIF, for 1 white pixel, 1 black pixel, 1 transparent pixel, and 1 arbitrary-RGBA color
2021-03-15 04:33:04
turns out lossy compression of pure white (#FFFFFF) decodes to #FEFEFE
Scope
Scope Not photoshopped
2021-03-15 04:48:56
veluca
Scope
2021-03-15 04:52:44
so weird to see "file format" be translated xD
Scope
2021-03-15 04:55:12
These are unique fonts from Fabian
fab
2021-03-15 04:56:57
can you do with the new version <@!111445179587624960>
Scope
2021-03-15 04:58:27
The new AV1 t-shirt design is ready
fab
2021-03-15 04:58:38
thanks
2021-03-15 04:58:42
you're a genius
2021-03-15 04:59:38
LMFAO
veluca
2021-03-15 05:18:10
really? that's a sick name ๐Ÿ˜›
2021-03-15 05:18:14
#badpuns
fab
2021-03-15 05:32:03
in github i'm called fabiorug
2021-03-15 07:59:42
raffreddore is called the repository
Deleted User
2021-03-16 01:23:55
So if anyone wants to know how to make an animated AVIF sequence (aka AV1 in an AVIF container): `MP4Box -add inputAV1.mp4 -ab avis -ab msf1 -ab miaf -ab MA1B -rb mif1 -brand avis -new animated.avif` MP4Box is part of GPAC and the result can currently be viewed with Opera 71+, Chrome 85+ (and mobile works since version 81 according to <@!172952901075992586>).
2021-03-16 01:24:13
Some examples:
2021-03-16 01:24:14
2021-03-16 01:24:15
2021-03-16 01:24:16
_wb_
2021-03-16 08:08:50
2021-03-16 08:09:23
Apple Preview is not capable of converting a 1x1 white pixel image to HEIC. Interesting...
2021-03-16 08:13:22
oh, it's because it's a 1-bit grayscale PNG, looks like they did not cover that case
Deleted User
190n didn't want to bump such an old post
2021-03-16 09:20:02
But I did ๐Ÿ˜‰
_wb_ Nah, no need to diss the shoulders of the giants we're standing on
2021-03-16 09:22:06
JPEG XL and AV1 (AVIF) should cooperate, AV1 for videos, AVIF for extremely low bitrate photos (quite niche, but still, at least until JPEG XL doesn't get better) and JPEG XL for images.
bonnibel thats why better jpeg compression is so important actually. because it gets applied over and over again for each layer
2021-03-16 09:24:33
I'd like to see a JPEG encoder that'd guess the original coefficients (assuming that the photo wasn't edited or non-boundary cropped).
Jim
So if anyone wants to know how to make an animated AVIF sequence (aka AV1 in an AVIF container): `MP4Box -add inputAV1.mp4 -ab avis -ab msf1 -ab miaf -ab MA1B -rb mif1 -brand avis -new animated.avif` MP4Box is part of GPAC and the result can currently be viewed with Opera 71+, Chrome 85+ (and mobile works since version 81 according to <@!172952901075992586>).
2021-03-16 09:42:32
The big question is -- why? Animations should not work in Chrome. So is it a bug that some seem to work and others don't?
_wb_
2021-03-16 10:03:40
Who says animations should not work in Chrome?
Jim
2021-03-16 10:17:29
Google, though Can I Use is the only place it seems to show up anymore. I remember when it came out it was announced lacking animation support. Since then, I've heard no official announcement for animations being added. https://caniuse.com/?search=avif
_wb_
2021-03-16 10:49:32
2021-03-16 10:49:47
trying HEIC to compress this gmail icon
2021-03-16 10:50:15
the image on the right is what I get if I open that PNG in Apple Preview and do Export as HEIC with the quality slider set to "lossless"
2021-03-16 10:51:55
guess they mean "lossless modulo subsampling chroma and alpha and messing up the colors"
Crixis
2021-03-16 10:56:40
f*** alpha subsapling sound stupid
_wb_
2021-03-16 10:57:50
not sure if that's what's happening but how else could you get that result?
2021-03-16 10:58:31
calling this "lossless" is really a big stretch
Jim
2021-03-16 10:59:16
What if you convert the HEIC to other formats? Does it stay like that?
Scope
2021-03-16 10:59:51
As far as I know Apple lossless is just "high quality"
_wb_
Jim What if you convert the HEIC to other formats? Does it stay like that?
2021-03-16 11:04:50
yes, it does
2021-03-16 11:05:36
2021-03-16 11:05:39
ah no not really
2021-03-16 11:05:49
the one on the right is the heic exported back to png
2021-03-16 11:05:58
the colors are back
2021-03-16 11:06:18
the ugly diagonal stays though
Jim
2021-03-16 11:06:53
Ah, so a bit of both then... The transparency is not likely to be a bug in the preview app, it's actually destroying the image. ๐Ÿ™ But the colors might be a bug in the display... or in the HEIC spec.
_wb_
2021-03-16 11:08:13
the original is a 150 byte PNG file
2021-03-16 11:08:32
the 'lossless' HEIC is 1435 bytes
2021-03-16 11:10:22
at least AVIF can actually do it losslessly, it's 639 bytes so a lot better than HEIC <:kekw:808717074305122316>
Scope
2021-03-16 11:11:09
And if use libheif https://github.com/strukturag/libheif ?
2021-03-16 11:13:15
```Note: to get lossless encoding, you need this set of options: -L switch encoder to lossless mode -p chroma=444 switch off color subsampling --matrix_coefficients=0 encode in RGB color-space```
Jim
2021-03-16 11:14:04
The other question is... if you are using Apple, and you take a photo and it saves as "lossless HEIC"... is it actually lossless or are you losing data? ๐Ÿ‘€
_wb_
2021-03-16 11:45:59
2021-03-16 11:46:35
that is what I get after doing `heif-enc -L -p chroma=444 --matrix_coefficients=0` and `heif-convert` back to PNG
2021-03-16 11:47:32
maybe I need to try a more recent libheif, this one is whatever Debian-unstable gave me
2021-03-16 11:55:57
ok looks like libheif does not like palette PNGs as input
2021-03-16 11:56:12
if I first convert it to a non-palette PNG, it does work
2021-03-16 11:56:44
not fully lossless, there are off-by-ones in the RGB values even with -L -p chroma=444 --matrix_coefficients=0
2021-03-16 11:57:07
but at least it looks identical and it's only off-by-ones
2021-03-16 11:57:35
heic file is 1811 bytes
Deleted User
Jim The big question is -- why? Animations should not work in Chrome. So is it a bug that some seem to work and others don't?
2021-03-16 02:02:46
I guess animated AVIFs need the `avis` branding and probably also the other ab and rb metadata to be working files. It looks like Chrome has support since 85 and Opera since version 71. Also, just putting them inside a video tag should work on every browser supporting AV1.
Scope
2021-03-16 04:52:41
https://github.com/AOMediaCodec/av1-avif/compare/d6630a044a...7536f4bccd
BlueSwordM
2021-03-16 04:56:40
`NOTE: [[!AV1]] supports 3 bit depths: 8, 10 and 12 bits, and the maximum dimensions of a coded image is 65536x65536, when coded with level 31.` ๐Ÿค” I thought the max for an AV1 frame was 35MP, not 4000MP. Wait, is that including the external tiles during encoding?
Scope
2021-03-16 04:57:45
I think so
_wb_
2021-03-16 04:59:56
uh
2021-03-16 04:59:59
level 31??
2021-03-16 05:00:12
2021-03-16 05:00:24
"Level 7 has not been defined yet."
2021-03-16 05:00:36
but level 31 has been defined?
BlueSwordM
2021-03-16 05:00:55
I have the impression the Wikipedia article hasn't been updated in a while...
_wb_
2021-03-16 05:02:56
ah
2021-03-16 05:03:13
2021-03-16 05:03:45
level 7.x has not been defined yet
2021-03-16 05:04:30
but I guess the NOTE refers to the seq_level_idx 31, which is defined, and is just "no limits"
2021-03-16 05:05:35
it seems not very wise to promote the creation of "no profile" avif files
2021-03-16 05:06:28
because that means you're also promoting the creation of decoders that try to decode those files, even if they have no clue if they actually can
BlueSwordM
_wb_ because that means you're also promoting the creation of decoders that try to decode those files, even if they have no clue if they actually can
2021-03-16 05:26:07
Chagall: `level index of 31 is unconstrained, rav1e always uses it for still_image` <:monkaMega:809252622900789269> `libaom just tries to estimate the level based on some input parameters but gets it wrong pretty often`
_wb_
2021-03-16 05:32:08
Why do you define profiles and levels then?
BlueSwordM
2021-03-16 05:33:18
It's mainly for HW decoding of videos, not AVIF images.
Jim
2021-03-16 05:34:34
<:JXL:805850130203934781>
Deleted User
2021-03-16 05:58:17
Woah, you can just rename animated .avif to .mp4 and upload it to Cloudinary: https://res.cloudinary.com/mattgore/video/upload/harvey.mp4 Browsers will open the file as video but putting it inside an img tag still works for Chrome (and probably Opera). If you don't have an account already, you can create one for free here: https://cloudinary.com/invites/lpov9zyyucivvxsnalc5/zijlpiu73n5ff0rhloih
2021-03-16 05:58:50
<@!794205442175402004> We are allowed to advertise Cloudinary, right? <:ugly:805106754668068868>
_wb_
2021-03-16 06:05:39
Sure, I guess ๐Ÿ˜ƒ
Jim
2021-03-16 06:14:46
I would assume the server would be looking at the file headers and/or mime and converting it. It shouldn't care about the extension.
Deleted User
2021-03-18 01:40:13
Does libjxs have an unofficial logo? Or are they open for submissions? ๐Ÿ˜
_wb_
2021-03-18 01:50:00
I don't think they have one
2021-03-18 01:52:02
XS is a patent-encumbered codec though... They're aiming for a rather specific niche / application domain too...
fab
2021-03-18 07:47:22
do you know webp2
2021-03-18 07:47:24
cwp2 -effort 5 -diffusion 48.8 -q 72 -pm 1 -sns 52.06 C:\Users\User\Desktop\2938137252.jpg -o C:\Users\User\Desktop\a.wp2
2021-03-18 07:47:32
is it a right command?
2021-03-18 07:49:16
it did
2021-03-18 07:51:53
i downloaded this from doom9
2021-03-18 07:51:54
https://www.sendspace.com/file/imvjom
2021-03-19 05:50:39
95.6 -s 2 webp2 jpeg xl 0.3.4 80.4 -s 8
2021-03-19 05:51:35
in this way you'll get the image encoded with good efficiency
2021-03-19 05:51:52
just decode to png the images
2021-03-19 05:52:42
if the detail is missing webp2 can give the impression of detail
2021-03-20 10:16:08
would be interested to try lossless palette 9
Deleted User
2021-03-20 06:17:41
I'm trying out JPEG XT ๐Ÿคช
2021-03-20 06:17:41
https://github.com/thorfdbg/libjpeg
2021-03-20 06:18:43
This is the original PNG:
2021-03-20 06:18:55
https://upload.wikimedia.org/wikipedia/commons/4/47/PNG_transparency_demonstration_1.png
2021-03-20 06:20:16
JPEG XL `-q 30` after decoding to PNG; it's doing quite well...
2021-03-20 06:21:45
...compared to JPEG XT with matched filesize ๐Ÿคฎ
fab
2021-03-20 06:23:20
how to compile
Deleted User
2021-03-20 06:23:23
And this is original JPEG XT file, if anyone's curious (yes, you can actually decode this thing if you've got a decoder, Discord doesn't strip JPEG XT metadata)
fab
2021-03-20 06:23:33
i'm on windows 7
2021-03-20 06:24:08
do you can share builds?
Deleted User
2021-03-20 06:24:22
Bad news for you, you need Linux or Windows 10 with WSL2
diskorduser
2021-03-20 06:28:36
Why don't you use linux inside a VM?
fab
2021-03-20 06:28:56
i don't know how to compile
2021-03-20 06:29:06
i can't run makefiles
Deleted User
2021-03-20 06:29:15
Setting up a virtual machine doesn't require compiling at all
fab
2021-03-20 06:29:18
like i saw jamaika using a GUIs
2021-03-20 06:29:32
for compiling codecs and specifying compiling parameters
2021-03-20 06:29:41
but i don't know how to open the GUI
2021-03-20 06:29:53
if there is some requirement like powershell
2021-03-20 06:29:56
or windows 10
2021-03-20 06:30:08
because some version of c require new system
2021-03-20 06:30:15
at least for compiling
Deleted User
2021-03-20 06:30:30
It's much easier to compile software on Linux
diskorduser
2021-03-20 06:30:58
First try to learn using ubuntu or someother distros. You don't need to understand about compiling code.
Deleted User
2021-03-20 06:31:08
It depends on the software, but that JPEG XT that I linked above just needs `./configure` and `make` if you used Linux
fab
2021-03-20 06:31:30
yes i tried on vm
Deleted User
2021-03-20 06:32:25
<@!416586441058025472> and I don't have to encode that photo you gave me, JPEG XT is an extension of the original JPEG, it's not really a new format.
2021-03-20 06:32:47
You'd need it only if you needed high dynamic range (HDR), high bit depth or alpha channel (transparency).
2021-03-20 06:32:57
In case of most photos you don't need that.
diskorduser
2021-03-20 06:38:38
<@456226577798135808> could you link me the jpeg xt encoder source code?
2021-03-20 06:46:38
NVM. I got it.
Deleted User
2021-03-21 06:15:28
Okay, now you've got something interesting: HDR imagery (I mean *actual* HDR, not tone-mapped to SDR) comparison. Original vs JPEG XT vs JPEG XL, all imported to GIMP's XCF file so you can edit it as float (`Exposure` works properly with HDR, `Curves` don't). Here's the file reuploaded to Discord by <@!219525188818042881> (big thanks!):
Fox Wizard
2021-03-21 10:32:16
Deleted User
2021-03-21 11:41:03
JPEG XT original command: `./jpeg -v -h -N -g 0 -rqt 3 -oz -dr -qt 3 -r12 -q 50 -Q 60 Apartment_float_o15C.pfm Apartment_float_o15C.jpg; ./jpeg Apartment_float_o15C.jpg Apartment_float_o15C.jpg.pfm`
2021-03-21 11:41:09
JPEG XL original command: `.\cjxl .\Apartment_float_o15C.pfm .\Apartment_float_o15C.jxl --target_size=577100 --intensity_target=4000 --noise=1 --dots=0 --patches=0 --epf=-1 --gaborish=1; .\djxl .\Apartment_float_o15C.jxl .\Apartment_float_o15C.jxl.pfm` _(**note**: I used 577100 target size despite JPEG XT file being 577572 because `cjxl` was somehow constantly overshooting the target)_
Paint_Ninja
2021-03-23 04:33:00
Hey, I've got a question regarding modern image codecs in general... It seems common to use the same file extension for lossy, lossless and animated lossy/lossless variants of the same codec these days, but why?
2021-03-23 04:34:08
Personally I find different file extensions beneficial for easily and quickly distinguishing these variants as well as making it easy for your average joe to understand. You get sent a FLAC or a PNG and be reasonably sure it's lossless, but you get a WavPack or WebP and there's no clear indication what it's going to be.
Deleted User
2021-03-23 04:46:42
We had that discussion already, <@!794205442175402004> should probably add something regarding .jxl to <#822120855449894942>.
_wb_
2021-03-23 05:09:57
https://www.reddit.com/r/jpegxl/comments/maabyj/newbie_question_regarding_jpeg_xl_file_extension/
Paint_Ninja
2021-03-23 05:59:08
Interesting... I'm still a bit confused however. Will JXL have just one official mime-type also?
Deleted User
2021-03-23 06:00:05
One is all you need!
2021-03-23 06:02:26
`image/jxl` and **nothing else**.
Paint_Ninja
2021-03-23 06:02:44
I really mean no offense, I'm really impressed with the work so far dating back to the FLIF days of having a responsive image codec for handling multiple sizes from a single file, but I honestly feel like there's some more subtle details being overlooked by having a single file and mime type.
Deleted User
2021-03-23 06:06:21
Extensions may be whatever you want, it's just a matter of convention you can easily change by just renaming your files. Mimetype is something a bit different, it's for machines. All of the files that fall under current `image/jxl` use the exact same decoder, so no need to differentiate them for machines.
Pieter
Paint_Ninja I really mean no offense, I'm really impressed with the work so far dating back to the FLIF days of having a responsive image codec for handling multiple sizes from a single file, but I honestly feel like there's some more subtle details being overlooked by having a single file and mime type.
2021-03-23 06:07:38
The point is that the losslessness isn't a property of the file format. It's the setting chosen in the encoder. If you want to convey to the (human) receiver the file is lossless, maybe use "file.lossless.jxl" or so?
Paint_Ninja
2021-03-23 06:11:24
With the same file extension and not caring about file extensions from a decoder level: - You can't filter image search results by static/probably animated and lossy/probably lossless on web search engines nor Windows file search - There's uncertainty about what variant it's likely to be - Easier for generation loss to occur as a result of people or services unknowingly re-encoding lossless files as lossy ones (you share a png and even after a lot of iterations it doesn't suffer from significant generation loss even with lossy "png optimiser" tools as even those still aim to be near-lossless) - No clear way of knowing if the JXL file produced by your camera earlier is lossy or lossless (for editing) without getting a hex viewer out and checking for a specific magic number, which is beyond a lot of people's abilities - Web devs cannot white/blacklist image codecs by variant - An advertising firm may want to block animated image banners without needing custom code to detect the magic numbers. - HTML doesn't allow filtering file uploads by magic numbers - only mime types and file extensions. Of course you should validate both sides but having it done natively by the browser in your client-side implementation is much easier Lastly, the general public tend to understand things by their file extensions. A GIF? Oh that's an animated image. A PNG? That's a lossless file that can be transparent. An MP3? Music. FLAC? Lossless, high quality music. Of course, you can maliciously change the file extension or otherwise not meet those general assumptions, but people generally stick to them.
_wb_
2021-03-23 06:11:59
A different media type for animated and non-animated could make sense, but then again, I don't think gif, webp, or avif have a different media type for their animated variants...
Scope
2021-03-23 06:12:43
PNG can be lossy or animated and all modern formats have the one official extension, such as WebP, HEIC, AVIF (there was also Avifs, but then abandoned)
Paint_Ninja
2021-03-23 06:13:41
As far as I'm aware PNG is only lossless with lossy implementations making use of its interlaced feature to grab a lower quality image from it?
_wb_
2021-03-23 06:13:48
There are non-animated GIFs. There are animated PNGs. An mp3 can be higher fidelity than a flac (e.g. because the flac was recorded with a crappy microphone).
2021-03-23 06:14:15
There are plenty of lossy PNG encoders, e.g. Photoshop and pngquant
Paint_Ninja
2021-03-23 06:15:05
File extensions are not a guarantee I agree, but it does give you an indiciation of intention assuming you trust the source
2021-03-23 06:16:58
You get sent a PNG and you can reasonably assume that the author intended to send you a lossless image. You get sent a WebP and you don't know. While mentioning this in the filename can help, services are less likely to recognise this than a standardised file extension and may unintentionally ignore the author's desired intent and lossily re-encode the file sent over their service as a result
_wb_
2021-03-23 06:17:52
I don't think it's reasonable to assume that PNGs are lossless
2021-03-23 06:19:00
Also I don't think it's reasonable to assume that JPEGs are lossy
Paint_Ninja
2021-03-23 06:19:04
Yes, the person who sent you a PNG or FLAC may have sent you a lossy file re-encoded to a lossless one. But generally speaking I think it's safe to assume that the person's *intent* was to send you a lossless file, especially if they were the original author
_wb_
2021-03-23 06:19:28
If your camera produces a JPEG, then that JPEG might be the most lossless version of the photo
2021-03-23 06:20:22
I don't think it's a good strategy to let workflows and processes be guided by filename extension conventions
Scope
2021-03-23 06:21:01
> There are non-animated GIFs. Yep, even today I saw some black and white static images in GIF format on discord
Pieter
2021-03-23 06:21:10
<@794205442175402004> Very random idea: would it make sense to have a standard tag in the image file format that says "lossy transformation performed by ..."?
_wb_
Pieter <@794205442175402004> Very random idea: would it make sense to have a standard tag in the image file format that says "lossy transformation performed by ..."?
2021-03-23 06:22:42
There's a new adhoc group in JPEG that wants to standardize metadata related to content authenticity and keeping track of what happened between capture and display.
2021-03-23 06:23:22
When they come up with something, it will most likely be represented in JUMBF so jxl will automatically support it :)
Paint_Ninja
2021-03-23 06:25:37
May I request that the reference encoder uses lossless settings by default on jxll file extensions at least and shows a decoding warning for lossy JXL files with jxll extensions? Similarly, showing a warning when encoding or decoding an jxla/ajxl file extension with only one frame?
_wb_
2021-03-23 06:28:44
The encoder could do that, but the decoder cannot really know what is lossy or lossless
Paint_Ninja
2021-03-23 06:29:24
There's no way of telling if a file was lossy or lossless encoded?
_wb_
2021-03-23 06:29:30
Lossy or lossless is not a property of a file, it is a property of a process
Paint_Ninja
2021-03-23 06:30:32
So there's absolutely no way of stopping or warning about generation loss if someone wanted to do that?
2021-03-23 06:30:55
Without having the original ofc
Scope
2021-03-23 06:31:02
I think it would be better to change the mindset and use in new formats without being tied to the extension, people are very used to it during the old limited formats (it's sometimes more convenient to quickly understand, but it's also not quite right)
_wb_
2021-03-23 06:31:18
You can make a guess, e.g. xyb vardct is likely lossy, ycbcr vardct is likely a losslessly recompressed jpeg, and modular without squeeze and delta palette is maybe lossless. But those are guesses based on what the current encoder does.
Scope
2021-03-23 06:34:48
Also, while I was doing test for Emoji, many of the PNGs were actually GIFs or Jpegs, but with a PNG extension (I don't know why, apparently for easy upload to some services) Also many of the PNGs on websites now are lossless WebP with PNG extension So extension is not a guarantee of anything, it is only a very rough understanding of what the image will be with a certain chance
Paint_Ninja
Scope I think it would be better to change the mindset and use in new formats without being tied to the extension, people are very used to it during the old limited formats (it's sometimes more convenient to quickly understand, but it's also not quite right)
2021-03-23 06:38:30
I'm just concerned that having everything use a single file extension by default is a barrier to adoption. I personally have avoided WebP because I don't know what my CDN will do to it and if the generation loss will kick in due to someone or something in the chain mistakenly re-encoding it to lossy. It's easy to remember a file extension, it's not so easy to know a magic number and run an algorithm to figure out the author's intent. Of course, extensions can be wrong and ideally decoders should require the right one to prevent this, but at least it makes it easy for people and machines to know the sender's intent
_wb_
2021-03-23 06:39:26
Many actual PNGs have been JPEGs before, or have had their colors reduced to fit in a 256-color palette. Lossless PNGs are the exception more than the rule.
Paint_Ninja
2021-03-23 06:40:02
There's a lot of people who don't understand codecs and do stupid stuff like that, yeah
_wb_
2021-03-23 06:41:09
It is not necessarily stupid
Scope
2021-03-23 06:41:10
And creating different extensions for one format gives a little convenience of quick understanding, but creates other problems and increases complexity
Paint_Ninja
2021-03-23 06:41:33
Could you elaborate on what problems it creates?
_wb_
2021-03-23 06:42:19
If you want to add alpha transparency to a JPEG in a way that works on every browser reliably, and have decent compression, then making it a (lossy) PNG8 is often the best choice.
Scope
2021-03-23 06:42:49
This has also been accepted for a very long time in video formats, e.g. MKV or MP4 can contain a huge number of different things inside
Paint_Ninja
2021-03-23 06:43:45
I've very rarely seen a music/audio file with a .mp4 file extension, it's almost always .aac or .m4a
2021-03-23 06:45:02
MKV is often thought of as a container format for videos, while of course it can do other things people expect that it's a video. A file extension specific to a codec however I believe is more thought of as the codec itself than a container format
_wb_
2021-03-23 06:46:21
Animated vs not animated is something that might justify different extensions, since it is justifiable that some software can only deal with still images, and also for an end-user there is a clear difference between animation and still.
Paint_Ninja
_wb_ If you want to add alpha transparency to a JPEG in a way that works on every browser reliably, and have decent compression, then making it a (lossy) PNG8 is often the best choice.
2021-03-23 06:46:39
That is a good idea actually, although using a JPEG with a clip-path or SVG is likely more efficient with still great browser support.
_wb_
2021-03-23 06:47:03
Which browser supports JPEG with an 8bim clip-path?
2021-03-23 06:47:07
None afaik
Paint_Ninja
2021-03-23 06:47:14
I meant CSS clip-path
2021-03-23 06:47:45
you can also embed the jpeg inside an svg which has a similar feature or have the svg reference the jpeg file
_wb_
2021-03-23 06:47:59
CSS clip-path is a workaround, as soon as someone downloads the image the alpha is gone
2021-03-23 06:48:36
SVG is a bloated format that increasingly nobody except browsers dare to open
Scope
2021-03-23 06:48:56
But I can't tell from MKV what will be inside, it could be a lossless format, it could be hundreds of different video and audio codecs, there could be subtitles, images, covers, etc. (I can only think with a certain probability that it's a video, but the same for JXL, it's more likely to be an image)
Paint_Ninja
Scope But I can't tell from MKV what will be inside, it could be a lossless format, it could be hundreds of different video and audio codecs, there could be subtitles, images, covers, etc. (I can only think with a certain probability that it's a video, but the same for JXL, it's more likely to be an image)
2021-03-23 06:51:13
You're right, and trying to put all those details in a file extension would be a big pain, however it's also more generalised than an image codec (an image codec doesn't have sound or subtitles etc)
Scope
2021-03-23 06:52:20
It may be more useful for animation (but it was abandoned in both PNG and AVIF, APNG and AVIFS are not used)
_wb_
2021-03-23 06:53:24
I think it would be useful to have metadata to put some kind of fidelity claim in (lossless, encoder version + distance target used to encode, whatever), and have an easy way in applications to check that metadata. But I wouldn't overload filename extensions to not just mean "this is something that a jxl decoder can decode" but also claims about fidelity and maybe other useful workflow information
Paint_Ninja
2021-03-23 06:55:23
I'm only talking about 4 extensions at most, not one for every setting ๐Ÿ˜› (jxll lossless, jxla animated, jxlla lossless animated, jxl other)
veluca
2021-03-23 06:56:51
I'm generally in favour of a separate extension for animated JXL, not so much for lossless
lvandeve
2021-03-23 06:57:42
.jxif. And then leave open for interpretation how to pronounce it
Paint_Ninja
2021-03-23 06:58:01
I'm all for having an easy way for people and applications to know what variant it is, be it file extensions, metadata, mime types, magic numbers or something else. As long as there's at least some way of knowing as a minimum
2021-03-23 06:59:12
I'm just a fan of file extensions because it's so widely supported and understood. If decoders enforced it there wouldn't be as much confusion or deception about it either, but I understand why decoders don't care
_wb_
2021-03-23 06:59:28
How is an encoder supposed to know if the input you're giving it is lossless or lossy to begin with?
Scope
2021-03-23 06:59:30
My opinion is that on the user side for convenience it is better to use something like lossless.jxl, animated.lossless.jxl, it does not give any guarantee, but the extension also does not give it
_wb_
2021-03-23 07:00:13
Is a losslessly recompressed jpeg something lossy or lossless?
Paint_Ninja
_wb_ How is an encoder supposed to know if the input you're giving it is lossless or lossy to begin with?
2021-03-23 07:01:02
You can't, but encoders/decoders can at least require the right extension
2021-03-23 07:02:08
e.g. if you're encoding a jpeg don't allow the user to set the file extension as a .flac or something silly
Scope
2021-03-23 07:02:17
Also can be a very wild mix of different types, also in JXL in theory can be different layers or areas encoded in lossless along with lossy
Paint_Ninja
2021-03-23 07:02:35
on the decoding side, you can't know for sure if the source material is lossy or not but you should be able to tell if it was lossy encoded with a lossless file extension
Scope Also can be a very wild mix of different types, also in JXL in theory can be different layers or areas encoded in lossless along with lossy
2021-03-23 07:04:03
In that case, personally I would give it the more general file extension. If it's all lossless, it's the lossless extension. If it's got some animation in it, it's the animated extension, etc...
_wb_
2021-03-23 07:04:54
The encoder gets an input and it produces an output. It knows if it is doing lossless or lossy compression, but it doesn't know if the input was lossless or lossy to begin with.
Paint_Ninja
2021-03-23 07:05:50
What if its input is the same format as it's encoding to? E.g. JPEG to JPEG
_wb_
2021-03-23 07:06:11
The jxl encoder only produces jxl output
2021-03-23 07:06:25
The jxl decoder can produce various output.
2021-03-23 07:06:51
Are you suggesting it should not be allowed to decode to .png if it has reasons to suspect that the jxl was lossy?
Paint_Ninja
2021-03-23 07:07:37
Good question
2021-03-23 07:08:24
I see how that could become a problem now
_wb_
2021-03-23 07:08:28
Because then you're basically forcing it to introduce generation loss by using a "known lossy" format like jpeg as output
Paint_Ninja
2021-03-23 07:08:47
Yeah
_wb_
2021-03-23 07:10:38
This is probably the best way to understand why you cannot really tie the property of losslessness to an extension. It is a property of a workflow, not an inherent property of a codec.
Paint_Ninja
2021-03-23 07:12:04
I have a silly idea, not sure how useful it would be
Scope
2021-03-23 07:12:45
The different extensions appeared mostly for the different formats that were mostly used for lossless/lossy/animation, people just adjusted it to their ease of understanding Btw, GIF was originally used mostly for static images (until PNG and Jpeg became more widespread)
Paint_Ninja
Paint_Ninja I have a silly idea, not sure how useful it would be
2021-03-23 07:13:46
Some people tend to edit lossy image files and when it comes to saving them they don't know what settings they should use to keep the quality similar to the original.
2021-03-23 07:15:04
Would it be a good idea for the encoder to somehow figure out the right default for you that would give a similar perceptual quality to the original file without the user manually overshooting it?
Scope
2021-03-23 07:19:56
By default it is almost so, with -d 1 it is very close to the original quality (without zooming) and it's not just the quantizer value as usual with other formats and encoders
Paint_Ninja
2021-03-23 07:22:10
Oh, nice!
2021-03-23 07:23:04
So if I have a low quality jxl and change the brightness a bit or some other minor edit and then feed it back through the encoder with default settings, the file size will stay similar?
Scope
2021-03-23 07:25:10
And this is more complicated, because then it will be necessary to read and change not the pixel output, but some encoder data
2021-03-23 07:27:09
Also, a low-quality image doesn't always mean good recompression or compression with a different format, because the visual losses are summarized And from the encoder side of the image it's almost equal whether it's lossless or lossy with very heavy compression, because it "doesn't know" what the original was
_wb_
2021-03-23 07:32:49
Generally, in an editing workflow you keep everything lossless and higher bit depth. Changing brightness after lossy compression is likely to introduce visible artifacts.
Paint_Ninja
2021-03-23 07:34:37
Ideally, yes it should be lossless during editing. Some source material may not have that luxury however. In this situation, do you recommend saving it as a "lossless" (lossy in a lossless format) file before editing and then saving it as lossy at the final stage?
_wb_
2021-03-23 07:35:44
Yes
Paint_Ninja
2021-03-23 07:36:35
My question is: Assuming the input codec is the same as the output, could the encoder use some metadata or psycovisual analysis of the file to determine the best defaults?
2021-03-23 07:37:33
And if so, would that be a good idea?
Pieter
2021-03-23 07:38:39
That seems very hard, especially if the editing may have introduced material with different qualities (e.g. text added on top of a photographic image).
_wb_
2021-03-23 07:39:01
If you edit, it's no longer any codec but just pixels
Pieter
2021-03-23 07:39:17
And I'm not sure it's desirable either... you'd be encouraging generation loss again.
Paint_Ninja
2021-03-23 07:39:21
Hmm, that makes sense
2021-03-23 07:40:58
Say if someone wanted to overlay some opaque text on top of an existing lossy image. Could the encoder do a diff with the original and avoid re-encoding the non-text parts?
2021-03-23 07:42:26
Or could the editing software request only a part of an existing jxr image to be encoded with new data?
veluca
Paint_Ninja Say if someone wanted to overlay some opaque text on top of an existing lossy image. Could the encoder do a diff with the original and avoid re-encoding the non-text parts?
2021-03-23 07:43:18
that can in theory be done with multiple layers and/or patches... not fun to do though ๐Ÿ˜„ and no encoder that does it yet
Deleted User
2021-03-23 07:44:01
Plz don't spam <#805176455658733570> with jxl stuff ๐Ÿ˜œ
Paint_Ninja
Plz don't spam <#805176455658733570> with jxl stuff ๐Ÿ˜œ
2021-03-23 07:44:27
Whoops, sorry!
NeRd
Scope > There are non-animated GIFs. Yep, even today I saw some black and white static images in GIF format on discord
2021-03-23 10:30:25
My web design teacher had a mix of GIF 87a and 89a files created in by obscure software for MacOS classic that we used in his class, it was the first time I saw GIF 87a in the wild lmao
Scope
2021-03-24 03:21:19
Btw, modern image formats would be useful for 64k browser demos: https://youtu.be/FYyL_mEQWOM?t=160
2021-03-24 03:22:05
2021-03-24 03:24:22
Crixis
2021-03-24 03:46:35
you can do a so f*** smaller jxl decoder?
BlueSwordM
2021-03-24 03:46:56
https://aomedia-review.googlesource.com/c/aom/+/133961 I see that the aom people interact a lot with you here huh? ๐Ÿ˜„
Scope
Crixis you can do a so f*** smaller jxl decoder?
2021-03-24 03:53:15
This is not necessary, this is a browser demo, so that all formats are supported as in the browser
Crixis
Scope This is not necessary, this is a browser demo, so that all formats are supported as in the browser
2021-03-24 03:54:36
ah, ok make sense
Scope
2021-03-24 04:21:01
Also 4K Executable Graphics and I think some similar things can be done with purely modern image encoders (but in different ways), such as layering an easily compressible background and a normal image https://youtu.be/E1tp1wCeVZ0?t=979
2021-03-25 10:59:13
<@!461421345302118401> I do not remember about Pingo, but ECT and WebP by default remove the invisible alpha, but visually it does not make any changes and it is not needed for normal images, it is not exactly lossy (if it is not some special textures for games and other technical images, where it may be necessary) Also to optimize in combination Pingo with ECT does not require additional scripts for parallel processing (if ECT is properly compiled for that), I would recommend this combination: ```pingo -sa -strip -nocompression *.png ect -9 --reuse --mt-file *.png``` Unless `-nocompression` requires some extra free space, but with these keys optimizers will not do double work, only what they do best, `-9` can be replaced by `-30060` for some improvement in efficiency, with more time. This combination is hard to beat in terms of speed/efficiency, for efficiency records there is a mod on ECT which one image can be optimized for several months
Deleted User
Scope <@!461421345302118401> I do not remember about Pingo, but ECT and WebP by default remove the invisible alpha, but visually it does not make any changes and it is not needed for normal images, it is not exactly lossy (if it is not some special textures for games and other technical images, where it may be necessary) Also to optimize in combination Pingo with ECT does not require additional scripts for parallel processing (if ECT is properly compiled for that), I would recommend this combination: ```pingo -sa -strip -nocompression *.png ect -9 --reuse --mt-file *.png``` Unless `-nocompression` requires some extra free space, but with these keys optimizers will not do double work, only what they do best, `-9` can be replaced by `-30060` for some improvement in efficiency, with more time. This combination is hard to beat in terms of speed/efficiency, for efficiency records there is a mod on ECT which one image can be optimized for several months
2021-03-25 12:39:18
Pingo fiddles with invisible alpha pixels AFAIK. https://discord.com/channels/794206087879852103/805007255061790730/822888805547114547
Jim
Scope Also 4K Executable Graphics and I think some similar things can be done with purely modern image encoders (but in different ways), such as layering an easily compressible background and a normal image https://youtu.be/E1tp1wCeVZ0?t=979
2021-03-25 12:41:47
Yep, I think it will be really good for combining photographic and vector portions. A photographic background could be compressed hf lossy and text/graphics layer on top compressed modular so that the text and vector art can be crisp and clean while the background data can be somewhat lossy.
2021-03-25 12:42:24
Granted, image editors would have to implement such a solution... not sure they have much interest to atm.
Scope
2021-03-25 12:46:47
Pingo (-sa -strip)
2021-03-25 12:47:05
Pingo+ECT
2021-03-25 12:52:00
WebP
2021-03-25 12:58:04
But, also WebP in one of the applications through the official Windows 10 WIC decoder
Jim
2021-03-25 01:39:11
The JXL art one is better.
_wb_
2021-03-25 01:42:20
this kind of "optimized" invisible pixels were quite expensive to encode with vardct (such horizontal stripes are cheap for PNG but not really for a dct)
2021-03-25 01:43:37
that's why we do something else instead (see https://discord.com/channels/794206087879852103/805007255061790730/822890261369716736)
lithium
Scope <@!461421345302118401> I do not remember about Pingo, but ECT and WebP by default remove the invisible alpha, but visually it does not make any changes and it is not needed for normal images, it is not exactly lossy (if it is not some special textures for games and other technical images, where it may be necessary) Also to optimize in combination Pingo with ECT does not require additional scripts for parallel processing (if ECT is properly compiled for that), I would recommend this combination: ```pingo -sa -strip -nocompression *.png ect -9 --reuse --mt-file *.png``` Unless `-nocompression` requires some extra free space, but with these keys optimizers will not do double work, only what they do best, `-9` can be replaced by `-30060` for some improvement in efficiency, with more time. This combination is hard to beat in terms of speed/efficiency, for efficiency records there is a mod on ECT which one image can be optimized for several months
2021-03-25 02:55:37
<@!111445179587624960> thank you very much ๐Ÿ™‚ I prepare use jxl on game asset(drawing content), could you teach me about this case(special textures for games and other technical images)?, I only know lossy alpha will get some issue, keep alpha lossless should be safety. look like pingo and pingo + ECT don't have any alpha issue on dice image case, but i still worry some special case. example: image.png => pingo -s0 -nosrgb -nostrip -quiet => oxipng -o3 --keep iCCP, sRGB -t 12 --quiet RGB24 or RGBA32 => jxl(vardct) => image.jxl PAL8 => jxl(lossless) => image.jxl // when png need use, decode to png image.jxl => image.png
Scope
2021-03-25 03:03:07
I don't think that optimizing an invisible alpha will be a problem for images intended for viewing, for textures it is sometimes used as additional data
lithium
2021-03-25 03:34:38
<@!111445179587624960> for textures content like unity3d or Unreal? I prepare use on RPG MAKER(VX ACE, MV) and renpy.
Scope
2021-03-25 03:36:25
Not really, they usually use other formats, not PNG, but in some games for specific uses
2021-03-25 03:37:34
If I am not mistaken Minecraft uses PNG and some Java games (but even if they use PNGs, they don't always use invisible alpha)
lithium
2021-03-26 11:27:54
<@!111445179587624960> So I shouldn't worry optimize invisible alpha and bit transform(to 8bit)? I test some pingo optimize png on those engine(RPG MAKER(VX ACE, MV), renpy), that png still work fine ๐Ÿ™‚
Scope
2021-03-26 11:28:19
Yep
lithium
2021-03-26 11:30:31
ok, Thank you very much for your help <@!111445179587624960> ๐Ÿ™‚
_wb_
2021-03-27 06:54:06
monad
2021-03-27 07:27:17
> 3.1 MB screenshot
lithium
2021-03-30 10:30:37
how to compare butteraugli and xpsnr? https://github.com/fraunhoferhhi/xpsnr
2021-03-30 10:31:22
butteraugli(XYB) xpsnr(yuv)
_wb_
2021-03-30 10:41:28
xpsnr looks like a poor man's / easier to implement butteraugli, attempting to model contrast masking but still operating in YCbCr (which is perceptually not that good) and allowing easy backgrounds to compensate for getting hard foregrounds wrong
lithium
2021-03-30 10:43:55
VVC will use xpsnr, I think AV1 use butteraugli tune is a good idea ๐Ÿ™‚
Scope
2021-04-03 04:15:16
<https://encode.su/threads/3610-Zpng-zstd-based-lossless-image-codec> <https://github.com/catid/Zpng> One of the reasons why I also added uncompressed PNG + Brotli (and this at least has some conditional support in browsers)
2021-04-03 04:41:05
But, I don't see the point of improving the old formats when they won't be compatible anyway and it would be better to add a completely new format (with much more features and improvements)
_wb_
2021-04-03 04:44:51
that's indeed the thing: if you need to upgrade software anyway, it doesn't matter much if it's an improved old format or a completely new format
spider-mario
2021-04-03 05:25:38
right, the advantage of upgrading old formats (e.g. JPEG XT) is usually backwards compatibility / graceful degradation
Scope
2021-04-04 12:17:03
Noticed after this news that Oodle compression is being compared to FLIF as well https://www.unrealengine.com/en-US/blog/oodle-now-free-to-use-in-unreal-engine-via-github
2021-04-04 12:17:16
<http://www.radgametools.com/oodlelimage.htm>
2021-04-04 12:17:25
http://www.radgametools.com/images/oli_compression_large.png
2021-04-04 12:18:05
`But unlike other compressors that accept a trade-off for slower speeds, Oodle Lossless Image is still super fast - its decode speed is 5-10x faster than PNG and 200-500x faster than FLIF! It's just massively faster than anything else at these compression levels.`
BlueSwordM
Scope `But unlike other compressors that accept a trade-off for slower speeds, Oodle Lossless Image is still super fast - its decode speed is 5-10x faster than PNG and 200-500x faster than FLIF! It's just massively faster than anything else at these compression levels.`
2021-04-04 12:21:16
The question is: does it actually reduce texture VRAM sizes as well?
Scope
2021-04-04 12:28:00
Oodle has separate tools for textures and they are also used in many modern games, but to reduce the VRAM use there must be hardware support and this is more for regular images, which can also be used somewhere
BlueSwordM
2021-04-04 12:28:47
I see.
2021-04-04 12:29:05
I just want to see what are their testing parameters.
Scope
2021-04-04 12:36:18
http://cbloomrants.blogspot.com/2020/06/oodle-texture-slashes-game-sizes.html
2021-04-04 12:38:16
<https://forums.warframe.com/topic/1223735-the-great-ensmallening/>
lithium
2021-04-04 06:38:12
Oodle dev, They forgot compare lolz
Deleted User
2021-04-04 08:15:53
<@!826537092669767691> `JINT_DC_SCAN_OPT_MODE` is supposed to be 0 (`One scan for all components`) by default in mozjpeg, right?
Kornel
2021-04-04 08:16:27
Yes, I've recently changed it
Deleted User
2021-04-04 08:17:06
`cjpeg`'s quick help says otherwise...
2021-04-04 08:17:20
``` -dc-scan-opt DC scan optimization mode - 0 One scan for all components - 1 One scan per component (default) - 2 Optimize between one scan for all components and one scan for 1st component plus one scan for remaining components```
fab
2021-04-04 08:33:17
https://chromium.googlesource.com/codecs/libwebp2/
Scope
`cjpeg`'s quick help says otherwise...
2021-04-04 10:29:28
<https://github.com/mozilla/mozjpeg/blob/master/cjpeg.c#L190>
Kornel
2021-04-04 10:52:42
Ugh, I need to delete `cjpeg`.
Deleted User
Kornel Ugh, I need to delete `cjpeg`.
2021-04-04 10:53:40
NOOOOOOOOOO
2021-04-04 10:54:05
This is our only way to create highly optimized JPEGs. We'd be screwed without this tool!
mincerafter42
2021-04-05 03:05:30
hello I am having lots of trouble with colour correction in PNG but then I realized I was in a server of people that probably know more about this than I do (and I am very inactive on it) I was making an animation about PNG because circumstances, but I just can't seem to find enough information to figure out how the `cHRM` chunk works apparently decoders can find the Y value of the red, green, and blue points in the xyY colour space when you only have x and y. Doesn't say _how_ anywhere I looked though. and I sort of maybe understand the rest of the process not sure, so if somebody had an explanation it would be helpful (also ping me if you have a reply because, like I said, I am not active)
_wb_
2021-04-05 05:10:20
I think the Y is implicitly normalized to be 1.0, no?
2021-04-05 05:10:50
<@604964375924834314> probably knows better than me
spider-mario
mincerafter42 hello I am having lots of trouble with colour correction in PNG but then I realized I was in a server of people that probably know more about this than I do (and I am very inactive on it) I was making an animation about PNG because circumstances, but I just can't seem to find enough information to figure out how the `cHRM` chunk works apparently decoders can find the Y value of the red, green, and blue points in the xyY colour space when you only have x and y. Doesn't say _how_ anywhere I looked though. and I sort of maybe understand the rest of the process not sure, so if somebody had an explanation it would be helpful (also ping me if you have a reply because, like I said, I am not active)
2021-04-05 08:14:38
this seems to be it: https://sourceforge.net/p/dispcalgui/code/HEAD/tree/trunk/DisplayCAL/ICCProfile.py#l6379 https://sourceforge.net/p/dispcalgui/code/HEAD/tree/trunk/DisplayCAL/colormath.py#l1591
Deleted User
2021-04-05 08:55:42
I'm testing JPEG XR, I've just compiled binaries for Windows (both 32-bit and 64-bit, `-O3` optimized). Check if they work for you.
2021-04-05 08:55:48
2021-04-05 08:55:53
2021-04-05 08:56:30
If you don't believe me, you can download the source code yourself: https://jpeg.org/downloads/jpegxr/jpegxr-ref.zip
2021-04-05 08:58:14
Download Orwell Dev-C++ (quite lightweight IDE) with TDM-GCC pre-configured: https://orwelldevcpp.blogspot.com/
fab
2021-04-05 08:59:20
and the homepage where you found this link
Deleted User
2021-04-05 09:00:21
Load this `.dev` file into the same directory as unpacked source, open it, compile yourself and enjoy ๐Ÿ™‚
fab
2021-04-05 09:01:51
but how to specify quantizer
Deleted User
2021-04-05 09:01:59
Compilation instructions for Linux are much simpler, just run this code: ```bash sudo apt install bison flex make```
fab
2021-04-05 09:02:00
i don't understand anything about the parameters
Deleted User
fab but how to specify quantizer
2021-04-05 09:02:10
For what?
fab
2021-04-05 09:02:24
jpegxr-x64 -h
2021-04-05 09:02:32
jpegxr-x64
Deleted User
2021-04-05 09:03:20
You don't need `-h`, just run it without any arguments and it will print you help
2021-04-05 09:03:44
And I don't understand this either ๐Ÿ˜†
2021-04-05 09:04:05
At least not yet, I have to look into this further
2021-04-05 09:18:37
This tool doesn't understand PNG files, you have to use raw files, TIF, PNM or RGBE. I recommend TIF, it's the easiest to convert to on Windows.
_wb_
2021-04-05 10:38:04
JPEG XR is not that great
2021-04-05 10:38:20
It's somewhere between old JPEG and J2K
2021-04-05 10:40:20
Microsoft abandoned the project, so there is only this half-baked tooling
spider-mario
2021-04-05 11:04:46
my limited experience with it was not encouraging at all
2021-04-05 11:05:03
sadly, I think some are confusing us with it
Deleted User
2021-04-05 11:07:55
Unfortunately I have to use it to re-create this comparison from scratch:
2021-04-05 11:07:57
https://upload.wikimedia.org/wikipedia/commons/2/20/Comparison_between_JPEG%2C_JPEG_2000_and_JPEG_XR.png
2021-04-05 11:09:00
Unfortunately it's GFDL'ed and I can't upload any more derivative work based on it to Commons...
2021-04-05 11:09:31
So I have to grab the original source panorama:
2021-04-05 11:09:33
https://upload.wikimedia.org/wikipedia/commons/archive/e/e6/20180512102522%21Paris_Night.jpg
2021-04-05 11:10:57
And redo everything myself. Fortunately it's dual-licensed GFDL and CC-BY-SA, I can use the latter and upload my version under CC-BY-SA.
_wb_
2021-04-05 11:14:32
You can use cloudinary to produce jpeg xr
Deleted User
_wb_ You can use cloudinary to produce jpeg xr
2021-04-05 11:14:45
Nice, thanks!
Crixis
2021-04-05 11:15:08
Why support xr?
Deleted User
2021-04-05 11:16:20
Here's what I've done so far. JPEG 2000 and JPEG XR weren't touched yet, but everything else (including the "Original" pixel-exact crop) was made from scratch by me. Texts were re-done with Arial 32 pt. and guide-aligned. I picked the very best settings for both encoding AND decoding, e.g. the MozJPEG with PSNR-HVS trellis tuning was too blocky after normal decoding, so I had to decode it with Knusperli... thanks Jyrki ๐Ÿ˜‰
2021-04-05 11:16:32
_wb_
2021-04-05 11:16:44
res.cloudinary.com/jon/image/fetch/q_70,f_wdp/[URL]
Deleted User
2021-04-05 11:20:36
I wish Knusperli was the default decoder everywhere... I'm that type of guy that'd sacrifice speed for maximum quality possible.
_wb_
2021-04-05 11:20:54
res.cloudinary.com/jon/image/fetch/q_100,f_png/http://res.cloudinary.com/jon/image/fetch/q_70,f_wdp/[URL]
Deleted User
2021-04-05 11:21:33
The JPEG XR executable above both encodes and decodes ๐Ÿ™‚
_wb_
2021-04-05 11:21:49
Ah ok
Deleted User
2021-04-05 11:25:25
I can't go below 13.2 KB and I need 9.16 KB... ๐Ÿ™
paperboyo
2021-04-05 11:26:08
This comparison image is very useful, thanks, Ziemek. Do you think it would make sense to include standard JPEG too (libJPEG?), because MozJPEG is likely so much better-looking, but not widely popular?
Deleted User
2021-04-05 11:29:09
I'm trying to squeeze out the best of every format, both encoder- and decoder-side. For example MozJPEG is the best JPEG encoder and Knusperli is the best JPEG decoder, so I used them in tandem. JPEG 2000 is going to be crazy, because there are multiple encoders and I have to try them all to get the best encode.
_wb_
2021-04-05 11:30:24
Kakadu is the best one
Deleted User
2021-04-05 11:30:51
Ok, so I'll start with that one
2021-04-05 11:32:24
But I'll still try other ones, because I'm curious ๐Ÿ˜›
2021-04-05 11:35:47
<@!794205442175402004> which JPEG XR encoder does Cloudinary use?
_wb_
2021-04-05 11:37:40
There is only one, afaik
Deleted User
I can't go below 13.2 KB and I need 9.16 KB... ๐Ÿ™
2021-04-05 12:35:15
Why so small? They all look ugly at that size and people caring about their images shouldn't use such low bpp.
Why so small? They all look ugly at that size and people caring about their images shouldn't use such low bpp.
2021-04-05 04:07:58
Original comparison (that I'm trying to recreate) was using 9.16 KB, that's why. And such low bitrates allow us to "see" better the internal "guts" of the codecs.
BlueSwordM
2021-04-06 03:38:57
That's new for mozjpg <:Thonk:805904896879493180>
2021-04-06 03:39:01
```CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find PNG (missing: PNG_LIBRARY) (found suitable version "1.6.37+apng", minimum required is "1.6")```
2021-04-06 03:43:59
Does anyone have an idea why it doesn't want to compile even if I have the supposedly correct dependency?
spider-mario
2021-04-06 03:58:00
that seems like a version parsing bug (with a confusing error message)
2021-04-06 03:58:22
you might be able to get around it by setting PNG_LIBRARY manually in CMakeCache.txt, not sure