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

Strange color issue happen on -q 5~6(--quality) #24

Open
Lee-lithium opened this issue Mar 4, 2022 · 6 comments
Open

Strange color issue happen on -q 5~6(--quality) #24

Lee-lithium opened this issue Mar 4, 2022 · 6 comments

Comments

@Lee-lithium
Copy link

Hello Ilya Kurdyukov, Sorry to bother you.

I get some strange color issue on non-photo drawing content,
those issue will happen on -q 5~6(--quality).

In this non-photo picture case, green book middle area have some tiny red pixel,
-q 3~4 haven't happen this issue.

original-cut-png (jpeg q90 420)
original

qs-q6-png
q6

JPEG Quant Smooth : Copyright (C) 2020 Ilya Kurdyukov : 2020-05-17
Build date: Jan 11 2021
https://github.com/ilyakurdyukov/jpeg-quantsmooth/releases/tag/1.20210110

jpegqs64 -q 6 -o -t 12 test.jpg test-qs.jpg
sample.zip

@ilyakurdyukov
Copy link
Owner

ilyakurdyukov commented Mar 4, 2022

I'm not really in the mood to solve this now because of the current world situation that happened because of my country.

This is when the UV upscaler makes the wrong decisions. Need a way to limit this. As I see it, mostly the upscaler works correctly, but in some places it creates artifacts.

Try replacing the text "16.0f" (use "search and replace") in quantsmooth.h with a smaller value (8.0f, 4.0f, 2.0f). Maybe I chose too high value for the limit.

@Lee-lithium
Copy link
Author

I understand, Thank you for your reply.
I'm sorry about this world situation, hope everything’s gonna be okay.

@ilyakurdyukov
Copy link
Owner

If you find a better value for this constant - feel free to tell me.

@ilyakurdyukov
Copy link
Owner

This limit doesn't solve the problem, need a different solution.

@zvezdochiot
Copy link

zvezdochiot commented Mar 10, 2022

Hi @ilyakurdyukov .

Maybe track the value of the coefficients on a given image via gdb?

Or use #if DEBUG for dump?

@ilyakurdyukov
Copy link
Owner

It seems to be the sum of small errors from different methods. In the original, the chroma has a red dot here, which gets brighter after reducing the artifacts, and then colors part of the line after the chroma upscale and gets even brighter. Unfortunate artifact from recovering the lost precision.

I saw this once in my test data as a miscolored dot.

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

No branches or pull requests

3 participants