jpeg-quantsmooth icon indicating copy to clipboard operation
jpeg-quantsmooth copied to clipboard

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

Open Lee-lithium opened this issue 2 years ago • 6 comments

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

Lee-lithium avatar Mar 04 '22 14:03 Lee-lithium

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.

ilyakurdyukov avatar Mar 04 '22 16:03 ilyakurdyukov

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

Lee-lithium avatar Mar 06 '22 08:03 Lee-lithium

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

ilyakurdyukov avatar Mar 06 '22 09:03 ilyakurdyukov

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

ilyakurdyukov avatar Mar 10 '22 06:03 ilyakurdyukov

Hi @ilyakurdyukov .

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

Or use #if DEBUG for dump?

zvezdochiot avatar Mar 10 '22 07:03 zvezdochiot

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.

ilyakurdyukov avatar May 21 '22 04:05 ilyakurdyukov