Questionable "-near_lossless" behavior #22
Replies: 2 comments 1 reply
-
Suggested fix: "--debug-near_lossless-contiguity" may be added to control the threshold. Contiguousness: If altering the "near_lossless" behavior is somehow convoluted: The technique could probably apply to all lossy processings (compression or denoise). The alike ringing artifact in JPEG, H.264 etc. when patched: should also receive the similar gain. |
Beta Was this translation helpful? Give feedback.
-
See also: The denoise techniques maybe related. |
Beta Was this translation helpful? Give feedback.
-
I doubt making monotonous things less monotonous may improve compressibility.
Compare below:
"highlight-4x.webp" | "highlight-4x.0.webp"
"diff_quot-6x.webp" | "diff_quot-6x.40.webp"
See also: https://github.com/MasterInQuestion/attach/commit/401c58fc3a56d265feadda567f02d79de93ff10c#diff_quot
This is also the source of most significant amount of visual difference.
Apparent example:
https://github.com/MasterInQuestion/attach/raw/main/MasterInQuestion/talk/36/Shadowing.webp
; where the background is plain
#002b36
.Patching the smeared area by "-near_lossless", and recompress with strict lossless:
Resulted smaller output, and apparent more fidel image.
Demo 2: https://github.com/MasterInQuestion/attach/raw/main/MasterInQuestion/talk/22/pray.webp
Note the border.
Demo 3: https://github.com/MasterInQuestion/attach/raw/main/curl/curl/14440/foobar.webp
"-near_lossless 40" would introduce ringing artifact in the colored regions:
That when patched would result in both improved compressibility and fidelity.
.
The very reason why "-near_lossless" would spoil in:
https://github.com/MasterInQuestion/attach/raw/main/community/community/139005/Long-long-swing.webp
Demo 4:
https://github.com/MasterInQuestion/attach/raw/main/MasterInQuestion/talk/22/border.webp
https://github.com/MasterInQuestion/attach/raw/main/MasterInQuestion/talk/22/blurriness.webp
.
More visible than previous examples.
Beta Was this translation helpful? Give feedback.
All reactions