Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

djpegli should decode xyb-jpeg to rgb-png #3513

Open
sommio opened this issue Apr 20, 2024 · 2 comments
Open

djpegli should decode xyb-jpeg to rgb-png #3513

sommio opened this issue Apr 20, 2024 · 2 comments
Labels
colorspace relates to hte use of color spaces, ICC profiles, etc enhancement New feature or request jpegli Related to jpegli, also cjpegli and djpegli unrelated to 1.0 Things that need not be done before the 1.0 version milestone

Comments

@sommio
Copy link

sommio commented Apr 20, 2024

Describe the bug
djpegli should decode xyb-jpeg to rgb-png to ensure that most programs can read it.

To Reproduce

❯ cjpegli --xyb in.png out.jpeg
Read 1920x1080 image, 2048379 bytes.
Encoding [XYB d1.000 AQ p2 OPT]
Compressed to 187502 bytes (0.723 bpp).
1920 x 1080,  52.273 MP/s [52.27, 52.27], , 1 reps, 1 threads.

❯ djpegli out.jpeg out.png
Read 187502 compressed bytes.
1920 x 1080,  56.085 MP/s [56.09, 56.09], , 1 reps, 1 threads.

❯ ffmpeg -i out.png -i in.png -filter_complex libvmaf -f null -
[Parsed_libvmaf_0 @ 0x5d4fcc17d600] VMAF score: 8.031800

Screenshots
截图 2024-04-20 07-18-21

Environment

  • OS: Arch Linux + CachyOS&ALHP Repository
  • Compiler version: GCC 13.2.1
  • CPU type: x86_64-v3
  • cjxl/djxl version string: v0.10.2 e148959 [AVX2,SSE4,SSE2]
@mo271 mo271 added enhancement New feature or request unrelated to 1.0 Things that need not be done before the 1.0 version milestone jpegli Related to jpegli, also cjpegli and djpegli colorspace relates to hte use of color spaces, ICC profiles, etc labels Apr 22, 2024
@RieGo
Copy link

RieGo commented Apr 24, 2024

I've also run into this problem.
I assume it wouldn't be a lossless decode, if you convert the colorspace.
Maybe an additional option for this would be a good way to deal with this?

@sommio
Copy link
Author

sommio commented Apr 25, 2024

It is lossy encoding, using xyb is just for encoding efficiency. So decoding to rgb should be the default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
colorspace relates to hte use of color spaces, ICC profiles, etc enhancement New feature or request jpegli Related to jpegli, also cjpegli and djpegli unrelated to 1.0 Things that need not be done before the 1.0 version milestone
Projects
None yet
Development

No branches or pull requests

3 participants