Kodi Community Forum
[WINDOWS] GPU assisted video decoding in XBMC for Windows via a custom DXVA renderer? - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Discussions (https://forum.kodi.tv/forumdisplay.php?fid=222)
+--- Forum: Feature Requests (https://forum.kodi.tv/forumdisplay.php?fid=9)
+--- Thread: [WINDOWS] GPU assisted video decoding in XBMC for Windows via a custom DXVA renderer? (/showthread.php?tid=33323)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16


- davilla - 2009-05-22

ssboisen Wrote:Windows 7 is comming with build in mpeg 2 and H.264 decoders which are multi-threaded and DXVA accelerated. Could this mean that adding dxva-support for the windows version of xbmc could get really easy? It doesn't support the mkv format but that's not really a problem as long as the decoding itself is.

Does this have a signifficant impact on xbmc?

Not unless someone steps up and creates some patches.


- Gamester17 - 2009-05-23

@ssboisen, as I am guessing that you are not a programmer yourself who is volunteering to code this I am moving your post into the feature suggestions forum and the existing topic thread with the discussion about DXVA.


- BrokenCodes - 2009-05-25

I'm currently working on simply codec support, without render, then using a blit from SDL for the actual display... We'll see how it goes...


Can XBMC simply add MPC-HC as an alternative player? - ajp8164 - 2009-05-26

Hi all -

I have been successful setting up xbmc as the frontend for the MediaPortal TvServer using the XBMCTvServer; see http://forum.team-mediaportal.com/general-talk-233/xbmc-python-script-36590/. There is some work to be done but the basics are there (and in lieu of a full blown native pvr solution for xbmc it will work in a pinch). I am driving the TvServer with the Hauppauge HD-PVR which is currently managing a 720p stream from my Directv STB. So, the obvious... the MP frontend renders this stream with very high quality (no dropped frames etc) - of course since MP is using DirectShow all of the video decoding (h264 stream) is going through my HD3200 GPU (CPU load is only about 5-7%) (I am using an ArcSoft h264 codec that came with the hardware).

The most serious problem I am working against is that the xbmc dvdplayer decodes using the CPU and my CPU is just not able to keep up (AMD 5050e). The CPU load varies between 78-88% and it is dropping frames continuously. So, I would really like to see DXVA support added (in some way) to xbmc's video player.

I was interested in the point made about MPC-HC and wonder whether or not we could simply include MPC-HC as an alternative video player for xbmc (save the licensing discussion), is this technically possible? One point to be made here is that at least MPC-HC is written in C++. Is the internal interface/architecture flexible enough to introduce an MPC-HC as an alternative? This sounds easier (on the surface) than upgrading the current dvdplayer (right?)

Thoughts?
-Andy

Edit: Been looking through the xbmc code. It seems like the architecture for video player integration is well abstracted behind CPlayerCoreFactory. Also, I did think of one other consideration (which I don't know too much about) - video mixing. I know that MP uses VMR9 (at least on Windows XP). I am unsure of the impact of video mixing within xbmc - not sure if the use of OpenGL vs. DirectShow makes this a huge problem or a non-problem(?)

Also, I am looking for a native integration, not the use of MPC as an external player (already consider that) - I want the xbmc overlay (OSD) mixed with the video - the external player capability does not provide this.


- BrokenCodes - 2009-05-26

You can set page overlays EASILY, with VMR9, and make the foreground a transparent OpenGL surface, but in order to get the best hardware display acceleration and codec HW support, EVR is what we need. Unfortunately, there is no layer support for EVR, and it would destroy Windows XP support.
EVR is immature (Vista was the first OS with EVR support). It works with DirectX 9 on XP, but the video output is ABSOLUTELY HORRIBLE.
DirectShow is slowly but surely being phased out, and with good reason, there has been no changes made to the base directshow framework since 2003.
I am looking into pairing acceleration support for Renderer V9 support in Windows XP and Vista, and Windows 7, the good news for this is, that if I do it RIGHT, we can make very few changes to allow compiling on Linux and MacOSX, and still maintain HW acceleration support for codecs, and for rendering...
So far I have HW accelerated codec support integrated in to my last windows compile, and I can make 1 define change and it falls back to VDPAU, for linux support.


- ashlar - 2009-05-27

BrokenCodes... o_____O Just like that?

Do I have it correctly? Are you saying you have XBMC Windows build that get hardware acceleration?


- natethomas - 2009-05-27

I'm with ashlar. Am I reading that right? HW accel on a Windows version of XBMC?


- BrokenCodes - 2009-05-27

natethomas Wrote:I'm with ashlar. Am I reading that right? HW accel on a Windows version of XBMC?

yes...
I also have a web browser API using Awesomium, or Firefox, accessible through python, and a few other goodies, been waiting till I have time to fix some of the issues, before posting patches...

Problem I have with the Accelerated codecs is that I can only overlay 2 colors...


I'm trying to overcome this, but its working flawlessly.

ATI 45XX HD works, as well as GeForce 9800 GT, MKV playback 1080p, with 4% CPU usage is nice, but having a crappy overlay for the controller, and having the volume bar / position bar destroy the section of the screen they are on is a bit annoying...


- User 42580 - 2009-05-27

Shocked

Quite impressive.
That's the beauty of open source software...

Why not post it so other can take a look? Maybe someone will know how to fix the two colors overlay thing.


- natethomas - 2009-05-27

BrokenCodes Wrote:yes...
I also have a web browser API using Awesomium, or Firefox, accessible through python, and a few other goodies, been waiting till I have time to fix some of the issues, before posting patches...

Problem I have with the Accelerated codecs is that I can only overlay 2 colors...


I'm trying to overcome this, but its working flawlessly.

ATI 45XX HD works, as well as GeForce 9800 GT, MKV playback 1080p, with 4% CPU usage is nice, but having a crappy overlay for the controller, and having the volume bar / position bar destroy the section of the screen they are on is a bit annoying...

Take all the time you need, buddy. This is XBMC for Windows holy grail status. If you can make it happen, ... well, that would be just awesome.


- garvani - 2009-05-27

Xbmc continually blows me away.. On a lot of different levels! Take BroneCodes for example. Comes out of know where and announces that he has hardware gpu accelerated video working in his build, Come again, you've done what!? Amazing how someone could come from out of the thin-air and add such a feature. Anyways, theres some truly awesome work you developers are doing! I and thousands of others appreciate it! BrokeCodes you've made me regret buying my quadcore now lol, i thought this was going to take a lot longer to resolve.. As nate said, take your time, if done right then this will be the mother of all patches..


- BrokenCodes - 2009-05-27

Discaciate Wrote:Shocked

Quite impressive.
That's the beauty of open source software...

Why not post it so other can take a look? Maybe someone will know how to fix the two colors overlay thing.

No, its the nature of the beast, what I'm trying to do now, is figure out how to use the watermark feature of DirectX, to my advantage here...
Blit the OpenGL textures into the watermark, and I should have fake overlay.


- ashlar - 2009-05-27

BrokenCodes Wrote:yes...
I also have a web browser API using Awesomium, or Firefox, accessible through python, and a few other goodies, been waiting till I have time to fix some of the issues, before posting patches...

Problem I have with the Accelerated codecs is that I can only overlay 2 colors...


I'm trying to overcome this, but its working flawlessly.

ATI 45XX HD works, as well as GeForce 9800 GT, MKV playback 1080p, with 4% CPU usage is nice, but having a crappy overlay for the controller, and having the volume bar / position bar destroy the section of the screen they are on is a bit annoying...
Shocked GREAT! Many thanks for the time you're putting in this. I guess by now you know fully well how much the community would appreciate success in this area.
It's fundamental for VC-1 content, as in that case FFMPEG is still single threaded.


- Blade_0815 - 2009-05-27

Shocked
Nod
I only registered to say:

aboslutely awesomy news!

can't wait for installing on my ION Windows 7 Machine!! Cool

gogogogo!

also thanks to all other xbmc developers...


- ashlar - 2009-05-28

BrokenCodes, would you mind giving us... hourly updates? Wink

Joking of course but... please, do keep us updated on progress. This has been a long time coming. By the way, I'd personally appreciate some sort of explanation of the exact procedure you're adopting to make it work.

I think it goes in a direction that I theorized when reasoning "by myself" but I'm no programmer and would like to better understand.