-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Anime4K_Clamp_Highlights.glsl causes darker colors when upscaling with gpu-next #14943
Comments
The wallpaper blending (e.g. with |
This is probably effect of bt.1886 implementation in libplacebo const float lb = powf(csp_min, 1/2.4f);
const float lw = powf(csp_max, 1/2.4f);
const float a = powf(lw - lb, 2.4f);
const float b = lb / (lw - lb);
GLSL("color.rgb = "$" * pow(color.rgb + vec3("$"), vec3(2.4)); \n",
SH_FLOAT(a), SH_FLOAT(b));
and
|
Here's how the image looks like with |
No, it was not.
Yeah, but vo_gpu does the same. So not sure what's your point exactly? Anyway, I was fixing something else, and made a fix for libplacebo https://code.videolan.org/videolan/libplacebo/-/merge_requests/676 might affect behavior here too, if you want to test, for me it doesn't affects this case.
Well, the difference in brightness is introduced by bt.1886 scaling in linearization, I don't believe it is sigmoid itself that makes different to vo_gpu. |
There is no difference with it. |
I dunno I thought the image looked cool. B) <--(clueless)
I think you're right. gpu and gpu-next look identical if I use |
is the result accurate with just pow(source, 2.4) processing and pow(source, 1/2.4)? isn't const float gamma_light = float(1.0/2.4) faster? |
mpv Information
Important Information
Reproduction Steps
Download https://raw.githubusercontent.com/bloc97/Anime4K/7684e9586f8dcc738af08a1cdceb024cc184f426/glsl/Restore/Anime4K_Clamp_Highlights.glsl
mpv --no-config --vo=gpu-next --glsl-shaders=Anime4K_Clamp_Highlights.glsl
with any image or videoUpscale the image or video
Expected Behavior
Colors stay the same
Actual Behavior
Colors become darker. In some images they even blend with the desktop wallpaper if the platform supports background transparency. This issue doesn't occur on
vo_gpu
or if upscaling with a shader.Possibly related to #9524
Log File
mpv.log
Sample Files
Original screenshot:
Upscaled with no shader:
Upscaled with Anime4K_Clamp_Highlights.glsl:
I carefully read all instruction and confirm that I did the following:
--log-file=output.txt
.The text was updated successfully, but these errors were encountered: