|
lithium
|
|
_wb_
well i'm not really interested in doing poor quality more efficiently, I'm aiming more at making d0.5 to d3 produce better and smaller results
|
|
2022-05-19 04:25:54
|
That make sense, I remember Butteraugli design intent is for this quality target(d0.5~d3).
|
|
|
BlueSwordM
|
|
_wb_
Beating avif in the area of low-bitrate artistically smudged and smoothed versions of an image that have very low fidelity but good appeal (for their bitrate) is probably going to be hard. Not saying it cannot be done, but I just don't see the use case except pleasing those who like to compare codecs by looking at overcompressed images.
|
|
2022-05-19 04:26:52
|
Also, this image is kind of a cheat.
|
|
2022-05-19 04:27:08
|
It activates some of the screen content tools that aomenc has access too.
|
|
|
_wb_
|
2022-05-19 04:34:55
|
Well av1 has palette blocks, which are probably useful for anime. Jxl doesn't have that, but it does have patches which can be used as palette blocks.
|
|
|
yurume
|
2022-05-19 04:47:23
|
one thing I've noticed from implementing jxsml is that you can also perform Palette transformation over already transformed Palette metachannels as well
|
|
|
_wb_
|
2022-05-19 04:51:48
|
Yes, no idea if that is useful for anything
|
|
2022-05-19 04:53:24
|
I think it might be useful if you have e.g. a 10-bit image where each channel only actually uses 800 different values, and those are the same values for R,G, and B.
|
|
2022-05-19 04:53:59
|
Then doing three single-channel palettes is useful to bring the range of the channels to 0-799 instead of 0-1023
|
|
2022-05-19 04:55:03
|
Ah wait no palette on palette is not useful for that
|
|
2022-05-19 04:56:03
|
For that case, doing an RCT on those 3 identical palette metachannels would be useful, so it only has to be encoded once and the two others become just all-zeroes
|
|
|
Jim
|
|
_wb_
do you think it's an unreasonable assumption that when you do lossy compression, you don't care about the color values of transparent pixels?
|
|
2022-05-19 04:59:41
|
If you're just exporting for the web or to share with others, no.
If you are saving a layered file for storage and possibly future editing, the color values should be preserved, transparent or not.
|
|
|
_wb_
|
2022-05-19 05:21:43
|
Yes, if you intend to do further editing of the alpha channel, then of course all values should be preserved. But then you probably also want to use lossless, not lossy.
|
|
2022-05-19 05:52:07
|
https://www.phoronix.com/scan.php?page=news_item&px=OpenJPEG-2.5-Brings-HTJ2K
|
|
|
lonjil
|
2022-05-20 03:15:53
|
What's the best tool to use to compress PNGs as much as possible? Without lossy transformations.
|
|
|
Traneptora
|
|
lonjil
What's the best tool to use to compress PNGs as much as possible? Without lossy transformations.
|
|
2022-05-20 03:22:52
|
I personally run a combination of optipng and zopflipng
|
|
2022-05-20 03:23:24
|
optipng will do things like colorspace reduction, potentially to palettes
|
|
2022-05-20 03:23:32
|
and zopflipng compresses the idat chunk with zlib
|
|
2022-05-20 03:23:55
|
zopflipng cannot multithread but that's not an issue if you're doing pngs in bulk since you can just use GNU Parallel to process-based parallelize
|
|
|
lonjil
|
2022-05-20 03:24:05
|
mm
|
|
2022-05-20 03:24:12
|
any settings recommendations?
|
|
|
Traneptora
|
2022-05-20 03:24:36
|
um, well I personally don't use zopflipng, I use `pigz` which is a multithreaded gzip that supports -11 for zopfli
|
|
2022-05-20 03:24:41
|
but.................
|
|
|
|
Diamondragon
|
|
lonjil
What's the best tool to use to compress PNGs as much as possible? Without lossy transformations.
|
|
2022-05-20 03:25:07
|
I recommend ECT.
https://github.com/fhanau/Efficient-Compression-Tool/releases/tag/v0.8.3
|
|
|
Traneptora
|
2022-05-20 03:25:21
|
I wrote my own shell script that reads a PNG from stdin and writes a PNG to stdout and recompresses the idat chunk and fdat chunks with pigz
|
|
2022-05-20 03:25:23
|
so it can thread
|
|
2022-05-20 03:25:25
|
it's *horrible*
|
|
2022-05-20 03:27:26
|
https://0x0.st/oaS7.sh
|
|
|
Fox Wizard
|
2022-05-20 03:29:28
|
Isn't ECT more efficient than optipng+zopflipng?
|
|
|
Traneptora
|
2022-05-20 03:29:35
|
I don't know, is it?
|
|
|
Fox Wizard
|
2022-05-20 03:29:44
|
Think so
|
|
|
lonjil
|
2022-05-20 03:30:04
|
ECT doesn't appear to be packaged on my distro anyway, and I'm too lazy to get it on my own >.>
|
|
|
Fox Wizard
|
2022-05-20 03:39:20
|
Guess we could try what's more efficient with this image <:KekDog:884736660376535040>
|
|
|
DZgas Ж
|
|
_wb_
well i'm not really interested in doing poor quality more efficiently, I'm aiming more at making d0.5 to d3 produce better and smaller results
|
|
2022-05-20 04:10:51
|
AVIF will the best for strong compression
|
|
2022-05-20 04:12:33
|
And this is really the best solution for the Internet
|
|
|
lonjil
|
2022-05-20 04:12:46
|
most images on the internet are not low quality
|
|
|
DZgas Ж
|
|
lonjil
most images on the internet are not low quality
|
|
2022-05-20 04:14:15
|
a?
|
|
2022-05-20 04:14:23
|
go will be
|
|
|
Fox Wizard
Guess we could try what's more efficient with this image <:KekDog:884736660376535040>
|
|
2022-05-20 04:15:57
|
Most people watch not the original picture, only watch the discord preview, jpeg, or in exceptional cases wepb
|
|
2022-05-20 04:17:01
|
https://media.discordapp.net/attachments/805176455658733570/977234079185506374/Resize.png?width=400&height=225 this
|
|
|
Fox Wizard
|
|
DZgas Ж
Most people watch not the original picture, only watch the discord preview, jpeg, or in exceptional cases wepb
|
|
2022-05-20 04:17:23
|
This has nothing to do with the image though <:KekDog:884736660376535040>
|
|
2022-05-20 04:18:44
|
That's just a Discord preview. If someone were to use the image I uploaded for an efficiency comparison between zopflipng+optipng then they wouldn't open the console to get the Discord preview :p
|
|
|
_wb_
|
|
DZgas Ж
And this is really the best solution for the Internet
|
|
2022-05-20 04:57:22
|
I don't really think so. Current "web quality" is around d1.5 to d2.5. Why would people be happy with lower fidelity than what they use now?
|
|
|
BlueSwordM
|
|
lonjil
What's the best tool to use to compress PNGs as much as possible? Without lossy transformations.
|
|
2022-05-20 05:00:11
|
ECT + Pingo if you're on Windows and only care about 8-bit.
Otherwise, ECT.
|
|
|
lonjil
ECT doesn't appear to be packaged on my distro anyway, and I'm too lazy to get it on my own >.>
|
|
2022-05-20 05:01:22
|
```git clone https://github.com/fhanau/Efficient-Compression-Tool --recursive
cd Efficient-Compression-Tool && mkdir build && cd build
cmake ../src -DECT_MULTITHREADING=ON -DECT_FOLDER_SUPPORT=ON -DCMAKE_CXX_FLAGS="-march=native" -DCMAKE_C_FLAGS="-march=native" -DCMAKE_BUILD_TYPE=Release && make -j 16
sudo make install``` Now the problem would be the dependencies <:kekw:808717074305122316>
|
|
|
DZgas Ж
|
|
_wb_
I don't really think so. Current "web quality" is around d1.5 to d2.5. Why would people be happy with lower fidelity than what they use now?
|
|
2022-05-20 05:16:18
|
well
|
|
|
DZgas Ж
|
|
2022-05-20 05:16:35
|
this is the argument
|
|
|
_wb_
I don't really think so. Current "web quality" is around d1.5 to d2.5. Why would people be happy with lower fidelity than what they use now?
|
|
2022-05-20 05:18:42
|
I did not understand how you made a quality assessment use D for all image
|
|
|
DZgas Ж
|
|
2022-05-20 05:21:00
|
this is d25 for JXL only
but for AVIF "d" is useless
the same kilobytes
|
|
|
_wb_
I don't really think so. Current "web quality" is around d1.5 to d2.5. Why would people be happy with lower fidelity than what they use now?
|
|
2022-05-20 05:23:37
|
avif will be exactly in this quality or even better - for this content, but 5 more times low size
|
|
2022-05-20 05:24:39
|
it's hard to imagine the amount of content that can be involved, it's literally all the art on the Internet
|
|
2022-05-20 05:26:16
|
I want to say that the problem is exactly the same as with jpeg 30 years ago
|
|
|
lonjil
|
|
Traneptora
I wrote my own shell script that reads a PNG from stdin and writes a PNG to stdout and recompresses the idat chunk and fdat chunks with pigz
|
|
2022-05-20 05:34:54
|
I wanna try this, so could you send me the crc32.py script it calls as well?
|
|
|
Traneptora
|
|
lonjil
I wanna try this, so could you send me the crc32.py script it calls as well?
|
|
2022-05-20 05:36:15
|
https://0x0.st/oaQE.py
|
|
|
lonjil
|
|
Traneptora
|
2022-05-20 05:38:17
|
you can also use `crc32` from perl
|
|
2022-05-20 05:38:27
|
should be at `/usr/bin/vendor_perl/crc32`
|
|
|
DZgas Ж
|
|
DZgas Ж
|
|
2022-05-20 05:39:57
|
interesting color map
|
|
|
Traneptora
|
2022-05-20 05:40:34
|
looks like an interpretation of Cr and Cb
|
|
|
DZgas Ж
|
2022-05-20 05:40:48
|
yep
|
|
2022-05-20 05:41:19
|
see all jpeg moment
|
|
|
_wb_
|
2022-05-20 05:41:32
|
Did you see my jxl file for that image?
|
|
|
DZgas Ж
|
|
_wb_
Did you see my jxl file for that image?
|
|
2022-05-20 05:41:46
|
no
|
|
|
_wb_
Did you see my jxl file for that image?
|
|
2022-05-20 05:42:23
|
show , am I missing something?
|
|
|
_wb_
|
2022-05-20 05:43:22
|
https://encode.su/threads/3397-JPEG-XL-vs-AVIF?p=74395&viewfull=1#post74395
|
|
2022-05-20 05:43:58
|
|
|
|
DZgas Ж
|
|
_wb_
|
|
2022-05-20 05:47:56
|
and you exactly used varDCT ?
|
|
|
_wb_
|
2022-05-20 05:48:06
|
No that is modular
|
|
|
DZgas Ж
|
|
_wb_
|
2022-05-20 05:48:50
|
For images like that, modular is more suitable
|
|
|
DZgas Ж
|
2022-05-20 05:49:06
|
the problem
|
|
2022-05-20 05:50:13
|
oh the big problem
|
|
|
BlueSwordM
|
|
DZgas Ж
avif will be exactly in this quality or even better - for this content, but 5 more times low size
|
|
2022-05-20 05:50:19
|
See, the problem is that when JXL fails, it fails a bit.
|
|
2022-05-20 05:50:28
|
When a video based image format fails, it tends to fail horribly.
|
|
|
_wb_
|
|
DZgas Ж
oh the big problem
|
|
2022-05-20 05:51:12
|
What's the big problem? We have both modes exactly to cover different kinds of images.
|
|
2022-05-20 05:51:56
|
It would be nice if we can make an encoder that more cleverly uses both modes, and I am working on that
|
|
2022-05-20 05:52:16
|
But bitstream-wise, I don't see the problem...
|
|
2022-05-20 05:53:16
|
In any case, for such images, vector formats should be used whenever possible. Rasterization is already an unnecessarily lossy operation imo.
|
|
|
lonjil
|
2022-05-20 05:54:28
|
Alright, I did optipng + thebombzen's script, and got the size down from 92'800'591 bytes to 77'606'529 🥳
|
|
|
DZgas Ж
|
2022-05-20 05:54:59
|
funny that just yesterday I was compressing 174 thousand images into a limited palette of 32 colors for png
|
|
|
Traneptora
|
|
lonjil
Alright, I did optipng + thebombzen's script, and got the size down from 92'800'591 bytes to 77'606'529 🥳
|
|
2022-05-20 05:58:46
|
lol, that's one massive PNG
|
|
|
lonjil
|
2022-05-20 05:58:52
|
yeah lol
|
|
2022-05-20 05:58:59
|
8000x8000 pixels
|
|
2022-05-20 05:59:40
|
Probably would be a good candidate for patches, especially if the program generating the image could take advantage of jxl features directly.
|
|
|
BlueSwordM
|
|
lonjil
Alright, I did optipng + thebombzen's script, and got the size down from 92'800'591 bytes to 77'606'529 🥳
|
|
2022-05-20 05:59:51
|
Try WebP 😛
|
|
2022-05-20 05:59:57
|
You'll see.
|
|
|
lonjil
|
2022-05-20 06:00:10
|
|
|
|
BlueSwordM
Try WebP 😛
|
|
2022-05-20 06:00:43
|
currently `cjxl -q 100 -e 9`'ing it :p
|
|
|
DZgas Ж
|
2022-05-20 06:11:36
|
kill the cpu
|
|
2022-05-20 06:11:44
|
use avif -s 0
|
|
|
Fraetor
|
2022-05-20 06:12:10
|
AVIF's lossless mode is not that amazing though.
|
|
2022-05-20 06:12:19
|
It struggles to beat webp.
|
|
|
DZgas Ж
|
|
_wb_
What's the big problem? We have both modes exactly to cover different kinds of images.
|
|
2022-05-20 06:13:56
|
you lost the color
|
|
2022-05-20 06:14:20
|
can you Compress even harder?
|
|
2022-05-20 06:15:43
|
this my 20 kb avif
|
|
|
190n
|
|
Fraetor
It struggles to beat webp.
|
|
2022-05-20 06:16:18
|
doesn't it even struggle to beat png lol
|
|
|
DZgas Ж
|
|
DZgas Ж
this my 20 kb avif
|
|
2022-05-20 06:16:52
|
the exceptional maximum that I can do without losing colors
|
|
2022-05-20 06:17:15
|
but...
|
|
|
_wb_
|
2022-05-20 06:20:29
|
If you really need that image compressed a lot, I suggest optimizing the svg further and doing brotli on it
|
|
2022-05-20 06:22:11
|
I just did lossless jxl on a pngquanted version of the image, I am sure better things than that can be done, but it's a bit of an academic exercise imo
|
|
|
DZgas Ж
|
|
_wb_
I just did lossless jxl on a pngquanted version of the image, I am sure better things than that can be done, but it's a bit of an academic exercise imo
|
|
2022-05-20 06:24:29
|
as soon as I take any anime art using a shadow or a gradient, Everything will break, except for AVIF
|
|
|
_wb_
|
2022-05-20 06:26:56
|
Yeah delta palette is probably a better idea, it has no problems with gradients
|
|
|
DZgas Ж
|
|
_wb_
Yeah delta palette is probably a better idea, it has no problems with gradients
|
|
2022-05-20 06:30:40
|
and yet jpeg xl works better with guardians, even at low compressions
|
|
2022-05-20 06:31:21
|
i mean giant solid gradients like 1000 pixels in size
|
|
2022-05-20 06:32:11
|
15 minutes passed, of course, not bad :)
|
|
|
Fraetor
|
2022-05-20 06:40:33
|
I got it down to 39KB with a bit of SVG optimisation.
|
|
|
DZgas Ж
|
|
DZgas Ж
15 minutes passed, of course, not bad :)
|
|
2022-05-20 06:40:41
|
130 kb wtf
|
|
|
Fraetor
|
2022-05-20 06:40:46
|
I probably need to start doing manual tricks to get better than that.
|
|
|
DZgas Ж
|
2022-05-20 06:41:29
|
oh god lossless is not a lossless
|
|
2022-05-20 06:43:23
|
wait
|
|
2022-05-20 06:43:46
|
Avif does not contain an algorithm for lossless compression?
|
|
|
Fraetor
|
2022-05-20 06:43:59
|
It does.
|
|
|
Traneptora
|
|
lonjil
currently `cjxl -q 100 -e 9`'ing it :p
|
|
2022-05-20 06:44:12
|
should use `-d 0` instead of `-q 100`
|
|
2022-05-20 06:44:21
|
it's not different but ideally you use distance instead of quality
|
|
2022-05-20 06:44:35
|
a good habit to get into
|
|
|
DZgas Ж
|
2022-05-20 06:44:36
|
it means i'm doing something wrong
|
|
2022-05-20 06:45:13
|
wtf its not the lossless
|
|
2022-05-20 06:46:00
|
just XOR image
|
|
|
Traneptora
|
2022-05-20 06:46:08
|
probably need `--max 0 --maxalpha 0`
|
|
|
DZgas Ж
|
|
Fraetor
|
2022-05-20 06:46:34
|
cavif has a seperate `--lossless` option.
|
|
|
DZgas Ж
|
|
Traneptora
|
2022-05-20 06:47:12
|
avifenc has `--lossless` yea, and if you override any settings that make it not lossless then it will warn you
|
|
|
DZgas Ж
|
2022-05-20 06:47:39
|
lol
|
|
2022-05-20 06:47:56
|
same
|
|
2022-05-20 06:48:15
|
but -min 0 lossless is not true lossless
|
|
|
fab
|
2022-05-20 07:03:01
|
jxl fidelity is unmatched
|
|
|
DZgas Ж
|
|
fab
jxl fidelity is unmatched
|
|
2022-05-20 07:03:36
|
👉 not for anime
|
|
|
lonjil
|
|
lonjil
Alright, I did optipng + thebombzen's script, and got the size down from 92'800'591 bytes to 77'606'529 🥳
|
|
2022-05-20 07:07:08
|
`cjxl -q 100 -e 9` took it down to 71'456'496 bytes
|
|
|
Traneptora
|
2022-05-20 07:07:47
|
noice
|
|
|
DZgas Ж
but -min 0 lossless is not true lossless
|
|
2022-05-20 07:08:31
|
you didn't set the alpha quality setting
|
|
|
DZgas Ж
|
|
Traneptora
you didn't set the alpha quality setting
|
|
2022-05-20 07:10:17
|
because I can it
|
|
2022-05-20 07:11:17
|
the ability to compress the alpha channel at Another level is a big advantage
|
|
2022-05-20 07:11:54
|
and....154 kb
|
|
2022-05-20 07:12:30
|
what
|
|
2022-05-20 07:12:42
|
the PNG is 60 kb
|
|
2022-05-20 07:13:34
|
what the 🤡
|
|
|
fab
|
2022-05-20 07:14:32
|
jxl has no impovement
|
|
2022-05-20 07:14:39
|
same quality as befoe
|
|
2022-05-20 07:14:53
|
as thee months ago
|
|
|
DZgas Ж
|
2022-05-20 07:15:36
|
ok...my pc too, already 5 years
|
|
2022-05-20 07:15:47
|
and smartphone...
|
|
2022-05-20 07:16:03
|
it seems this is the end
|
|
2022-05-20 07:16:22
|
av2 will never come out
|
|
2022-05-20 07:17:01
|
but... what the hell is going on with lossless avif
|
|
2022-05-20 07:17:53
|
they really, no joke, create an exact copy of the image based on their algorithms FOR LOSSY COMPRESSION
|
|
2022-05-20 07:19:20
|
just like jpeg without round the DCT coefficients
|
|
2022-05-20 07:21:18
|
**in this case, the situation in which there will be color Paletre - instant defeat**
|
|
2022-05-20 07:22:30
|
Jpeg XL was much smarter in this sense and just had a separate algorithm for lossless compression, just like webp
|
|
|
DZgas Ж
this my 20 kb avif
|
|
2022-05-20 07:23:41
|
and yet no one can beat it
|
|
2022-05-20 07:24:31
|
but if you use a palette, then it is possible, therefore, it is better not to give such a chance and take a more complex image
|
|
2022-05-20 07:27:58
|
and even with noise
|
|
2022-05-20 07:28:04
|
|
|
2022-05-20 07:29:48
|
there is a parameter in avif, but I'm not entirely sure that it does something useflu
enable-chroma-deltaq=B : Enable delta quantization in chroma planes (0: disable (default), 1: enable)
|
|
|
fab
|
2022-05-20 07:33:08
|
is you community in ussian language
|
|
2022-05-20 07:33:20
|
on telegram
|
|
|
DZgas Ж
|
|
fab
|
2022-05-20 07:33:41
|
do not worry, i won't enter
|
|
2022-05-20 07:33:48
|
is about hacking?
|
|
|
DZgas Ж
|
|
fab
is about hacking?
|
|
2022-05-20 07:34:22
|
no, it's just what i like
|
|
2022-05-20 07:34:51
|
sometimes these are very distant things like codecs or something technical
|
|
|
fab
|
2022-05-20 07:35:07
|
do you have study
|
|
|
DZgas Ж
|
2022-05-20 07:35:34
|
maybe you should add another link
|
|
|
fab
do you have study
|
|
2022-05-20 07:35:47
|
no
|
|
|
fab
|
2022-05-20 07:35:54
|
no university
|
|
2022-05-20 07:36:18
|
are you young
|
|
|
DZgas Ж
|
2022-05-20 07:36:25
|
I dropped out of university and work
|
|
|
fab
are you young
|
|
2022-05-20 07:37:24
|
I also break the law by not joining the army
|
|
2022-05-20 07:37:48
|
they will come for me soon, and my life was not long
|
|
|
fab
is you community in ussian language
|
|
2022-05-20 07:39:43
|
sorry you don’t understand, but in this picture I created a comprehensive instruction for 3 video codecs at once
|
|
2022-05-20 07:42:53
|
and I also made a minecraft font based on game files, although I used some kind of Japanese algorithm on github with Japanese descriptions and instructions in Japanese
|
|
2022-05-20 07:43:56
|
I use it every day everywhere, I stopped wearing glasses and I see text only through this font, because it occupies a maximum of useful area and is discrete
|
|
|
Fraetor
|
2022-05-20 07:54:46
|
That is actually a pretty cool font.
|
|
|
DZgas Ж
|
2022-05-20 07:58:27
|
this version has all unicode characters for all languages, even china and japanese character set
|
|
|
|
Deleted User
|
|
DZgas Ж
but -min 0 lossless is not true lossless
|
|
2022-05-20 07:58:33
|
yez
|
|
|
DZgas Ж
|
|
yez
|
|
2022-05-20 07:59:55
|
it turned out that avif lossless for vector images is not good at all,
|
|
|
DZgas Ж
|
|
2022-05-20 08:24:02
|
101638 bytes
|
|
2022-05-20 08:28:23
|
in the CJXL should do this: -t is --num_threads
|
|
|
3DJ
|
2022-05-20 08:32:43
|
Howdy folks, I'm looking for an image format that can compress (losslessly) the h*ck out of my hundreds of GBs of 3D stereo pairs like these PNGs
Someone suggested HEIF which supports that <https://nokiatech.github.io/heif/examples.html>
but JPEG XL might be able to achieve even lower filesizes.
Should I go with HEIF, JPEG XL or does anyone have any other suggestions? 👀
|
|
|
DZgas Ж
|
|
3DJ
Howdy folks, I'm looking for an image format that can compress (losslessly) the h*ck out of my hundreds of GBs of 3D stereo pairs like these PNGs
Someone suggested HEIF which supports that <https://nokiatech.github.io/heif/examples.html>
but JPEG XL might be able to achieve even lower filesizes.
Should I go with HEIF, JPEG XL or does anyone have any other suggestions? 👀
|
|
2022-05-20 08:35:53
|
why are this is pictures?
|
|
2022-05-20 08:38:01
|
do not use HEIF it is already outdated, there is either JPEG XL or AVIF
Since you have an image of a non-realistic plan here, I think avif will suit you better, but it all depends on how many such pictures you have and how long you are willing to wait (processor power)
|
|
|
3DJ
Howdy folks, I'm looking for an image format that can compress (losslessly) the h*ck out of my hundreds of GBs of 3D stereo pairs like these PNGs
Someone suggested HEIF which supports that <https://nokiatech.github.io/heif/examples.html>
but JPEG XL might be able to achieve even lower filesizes.
Should I go with HEIF, JPEG XL or does anyone have any other suggestions? 👀
|
|
2022-05-20 08:39:20
|
<@740013717114192023> but better tell how many times from the compressed PNG you would like to compress these images?
|
|
|
_wb_
|
2022-05-20 08:40:52
|
Current libjxl will not do this, but for such images, you could encode one half and then encode only the diff for the other half
|
|
|
3DJ
|
2022-05-20 08:41:19
|
how would you do that?
|
|
|
_wb_
|
2022-05-20 08:41:56
|
Encode one frame that is just one half, then a next frame that uses Patches to subtract one half from the other
|
|
|
DZgas Ж
|
|
DZgas Ж
<@740013717114192023> but better tell how many times from the compressed PNG you would like to compress these images?
|
|
2022-05-20 08:42:28
|
because if you want to compress about ~2 times the original, then it's best to use JPEG XR which handles a lot better with a little rounding of the coefficients, better than jpeg and jpeg XL.
And at the same time it has a very high speed, I would recommend XnConvert for multithreaded compression, jpeg XR "with all block filters" at quality 95 <@740013717114192023>
|
|
|
_wb_
Current libjxl will not do this, but for such images, you could encode one half and then encode only the diff for the other half
|
|
2022-05-20 08:43:57
|
oh yes... a stereo pair, for sure, can get confused and write an algorithm that will translate each pair of frames into an AV1 video, but this is very confusing
|
|
|
3DJ
|
|
_wb_
Encode one frame that is just one half, then a next frame that uses Patches to subtract one half from the other
|
|
2022-05-20 08:44:23
|
wait, is this channel for video? I'm just trying to compress side by side images, not sure how to encode frames separately
|
|
|
DZgas Ж
|
2022-05-20 08:45:35
|
compression cannot work in such a way that it affects part of the image on a completely different pixel gap away
|
|
|
3DJ
|
2022-05-20 08:45:47
|
I know there's a video codec (MVC, used in Blu-ray 3D movies) that encodes the second view taking into consideration the difference to the other or something like that
so basically I'm trying to do that, but for individual stereo pair images
|
|
|
DZgas Ж
|
2022-05-20 08:46:55
|
wait a second, I'll see how compress 3d videos on torrents
|
|
|
_wb_
|
|
3DJ
wait, is this channel for video? I'm just trying to compress side by side images, not sure how to encode frames separately
|
|
2022-05-20 08:47:39
|
Jxl can do zero-duration frames to make a composite still image
|
|
|
3DJ
|
2022-05-20 08:47:47
|
MVCs are common in BD3D rips with MakeMKV
|
|
|
_wb_
Jxl can do zero-duration frames to make a composite still image
|
|
2022-05-20 08:49:05
|
so I take it that's doable with cjxl.exe, right? what commands would I need to do this?
|
|
|
DZgas Ж
|
|
DZgas Ж
wait a second, I'll see how compress 3d videos on torrents
|
|
2022-05-20 08:49:27
|
Half OverUnder
|
|
2022-05-20 08:49:48
|
AVC
|
|
|
3DJ
|
2022-05-20 08:50:02
|
yeah that's definitely re-encoded
|
|
|
DZgas Ж
|
2022-05-20 08:51:15
|
just avc
|
|
|
_wb_
|
|
3DJ
so I take it that's doable with cjxl.exe, right? what commands would I need to do this?
|
|
2022-05-20 08:51:40
|
Nah there is currently no cjxl option to split up a stereographic image, it's just something that could in principle be done
|
|
|
DZgas Ж
|
2022-05-20 08:52:53
|
completely standard AVC no one takes into account the compression of the difference between the halves of a stereo pair
|
|
|
3DJ
|
|
DZgas Ж
just avc
|
|
2022-05-20 08:52:56
|
A proper BD3D rip should look something like this in MediaInfo (notice the `Stereo` flag in Format profile)
```Video
ID : 1
ID in the original source m : 4113 (0x1011)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Stereo High@L4.1 / High@L4.1
MultiView_Count : 2
MultiView_Layout : Both Eyes laced in one block (left eye first)
Format settings : CABAC / 3 Ref Frames
Format settings, CABAC : Yes
Format settings, Reference : 3 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 1 h 33 min
Bit rate mode : Variable
Bit rate : 30.8 Mb/s
Maximum bit rate : 30.0 Mb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.620
Stream size : 20.2 GiB (75%)
Language : English
Default : No
Forced : No
Original source medium : Blu-ray```
|
|
|
DZgas Ж
|
|
3DJ
A proper BD3D rip should look something like this in MediaInfo (notice the `Stereo` flag in Format profile)
```Video
ID : 1
ID in the original source m : 4113 (0x1011)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Stereo High@L4.1 / High@L4.1
MultiView_Count : 2
MultiView_Layout : Both Eyes laced in one block (left eye first)
Format settings : CABAC / 3 Ref Frames
Format settings, CABAC : Yes
Format settings, Reference : 3 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 1 h 33 min
Bit rate mode : Variable
Bit rate : 30.8 Mb/s
Maximum bit rate : 30.0 Mb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.620
Stream size : 20.2 GiB (75%)
Language : English
Default : No
Forced : No
Original source medium : Blu-ray```
|
|
2022-05-20 08:54:21
|
Stereo flag? I do not see
|
|
|
3DJ
|
2022-05-20 08:54:43
|
5th line in my paste
|
|
2022-05-20 08:54:56
|
> Format profile : **Stereo** High@L4.1 / High@L4.1
|
|
|
DZgas Ж
|
|
3DJ
|
2022-05-20 08:55:47
|
`left eye first` is another giveaway that the video is stereo 3D
|
|
|
DZgas Ж
|
|
3DJ
|
|
_wb_
Nah there is currently no cjxl option to split up a stereographic image, it's just something that could in principle be done
|
|
2022-05-20 08:56:11
|
so with what we currently have now. what would you recommend?
|
|
|
DZgas Ж
|
|
3DJ
> Format profile : **Stereo** High@L4.1 / High@L4.1
|
|
2022-05-20 08:56:47
|
funny that it is written with the slash
|
|
2022-05-20 08:57:40
|
well
|
|
|
_wb_
Jxl can do zero-duration frames to make a composite still image
|
|
2022-05-20 08:58:53
|
avif can do that too. of course, only then it will not differ much from the AV1 video
|
|
|
3DJ
|
2022-05-20 08:59:07
|
here are the results with some converters so I just wanted to keep looking for alternatives
|
|
|
DZgas Ж
|
|
3DJ
here are the results with some converters so I just wanted to keep looking for alternatives
|
|
2022-05-20 09:00:08
|
|
|
2022-05-20 09:00:53
|
<:AV1:805851461774475316>
|
|
|
3DJ
|
2022-05-20 09:01:44
|
GIMP HEIC seems to do a better job than JXL (faster and slightly lower filesize, perhaps because it might be automatically detecting it as a stereo pair and using differences)
but I'm not quite sure how lossless it is. I put it on top of the source PNG in GIMP with blending mode set to difference and it was all black, which usually means they're identical/lossless but I wanna make sure.
|
|
|
DZgas Ж
|
|
2022-05-20 09:03:07
|
neat, where is this from if you dont mind me asking?
|
|
|
DZgas Ж
|
|
3DJ
neat, where is this from if you dont mind me asking?
|
|
2022-05-20 09:04:44
|
compiled
|
|
|
3DJ
|
2022-05-20 09:05:34
|
ahh, neat. just tried it and it's pretty dang impressive, but I'm also afraid it might be lossy
|
|
2022-05-20 09:07:35
|
yeah the default's lossy so I'll check out the commands/help
|
|
|
Fraetor
|
2022-05-20 09:07:50
|
Its --lossless for avifenc
|
|
|
DZgas Ж
|
|
DZgas Ж
because if you want to compress about ~2 times the original, then it's best to use JPEG XR which handles a lot better with a little rounding of the coefficients, better than jpeg and jpeg XL.
And at the same time it has a very high speed, I would recommend XnConvert for multithreaded compression, jpeg XR "with all block filters" at quality 95 <@740013717114192023>
|
|
2022-05-20 09:08:22
|
<@740013717114192023>
|
|
|
3DJ
|
2022-05-20 09:10:05
|
Oh that's right. already downloaded it and gonna try it next 👌
|
|
|
DZgas Ж
because if you want to compress about ~2 times the original, then it's best to use JPEG XR which handles a lot better with a little rounding of the coefficients, better than jpeg and jpeg XL.
And at the same time it has a very high speed, I would recommend XnConvert for multithreaded compression, jpeg XR "with all block filters" at quality 95 <@740013717114192023>
|
|
2022-05-20 09:13:51
|
like this, right?
|
|
|
DZgas Ж
|
|
3DJ
like this, right?
|
|
2022-05-20 09:14:58
|
yes but q 95
|
|
|
3DJ
like this, right?
|
|
2022-05-20 09:15:40
|
and specify the folder where
|
|
|
3DJ
|
2022-05-20 09:16:24
|
dang, lossless quality comes at a high price
|
|
|
DZgas Ж
|
|
3DJ
like this, right?
|
|
2022-05-20 09:16:31
|
and remove the ask parameter, without it the multithread will not work
|
|
|
3DJ
dang, lossless quality comes at a high price
|
|
2022-05-20 09:17:03
|
i say use 95
|
|
2022-05-20 09:17:25
|
its maximum lossless
|
|
2022-05-20 09:17:36
|
for u
|
|
|
3DJ
|
2022-05-20 09:18:11
|
you mean like visually lossless?
|
|
|
Fraetor
|
|
3DJ
dang, lossless quality comes at a high price
|
|
2022-05-20 09:18:18
|
Yeah, there is a lot to be said for very near lossless.
|
|
|
DZgas Ж
|
2022-05-20 09:18:31
|
but by the way, there is another codec for you
|
|
|
Fraetor
|
2022-05-20 09:18:34
|
Like cjxl -d 0.3 kind of level.
|
|
|
DZgas Ж
|
2022-05-20 09:19:31
|
<@740013717114192023>given the plane of the content, you can try WEBP at 100 quality (lossy)
|
|
|
3DJ
|
2022-05-20 09:20:19
|
the reason I want lossless is cuz even slight differences are a lot more noticeable when viewing 3D images
just like crossing your eyes makes find the difference games very obvious, cuz compression artifacts in one eye will probably not match other
|
|
|
DZgas Ж
|
2022-05-20 09:20:28
|
iWEBP at 100 quality (lossy) will slightly less than jpeg XR 95
|
|
|
3DJ
|
|
DZgas Ж
<@740013717114192023>given the plane of the content, you can try WEBP at 100 quality (lossy)
|
|
2022-05-20 09:20:44
|
what app should I use to convert? XnConvert?
|
|
|
DZgas Ж
|
|
3DJ
what app should I use to convert? XnConvert?
|
|
2022-05-20 09:21:00
|
yes
|
|
2022-05-20 09:21:35
|
<@740013717114192023>have you already made all the important settings? send another screenshot
|
|
2022-05-20 09:22:56
|
oh yes, webp may not be suitable because YUV420
|
|
|
3DJ
|
2022-05-20 09:34:27
|
Yeah, I'm just trying other lossless formats
|
|
2022-05-20 09:34:51
|
so I'm just looking for the smallest lossless method with reasonable encoding/decoding speed
|
|
|
DZgas Ж
|
|
3DJ
so I'm just looking for the smallest lossless method with reasonable encoding/decoding speed
|
|
2022-05-20 09:38:35
|
then I think jpeg xr 95 is the best option, more test for this option
|
|
|
3DJ
|
2022-05-20 09:43:19
|
i gotta go but I'll keep trying more formats. XnConvert seems like a perfect tool for what I need. guess I just need to find the right format and settings 👌
|
|
|
190n
|
2022-05-20 11:56:36
|
probably rimworld from the filename
|
|
|
Fox Wizard
|
2022-05-20 11:56:48
|
Still a cursed name tbh <:KekDog:884736660376535040>
|
|
|
lonjil
|
2022-05-20 11:58:36
|
Rimworld, yes
|
|
2022-05-20 11:59:13
|
Since it's composed entirely of sprites, i wonder how much smaller it could be with the proper application of patches
|
|
|
Fox Wizard
|
|
lonjil
Alright, I did optipng + thebombzen's script, and got the size down from 92'800'591 bytes to 77'606'529 🥳
|
|
2022-05-21 12:23:35
|
ECT got it down to 77,572,980 bytes <:KekDog:884736660376535040>
|
|
2022-05-21 12:24:07
|
Don't know what parameters though, because running 4 instances with different parameters and it's still going, so might become smaller XD
|
|
2022-05-21 12:35:24
|
77,315,000 <:thinkies:854271204411572236>
|
|
2022-05-21 01:19:58
|
Hm, 77,175,971
|
|
2022-05-21 02:03:05
|
|
|
|
|
Deleted User
|
|
3DJ
i gotta go but I'll keep trying more formats. XnConvert seems like a perfect tool for what I need. guess I just need to find the right format and settings 👌
|
|
2022-05-21 01:08:40
|
Use lossless WebP if you want decent encoding speed and fast decoding, and don't mind being limited to 8 bpc. JXL at something like -s 3 might also be a nice alternative but the decode speed of lossless/modular content was a bit slow last time I checked.
Use near-lossless WebP (start with 60) if you want something that is practically indistinguishable from the original, even when zooming in.
Use lossy (VarDCT) JXL with low distance if you want mostly transparent results with low file sizes.
|
|
|
3DJ
|
2022-05-21 03:46:02
|
<@456226577798135808> <@226977230121598977> I kept trying more formats and here are my results.
q=quality, c=compression level
|
|
2022-05-21 03:46:36
|
the smallest lossless results is avif, but compression time is 4 mins 😬
|
|
2022-05-21 03:47:52
|
also the 3D image viewers I have don't support uncommon formats like avif, heic, jxl, etc, but webp is supported so it does seem like the best option
|
|
|
DZgas Ж
|
|
3DJ
<@456226577798135808> <@226977230121598977> I kept trying more formats and here are my results.
q=quality, c=compression level
|
|
2022-05-21 03:49:42
|
compression is absolutely lossless in this case is meaningless
|
|
2022-05-21 03:51:11
|
well, if there is only webp support then yes, use q100 lossy with algorithm 6
|
|
2022-05-21 03:51:45
|
but the yuv420
|
|
|
3DJ
|
|
DZgas Ж
compression is absolutely lossless in this case is meaningless
|
|
2022-05-21 03:54:36
|
not quite sure what you mean, but my priorities are small filesize>lossless quality>decoding time>encoding time
|
|
|
DZgas Ж
well, if there is only webp support then yes, use q100 lossy with algorithm 6
|
|
2022-05-21 03:55:17
|
these are my options atm btw
|
|
|
DZgas Ж
|
|
3DJ
not quite sure what you mean, but my priorities are small filesize>lossless quality>decoding time>encoding time
|
|
2022-05-21 03:59:30
|
<:PepeOK:805388754545934396>
|
|
|
|
Deleted User
|
|
3DJ
the smallest lossless results is avif, but compression time is 4 mins 😬
|
|
2022-05-21 04:29:43
|
it's probably not lossless RGB then, AVIF is rather bad at that and surely using YUV in your case. I would keep my distance to AVIF, HEIC and lossy WebP unless you are targeting very low bit rates.
|
|
|
3DJ
also the 3D image viewers I have don't support uncommon formats like avif, heic, jxl, etc, but webp is supported so it does seem like the best option
|
|
2022-05-21 04:30:31
|
then you should go with (near) lossless WebP but I recommend using cwebp directly: https://storage.googleapis.com/downloads.webmproject.org/releases/webp/index.html
|
|
|
3DJ
|
2022-05-21 04:30:45
|
then we've got a winner
webp lossless compression level 5 just takes 5 seconds, while level 6 takes 33 seconds yet the KBs are the same <:WhatThe:806133036059197491>
|
|
|
|
Deleted User
|
2022-05-21 04:31:56
|
it might just try more stuff and then finds out that it isn't any more useful for that particular image.
|
|
|
3DJ
|
2022-05-21 04:33:32
|
yeah, that's why I was hoping for a format that was aware that it's a stereo pair image to encode redundant data efficiently
|
|
|
|
Deleted User
|
2022-05-21 04:34:52
|
I'm confident that this won't be effectively possble when targeting true lossless results.
|
|
|
3DJ
|
2022-05-21 04:35:04
|
as for lossy formats, even webp at 100 quality has significant quality loss, especially at high contrast edges. yuck
|
|
|
|
Deleted User
|
2022-05-21 04:35:53
|
yes, it's way better to use something like `-near_lossless 60` with cwebp
|
|
|
3DJ
|
2022-05-21 04:38:48
|
neat, I'll give it a shot 👌
|
|
|
_wb_
|
2022-05-21 04:55:18
|
Webp q100 is still 4:2:0 and tv-range ycbcr, so that is roughly 7.5-bit G and 6.5-bit R and B with 75% of the R and B missing.
|
|
|
BlueSwordM
|
|
it's probably not lossless RGB then, AVIF is rather bad at that and surely using YUV in your case. I would keep my distance to AVIF, HEIC and lossy WebP unless you are targeting very low bit rates.
|
|
2022-05-21 05:38:40
|
Nope. Lossless AV1 is lossless.
|
|
2022-05-21 05:38:47
|
Just activate the lossless flag, and it's fine.
|
|
|
|
Deleted User
|
|
BlueSwordM
Nope. Lossless AV1 is lossless.
|
|
2022-05-21 05:58:55
|
But wasn't that only added "recently"? I would guess that XnConvert could be using an older version for AVIF. Otherwise I would be pretty impressed if there existed an image where it beats WebP as well as JXL for lossless.
|
|
|
BlueSwordM
|
|
But wasn't that only added "recently"? I would guess that XnConvert could be using an older version for AVIF. Otherwise I would be pretty impressed if there existed an image where it beats WebP as well as JXL for lossless.
|
|
2022-05-21 06:04:16
|
It's not recent(it's been about 1-1.5 years since it's lossless), but I wouldn't trust XnConvert for good conversion at all in this context.
|
|
|
_wb_
|
2022-05-21 06:04:33
|
Not impossible on a single image, but somewhat surprising, yes
|
|
|
BlueSwordM
|
2022-05-21 06:05:02
|
Ideally, you'd check with avifenc/avifdec if the image is lossless or not.
|
|
|
_wb_
|
2022-05-21 06:06:01
|
If it can use intra block copy effectively, while jxl is not trying such a thing atm, it could be that it is more effective for stereographic images...
|
|
|
|
Deleted User
|
|
BlueSwordM
Ideally, you'd check with avifenc/avifdec if the image is lossless or not.
|
|
2022-05-21 06:14:57
|
`avifenc -l test.png test.avif`uses YUV444
|
|
|
3DJ
|
|
3DJ
then we've got a winner
webp lossless compression level 5 just takes 5 seconds, while level 6 takes 33 seconds yet the KBs are the same <:WhatThe:806133036059197491>
|
|
2022-05-21 06:19:38
|
That 4,980kb avif was encoded with avifenc using the lossless flag too, and here's the mediainfo
```Image
ID : 1
Format : av01
Codec ID : av01
Width : 3 840 pixels
Height : 1 080 pixels
Color space : RGB
Bit depth : 8 bits
Stream size : 4.86 MiB (100%)
Color primaries : BT.709
Transfer characteristics : sRGB/sYCC
Matrix coefficients : Identity
Color range : Full
Codec configuration box : av1C```
|
|
|
|
Deleted User
|
2022-05-21 06:22:11
|
sYCC, so it's not lossless as expected
|
|
|
BlueSwordM
|
2022-05-21 06:22:45
|
There's something wrong.
|
|
2022-05-21 06:22:48
|
Something changed.
|
|
2022-05-21 06:22:56
|
I need to check with aomenc.
|
|
|
|
Deleted User
|
2022-05-21 06:24:03
|
Was it only possible to get lossless if you took a single AV1 frame and put that into an AVIF container?
|
|
|
BlueSwordM
|
|
Was it only possible to get lossless if you took a single AV1 frame and put that into an AVIF container?
|
|
2022-05-21 06:26:05
|
No, I could encode AV1 lossless in the past no problem, even RGB...
|
|
2022-05-21 06:27:29
|
Quite weird honestly.
|
|
|
_wb_
|
2022-05-21 06:27:30
|
Identity matrix could mean it is not YCC
|
|
2022-05-21 06:28:24
|
Can you decode and run `compare -metric pae orig.png decoded.png null:` ?
|
|
2022-05-21 06:29:42
|
I wouldn't be surprised if avif wins on images that have duplicated regions if it can use intra block copy
|
|
|
BlueSwordM
|
2022-05-21 06:29:46
|
It's obviously not lossless. Anything other than 0.00 in `butteraugli_main` means it's not lossless.
That's why it's strange: something changed.
|
|
2022-05-21 06:30:21
|
```butteraugli_main /home/bluezakm/Videos/2048x1320_david-marcu-441_png_original.png /home/bluezakm/Videos/2048x1320_david-marcu-441_png_original-avif.png
2.8017091751
3-norm: 1.348538```
|
|
|
|
Deleted User
|
|
_wb_
I wouldn't be surprised if avif wins on images that have duplicated regions if it can use intra block copy
|
|
2022-05-21 06:37:14
|
intra won't be effective for lossless. I saw that when testing lossless x264 vs individual fjxl frames.
|
|
|
BlueSwordM
|
2022-05-21 06:38:07
|
I posted a new reply to the issue:
https://github.com/AOMediaCodec/libavif/issues/919
|
|
|
_wb_
|
|
intra won't be effective for lossless. I saw that when testing lossless x264 vs individual fjxl frames.
|
|
2022-05-21 06:42:51
|
Yeah usually not, there might be exceptions though. In principle both av1 and jxl can exploit the redundancy between left and right half of stereographic images, but I know libjxl isn't doing that (yet).
|
|
|
3DJ
|
|
yes, it's way better to use something like `-near_lossless 60` with cwebp
|
|
2022-05-21 06:58:58
|
60 really does seem like the magic number
I see no pixel differences compared to the original, but as soon as I drop to 59, yikes
|
|
2022-05-21 07:00:47
|
61-100 also yield no visible pixel differences as expected, and so does avifenc- lossless
|
|
2022-05-21 07:25:44
|
Here's another case of counter-productive max compression level (-z command)
```
1-NEARLOSSLESS60z1.webp 3.111s 3381720 bytes (6.52 bpp)
1-NEARLOSSLESS60z2.webp 3.231s 3379364 bytes (6.52 bpp)
1-NEARLOSSLESS60z3.webp 4.337s 3143490 bytes (6.06 bpp)
1-NEARLOSSLESS60z4.webp 4.259s 3143490 bytes (6.06 bpp)
1-NEARLOSSLESS60z5.webp 4.460s 3108410 bytes (6.00 bpp)
1-NEARLOSSLESS60z6.webp 6.261s 3106254 bytes (5.99 bpp)
1-NEARLOSSLESS60z7.webp 7.334s 3107114 bytes (5.99 bpp)
1-NEARLOSSLESS60z8.webp 8.000s 3047462 bytes (5.88 bpp)
1-NEARLOSSLESS60z9.webp 41.358s 3047034 bytes (5.88 bpp)
```
level 9 takes over 40s while level 6 (i think it's the default, so no wonder) takes just ~6 seconds and the filesize is the smallest so I guess I'll just use -z 6/keep the default.
|
|
|
_wb_
|
2022-05-21 07:37:54
|
Well 8/9 are a bit smaller, here it looks 8 is a good idea
|
|
|
3DJ
|
2022-05-21 08:11:46
|
oh h*ck you're right. that was my first impression but then brainfart
|
|
2022-05-21 08:11:58
|
https://giphy.com/gifs/ohdY5OaQmUmVW
|
|
|
_wb_
|
2022-05-21 08:25:18
|
I also made the same brainfart, looking too much at last digits lol
|
|
|
3DJ
|
2022-05-22 02:00:59
|
numbers. they're hard, man
|
|
|
DZgas Ж
|
2022-05-22 12:51:20
|
https://encode.su/threads/3397-JPEG-XL-vs-AVIF?p=74423#post74423
|
|
2022-05-22 12:52:41
|
|
|
2022-05-22 12:53:14
|
|
|
|
|
Deleted User
|
|
3DJ
60 really does seem like the magic number
I see no pixel differences compared to the original, but as soon as I drop to 59, yikes
|
|
2022-05-22 12:56:28
|
your program might not show differences below a certain limit. IIRC from what <@532010383041363969> told, then 80 should allow +-1 Bit change, 60 +-2, 40 +-4. But no idea what happens in between for 59.
|
|
|
DZgas Ж
|
|
BlueSwordM
I posted a new reply to the issue:
https://github.com/AOMediaCodec/libavif/issues/919
|
|
2022-05-22 01:15:17
|
👍
|
|
|
fab
|
|
DZgas Ж
|
|
3DJ
|
|
your program might not show differences below a certain limit. IIRC from what <@532010383041363969> told, then 80 should allow +-1 Bit change, 60 +-2, 40 +-4. But no idea what happens in between for 59.
|
|
2022-05-22 02:05:27
|
with my setup, it should exaggerate even slightest pixel differences but yeah there's probably a more objective method to compare pixels more accurately, but my guess that this is at least literally indistinguishable even if it might not be mathematically lossless. I just wanna avoid any visible pixel differences cuz they're way more noticeable in 3D cuz eyes/brain are pretty sensitive to left-right differences (like for depth perception)
|
|
|
|
Deleted User
|
2022-05-22 03:33:51
|
What about Aliasing? Shouldn't this be a way bigger visual concern than slighly lossy compression?
|
|
|
DZgas Ж
|
2022-05-22 04:48:42
|
<@740013717114192023>ok just use classic jpeg with yuv444 and Q 100
|
|
|
_wb_
|
2022-05-22 04:55:18
|
Why would you ever do that?
|
|
2022-05-22 04:55:45
|
That's almost guaranteed to be larger than lossless while not actually being lossless
|
|
|
3DJ
|
2022-05-22 05:01:10
|
<@456226577798135808> not sure I follow. isn't aliasing just sharp, blocky edges in raw rendered frames? not sure how it's relevant in lossless compression. if the conversion somehow messes with the edges, the difference will be visible, otherwise it will be just a black frame AKA all pixels should at least in theory be identical
<@226977230121598977> do any of these set yuv444?
|
|
|
DZgas Ж
|
|
3DJ
<@456226577798135808> not sure I follow. isn't aliasing just sharp, blocky edges in raw rendered frames? not sure how it's relevant in lossless compression. if the conversion somehow messes with the edges, the difference will be visible, otherwise it will be just a black frame AKA all pixels should at least in theory be identical
<@226977230121598977> do any of these set yuv444?
|
|
2022-05-22 05:04:21
|
yes 1x1x1 is yuv444
|
|
2022-05-22 05:05:07
|
and optimaze huffman
|
|
|
_wb_
That's almost guaranteed to be larger than lossless while not actually being lossless
|
|
2022-05-22 05:05:58
|
Well, that's also an option.
|
|
2022-05-22 05:06:21
|
same as jpeg2000 at max quality
|
|
2022-05-22 05:06:47
|
thing is that it is fast
|
|
|
_wb_
|
2022-05-22 05:17:48
|
Fast png is faster, fully lossless, and probably denser
|
|
2022-05-22 05:18:00
|
Or fjxl
|
|
|
3DJ
|
|
_wb_
That's almost guaranteed to be larger than lossless while not actually being lossless
|
|
2022-05-22 05:19:23
|
I'm actually getting a much smaller filesize compared to the original 9MB PNG and it also seems lossless (no pixel differences)
and it really is pretty fast (sub-second encoding time) and smaller compared to this PNG re-compressed to be able to post on discord (took 3 seconds)
|
|
2022-05-22 05:19:58
|
what do people here use to compare truly lossless conversions to the original?
|
|
|
_wb_
|
2022-05-22 05:34:23
|
compare -metric pae
|
|
|
DZgas Ж
|
|
3DJ
with my setup, it should exaggerate even slightest pixel differences but yeah there's probably a more objective method to compare pixels more accurately, but my guess that this is at least literally indistinguishable even if it might not be mathematically lossless. I just wanna avoid any visible pixel differences cuz they're way more noticeable in 3D cuz eyes/brain are pretty sensitive to left-right differences (like for depth perception)
|
|
2022-05-22 05:41:23
|
jpeg2000 have Wavelet transform - interesting for your case
|
|
|
_wb_
|
2022-05-22 05:53:40
|
Not really I think. DWT is quite bad for non-photo, maybe even worse than DCT...
|
|
|
|
Deleted User
|
|
3DJ
<@456226577798135808> not sure I follow. isn't aliasing just sharp, blocky edges in raw rendered frames? not sure how it's relevant in lossless compression. if the conversion somehow messes with the edges, the difference will be visible, otherwise it will be just a black frame AKA all pixels should at least in theory be identical
<@226977230121598977> do any of these set yuv444?
|
|
2022-05-22 06:11:13
|
I mean the game's aliasing patterns will be slightly different between the left and right image. I can't imagine high quality lossy compression to be as noticeable with 3D as this aliasing "issue". Btw, your Nickelodeon game seems to have problems with the bloom implementation. It's too far left for the left eye and too far right for the right eye (very awkward on e.g. the brown ball above player 2).
|
|
|
3DJ
|
|
I mean the game's aliasing patterns will be slightly different between the left and right image. I can't imagine high quality lossy compression to be as noticeable with 3D as this aliasing "issue". Btw, your Nickelodeon game seems to have problems with the bloom implementation. It's too far left for the left eye and too far right for the right eye (very awkward on e.g. the brown ball above player 2).
|
|
2022-05-22 06:25:12
|
ahh I see what you mean. 3D objects don't (and shouldn't) be exactly the same for both eyes, unless they're flat/2D (e.g. HUD). The separation between left and right will inherently make objects look slightly different, but most of the time it has to be cohesive. (e.g. a flat-colored cube will look like the same shape for both eyes, but water will appear to have different shapes because of reflection/refraction.)
I've never noticed anti/aliasing making a noticeable difference in 3D, but I absolutely regret taking some of my early 3D screenshots in JPG format cuz the compression artifacts are exaggerated in 3D, like seeing through dirty glasses.
|
|
2022-05-22 06:29:07
|
As for that particular screenshot, this game isn't a great example of proper 3D. It's just a recent one I found to have multiple qualities I thought would be important for re-encoding (high contrast edges, text, many colors, grass, gradients, etc)
|
|
2022-05-22 06:35:41
|
but you're right, it's fairly rare but there's definitely something weird going on with the brown yarn ball strings AA/haze/bloom. Some games have broken effects in 3D so I'll see if someone in the 3DV community can look into it 👌
|
|
|
_wb_
compare -metric pae
|
|
2022-05-22 06:37:12
|
<@794205442175402004> which tool is that?
|
|
|
_wb_
|
2022-05-22 07:00:24
|
Imagemagick
|
|
2022-05-22 07:01:25
|
`compare -metric pae orig.png compressed.png diffmap.png`
|
|
2022-05-22 07:01:57
|
Or `null:` as the last argument if you don't need to have a diffmap
|
|
|
3DJ
|
2022-05-22 07:08:30
|
yikes, now it looks like a Jackson Pollock lmao
|
|
|
_wb_
|
2022-05-22 07:32:43
|
Can adjust tollerance for diffmap with -fuzz
|
|
2022-05-22 07:32:58
|
-fuzz 3 or whatever
|
|
2022-05-22 07:33:25
|
But just the number you get is what tells you how much the peak error is
|
|
2022-05-22 07:33:34
|
Should be 0 when really lossless
|
|
2022-05-22 07:34:20
|
Default imagemagick is 16-bit internally, so an off-by-one in 8-bit will be something like a pae of 256
|
|
|
3DJ
|
2022-05-22 07:42:35
|
gotcha. with the jpg I get `1028 (0.0156863)`, but with the PNG re-compressed file I get `0 (0)`
|
|
|
_wb_
|
2022-05-22 07:47:46
|
So that's up to off-by-4 in 8-bit values
|
|
2022-05-22 07:48:18
|
Which makes sense, just YCbCr will already do something like off-by-3
|
|
2022-05-22 07:48:53
|
You can do `-verbose` (before the `-metric`) to see it per channel
|
|
2022-05-22 07:49:14
|
Probably will be mostly R and B that have errors
|
|
2022-05-22 07:49:42
|
Can also use `mae` instead of `pae` to see mean error instead of peak
|
|
2022-05-22 07:50:04
|
Or rmse/psnr
|
|
|
3DJ
|
2022-05-24 02:46:26
|
oof, guess webp near_lossless 60 was lossy too (should've expected it from the flag name lol)
|
|
2022-05-24 02:48:46
|
`cwebp -lossless -z 8` is truly lossless (0) so guess I might just go with it
|
|
|
|
Deleted User
|
2022-05-24 12:32:47
|
but gaining 20-30% density by changing pixels less than 1/256th is still pretty impressive. I don't think any modern (lossy) format can compete with that.
|
|
|
3DJ
|
2022-05-24 12:58:00
|
here's the general impression I've gotten from the formats I've tried
|
|
2022-05-24 01:04:15
|
Oh wait, JXR is actually lossless. I'll be updating the chart here <https://airtable.com/shryqQXwTwpNAakt1>
|
|
2022-05-24 01:15:48
|
I'm still annoyed HEIF/HEIC is supposed to be lossless according to the XnConvert quality slider, but even all the examples here are lossy according to compare <https://avi.alkalay.net/2018/08/heic-lossless-images.html>
|
|
|
Fraetor
|
2022-05-24 02:22:39
|
I think compatibility is a very large point in webp's favour. (Almost to the point of going for PNG instead, but that depends on your exact usecase.)
|
|
|
3DJ
|
2022-05-24 02:59:00
|
I just wanna shrink my 3D screenshot collection (mostly PNS/PNG and some JPS/JPG) in size, while keeping the same quality in case I need to re-convert to a more efficient format in the future without generation loss
|
|
2022-05-24 03:00:27
|
that's why I wanna make sure before I commit to letting my CPU burn overnight <:kekw:808717074305122316>
|
|
|
Fraetor
|
2022-05-24 03:11:23
|
In that case webp lossless is probably the best option, as the tooling exists for you to be able to use it currently. JXL isn't quite there yet with the tooling, though I would be tempted to use it on the JPG files due to the bitexact recompression.
|
|
|
3DJ
|
2022-05-24 03:17:25
|
Ohh that's right. Doesn't make a lot of sense to convert lossy to lossless
guess I'll just convert PNGs to WebP lossless and JPGs to JXL
|
|
2022-05-24 03:26:36
|
<@176735987907559425> does cjxl do bitexact recompression by default when the source is JPG?
|
|
|
yurume
|
2022-05-24 03:40:48
|
for non-progressive typical JPEG files, yes to my knowledge (you can override it by `-j`)
|
|
|
Fraetor
|
|
3DJ
<@176735987907559425> does cjxl do bitexact recompression by default when the source is JPG?
|
|
2022-05-24 03:47:09
|
Yep, it is the default so long as a distance or quality isn't specified (unless that is -d 0 or -q 100). It should say "JPEG, lossless transcode" in the output.
|
|
|
_wb_
|
|
yurume
for non-progressive typical JPEG files, yes to my knowledge (you can override it by `-j`)
|
|
2022-05-24 04:37:55
|
Also for progressive ones. The jxl will not mirror the jpeg scan script, but it will encode the same data and can reconstruct the file just fine.
|
|
|
but gaining 20-30% density by changing pixels less than 1/256th is still pretty impressive. I don't think any modern (lossy) format can compete with that.
|
|
2022-05-24 04:40:22
|
Look at it this way: a typical 8-bit photo can be losslessly compressed at 12 bpp. A lot of that goes to the noise in the lsb. If you allow the lsb of every channel to change, that's basically 3 bpp worth of incompressible bits won.
|
|
2022-05-24 04:44:01
|
Actually allowing an off-by-one in either direction means you can quantize RGB by a factor of 3 (rounding to the nearest multiple of 3, which is never more than 1 away), so you can get rid of a bit more than one bit of information
|
|
2022-05-24 04:45:28
|
It also means you reduce 16 million colors to 16/27 million colors...
|
|
|
3DJ
|
2022-05-24 04:52:20
|
https://media.giphy.com/media/KxhIhXaAmjOVy/giphy-downsized-large.gif
|
|
|
_wb_
|
2022-05-24 05:06:24
|
Doing the quantization not directly on the RGB values, but instead on predictor residuals, will have the same compression advantage but produces nicer results, at least when using an averaging type of predictor. That is what lossy flif does, and what you can also do to do lossy png24 (using the AvgN+W predictor in png). I don't know if that's what near-lossless webp does too? <@532010383041363969>
|
|
2022-05-24 05:08:34
|
In jxl we could also do predictor residual quantization. Probably not as effective as delta palette, but still could be worth doing since it has strong error bounds...
|
|
|
lithium
|
2022-05-24 05:25:21
|
I collect some webp near-lossless detail from Jyrki Alakuijala 🙂
|
|
|
BlueSwordM
|
2022-05-24 05:53:02
|
<@794205442175402004> Is it possible that there's a bug with ssimulacra_main and butteraugli_main regarding checking some lossless stuff?
https://github.com/AOMediaCodec/libavif/issues/919#issuecomment-1135163700
On his end, these images seem to be lossless:
https://slow.pics/c/AlqqgdC3
|
|
2022-05-24 05:56:45
|
Even PSNR agrees.
|
|
2022-05-24 05:58:31
|
`ffmpeg -i 2048x1320_david-marcu-441_png_original-s0-avif.avif -i /home/bluezakm/Pictures/unknown/2048x1320_david-marcu-441_png_original.png -lavfi psnr=stats_file=psnr_logfile.txt -f null -`
`[Parsed_psnr_0 @ 0x441d5c0] PSNR r:inf g:inf b:inf average:inf min:inf max:inf`
|
|
|
Traneptora
|
|
_wb_
Look at it this way: a typical 8-bit photo can be losslessly compressed at 12 bpp. A lot of that goes to the noise in the lsb. If you allow the lsb of every channel to change, that's basically 3 bpp worth of incompressible bits won.
|
|
2022-05-24 06:10:22
|
something I've wondered is what if you take an 8-bit RGB and compress it *lossily* in 16-bit with a high enough quality that you can bitexactly reproduce the original image. is this a thing that is feasible?
|
|
2022-05-24 06:11:20
|
that is, you take each value and multiply it by 257, and then lossily compress it, and then afterward you divide each value by 257 (rounding nearest)
|
|
2022-05-24 06:11:53
|
could this work, and would it be more effective than just lossless modular
|
|
2022-05-24 06:12:27
|
assuming standard input PNG conditions, i.e. sRGB, 8-bit RGB (no alpha)
|
|
2022-05-24 06:12:54
|
if you set the distance low enough I wonder if you could achieve this
|
|
|
_wb_
|
|
BlueSwordM
<@794205442175402004> Is it possible that there's a bug with ssimulacra_main and butteraugli_main regarding checking some lossless stuff?
https://github.com/AOMediaCodec/libavif/issues/919#issuecomment-1135163700
On his end, these images seem to be lossless:
https://slow.pics/c/AlqqgdC3
|
|
2022-05-24 06:35:52
|
Does the png file have a color profile? Most tools will just compare rgb values without taking color profiles into account. Ssimulacra_main and butteraugli do take color profile into account, so if the rgb values are identical but the primaries are different, they will show some nonzero value
|
|
|
BlueSwordM
|
|
_wb_
Does the png file have a color profile? Most tools will just compare rgb values without taking color profiles into account. Ssimulacra_main and butteraugli do take color profile into account, so if the rgb values are identical but the primaries are different, they will show some nonzero value
|
|
2022-05-24 06:38:16
|
That might just be it 😅
|
|
|
_wb_
|
|
Traneptora
something I've wondered is what if you take an 8-bit RGB and compress it *lossily* in 16-bit with a high enough quality that you can bitexactly reproduce the original image. is this a thing that is feasible?
|
|
2022-05-24 06:38:19
|
Could be feasible but I doubt it would be more effective. Also if the goal is to end up doing 8-bit rgb losslessly, it's better to not do XYB since that will not uniformly spread the error (you'll get more errors in the blues, etc)
|
|
|
Traneptora
|
2022-05-24 06:39:27
|
what's the option to use original profile with `cjxl`
|
|
|
3DJ
|
2022-05-24 06:40:01
|
Wait, what the...
I'm also getting similar results on my end.
I converted PNGs to lossless WebP and also see a difference in contrast even tho compare reports all 0s
|
|
2022-05-24 06:40:23
|
|
|
2022-05-24 06:40:32
|
forgot to rename it, PNS=PNG
|
|
|
Traneptora
|
|
3DJ
Wait, what the...
I'm also getting similar results on my end.
I converted PNGs to lossless WebP and also see a difference in contrast even tho compare reports all 0s
|
|
2022-05-24 06:40:44
|
looks like a viewer presentation issue, if the pixel data is the same
|
|
2022-05-24 06:40:50
|
like one of them is respecting ICC and one isn't, for example
|
|
|
3DJ
|
|
Traneptora
looks like a viewer presentation issue, if the pixel data is the same
|
|
2022-05-24 06:42:13
|
|
|
2022-05-24 06:42:32
|
I'm using the same viewer app for both files*. or do you mean there's something missing in the converted file?
|
|
|
Traneptora
|
|
3DJ
I'm using the same viewer app for both files*. or do you mean there's something missing in the converted file?
|
|
2022-05-24 06:43:58
|
I mean the viewer might be respecting metadata for PNG and not for WebP, for vice versa
|
|
2022-05-24 06:44:17
|
either way if the pixel data is the same and the same viewer doesn't look the same for the different files, then it has to be a metadata issue
|
|
2022-05-24 06:44:20
|
since there's nothing else it could be
|
|
|
3DJ
|
2022-05-24 06:46:44
|
makes sense. that explains why they look identical in Firefox/Discord
|
|
|
BlueSwordM
<@794205442175402004> Is it possible that there's a bug with ssimulacra_main and butteraugli_main regarding checking some lossless stuff?
https://github.com/AOMediaCodec/libavif/issues/919#issuecomment-1135163700
On his end, these images seem to be lossless:
https://slow.pics/c/AlqqgdC3
|
|
2022-05-24 06:47:50
|
guess it was a different issue, cuz I can still see the difference in those on the browser
|
|
2022-05-24 06:48:31
|
h*ck sorry I left the mention on
|
|
2022-05-24 06:48:46
|
anyway guess I'll open an issue for the app then
|
|
|
_wb_
|
|
Traneptora
what's the option to use original profile with `cjxl`
|
|
2022-05-24 06:52:41
|
Cjxl does that by default if the input is png or jpeg and you're doing lossless. If you do lossy, it will investigate the input profile, and if it's 'close enough' to an enum space, it will signal an enum space instead of encoding an icc profile.
|
|
|
Traneptora
|
2022-05-24 06:53:11
|
no, I meant, how do I tell it to disable XYB encode for lossy input
|
|
2022-05-24 06:53:15
|
like is there an option
|
|
|
_wb_
|
|
3DJ
Wait, what the...
I'm also getting similar results on my end.
I converted PNGs to lossless WebP and also see a difference in contrast even tho compare reports all 0s
|
|
2022-05-24 06:54:21
|
Yeah `compare` ignores color profile, if you use cwebp it will silently strip the color profile, which is pretty bad behavior but it is what it is (also dwebp will silently strip the color profile in the decoded output)
|
|
|
Traneptora
no, I meant, how do I tell it to disable XYB encode for lossy input
|
|
2022-05-24 06:55:19
|
Ah, -c 1 should do that, but no idea if that actually works in vardct mode
|
|
|
Traneptora
|
|
_wb_
Ah, -c 1 should do that, but no idea if that actually works in vardct mode
|
|
2022-05-24 06:56:51
|
do you mean `-C 1` for YCoCg?
|
|
|
_wb_
|
2022-05-24 06:57:08
|
No
|
|
2022-05-24 06:57:16
|
Lowercase -c
|
|
|
Traneptora
|
2022-05-24 06:57:35
|
cause it's undocumented
|
|
|
_wb_
|
2022-05-24 06:57:36
|
VarDCT cannot use RCTs since those are modular transforms
|
|
|
Traneptora
|
2022-05-24 06:57:49
|
I did `--help --verbose` and it still wasn't there
|
|
|
|
veluca
|
2022-05-24 06:58:03
|
one more --verbose
|
|
|
Traneptora
|
2022-05-24 06:58:13
|
oh didn't realize I could do `--help -v -v`
|
|
2022-05-24 06:58:15
|
ah, there it is
|
|
|
_wb_
|
2022-05-24 06:58:20
|
Lowercase -c 0 means XYB, -c 1 is RGB, -c 2 means the input you are passing it should be interpreted as YCbCr instead of RGB
|
|
|
Traneptora
|
2022-05-24 06:58:47
|
so `-c 2` means I'm passing it YUV 4:4:4 input using the BT470BG matrix
|
|
|
_wb_
|
|
Traneptora
|
2022-05-24 06:59:00
|
(the standard Jpeg matrix)
|
|
|
_wb_
|
2022-05-24 06:59:02
|
Yeah
|
|
2022-05-24 06:59:11
|
The jpeg matrix, full range
|
|
|
Traneptora
|
2022-05-24 06:59:21
|
thanks
|
|
|
_wb_
|
2022-05-24 06:59:58
|
You can use that to do lossless yuv444 with modular
|
|
|
Traneptora
|
2022-05-24 07:00:03
|
is there any particular reason to use that matrix and not RGB for input that isn't supposed to be legacy jpeg compatible
|
|
2022-05-24 07:00:55
|
cause the problem is if you have yuv444 with a different matrix, like the BT709 matrix, then the colors will be wrong
|
|
|
_wb_
|
2022-05-24 07:01:53
|
Yeah I guess we should have made the ycbcr matrix a header field that just has jpeg as a default value or something
|
|
|
Traneptora
|
2022-05-24 07:02:00
|
also how does JXL losslessly recompress 4:2:0 jpegs? do you compress than as 4:4:4 and scale the Cb and Cr planes up by a factor of 2?
|
|
|
_wb_
|
2022-05-24 07:02:53
|
In the YCbCr case, we allow each channel to be subsampled 2x in either direction, there are basically 6 header bits for that
|
|
|
Traneptora
|
|
_wb_
Yeah I guess we should have made the ycbcr matrix a header field that just has jpeg as a default value or something
|
|
2022-05-24 07:02:54
|
could use the extensions field to signify a different matrix probably
|
|
2022-05-24 07:03:31
|
that would allow it to be compatible
|
|
2022-05-24 07:03:50
|
but I figure that is probably a low priority at this point
|
|
2022-05-24 07:04:33
|
PNG has a really intelligent clause in the spec that says decoders are required to ignore unknown chunks and not signify an error
|
|
2022-05-24 07:04:41
|
which guarantees forward compatibility
|
|
2022-05-24 07:05:01
|
could make JXL work similarly where if an extension field is set to something nonzero and a decoder doesn't know what it means, just ignore it
|
|
|
_wb_
|
2022-05-24 07:05:35
|
Yes, I guess an extension would be sensible. Old decoders would fall back to using the wrong matrix and give wrong colors, but that's probably not the end of the world since this use case would probably allow requiring everyone involved to update their decoder
|
|
2022-05-24 07:05:59
|
Yes, extensions are defined like that. Decoders will ignore them.
|
|
2022-05-24 07:06:14
|
Well, header extensions at least.
|
|
|
Traneptora
|
2022-05-24 07:06:16
|
also, since garbage at the end of a codestream is considered legal, you could always add extra chunks after the codestream and older decoders will just ignore it
|
|
2022-05-24 07:06:26
|
or something of that form
|
|
2022-05-24 07:06:39
|
if it belongs in the codestream and not in the container that is
|
|
|
_wb_
|
2022-05-24 07:06:51
|
We have a mechanism where extensions signal their length so old decoders know how many bits to skip
|
|
|
Traneptora
|
2022-05-24 07:07:14
|
... hm? I didn't encounter this when reading the header draft
|
|
|
_wb_
|
2022-05-24 07:07:18
|
So we can add extensions and have the extra info right in the header
|
|
|
Traneptora
|
2022-05-24 07:07:53
|
the extensions field itself is a U64() to determine which extensions are present iirc
|
|
2022-05-24 07:08:10
|
and for each bit set, in order, you have another U64(), which is the payload, right?
|
|
2022-05-24 07:08:37
|
unless it's changed since that draft
|
|
2022-05-24 07:08:48
|
I didn't see anything that could be a payload except the U64()
|
|
|
_wb_
|
2022-05-24 07:09:34
|
Well the other U64() per extension is not the payload, it is the _size_ of that payload
|
|
|
Traneptora
|
2022-05-24 07:09:54
|
oh, that's... not clear.
|
|
2022-05-24 07:10:13
|
so that U64() is a size field in bits, followed by the actual payload?
|
|
|
_wb_
|
2022-05-24 07:10:15
|
So a decoder needs to read them and skip each one it doesn't know
|
|
2022-05-24 07:10:33
|
I think it's first all the sizes, then all the payloads, iirc
|
|
|
Traneptora
|
2022-05-24 07:10:49
|
it would have to read it anyway since U64() is variable length, but I didn't realize it had to skip that many bits
|
|
|
_wb_
|
2022-05-24 07:12:00
|
At the moment it will be zero bits to skip since nothing is writing extensions, but yes, when something does write extensions, you have to skip the sum of those sizes
|
|
|
Traneptora
|
2022-05-24 07:12:24
|
... that is not stated in the spec draft
|
|
|
_wb_
|
2022-05-24 07:19:51
|
|
|
2022-05-24 07:21:21
|
That last sentence is maybe not explicit enough
|
|
|
Traneptora
|
2022-05-24 07:24:42
|
Yea, that implies to me that the extension_bits is the payload, not the size of the payload
|
|
|
_wb_
|
2022-05-24 07:31:11
|
The "starting after extensions_bits has been read" should help, but probably we should just add a row there of type u(extension_bits[i]) and with name extension_i_payload, or something
|
|
|
Traneptora
|
2022-05-24 07:33:30
|
yea, that would make it very explicit
|
|
|
3DJ
|
|
3DJ
|
|
2022-05-24 09:58:52
|
Problemo solvedo https://github.com/gkv311/sview/issues/107#issuecomment-1136467761
|
|
2022-05-24 09:59:51
|
Thank h*ck for actively maintained FOSS 🙏
|
|
2022-05-25 01:02:46
|
I used `-mt` for multi-threading, but shouldn't it use more CPU? seems to peak at ~13% <:DogWhat:806133035786829875>
|
|
|
DZgas Ж
|
2022-05-25 06:34:07
|
webp<:Thonk:805904896879493180> multi-thread<:WhatThe:806133036059197491> how
|
|
|
_wb_
|
2022-05-25 06:38:48
|
probably only parts of it are actually multi-threaded, e.g. things like color transforms are easy to parallelize
|
|
|
Reddit • YAGPDB
|
|
Fox Wizard
|
2022-05-25 07:52:41
|
Even with the best 90s computers it would take so long it's unrealistic and nobody could play it back™️
|
|
|
_wb_
|
2022-05-25 09:22:36
|
I remember the time when mp3 was just invented and people with old computers had trouble playing them
|
|
|
yurume
|
2022-05-25 09:24:23
|
I recall a similar experience with jpeg(1)
|
|
|
Fox Wizard
|
2022-05-25 10:09:25
|
Lol. I wasn't even born yet when mp3 became a thing XD
|
|
2022-05-25 10:14:27
|
Lol, even AAC is older than me <:KekDog:884736660376535040>
|
|
|
Traneptora
|
2022-05-25 02:18:22
|
mp3 is a 30 year old codec iirc
|
|
2022-05-25 02:18:41
|
mp3 is like the audio equivalent of legacy jpeg
|
|
2022-05-25 02:18:49
|
universal support but very primitive
|
|
2022-05-25 02:19:01
|
JXL to legacy jpeg to me is like Opus to mp3
|
|
|
3DJ
|
|
DZgas Ж
webp<:Thonk:805904896879493180> multi-thread<:WhatThe:806133036059197491> how
|
|
2022-05-25 02:53:42
|
|
|
2022-05-25 02:55:30
|
CPU also seems to be going up and down and the process seems to be restarted. so if it allowed multiple parallel processes, it would be a lot faster, at least in theory
|
|
|
DZgas Ж
|
|
|
|
2022-05-25 03:16:39
|
<:HaDog:805390049033191445>
|
|
|
|
|
2022-05-25 03:17:48
|
128x64 why not
|
|
|
_wb_
probably only parts of it are actually multi-threaded, e.g. things like color transforms are easy to parallelize
|
|
2022-05-25 03:19:36
|
I know that VP9 is parallelized only for 2 threads. and further only after frame splitting
|
|
|
Traneptora
JXL to legacy jpeg to me is like Opus to mp3
|
|
2022-05-25 03:21:02
|
this is an extreme explicit association
The saddest thing is that no one makes a better codec than opus. it's sad we've reached the end
|
|
|
3DJ
|
2022-05-25 03:25:19
|
I mean, opus is lossy and last I checked it doesnt support 44.1khz so there's still room for improvement
|
|
|
Traneptora
|
|
3DJ
I mean, opus is lossy and last I checked it doesnt support 44.1khz so there's still room for improvement
|
|
2022-05-25 03:34:50
|
not supporting 44.1 kHz was an intentional decision
|
|
2022-05-25 03:34:57
|
because it's lossy
|
|
2022-05-25 03:35:19
|
essentially all hardware samples at 48 kHz except some hardware that specifically plays back CDs
|
|
2022-05-25 03:35:37
|
so you're going to have to resample 44.1 kHz to 48 kHz *anyway* on playback
|
|
2022-05-25 03:35:44
|
this forwards the resampling to the encoder side which makes more sense
|
|
|
DZgas Ж
|
|
3DJ
I mean, opus is lossy and last I checked it doesnt support 44.1khz so there's still room for improvement
|
|
2022-05-25 03:44:22
|
you don't need 44.1 for lossy
|
|
2022-05-25 03:45:45
|
and also, there is SOX - the last word in the world of respemlers
|
|
|
BlueSwordM
|
2022-05-25 03:51:49
|
Basically, it's not an issue 😄
|
|
|
Traneptora
|
2022-05-25 03:54:07
|
don't forget the Nyquist-Shannon Sampling Theorem
|
|
|
3DJ
|
2022-05-25 03:54:28
|
yeah, I get that, but it still seems kinda arbitrary that they chose to leave out 44.1khz while 8khz is still supported
like, it wouldn't make a lot of sense to convert 8khz to 48khz, increasing filesize for no good reason. is it because of multiples?
|
|
|
Traneptora
|
2022-05-25 03:54:50
|
because 44.1 kHz and 48 kHz are both fullband
|
|
2022-05-25 03:55:15
|
fullband being able to represent frequencies in the 0-20 kHz range
|
|
2022-05-25 03:55:21
|
anything higher than 20 kHz is irrelevant
|
|
2022-05-25 03:55:34
|
so 44.1 kHz and 48 kHz are both fullband
|
|
2022-05-25 03:55:57
|
as far as I'm aware opus has a hard lowpass at 20 kHz anyway
|
|
2022-05-25 03:56:32
|
8 kHz on the other hand is not fullband, it's narrowband, and it's used for a different purpose
|
|
|
3DJ
|
2022-05-25 03:59:00
|
ahh, I see. makes sense
|
|
2022-05-25 04:00:24
|
still, as much as I like opus, I wouldn't say it's the "best" codec out there. like if the point is to archive audio bit-perfectly/non-destructively, it's probably better to go with a lossless format
|
|
|
Traneptora
|
2022-05-25 04:02:14
|
it's the best lossy audio codec out there
|
|
2022-05-25 04:02:30
|
but you are correct that flac is better suited for archival
|
|