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

Subsampling Fails #91

Closed
jimbo2150 opened this issue Jun 3, 2021 · 16 comments · Fixed by #306
Closed

Subsampling Fails #91

jimbo2150 opened this issue Jun 3, 2021 · 16 comments · Fixed by #306
Assignees
Labels
cjxl Related to cjxl encoder tool

Comments

@jimbo2150
Copy link
Contributor

Describe the bug
Attempting to subsample colors causes encoding to fail.

To Reproduce
Add --resampling=2 (or any other valid value other than 1).
An error occurs: Failed to compress to VarDCT.

Expected behavior
Produce an image.

Environment

  • OS: Windows 10
  • Compiler version: various
  • CPU type: x86_64
  • cjxl/djxl version string: [v0.3.7 | SIMD supported: AVX, Scalar]
@veluca93
Copy link
Member

veluca93 commented Jun 3, 2021

Interesting, what is the image that reproduces this?

@jonsneyers jonsneyers added the cjxl Related to cjxl encoder tool label Jun 3, 2021
@jonsneyers
Copy link
Member

I cannot reproduce. On PNG input, it works as expected. On JPEG input, doing lossless JPEG recompression, it does do something that it probably shouldn't do (it encodes something that is the top-left quadrant, upsampled 2x, that decodes to pixels but not back to the original jpeg). I couldn't find a way to make it not produce a jxl file though.

@jimbo2150
Copy link
Contributor Author

Interesting, what is the image that reproduces this?

Every image I tried causes it to fail.

@jonsneyers
Copy link
Member

Default cjxl options?

Are you using the current latest version from git?

(we should bump up the version number because 0.3.7 can mean anything at this point)

@jimbo2150
Copy link
Contributor Author

I've tried with default and adding other options, nothing worked if resampling is set to anything other than 1.

It is 0.3.7, don't know the hash it was build on. Just using a build from the Discord links. Most don't work but the two I found that do both do the same thing. One appears to have SIMD while the other doesn't. They were both built around mid to end of May.
I can build one this weekend and see what happens.

@jimbo2150
Copy link
Contributor Author

I just tried Raysar's new build and it works. Possibly the other builds floating around were missing something.

@jimbo2150
Copy link
Contributor Author

Running into some issues again. Any photo I try to compress with quality below 52 fails.

@jimbo2150 jimbo2150 reopened this Jun 3, 2021
@deymo
Copy link
Contributor

deymo commented Jun 3, 2021

@jimbo2150 what platform do you need builds for?

@jimbo2150
Copy link
Contributor Author

@jimbo2150 what platform do you need builds for?

Windows 10, but don't really need it now. Someone just did a build - first one I've seen in a few weeks. I can build it myself, but would need to do it over a weekend. Thanks.

@jimbo2150
Copy link
Contributor Author

Running into some issues again. Any photo I try to compress with quality below 52 fails.

jxl-resampling-problem

@veluca93
Copy link
Member

veluca93 commented Jun 5, 2021

Ah, I know what is going on -- try passing --progressive_dc=0 too...

@jimbo2150
Copy link
Contributor Author

Ah, I know what is going on -- try passing --progressive_dc=0 too...

That worked, but odd that you have to disable progressive decoding.

@veluca93
Copy link
Member

veluca93 commented Jun 5, 2021

Ah, I know what is going on -- try passing --progressive_dc=0 too...

That worked, but odd that you have to disable progressive decoding.

Progressive DC doesn't work with downsampling - but we should not turn it on by default then :)

@jimbo2150
Copy link
Contributor Author

Also fails on any speed above 7.

jxl-resampling-speed-issue

@veluca93
Copy link
Member

veluca93 commented Jun 5, 2021

Ah, yes, I can see why that would be the case - we'll make sure to return an explicit error.

@ziemek99
Copy link
Contributor

ziemek99 commented Jul 2, 2021

Any updates on this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cjxl Related to cjxl encoder tool
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants