DirectX - Support for hardware acceleration

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
Momotte
New Cone
New Cone
Posts: 2
Joined: 02 Jun 2005 14:45

DirectX - Support for hardware acceleration

Postby Momotte » 02 Jun 2005 14:52

Hi guys,

I saw some threads (either requests or questions) about eventual support for DXVA. Is it going somewhere? I mean is there anyone working on that?

My main problem is that playing HDTV content(MPEG2, MPEG4) using VLC now is almost impossible except if one have an incredibly fast system. I was just wondering if anyone experience the same as me.

Thanks,

The DJ
Cone Master
Cone Master
Posts: 5987
Joined: 22 Nov 2003 21:52
VLC version: git
Operating System: Mac OS X
Location: Enschede, Holland
Contact:

Postby The DJ » 02 Jun 2005 18:07

No one is working on it. It is registered as a requested feature in our tracking system though. https://trac.videolan.org/vlc/ticket/151

There is no timetable for it, it will probably be implemented by a user like you who really wants it and is tired waiting any longer :D.
Don't use PMs for support questions.

Momotte
New Cone
New Cone
Posts: 2
Joined: 02 Jun 2005 14:45

Postby Momotte » 03 Jun 2005 15:21

There is an easy way to do it but I am not aware of the internal structure of vlc. Basically it would consist of this:

- New output module called DirectX graph:
-> Create a IFilterGraph instance
-> Create a universal push source instance
-> Set the media types of the output pins to the desired format depending on what is streamed from vlc
-> Render the push source output pins

- Required:
-> New output module DLL
-> A way to get VLC's video window handle to be able to render it within its main frame

This would allow users to use all system's installed codecs(where most of them support DXVA). On the other hand, this module would probably not be cross platform and work only for Win32 :(

I might give it a try but it could take me a while to understand the plugin architecture...

patch
Blank Cone
Blank Cone
Posts: 34
Joined: 06 Jun 2008 06:05

Hardware acceleration Support options

Postby patch » 27 Dec 2008 15:32

From viewtopic.php?f=2&t=42328&start=15#p152183
My graphics card has on board video decoding, does VideoLan support, or will it support this?
This post suggests it doesn't and isn't likely to in the foreseeable future viewtopic.php?f=14&t=44499&p=140451&hilit=Avivo#p140451

If so is not this increasingly going to be a problem for users with ATI® Avivo™ and NVIDIA® PureVideo™ and Intel Clear Video technology cards
From viewtopic.php?f=2&t=42328&start=15#p152304
Give us the specs to decode with the graphic cards, and we might do it.
SInce AVIVO® and other CRAP® (PureVideo®) are not open source and don't provide any open access to it, it is a NO GO.
Not sure how they have done it but Media Player classic supports EVR renderer and DirectX Video Acceleration (DXVA) with H.264 and VC-1 codecs resulting in video card hardware acceleration of H.264 and VC-1 decoding on ATI Radeon HD series, H.264 on nVidia series 8(9)xxx http://mpc-hc.sourceforge.net/DXVASupport.html This makes a dramatic difference to my ability to play higher definition movies on older hardware (Intel Pentium D 930 with ATI 4650 512M, and a Celeron 2.6GHz with Radeon HD 2600 XT both running windows XP)

It would be wonderful if similar functionality could be added to VLC

Not sure how similar it is to the Linix nvidia binary interface, but perhaps interfacing to both would preserve cross platform functionality http://www.phoronix.com/scan.php?page=a ... _180_vdpau
Last edited by patch on 26 Jan 2009 07:10, edited 3 times in total.

heffeque
Blank Cone
Blank Cone
Posts: 92
Joined: 13 Sep 2005 04:00
VLC version: 2.0.2
Operating System: Win7-64

Re: DirectX - Support for hardware acceleration

Postby heffeque » 28 Dec 2008 06:54

Well... actually some of the support could be done via CUDA, ¿no?

I know that OpenCL support will be relatively easy to implement (it'll be in Mac OS X 10.6 Snow Leopard), but I'm not sure that CUDA is that easy.

Could anybody be so kind to enlighten us with some info about it?
(.-=Kiwi=-.)

patch
Blank Cone
Blank Cone
Posts: 34
Joined: 06 Jun 2008 06:05

Hardware acceleration Support options

Postby patch » 29 Dec 2008 15:30

Well... actually some of the support could be done via CUDA, ¿no?
Sounds like it is more aimed at non graphical use of graphics processors to me, so it may not be the ideal starting point http://en.wikipedia.org/wiki/CUDA
I know that OpenCL support will be relatively easy to implement (it'll be in Mac OS X 10.6 Snow Leopard), but I'm not sure that CUDA is that easy.
Sounds more general purpose, but the reference to DirectX 11 makes me suspect limited support for existing operating systems and graphics cards http://en.wikipedia.org/wiki/OpenCL
Last edited by patch on 14 Jan 2009 14:31, edited 1 time in total.

heffeque
Blank Cone
Blank Cone
Posts: 92
Joined: 13 Sep 2005 04:00
VLC version: 2.0.2
Operating System: Win7-64

Re: DirectX - Support for hardware acceleration

Postby heffeque » 29 Dec 2008 15:42

Well yes... they're both for general purpose code, but taking into consideration that there's a lot of CPU usage on x264 at 1080p (for example) then it would be nice to be able to offload some of that to the GPU, even if it's non video specific stuff.
(.-=Kiwi=-.)

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: DirectX - Support for hardware acceleration

Postby Jean-Baptiste Kempf » 30 Dec 2008 17:50

DxVA is very DirectShow oriented and VLC isn't. But any good idea is welcomed.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

heffeque
Blank Cone
Blank Cone
Posts: 92
Joined: 13 Sep 2005 04:00
VLC version: 2.0.2
Operating System: Win7-64

Re: DirectX - Support for hardware acceleration

Postby heffeque » 01 Jan 2009 17:28

(.-=Kiwi=-.)

patch
Blank Cone
Blank Cone
Posts: 34
Joined: 06 Jun 2008 06:05

Hardware acceleration Support options

Postby patch » 05 Jan 2009 13:35

DxVA is very DirectShow oriented and VLC isn't. But any good idea is welcomed.
Thank you for the insight, I appreciate knowing where VLC is and is not heading.

However the knowledge also saddens me.
VLC under XP on my old hardware results in 100% cpu usage and choppy HD video
Media Player classic with DXVA on the same hardware results in <20% cpu usage and smooth video.

As such I am forced to run Media Player classic for my high def movies.
Not my first choice, but hay life is full of compromises.

From viewtopic.php?f=2&t=42328&start=15#p153716
I found that VLC 0.8.6* does achieve hardware acceleration of x264-encoded streams on my Nvidia GeForce Go7300, in WindowsXP SP2.

Nvidia users will recall that series 6- and 7- GPUs provide partial H.264 acceleration, while series 8- and over provide acceleration of all H.264 functions (notice I explicitly avoid the highly confusing "PureVideo" term).

Well, I encode my SD videos with x264 and VLC plays it back with hardware acceleration.
How do I know ? I get near-zero CPU usage, as opposed to 10-30% CPU usage when not accelerated.
My statement needs some qualification however :
  • 1. VLC accelerates playback if the "Output Module" is explicitly set to "DirectX", not to "Default"
    2. I have found no acceleration if it is set to "Direct3D" (or any other module)
    3. hardware acceleration is sporadic :
    • 3.1 boot my laptom, play a video with VLC -- GPU-acceleration is ON (near-zero CPU)
      3.2 play it with another player (MPC-HC for instance) -- no GPU acceleration (CPU > 20%)
      3.3 close other player and play again with VLC -- no GPU acceleration (CPU > 20%)
      3.4 reboot or go to standby & back -- -- GPU-acceleration is ON
I have only tried this with SD (720x576/PAL) content because that's all I have.
I would like the community to confirm my findings :
  • 1. with 720p content or higher
    2. with NVidia 8-series CPUs
always using WinXP SP2 of course.
My guess is that when VLC is forced to use DirectX, then it accesses the DXVA function (v1 under XP does provide hardware acceleration).

To conclude, I think the PureVideo label (if not the technology) has contributed so much fudge to this topic that people have been thrown off-track. I've been trying to achieve x264 hardware acceleration ever since I got my laptop last year, have tested dozens of players, and VLC would systematically yield the best playback results.
I figure this is why.

Any & all comments are welcome.
enkidu
Has anyone got this working with 0.9.8a? Doesn't work for me.
Last edited by patch on 14 Jan 2009 14:30, edited 3 times in total.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: DirectX - Support for hardware acceleration

Postby Jean-Baptiste Kempf » 05 Jan 2009 13:40

Well, DxVA is not impossible in VLC, but quite difficult, that's it.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

patch
Blank Cone
Blank Cone
Posts: 34
Joined: 06 Jun 2008 06:05

Hardware acceleration Support options

Postby patch » 05 Jan 2009 14:59

Well, DxVA is not impossible in VLC, but quite difficult, that's it.
NP
I really appreciate the effort you put into VLC and believe it is an excellent product.
I'm just trying to see how best I can use it.
Thanks for the reference
Makes me wonder if openGL & openCL might not be a better way for VLC to go given it's cross platform and open development focus. Apparently supporting nvidia, ATIcards and windows, linix, Apple's Snow Leopard.

Any one worked out if openGL or openCL has support for hardware video decoding?
I have never worked with openCL but openmax sounds as it knows about H264, MJPEG, WMV, MPEG4, H263, MPEG2 http://www.khronos.org/files/openmax_il_spec_1_1_2.pdf however I don't know if the support would include hardware acceleration on common graphics cards.

BTW
Is it possible for a mod to delete "DirectX" from the title of this thread. Maybe change it to "Hardware acceleration support" or something similar as a discussion in this forum should not be limited to DirectX / windows
Last edited by patch on 14 Jan 2009 14:28, edited 1 time in total.

patch
Blank Cone
Blank Cone
Posts: 34
Joined: 06 Jun 2008 06:05

Hardware acceleration Support options

Postby patch » 14 Jan 2009 14:21

Sad when you have to try & answer your own questions but here goes
Any one worked out if openGL or openCL has support for hardware video decoding?... openmax sounds as it knows about H264, ... don't know if the support would include hardware acceleration on common graphics cards.
Reading through http://www.khronos.org/files/openmax_il_spec_1_1_2.pdf I suspect the answers depends on what drivers nvidia & ATI choose to write.
Unfortunately from what I can see they have not yet written drivers to utilise their hardware via openMax http://felipec.wordpress.com/2008/12/12 ... agleboard/ Maybe that will change after openCL support is added for nvidia & ATI cards.

VLC doesn't yet use openmax http://www.celinux.org/elc08_presentati ... penmax.pdf but clearly supports openGL

Looks like it is awhile off yet :(

patch
Blank Cone
Blank Cone
Posts: 34
Joined: 06 Jun 2008 06:05

Hardware acceleration Support options

Postby patch » 31 Jan 2009 08:11

DxVA is very DirectShow oriented and VLC isn't.
True but AMD's X-Video Bitstream Acceleration (XvBA) can apparently be used with the binary ATI Linux driver and is very similar (if not identical) to DXVA. http://www.phoronix.com/scan.php?page=a ... xvba&num=1

This may make support of DxVA / XvBA more viable as it then covers 2/3 of the platforms VLC runs on.
Although openMax support by VLC & AMD would be better but this would involve 2 groups both implementing significant code.

By the way
From viewtopic.php?f=2&t=42328&start=15#p152304
Give us the specs to decode with the graphic cards, and we might do it.
I posted in the AMD Developers forum awhile ago & got no response from AMD http://forums.amd.com/forum/messageview ... &forumid=9

Rémi Denis-Courmont
Developer
Developer
Posts: 15268
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: DirectX - Support for hardware acceleration

Postby Rémi Denis-Courmont » 31 Jan 2009 21:34

OpenMAX is currently embedded-centric, and it is not clear that it would spread to desktops. And it looks rather nasty if we end up having to support both OpenCL and OpenMAX standards from the same consortium to do the exact same thing :(

If we look at the details, OpenMAX DL is targetted at codecs implementors. VLC does not implement any non-trivial codec internally, it defers to libraries such as FFMPEG's libavcodec. The only part of DL that VLC could use directly is chroma conversion... but that would be silly as we already accelerate those via Direct3D or XVideo. On the other hand, VLC does have XvMC support(not sure if it still works), so there might be a way... ?

OpenMAX IL could be used, as a replacement for our traditional codecs, especially FFMPEG's libavcodec. But there's the typical problem that VLC insists on being the interface between the codec and the output (this is required for streaming and transcoding to work). I am not sure if we'd get much out of IL if used that way.

OpenMAX AL is not interesting. VLC, or rather LibVLC, could provide an implementation of OpenMAX AL, much like Phonon-VLC. AL is too high-level for us to use it.


Anyway, whether it is DirectX VA, VPDAU, VAAPI, XvBA, OpenCL or OpenMAX, the main constraint is developper time and motivation. Or salary, but it seems like all professionnal OSS contribution are targetted at GStreamer or as proof-of-concept for MPlayer. As usual patch welcome.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

patch
Blank Cone
Blank Cone
Posts: 34
Joined: 06 Jun 2008 06:05

Hardware acceleration Support options

Postby patch » 01 Feb 2009 01:41

OpenMAX is currently embedded-centric, and it is not clear that it would spread to desktops. And it looks rather nasty if we end up having to support both OpenCL and OpenMAX standards from the same consortium to do the exact same thing :(
...
VLC does not implement any non-trivial codec internally, it defers to libraries such as FFMPEG's libavcodec.
...
Anyway, whether it is DirectX VA, VPDAU, VAAPI, XvBA, OpenCL or OpenMAX, the main constraint is developper time and motivation.
Thank you for your detailed response, I had not appreciated that openMax was targeted at the embedded market.
If I understand correctly, decoder performance changes +/- Graphics card hardware acceleration are most likely to result from ffmpeg modifications.

I had a look there and clearly there is lots of activity related to performance improvement by interfacing to graphics card hardware acceleration (unfortunately there appears to be a bias to unix interfaces without corresponding support for equivalent windows interfaces).
I couldn't find anything related to openCL, which surprised me as openGL + openCL should be an excellent combination supporting multiple operating systems, graphics card manufacturers, and flexible processing. Perhaps I need to wait till AMD & NIVIDA release driver support in 1H 2009
AMD http://forums.amd.com/devforum/messagev ... erthread=y
NIVIDA http://www.nvidia.com/object/io_1228825271885.html
OpenGL 3.0 overview http://www.khronos.org/developers/libra ... erview.pdf
OpenCL 1.0 overview http://www.khronos.org/developers/libra ... erview.pdf

BTW, some references I found in FFMPEG's developers forum
VDPAU support
(VDPAU is the Linux equivalent of the Microsoft's DirectX Video Acceleration (DxVA) API for Windows)
http://thread.gmane.org/gmane.comp.vide ... ocus=79768

VA API support to FFmpeg to support XvBA and VDPAU backends
(Video Acceleration API (VAAPI) is meant to some day replace XvMC, which is the UNIX equivalent of DxVA API)
(XvBA for ATI Radeon GPU is the Linux equivalent of the Microsoft's DirectX Video Acceleration (DxVA) API for Windows)
http://thread.gmane.org/gmane.comp.vide ... ocus=81763
http://thread.gmane.org/gmane.comp.vide ... evel/81624

MPEG1/2 patch for VDPAU HW acceleration round 9
http://thread.gmane.org/gmane.comp.vide ... evel/80380

Decoding AVCHD using multi-threaded code
http://thread.gmane.org/gmane.comp.vide ... evel/78944

Hardware assisted video decoding (from 2007)
http://thread.gmane.org/gmane.comp.vide ... ocus=53492

Media Player Classic - Homecinema with DXVA (DirectX Video Acceleration) via a FFmpeg development fork
http://thread.gmane.org/gmane.comp.vide ... ocus=63765

FFmpeg unlikely to support DirectX Video Acceleration (DXVA)
http://thread.gmane.org/gmane.comp.vide ... focus=4098

patch
Blank Cone
Blank Cone
Posts: 34
Joined: 06 Jun 2008 06:05

Re: Hardware acceleration Support options

Postby patch » 12 Mar 2009 11:28

I had a look there and clearly there is lots of activity related to performance improvement by interfacing to graphics card hardware acceleration (unfortunately there appears to be a bias to unix interfaces without corresponding support for equivalent windows interfaces).
Looks like we may have support for hardware acceleration at some stage in the future
http://thread.gmane.org/gmane.comp.vide ... ocus=84668
viewtopic.php?f=7&t=56258
or software viewtopic.php?f=7&t=56656
Lets hope so.

patch
Blank Cone
Blank Cone
Posts: 34
Joined: 06 Jun 2008 06:05

Re: Hardware acceleration Support options

Postby patch » 30 Dec 2009 06:45

DXVA support now has a status of closed. https://trac.videolan.org/vlc/ticket/151#comment:5

Does that mean VLC 1.1 supports it?
Or that support is no longer considered necessary as some other approach such as openCL is to be used?

Apparently DXVA is being ported from Media player classic - HC to ffdshow

omodecarton
Blank Cone
Blank Cone
Posts: 11
Joined: 07 Apr 2008 21:46
Operating System: Windows XP SP3

Re: DirectX - Support for hardware acceleration

Postby omodecarton » 09 Feb 2010 20:35

anyone?

Lotesdelere
Cone Master
Cone Master
Posts: 9975
Joined: 08 Sep 2006 04:39
Location: Europe

Re: DirectX - Support for hardware acceleration

Postby Lotesdelere » 09 Feb 2010 21:17



Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 21 guests