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
video playback glitching out with hwdec "d3d11va" and/or "auto" #3255
Comments
I assume |
|
Here's how it plays with those parameters: Also I updated the "hwdec options I tried and their results" section in the OP. |
What happens if run with |
https://u.pomf.is/izuiqi.webm |
Does the branch |
Using https://bitbucket.org/rorgoroth/mpv-for-windows/downloads/mpv64__d3d_copy_texture.7z
with d3d11va-copy mpv crashes. |
The crash is a small oversight. I fixed it and force-pushed the branch. Not sure why the d3d11va mode doesn't work for you. It does for me. |
I noticed the same glitch happening on youtube and oddshot.tv sometimes so maybe it's not an mpv issue but a driver/os one? |
Possibly related Chrome issue (see the attached WebM): http://crbug.com/623029 It seems like Chrome are solving this by manually blacklisting AMD drivers from using external NV12 textures. |
How about we manually blacklist AMD drivers? |
That issue just says that they reverted the default. Looking forward to seeing how they solve it and it they find the real cause. (Surely they know how to contact the AMD driver team directly.) |
Chrome is working around the bug when it detects AMD drivers by using disable_dxgi_zero_copy_video, disable_nv12_dxgi_video flags when it detects the faulty hardware. This works in chrome's case because chrome's code has a solid infrastructure to workaround driver bugs on a case by case basis. It is better if mpv can add some case by case detection code in d3d11va to use d3d11va-copy when it detects AMD hardware. Or only add it to auto code and document d3d11va as faulty on amd hardware. |
How about AMD fixes their shit? |
still true with 16.9.2 driver, very disappointed in AMD |
To be honest I'm not sure if there could be a user error (documentation about d3d11va and threading isn't very explicit on MSDN). But if even Google chose to use a blacklist, it seems likely that their code is actually correct and AMD's drivers are broken. I'd expect that Google and AMD are in contact with each other. Also, I haven't heard of problems on other platforms (Intel/nvidia). Is it known whether all AMD hardware is affected? Also, did anyone try the d3d_copy_texture branch? It's aging, I can rebase it if anyone wants a newer version. |
Based on the chrome source code from https://cs.chromium.org/chromium/src/gpu/config/gpu_driver_bug_list_json.cc almost all AMD hardware i.e vendor id 0x1002 appears to be affected
Firefox currently disables d3d11 on all AMD hardware and falls back to dxva2 Based on both cases it can safely be assumed all AMD hardware is effected. I tested it on a A10 APU(Radeon 7660G) with 15.7 (15.200.1065.0) driver (Trinity) I will try to test it soon on Carrizo chips. |
Don't assume that Google and AMD are in contact with each other. It is likely that they only contact AMD if a workaround is not possible or requires too much effort. |
Using:
I get [d3d11va] Failed to create Direct3D11 texture with 22 surfaces: The parameter is incorrect. (0x80070057) d3d11va without copy: mpv log (d3d11va-copy):
Tried using Gonna update to latest AMD driver now and test again. Edit: same thing with 16.11.4 |
Wondering if it doesn't like D3D11_BIND_SHADER_RESOURCE... |
Apparently this happened, according to: #3464 (comment) So I'm closing this. If someone still has the problem even with updated AMD drivers, please post here, or open a new issue. |
Like the manual says, this is technically undefined behaviour. See: https://msdn.microsoft.com/en-us/library/windows/desktop/ff476085.aspx In particular, MSDN says texture arrays created with the BIND_DECODER flag cannot be used with CreateShaderResourceView, which means they can't be sampled through SRVs like normal Direct3D textures. However, some programs (Google Chrome included) do this anyway for performance and power-usage reasons, and it appears to work with most drivers. Older AMD drivers had a "bug" with zero-copy decoding, but this appears to have been fixed. See mpv-player#3255, mpv-player#3464 and http://crbug.com/623029.
Like the manual says, this is technically undefined behaviour. See: https://msdn.microsoft.com/en-us/library/windows/desktop/ff476085.aspx In particular, MSDN says texture arrays created with the BIND_DECODER flag cannot be used with CreateShaderResourceView, which means they can't be sampled through SRVs like normal Direct3D textures. However, some programs (Google Chrome included) do this anyway for performance and power-usage reasons, and it appears to work with most drivers. Older AMD drivers had a "bug" with zero-copy decoding, but this appears to have been fixed. See mpv-player#3255, mpv-player#3464 and http://crbug.com/623029.
Like the manual says, this is technically undefined behaviour. See: https://msdn.microsoft.com/en-us/library/windows/desktop/ff476085.aspx In particular, MSDN says texture arrays created with the BIND_DECODER flag cannot be used with CreateShaderResourceView, which means they can't be sampled through SRVs like normal Direct3D textures. However, some programs (Google Chrome included) do this anyway for performance and power-usage reasons, and it appears to work with most drivers. Older AMD drivers had a "bug" with zero-copy decoding, but this appears to have been fixed. See mpv-player#3255, mpv-player#3464 and http://crbug.com/623029.
Like the manual says, this is technically undefined behaviour. See: https://msdn.microsoft.com/en-us/library/windows/desktop/ff476085.aspx In particular, MSDN says texture arrays created with the BIND_DECODER flag cannot be used with CreateShaderResourceView, which means they can't be sampled through SRVs like normal Direct3D textures. However, some programs (Google Chrome included) do this anyway for performance and power-usage reasons, and it appears to work with most drivers. Older AMD drivers had a "bug" with zero-copy decoding, but this appears to have been fixed. See #3255, #3464 and http://crbug.com/623029.
So I just updated my mpv and video playback seems to be glitching out when using d3d11va/auto, to be honest I've never used anything other than software or dxva2-copy til now.
Platform:
Windows 10 Enterprise Build 10586.318
Driver:
Radeon Crimson 16.6.1 (VGA: R7 260x)
mpv version tested:
latest from https://bitbucket.org/rorgoroth/mpv-for-windows/downloads (mpv-latest-Win64.zip) as of today/when I'm posting this
MPC-HC version tested:
latest from https://mpc-hc.org/downloads/ ("v1.7.10 which was compiled from d911f14") x64
Two .webm files and one image showing off the problem:
https://u.pomf.is/dazvpi.webm
https://u.pomf.is/cbejfy.webm (with stats)
Same file running on MPC-HC (unchanged configs):
DXVA Checker:
hwdec options I tried and their results:
relevant mpv.conf:
output log from one of the video files:
output.txt
Let me know if you need any more informations. As a side note, I would love to know how to properly use the monitor profile's constrast and how to properly downsample to mono sound.
The text was updated successfully, but these errors were encountered: