-
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
Artifacts with gpu-hq profile for some videos #6111
Comments
Can't reproduce on my end, but seems like some sort of underflow bug. What's worrying me is the fact that |
This generated shader looks fishy. From your log:
Compare with the source: // Pre-conversion, like linear light/sigmoidization
GLSLF("// scaler pre-conversion\n");
bool use_linear = p->opts.linear_scaling || p->opts.sigmoid_upscaling;
// Linear light downscaling results in nasty artifacts for HDR curves due
// to the potentially extreme brightness differences severely compounding
// any ringing. So just scale in gamma light instead.
if (mp_trc_is_hdr(p->image_params.color.gamma) && downscaling)
use_linear = false;
if (use_linear) {
p->use_linear = true;
pass_linearize(p->sc, p->image_params.color.gamma);
pass_opt_hook_point(p, "LINEAR", NULL);
} It seems as though On my end, the image_params are correctly detected and the linearization code is skipped. I'll try again soon-ish with ffmpeg and mpv git master. |
I can also reproduce it.Same config as OP just had to add Log File |
I can reproduce on AMD GPU too.
|
It has the problem with 1440p format on AMDGPU, but no problem with 2160p. 2160p: https://0x0.st/sv_M.txt |
Okay, I can reproduce the issue on my end. Seems like the choice of format is relevant. Format 337 (2160p60 vp9.2) does not exhibit the issue, format 315 (2160p60 vp9) does. From looking at the metadata of the clip it's immediately obvious what the issue is:
It's marked as an SDR clip, but it still contains HDR metadata, leading to a scenario where the components in mpv disagree about whether or not the clip is HDR or not. The main scaling code, which goes by the tagged TRC, says it's SDR (which it is) - but the tone mapping code, which goes by the tagged signal peak, performs tone mapping (which given the tagged metadata it would rightly need to do so). So this is an issue both with the source and mpv: the source should not mistag their crap, and mpv should sanitize mistagged crap to avoid blowing up on SDR clips with HDR metadata. (Although to be fair, an SDR TRC can be used with floating point formats to produce a HDR file without requiring a HDR TRC, but I think this is such an unlikely scenario that I'm willing to lose this support in order to avoid exploding on clips like this - and besides, our code isn't exactly equipped to handle that case anyway) |
By overriding it with 1.0 (aka SDR). This prevents blowing up on mistagged clips. Fixes mpv-player#6111
By overriding it with 1.0 (aka SDR). This prevents blowing up on mistagged clips. Fixes #6111
It just occurred to me that maybe we should clamp it to <=1.0 rather than forcing it to 1.0, to avoid excluding the theoretical possibility of having an SDR clip with a lower signal peak. But, eh. |
There is something else i've noticed(could be a bug).So the video sample from the first post if you try to play it without
So is it set to 0 or not? If it is the video theoretically should start playing without inserting an extra command line. |
By overriding it with 1.0 (aka SDR). This prevents blowing up on mistagged clips. Fixes mpv-player#6111 (cherry picked from commit 48c38f7)
By overriding it with 1.0 (aka SDR). This prevents blowing up on mistagged clips. Fixes mpv-player#6111 (cherry picked from commit 48c38f7)
By overriding it with 1.0 (aka SDR). This prevents blowing up on mistagged clips. Fixes mpv-player#6111 (cherry picked from commit 48c38f7)
This can be narrowed down to just the dscale=mitchell and sigmoid-upscaling=yes settings from the gpu-hq profile.
mpv version and platform
0.29.0 2018-07-31 build by lachs0r on Windows 10 64-bit
Reproduction steps
Have --dscale=mitchell --sigmoid-upscaling=yes. This does not occur for all videos, but occurs on some.
Expected behavior
Look something like this (screenshot without sigmoid-upscaling to remove the artifacts):
https://postimg.cc/image/tetd2g24h/
Actual behavior
White pixels around black points, as can be seen in this screenshot (Print Screen key was used, because it doesn't show up when pressing 's' to get a screenshot with mpv):
https://postimg.cc/image/qkq7ozkip/
Log file
https://pastebin.com/eCDwYzWB
Sample files
An accessible example would be something like this youtube video with youtube-dl (at 1440p for me, the 1080p version does not for me), which exhibits it on the first frame: https://www.youtube.com/watch?v=LXb3EKWsInQ
e.g.
The text was updated successfully, but these errors were encountered: