-
Notifications
You must be signed in to change notification settings - Fork 417
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
Gamma-correct chroma subsampling #193
Comments
Coincidentally the next version of WebP will solve that too, by using an iterative algorithm: https://chromium.googlesource.com/webm/libwebp/+/master/src/enc/picture_csp.c#487 |
That prototype is pretty impressive. It's far better than the current subsampling. Edit: I made a little comparison slider. The image on the right is the prototype: |
The webp source code link moved to https://github.com/webmproject/libwebp/blob/master/src/enc/picture_csp_enc.c. Search The luma-scaled code is at https://github.com/kornelski/jpeg-compressor/blob/9eeb009fdb8673224de5be978574cb139e4b8bf6/jpge.cpp#L611. sharp YUV is now a separate |
Huh, apparently there's yet another approach , the HDRTools way. Pic is from doi:10.5594/m001639. No idea how well it works in SDR, when "OETF" is just "gamma". Oh god a google for "chroma subsampling" gave me some arxiv magic (possible published version) involving gradient descent in H.266. oh it's friendlier when you say "iterative" and it lists some prior work too. code's gone |
This image (source) should show RULES on an sRGB-ish monitor and/or browser with a good color management.
and if it's resized with appropriate gamma should resize to:
However, libjpeg blends pixels in Cr/Cb color space, which has non-linear gamma, and chroma subsampling results in:
It could be better. I've prototyped a very slow and hacky chroma downsampling that generates:
so there's definitely a room for improvement.
The text was updated successfully, but these errors were encountered: