ffmpeg (mplayerc) h.264/VC1 GPGPU decoding found
#1
Forward:
As a long time XBMC user and advocate, I would like to thank all the XBMC developers for the hard work and dedication. The following is something I found out there, that some of 'us' in the Windows thread MAY want to look at. This code will most likely NEVER make it into the XBMC trunk. This is just something to look at, and in no way does this constitute anything more than a thought. If this idea would take more than 10 min it should be dropped.

Subject:
What if I told you that there is an ffmpeg compatible GPGPU h.264/VC1 decoding library in the wild today?

While doing research into hardware based codecs that are not part of WinDVD/PowerDVD I found out that the Media Player Classic fork, MPC - Homecinema has hardware based h.264/VC1 decoding. Now this is based on ffmpeg, as 'we' are, so I thought I would go digging. The code in question was 'borrowed' from the MplayerC project, according to the GPL in the header files.

The good news is that is works on anything with programmable shaders, so the Radeon HD and newer NVidia graphics cards will work with this no problem.

The bad news is that the code is alpha, and windows only. It is based on the DXVA slandered so Linux and Mac are out of luck, and as 'we' are OpenGL, I don't know if we could even think about 'playing nice' with this code.

If this is a bad idea and should drop it, I will shut up and even kill the posting, if necessary. If I have insulted anyone or step out of line, I apologize.

Sources:
http://en.wikipedia.org/wiki/Unified_Video_Decoder
http://en.wikipedia.org/wiki/DirectX_Video_Acceleration
http://mpc-hc.sourceforge.net/DXVASupport.html
http://mpc-hc.svn.sourceforge.net/viewvc...cvideodec/
XBMC user since before that Music db hack.
Now with his 2nd DMCA Takedown
#2
It looks like this is some kind of wrapper library, and not that compatible.
And from the date over at doom9 it looks like this has been going on a while.

Blush I'm an idiot, never mind.
http://forum.doom9.org/showthread.php?t=123537
XBMC user since before that Music db hack.
Now with his 2nd DMCA Takedown
#3
Thumbs Up 
NerdAnd what then? Do u think that this library could be used with XBMC windows?? GPU based acceleration is really a 'must have' into XBMC. I hope that to have this feature could be on top list of new objectives for XBMC developers...

kind regards, Laugh
#4
Very interesting.. Maybe one of the developers could give us some more clarity on how to implement this in the windows version? Maybe it's possible to create 2 dll's based which will be chosen on architecture...
#5
There are already several h.264 dll's spotted in the developers tree on trac. The question is when it will be public.
#6
Louike Wrote:There are already several h.264 dll's spotted in the developers tree on trac. The question is when it will be public.

To quote ID

" When it's done"

Smile
#7
Louike Wrote:There are already several h.264 dll's spotted in the developers tree on trac. The question is when it will be public.

That would be fantastic.. I was on the verge of replacing my xbmc box with an NMT appliance... I still think that xbmc is the best multimedia frontend by far! so I bought a 780g chipset to replace my xbox1 and was a bit dissapointed in HD video playback under xbmc-win/lin.

I think i'm gonna wait little while longer now.. Hope there will be a beta with HW Acceleration soon!
#8
This might be one of those situations where the devs say, "ask someone else." My understanding is that the XBMC devs don't play around much with the actual ffmpeg codec work; they simply borrow from the main branch of that project. Your best hope would be to get the ffmpeg devs to implement a DirectX version of their software and hope that the XBMC devs could then implement it.
#9
natethomas Wrote:This might be one of those situations where the devs say, "ask someone else." My understanding is that the XBMC devs don't play around much with the actual ffmpeg codec work; they simply borrow from the main branch of that project. Your best hope would be to get the ffmpeg devs to implement a DirectX version of their software and hope that the XBMC devs could then implement it.

Did you actually read this thread or don't i understand you? There's a branch of ffmpeg with hardware decoding out there.

video playing is one of the core functionalities from xbmc.. It would be madness to completely ignore the fact that there is a core component which can be improved a lot.
If this means you have to make a small sidestep, what's wrong with that? Creativity and flexibility is what made XBMC an outstanding player in the first place, why lose it now?
#10
us1111 Wrote:I think i'm gonna wait little while longer now.. Hope there will be a beta with HW Acceleration soon!
I think you'd be better off by investing in a more powerful CPU and forget about HW acceleration.
#11
I think it was a combination of both. The devs of XBMC only use the main fork of ffmpeg, but I also wrote under the impression that the video decoding library in question was an extreme alpha offshoot. That may not be the case.

Anyway, I'm still probably going to have to agree with Ashlar on this one. Implementing a directX video player in an OpenGL system sounds like a real pain. And converting the existing Windows XBMC all the way over to DirectX would likely be a ton of coding.

Of course, I'm not a dev, so maybe I'll shut up and let one of them discuss it.
#12
ashlar Wrote:I think you'd be better off by investing in a more powerful CPU and forget about HW acceleration.

Yeah that would probably be the way of the least resistance... If that is however the way things should go, you're better of buying a popcorn on which the core functionality (playing video's) is done..

I would however be very sad to have to give up my XBMC's (2 xbox'es and 1 PC) because of lack of improvement to the decoding part in this area.
The consensus at the moment is to create GPU based hardware to offload the CPU. Everyone is moving towards this direction, except...

However this also should also imply that ffmpeg would branch in 2 directions.. The platform independent dual core based decoder and the hardware optimized one.. We'll see what the xbmc team will do in this regard.
#13
The code in question was offered by the developers of ffmpeg for backporting into the main codebase. The code was REJECTED by ffmpeg for not being cross platform.

Hence why it won't make it into XBMC. No
XBMC user since before that Music db hack.
Now with his 2nd DMCA Takedown
#14
Bad news then... let's hope that anyone can share here his implementation to make it work with windows, even if it's not official...

regards,
#15
us1111 Wrote:Yeah that would probably be the way of the least resistance... If that is however the way things should go, you're better of buying a popcorn on which the core functionality (playing video's) is done.
Go use a popcorn hour and come back. The user interface is sluggish to say the least. Not even speaking about functionality.
Quote:The consensus at the moment is to create GPU based hardware to offload the CPU. Everyone is moving towards this direction, except...
The consensus by whom? I, for once, I've never encountered a file that I wasn't able to play with software based decoding, while finding plenty of files that were not decodable by the hardware decoders.

Logout Mark Read Team Forum Stats Members Help
ffmpeg (mplayerc) h.264/VC1 GPGPU decoding found2