Re: [chromium-dev] How can I force the use of D3D11VideoDecoder?

901 views
Skip to first unread message

Dale Curtis

unread,
Nov 1, 2021, 1:49:03 PM11/1/21
to mohamme...@dolby.com, media-dev, Frank Liberato, Ted (Chromium) Meyer
D3D11VideoDecoder is enabled by default now. If it's not working your device may not be supported.

- dale

On Fri, Oct 29, 2021 at 11:13 AM Mohammed Al Ani <mohamme...@dolby.com> wrote:
Hi!

I'm wondering if there is a flag or a switch to force the use of D3D11VideoDecoder when running on webrtc? So far I am only getting MojoVideoDecoder to work. 

I made sure that media_switches.cc - Chromium Code Search has D3D11VideoDecoder enabled.


--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/271f1b5a-37cb-4a71-a56d-ea9731d3db62n%40chromium.org.

Frank Liberato

unread,
Nov 1, 2021, 1:58:24 PM11/1/21
to Dale Curtis, mohamme...@dolby.com, media-dev, Ted (Chromium) Meyer
MojoVideoDecoder might be D3D11VideoDecoder, though I thought MojoVideoDecoder reported the underlying decoder properly now.  At least locally, I see "D3D11VideoDecoder".

If you play something that's not webrtc (e.g., something from here), then check chrome://media-internals, does it list "MojoVideoDecoder" there?
  
thanks
-fl
--
I sometimes work nonstandard hours.  Please don't feel any urgency to respond outside of your working hours.

Al Ani, Mohammed

unread,
Nov 1, 2021, 7:56:11 PM11/1/21
to Frank Liberato, Dale Curtis, media-dev, Ted (Chromium) Meyer, Hu, Ellen

Hi Frank,

 

Thanks for your response. I did play an H264 video from the link you referenced. Chromium media-internals does report MojoVideoDecoder. I played the same video on Chrome browser, and it reported D3D11VideoDecoder.

 

After some digging in Chromium, found out that DXVA was the underlying decoder. Still I’m trying to understand why D3D11Decoder class was not invoked in the case of Chromium. If you have any tips please feel free to share.

 

Thanks,

 

Mohammed Al Ani

Frank Liberato

unread,
Nov 1, 2021, 8:11:03 PM11/1/21
to Al Ani, Mohammed, Dale Curtis, media-dev, Ted (Chromium) Meyer, Hu, Ellen
Hi

That's unexpected -- it should say either "D3D11VideoDecoder", or "VDAVideoDecoder" if it's DXVA.  I don't think that "MojoVideoDecoder" should ever be printed in a recent build of chromium.  It corresponds to kMojo, which i don't think is used anywhere anymore.

In the past, "MojoVideoDecoder" was printed for both DXVA and D3D11 because kMojo was returned for them both.  It sounds like you're seeing this older behavior with your chromium build.

What does chrome://version in chromium report as your version number?  I don't know how recent the change from kMojo => {D3D11, VDA} was, off-hand, but I suggest syncing to ToT if your copy of the source is more than a few days old.

Thanks
Frank

Al Ani, Mohammed

unread,
Nov 2, 2021, 4:20:11 PM11/2/21
to Frank Liberato, Dale Curtis, media-dev, Ted (Chromium) Meyer, Hu, Ellen

Hi Frank,

 

Thanks for the tip, you are right on a newer build I do see “VDAVideoDecoder” when I build newer Chromium.

 

One more thing I’d like to know more about is the DXVA decoder. I do see that decoder factory generates DXVA decoder if Windows OS is detected (see this) But in older versions, there was a D3D11DecoderAccelerator (link). Also, I do see there is a D3DVideoDecoder class in the latest build of Chromium but I when I try to play any of the videos in the link that sent initially, I’m not really triggering the D3D11VideoDecoder. So I guess in the latest Chromium, what is the difference between DXVA and D3DVideoDecoder? And what kind of media would enable the usage of the D3D11VideoDecoder?

 

Thanks,

Mohammed

Ted (Chromium) Meyer

unread,
Nov 2, 2021, 11:01:46 PM11/2/21
to Al Ani, Mohammed, Frank Liberato, Dale Curtis, media-dev, Hu, Ellen
I would suggest chromium.exe --disable-gpu-driver-bug-workarounds --enable-features=D3D11VideoDecoder

The feature flag should already be enabled by default, but maybe you've got something turning it off somehow. https://source.chromium.org/chromium/chromium/src/+/main:media/mojo/services/gpu_mojo_media_client_win.cc
Is where we select the windows hw decoder.

Al Ani, Mohammed

unread,
Nov 3, 2021, 12:55:25 PM11/3/21
to Ted (Chromium) Meyer, Frank Liberato, Dale Curtis, media-dev, Hu, Ellen

Thanks, those flags worked for me. I see D3D11VideoDecoder being used in some of the media now. It seems anything webrtc is still using dxva but looks like this is a design intent.

 

Thanks,

Mohammed

Reply all
Reply to author
Forward
0 new messages