mpv icon indicating copy to clipboard operation
mpv copied to clipboard

VDPAU: corruption when decoding too fast

Open haasn opened this issue 10 years ago • 12 comments

mpv version and platform

Master. Also tested v0.16 with no change. Nvidia 367.27 + Gentoo Linux 4.5.7

Expected behavior

Frames are rendered correctly

Actual behavior

Frames are rendered with image corruption

Reproduction steps

mpv --speed=20 --hwdec=vdpau FILE or just use mpv --hwdec=vdpau FILE and try precise seeking

Log files

https://0x0.st/Ty_.txt

haasn avatar Jun 20 '16 16:06 haasn

--vf=vdpaurb fixes the -speed 20 issue but not the precise seeking issue.

The artifacts also look distinctly different. The -speed 20 artifacts just look like the bottom bits of the frame are melted. The precise seeking artifacts are more like spontaneous blocks appearing all over the frame.

haasn avatar Jun 20 '16 16:06 haasn

I'm seeing the latter type of artifacts in all cases.

ghost avatar Jun 20 '16 17:06 ghost

(364.16 here.)

ghost avatar Jun 20 '16 17:06 ghost

Since the update to mpv 0.18 I get artifacts with hwdec=vdpau that look like de-interlacing gone wrong, it occurs regardless of seeking or speed-up. I'm using an AMD card with mesa 11.2.2 under xorg 1.18.3 (Archlinux). The artifacts are not visible on screenshots made with mpv.

This is what it looks like with and without vdpau, all other settings default via --no-config: http://b.1339.cf/qoedfst.png http://b.1339.cf/xdaebwu.png

(it's a video of some screencast, artifacts are best seen on text like this)

lamarpavel avatar Jun 26 '16 14:06 lamarpavel

That's different and looks like the reinterleaving is going wrong.

ghost avatar Jun 26 '16 15:06 ghost

mpv's deinterleaving shader relies on correct GL_NEAREST behavior. Maybe your drivers are bust?

haasn avatar Jun 26 '16 15:06 haasn

Alright, sorry to have cluttered up this issue with something unrelated. Should I create a new one for further investigation?

lamarpavel avatar Jun 26 '16 15:06 lamarpavel

AMD issue: #3317

ghost avatar Jul 06 '16 17:07 ghost

Same here with [361.28, 367.27] once I upgraded my hardware from GTX 550 to GTX 950. Also it happens with both --vo vdpau and --vo opengl.

I was thinking this new hardware might be faulty, then I tried mplayer+vdpau and (mpv|mpc-hc)+dxva2 on Windows and they don't have any problem.

MPV versions: 0.18.0, 0.18.1, master

JackieKu avatar Jul 28 '16 17:07 JackieKu

Note: I can partially “work around” the issue by using

export VDPAU_TRACE=2
export VDPAU_TRACE_FILE=/dev/null

The fact that this helps significantly seems to indicate that the issue might be some sort of synchronization barrier gone wrong.

haasn avatar Jul 28 '16 18:07 haasn

I can’t reproduce this anymore with a GTX 960 (driver 370.28).

ghost avatar Nov 06 '16 01:11 ghost

Neither can I

haasn avatar Nov 06 '16 01:11 haasn