Skip to content
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

gpu-next: interpolation black flashes/flickering #13108

Open
Quantzic opened this issue Dec 15, 2023 · 14 comments
Open

gpu-next: interpolation black flashes/flickering #13108

Quantzic opened this issue Dec 15, 2023 · 14 comments

Comments

@Quantzic
Copy link

Important Information

Provide following Information:

  • mpv version : v0.37.0-81-g443c2487
  • Platform and Version : Windows 11 Pro 23H2
  • Source of the mpv binary : shinchiro
  • If known which version of mpv introduced the problem : unknown, always present?
  • GPU model, driver and version : RTX 4070Ti, 546.29
  • Possible screenshot or video of visual glitches

Reproduction steps

mpv --no-config --vo=gpu-next --video-sync=display-resample --interpolation=yes HYbJ.mkv
Black flashes are present in certain scenes.

mpv --no-config --vo=gpu --video-sync=display-resample --interpolation=yes HYbJ.mkv
Normal playback without issue.

It's been suggested to try --correct-downscaling=no unfortunately it has no positive effect here. Using, e.g., --tscale=mitchell, instead of the default oversample does fix the problem however.

Expected behavior

No black flashes during video playback.

Actual behavior

Black flashes during video playback.

Log file

log.txt

Sample files

The issue is especially noticeable at a certain distance from the screen in a dimly lit room.

https://0x0.st/HYbJ.mkv : note the porch railing on the left & right
https://0x0.st/HYbv.mkv : around the trees in the foreground

@sfan5
Copy link
Member

sfan5 commented Dec 15, 2023

screenshots? sounds like this issue #11499

@Quantzic
Copy link
Author

I doubt it's related to such severe artifacting/corruption. It's not visible on screenshots at all, motion only. I'm not well versed in video capture either so above is the best i can do.

@Dudemanguy
Copy link
Member

Dudemanguy commented Dec 15, 2023

I believe I see what you are referring to and indeed it doesn't happen in vo_gpu. I checked some of the recent commits related to interpolation, but the behavior looks the same. I suppose this means libplacebo's oversample does something different than vo_gpu's implementation.

@Dudemanguy
Copy link
Member

I took a couple of poor quality screen recordings where you can sort of see the flicker. It's hard to describe in words but if you see it you'll know what I mean. It's more apparent when you actually watch it on your own screen. This is from the HYbJ.mkv video.

gpu:
gpu-2023-12-15_19.00.39.webm
gpu-next:
gpu-next-2023-12-15_18.59.44.webm

When watching these, I found it helpful to focus on this area of the picture. If you watch closely, you should be able to see that around the bars there's some black flickering (that's not compression artifacts) in gpu-next but not gpu as the video zooms out.
mpv-shot0001

@mightyhuhn
Copy link

shouldn't a target refresh rate and such be added?

on my oled at 120 hz both flicker/ghost.
can you check if one uses linear light blending and the other gamma light blending? just a blind guess.

@seamtex
Copy link

seamtex commented Dec 23, 2023

i've been having this problem too. With vo=gpu is way less noticeable. A high tscale-blur fixes it tho, but ofc it makes everything blurry haha .
im using

tscale=sphinx
tscale-radius=0.49
tscale-blur=0.6991556596428412

It gets even worse with oversample

@ixxbxxx
Copy link

ixxbxxx commented Dec 26, 2023

Just speculating here but VRR changes the gamma curve when framerate falls below the VRR range which can cause this 'flashes' in my experience. Solution here is to disable G-sync in NVCP either globally or only for mpv.

@Quantzic
Copy link
Author

I can't reproduce it with the tscale=sphinx parameters on my end. VRR also isn't supported on my screen.

@Jules-A
Copy link

Jules-A commented Dec 27, 2023

Just speculating here but VRR changes the gamma curve when framerate falls below the VRR range which can cause this 'flashes' in my experience. Solution here is to disable G-sync in NVCP either globally or only for mpv.

What on earth? Why would that be a thing? I've never seen that with Freesync. Then again, my monitor is just marketed as adaptive-sync and doesn't have LFC but I doubt that has anything to do with gamma.

I've been running oversample interpolation with display-resample on GPU-Next and haven't been able to reproduce on my AMD gpu in DX11, haven't tried with other interpolation scalers though.

@NiLuJe
Copy link

NiLuJe commented Dec 27, 2023

Isn't there a different tscale-clamp default/behavior between gpu and gpu-next for oversample? (specifically, I seem to remember it being unclamped by default in libplacebo, while mpv defaults tscale-clamp to 1.0).

@ixxbxxx
Copy link

ixxbxxx commented Dec 30, 2023

Just speculating here but VRR changes the gamma curve when framerate falls below the VRR range which can cause this 'flashes' in my experience. Solution here is to disable G-sync in NVCP either globally or only for mpv.

What on earth? Why would that be a thing? I've never seen that with Freesync. Then again, my monitor is just marketed as adaptive-sync and doesn't have LFC but I doubt that has anything to do with gamma.

I've been running oversample interpolation with display-resample on GPU-Next and haven't been able to reproduce on my AMD gpu in DX11, haven't tried with other interpolation scalers though.

@Jules-A you should really read up before disregarding this known issue.

https://www.google.com/search?q=vrr+gamma+flickering

Also an app to test this phenomena

https://github.com/MattTS01/VRR_Flicker_Test_OpenGL

Happens across all gpu-api.

@Jules-A
Copy link

Jules-A commented Dec 30, 2023

@Jules-A you should really read up before disregarding this known issue.

I never said it was impossible, I just don't understand how it's possible. From what you linked it seems pretty much exclusive to OLED. I've never heard of gamma flickering but I have heard of brightness flickering. Thing is, how do you know it's gamma specifically and not just brightness? (well unless you have an OLED and specifically use that app). I think most people aren't using OLED though and honestly if this is related to VRR, people should be posting their monitor specs also.

@ixxbxxx
Copy link

ixxbxxx commented Dec 31, 2023

@Jules-A you should really read up before disregarding this known issue.

I never said it wasn't impossible, I just don't understand how it's possible. From what you linked it seems pretty much exclusive to OLED. I've never heard of gamma flickering but I have heard of brightness flickering. Thing is, how do you know it's gamma specifically and not just brightness? (well unless you have an OLED and specifically use that app). I think most people aren't using OLED though and honestly if this is related to VRR, people should be posting their monitor specs also.

Dude you're the first person to mention brightness in this thread. OP's original issue was with flickering hence my suggestion of what could be the cause given that he has VRR, and provided a suggested solution for OP to try. Not sure why you are taking issue with me suggesting a potential fix, so weird.

@Jules-A
Copy link

Jules-A commented Dec 31, 2023

Not sure why you are taking issue with me suggesting a potential fix, so weird.

I think you are just misreading or making too many assumptions, I never said anything of the sort, nor did I mean to imply your suggestion was invalid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants