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


- ashlar - 2009-03-11

phi2039 Wrote:One last point of note, since we have ventured completely off topic here, is that 'Windows' is not just one OS. XP and Vista (and now Win7) have significant differences, particularly in their handling of graphics and sound. This means that we are effectively developing on 2 (3) different platforms and must take all of the inconsistencies into account. I would love to use the new API's introduced in Vista, but the would leave XP users in the cold.
I'm glad you mention this, as I think it's a major hurdle to overcome, especially in a situation where developers are a rare commodity.

I would strongly favour a decision to stick to one supported OS. I'm using XP SP3, but if you really believe Vista minimum would make your life easier... why not? Again, there are few Win developers, to have them spread their precious time on multiple OSes is really not the right thing to do.

I suppose for all multimedia purposes Vista will be compatible with Windows 7. If that would not be the case... then it's an even tougher choice. But I seem to remember that the new foundations were all layed out on Vista.

BTW, my long time prediction is that Windows will sooner or later fork to a different "thing". Something like Plex, DirectX based and everything. The audio-video side with SDL seems to be a pain for everybody, unfortunately (due to OpenGL and DirectX implementation problems, not our XBMC developers).


- natethomas - 2009-03-11

I'm actually a huge fan of leaving the XP users in the cold, if we are talking about GPU acceleration. At least, in the future. The only theoretical way to get full GPU acceleration in Windows is to take advantage of DXVA2.0, which is only available with the modern display drivers of Vista and 7.0.

Now don't get me wrong, maintaining XBMC across all platforms of Windows is of huge importance, but there is no actual nor theoretical way to use full GPU acceleration in XP with currently accessible APIs. That's just a cold, hard fact. XP can still run XBMC using CPU processing and would still be able to in the future.

But any serious discussion of GPU acceleration at this point must take into account that Vista and 7.0 are the only currently available methods, even if those methods are insanely tricky.


- ashlar - 2009-03-11

Huh I'm getting hardware decoding of h.264 streams under XP. What is this thing you are talking about? I'm all for leaving XP behind for a real purpose, but h.264 and VC-1 are accelerated under XP as well.


- Livin - 2009-03-11

phi2039 Wrote:Well, as ONE of TWO (maybe 3) Windows devs who are working on YOUR behalf to improve the performance of XBMC on Windows, I would suggest you consider your audience before posting a critical reply in the forum. You highlight yet another reason why it is difficult to find anyone willing to contribute their time to resolving Windows issues in XBMC: arrogant users. Seeing as how I have actually spent many hours working on solutions to issues caused by the excellent system facilities you referenced (e.g. DirectX), I would be very open to looking at YOUR patches for the outstanding sound problems being experienced by other users.

Congratulations, you have given me one more good reason to consider focusing my development efforts solely on Linux, OSX, and XBox...and I am sure the rest of the Windows user community will thank you for it.

my post was not critical in ANY way of XBMC or the developers... it was actually critical of the posters complaining. It defended the XBMC devs stating there are trade-offs when supporting multiple platforms at one time, with a single code trunk, and they should just be happy they have a branch for the OS they want to run. I know it was wordy in the original post, sorry.

Don't jump ship to the Xs, as XBMC grows in popularity the windows userbase, and hopefully developer base, will also grow... as I pointed out in my post, it is the #1 used desktop in the world by a margin of 98 to 2.


- natethomas - 2009-03-11

ashlar Wrote:Huh I'm getting hardware decoding of h.264 streams under XP. What is this thing you are talking about? I'm all for leaving XP behind for a real purpose, but h.264 and VC-1 are accelerated under XP as well.

Before we get into an argument, let's quickly define some terms.

There are multiple methods of GPU decoding.

NVidia has a proprietary version called PureVideo.

Windows has an alternative version called DXVA.

Additionally, there is a theoretically less effective method available using CUDA.

There may be other forms that I am not conversant with.

PureVideo cannot be accessed unless you have signed an agreement with NVIDIA.

CUDA is still in very early use and may never equal the pure performance ability of the already designed options.

Thus, for the moment, we are left with DXVA.

DXVA comes in two types. DXVA1.0 and 2.0. After some additional reading this morning (sorry, I got tired last night), I've come to the conclusion that you are correct. DXVA1.0 can, in fact, do most of the things, accelerator-wise, that 2.0 can do.

The major difference lies in the control of that acceleration. The DXVA 1.0 API can only be used by first accessing the media renderer (aka directshow, in this case). DXVA2 allows us to sidestep directshow and call the API directly. The cool thing about this is the fact that our own ffmpeg decoder could actually (theoretically) call the GPU without having to give up the ghost to a Windows decoder.

As far as I can tell, under XP we'd always be forced to use an external player, just, possibly, less obviously, while under Vista this would not be necessary.


- spiff - 2009-03-11

can you please throw some links in our face, in particular the one that clearified that v1.0 vs 2.0 bit


- davilla - 2009-03-11

It's a simple equation to solve.

Find a developer that is will to spend x weeks/months adding the required bits in a way that is compatible with the current multi-platform source code. Add a few users that are willing to do serious testing. Done.

That's what happened with Linux and VDPAU.

The wrong way to do this is creating arguments as to why the existing XBMC developers should stop what they are working on and re-vector their already limited resources to adding this functionality.


- motd2k - 2009-03-11

There's also the possibility of using a prebuilt XBMCLive to access VDPAU in the future, that might be a reasonable solution, after-all if you want to just 'watch' video on Windows, as you correctly asserted, mp-hc will do it. If you want the UI then you're likely going to be fullscreen, so booting a USB stick to do it isn't the end of world.

That or dive into the code and add it!



motd


- ashlar - 2009-03-11

davilla Wrote:The wrong way to do this is creating arguments as to why the existing XBMC developers should stop what they are working on and re-vector their already limited resources to adding this functionality.
I pray the gods I have not been the one to convey this impression.

Was not aware that DXVA 2.0 could theoretically do away with DirectShow, *that* is promising.

Also, I wouldn't discount CUDA. CoreAVC seems to be getting great performance out of that (I'm a registered user, will download the latest version and report back first hand experience). For reference: http://forum.corecodec.com/viewtopic.php?f=3&t=1724&st=0&sk=t&sd=a

Edit: in reply to the Live thing. You are right motd2k, but doing that takes away one of the best uses of an HTPC with a good wireless keyboard: browsing the net from your couch. Plus gaming, which is another thing you can do if you have a decent machine under your TV. I know it seems to be wanting "all". But we're just talking after all. One can always dream.

And, actually, sometimes I have to remember that, for me, already now XBMC is doing 98% of what I want it to do (save for the plugins that I still have to understand how and if they work under Windows).

Since many developers are here... what about the external player thing? Do you think all moby-uk work could be brought back to SVN?


- natethomas - 2009-03-11

spiff Wrote:can you please throw some links in our face, in particular the one that clearified that v1.0 vs 2.0 bit

Sure thing. The primary one comes directly from MSDN

http://msdn.microsoft.com/en-us/library/cc307941(VS.85).aspx

I am merely relaying what I've understood from this page. I personally don't have a coding background, so, as always, it's entirely possible that I've completely misunderstood what's going on.

The one thing I didn't really understand from this page, or from the Wiki on it, is Media Foundation. I can't figure out if that's the sole means of calling the API, if it is a video renderer itself, or what.

http://en.wikipedia.org/wiki/Media_Foundation

Regardless, there is a definite movement away from Directshow going on. I don't know how much of a good thing that is, but it's something.


- natethomas - 2009-03-11

As to motd2k's point..., good point. It may well be, if this whole Nvidia Ion thing blows up like I hope, that everything we are talking about could be a moot point in about 8 months. You have no idea how excited I would be if we could get the next standard equivalent to the original Xbox. No more hassle. No more thinking. Just pop and go.


- Geeba - 2009-03-11

natethomas Wrote:As to motd2k's point..., good point. It may well be, if this whole Nvidia Ion thing blows up like I hope, that everything we are talking about could be a moot point in about 8 months. You have no idea how excited I would be if we could get the next standard equivalent to the original Xbox. No more hassle. No more thinking. Just pop and go.

I hear ya!!!! Big Grin

I was so hoping it would make it to an appliance type platform rather than 1500 different hardware senarios. Oo


- spiff - 2009-03-11

rite. while they have indeed thrown away the need for a dshow chain you can still only render to direct3d/directx surface entities. it's gonna be a bitch to get the data available as a opengl texture (i suspect the drm shite in vista will make sure it's close to impossible). i hope somebody can prove me wrong here but it still looks to be completely tied to the dx framework.


- ArtVandelae - 2009-03-11

spiff Wrote:rite. while they have indeed thrown away the need for a dshow chain you can still only render to direct3d/directx surface entities. it's gonna be a bitch to get the data available as a opengl texture (i suspect the drm shite in vista will make sure it's close to impossible). i hope somebody can prove me wrong here but it still looks to be completely tied to the dx framework.

It can be done and it isn't terribly difficult: you just take a D3D texture or surface with your data, lock it, and pass the data pointer to the OpenGL texture sub image function. It can be quite slow, however, since the copy chain is going from VRAM->System RAM->VRAM.


- SlaveUnit - 2009-03-11

ArtVandelae YOU ARE HIRED! Smile