DescriptionAdd support for DX11 based H/W video decoding on Windows 8+
This is only available on Windows 8+ because the media foundation API which exposes the device
manager to be pased to the decoder MFCreateDXGIDeviceManager only exists on Windows 8+.
Changes in this patch are mostly around using DX11 or D3D wherever needed. These are as below:-
1. In the initialization code path where we use D3D or DX11 based on whether we are on Windows 8+
and ANGLE and the decoder say they support DX11.
2. The output frame processing code where we extract the DX11 texture and copy it out to ANGLE. One change
here is that DX11 does not provide an automatic way for format conversion for textures. The decoder outputs
YUV12 textures and ANGLE expects RGB. We can achieve this by setting a shader for conversion. That seemed
like too much work. Thankfully there is a video processor media foundation transform on Windows which
does the conversion for us on the GPU. We use this object to convert the output frame and copy it out to
ANGLE.
3. We pass the GL context to the decoder to enable us to query ANGLE to see if it is using D3D or DX11.
BUG=456418
Committed: https://crrev.com/3b01db9b22725d4e7d6422d8dadf48dce8ac4794
Cr-Commit-Position: refs/heads/master@{#318560}
Patch Set 1 #Patch Set 2 : Support DX11 decoding #Patch Set 3 : Fixed logs #Patch Set 4 : Pass the GLContext to the decoder #Patch Set 5 : Refactor and cleanup #Patch Set 6 : Fixed comment #Patch Set 7 : Rebased to tip #Patch Set 8 : Fix build redness #Patch Set 9 : Experimental support for Windows 7 DX11 #
Total comments: 11
Patch Set 10 : Address review comments #Patch Set 11 : Fix build error #
Total comments: 12
Patch Set 12 : Address review comments #
Total comments: 2
Patch Set 13 : Move debug alias to under FAILED(hr) #Patch Set 14 : Add alias calls to other places which have CHECKs #
Total comments: 2
Patch Set 15 : Use the ID3D11Query interface to poll the device context to see when the texture copy completes #Patch Set 16 : Added a CHECK to catch GetData failures #
Messages
Total messages: 28 (6 generated)
|