Nevcairiel / LAVFilters

LAV Filters - Open-Source DirectShow Media Splitter and Decoders
GNU General Public License v2.0
7.32k stars 787 forks source link

Video artifacts when playing back certain H.264 Blu-ray rips on AMD GPUs #486

Open Gryzzplo opened 2 years ago

Gryzzplo commented 2 years ago

System Info: Ryzen 9 5900HX with Vega iGPU AMD RX 6800M Windows 11

Green artifacts appearing with some H.264 un-reencoded Blu-ray rips. Happens with both DXVA, D3D11. Does not happen with software decoding, hw decoding on Intel or NVIDIA GPUs, and the Movies & TV / New Media Player App with AMD HW acceleration (surprisingly). Screenshot (147) HW acceleration on Screenshot (148) HW acceleration off

Video Sample: https://bit.ly/37rwrno

clsid2 commented 2 years ago

You did not mention your player and LAV Filters version. Update to MPC-HC 1.9.20 in case you are using something old.

https://github.com/clsid2/mpc-hc/releases

Gryzzplo commented 2 years ago

I'm sorry, I'm using the latest stable build of MPC-HC, 1.9.20, with LAV 0.76.1

nyanmisaka commented 2 years ago

ffmpeg -hwaccel d3d11va -hwaccel_output_format nv12 -i "WALL-E-024.mkv" -y out.yuv

It seems that the dxva2/d3d11va hwaccel in ffmpeg on AMD is the cause, the dumped data is broken too.

May be you can find some help from their folks. https://github.com/GPUOpen-LibrariesAndSDKs/AMF

mitzsch commented 1 year ago

It seems that this is windows related. Trying the sample under Linux with mpv and hw decoding (vaapi) does not show a mangled image. (mpv on windows shows the same artifacts as lavfilters)

BreakPoints commented 1 year ago

I'm able to reproduce on MPC-HC 1.9.24, LAV Filters 0.77.0.1, AMD 6800U (With RDNA 2 GPU). Happens on all hardware accelerated decoders, fine on software. Possibly a bug in the Windows drivers but must be able to be worked around as the built in media player apps in Windows 11 do not show these issues and still use the GPU decoder.

image