Intel Clear Video™ and H.264/AVC

By Eric Sardella (Intel) (10 posts) on March 15, 2009 at 8:19 am

 

As I mentioned in my last blog post, I've been working on getting H.264/AVC acceleration enabled.  This project was started by a post by one of the community members:

http://software.intel.com/en-us/forums/developing-software-for-visual-computing/topic/60703/page/1/

 

Over the last month, "casimier666" and I have been adding the acceleration code to Media Player Classic - Home Cinema.  Its been quite an education for me, and I owe much thanks to him for his help throughout the process.    I am happy to say that as of today, the player can now use the Intel Clear Video™ hardware to offload the processing to the hardware!

 

The code has been checked into sourceforge here: http://mpc-hc.svn.sourceforge.net/viewvc/mpc-hc/trunk/.

While it can play most clips we through at it - there are still a few that it can not.  Video clips with multiple slices per frame still have some corruption, but we are working on it and will update the code base when its fixed.   

 

I wanted to let you all know what the next steps are for this project.  I am currently writing a whitepaper that goes over the unique aspects of the DXVA2 interface on the G45.  It will contain some sample code and a bit of tutorial information on how DXVA2 works.  If you have suggestions on what should be in the paper, please drop me a note.

 

The following is a preview of the information in the paper:

 

  - Intel Clear Video™ for the G45 supports VLD mode acceleration for H.264/AVC content via the following GUID:

        DXVADDI_Intel_ModeH264_E: {604F8E68-4951-4c54-88FE-ABD25C15B3D6} 

 

While there are additional modes of acceleration available,  we are not going to focus on them.  VLD mode is an end-to-end  acceleration path that yields the best performance - and it’s the easiest to enable. 

 

One of the key enabling items for the G45 is when dealing with slices in the content.    The G45 chipset requires that the host send down the slice data in the DXVA_Slice_H264_Long structure, and does not support the DXVA_Slice_H264_Short version.   

 

The DXVA_Slice_H264_Long structure is where "casimier666" and I spent the most time working to get correct.  This mode of operation requires the host application to keep track of the reference pictures in the decoded picture buffer, and then send the correct references so that the hardware will decode the picture.  The host controls the management of the list, with short and long term pictures being added/removed via commands in the bit stream itself.     I don’t have much experience with the short structure - but I bet its easier then the long version!

 

Another challenge with the DXVA_Slice_H264_Long structure is the management of the offsets into the slice data.  The long version requires that each slice pass the "SliceBytesInBuffer", and the "BitOffSetToSliceData".  These offsets can be calculated as the bitstream gets parsed.  There's a few special rules that the host must be aware of when setting the offsets.  I'll go over more of those in the whitepaper.

 

This project has been a great example of the community members and us at Intel working together to do something great.  If you would like to contribute to this effort, download the code and check it out!

I'll make sure to update everyone when the paper is done, and the code is 100%.

Thanks for Reading!

Eric

Categories: Visual Computing

Comments (23)

March 15, 2009 3:08 PM PDT


Rune
Eric i will just use this oppertunity to thank you alot for helping out "Casimir666" with his fight to get dxva working on the G45 chipset.

Thank you

Also do you plan to give out any info regarding VC1 dxva in the future ?

Regards
Rune
Norway
March 17, 2009 3:21 PM PDT

Eric Sardella (Intel)
Eric Sardella (Intel)Total Points:
2,162
Status Points:
1,662
Brown Belt
Hi Rune,

Thanks for the comment. Yes, I'll be working on VC1/dxva next
March 18, 2009 8:14 AM PDT


Norbert A.
Thank you very much for finally impementing this promised feature. Will this Version of MPC HC work on XP, Vista and Win7? Do you need special drivers or just the normal ones?

In a quick test this didn't work for me on XP SP3 32bit with newest Intel drivers 6.14.10.5039 and MPC HC SVN 1010 + Beliyaal Fixes Ver 18.

DXVA Checker only reports MPEG2/WMV9/VC1 functionality, not "ModeH264_VLD_NoFGT".

Any help would be highly appreciated.
March 18, 2009 10:20 AM PDT

Eric Sardella (Intel)
Eric Sardella (Intel)Total Points:
2,162
Status Points:
1,662
Brown Belt
Only DVXA2 is implmented - so its Vista specific. I haven't seen the code for DXVA Checker, but I am not surprised about it not reporting the support. Intel uses a unique GUID to report its support for the format.
March 18, 2009 11:30 AM PDT


Norbert A.
Thanks for your quick reply. This is bad news. :-/

Are there future plans to implement DXVA1 as well? I think this feature is most important for (Sub-)Notebooks with a small CPU, and very many of those are still running XP because it's not such a heavy resource eater as Vista.
March 20, 2009 1:33 PM PDT


D.
It's excellent to see Intel working with the community, and hopefully this pain from nonstandard interfaces will filter back to the hardware designers for the next cycle.

Are there any prelim benchmarks for CPU % & total wattage before/after? Should we hold off on those comparisons?

I'd also like DXVA1, since I expect to use XP for the next year or two.
March 20, 2009 2:11 PM PDT


D.
(one more):

And will this work with GN40 as well?
March 24, 2009 12:25 AM PDT

shichen_1223yahoo.com.cn
shichen_1223yahoo.com.cnTotal Points:
10
Registered User
Hi Eric
I want to know if the DMA 500 work with DXVA, from the paper we know it can decode H.264 and WMV and MPEG in a hard way,but I don't know exactly how to full use it's function in my program
April 7, 2009 12:47 AM PDT


Heather
Hey how about the GM45 Cantiga chipsets with the integrated GMA 4500MHD? They seem to have the same capabilities sets for both VC-1 and H.264 as the G45 whch you guys are adding support for.

It would be a nice low power consumption portable media player, when you're of course in the middle of your nowher, you ran out of "work" and want pop in a good HD quality TV or something in that format.

Please don't tell me the mobile integrated graphics are further crippled:(
April 7, 2009 11:20 AM PDT

Eric Sardella (Intel)
Eric Sardella (Intel)Total Points:
2,162
Status Points:
1,662
Brown Belt
Hi All.. Sorry for the delayed response. I was at GDC last week kicking off the Level Up 2009 Game Demo Contest, and I’ve been playing catch up for days now. I’ll try to answer a few of the open questions:

Regarding DXVA1: No, I will not be doing any work with MPC to get DXVA1 coded. The driver requires the EVR renderer, which means DXVA2, and thus Vista. Sorry – I know it’s a bummer for some of you.

The GN40 is an Atom based chipset, so it’s totally different then the integrated graphics chipset that this discussion is focused on. That platform has its own acceleration capabilities, driver support, etc

Forgive me, but I don’t know what the “DMA 500” is. Perhaps a bit more information will help me answer your question.

Finally, YES – it works with GM45 Cantiga chipsets. In fact, that’s what I developed the support on.. No crippling here :)

Thanks for the questions.

Eric
April 8, 2009 2:29 AM PDT

shichen_1223yahoo.com.cn
shichen_1223yahoo.com.cnTotal Points:
10
Registered User
Hi
sorry, I mean GMA500, in the chipset names "Intel system control hub us15w". it is also an Atom based chipset.
I have another 2 questions, can we enable DXVA in a linux OS? like moblin etc. if we develop the application under windows, which SDK do we need?
Thanks.
April 12, 2009 9:00 AM PDT


Aaron Brezenski
You can get EVR on XP (.NET Framework 3.0 or Service Pack 3), but I seem to recall hearing it's buggy.

Eric, I think the GN40 is a Cantiga variant, but I'm not certain. Unless the DXVA solution is heavily CPU-dependent, it should work the same.

GMA500 is Poulsbo (mixed NB/SB for Atom). It's architecturally very different from Intel's other chipsets and it's allegedly able to decode up to 720p/1080i (no 1080p) in hardware, but I haven't seen

DXVA is a windows standard. The Linux equivalent would be XvMC or possibly something newer like VA-API, which is supposedly supported by GMA500 already (http://www.phoronix.com/scan.php?page=article&item=xorg_vaapi_mplayer&num=1).
April 13, 2009 8:33 PM PDT


Wakey
I'd like to know if it will support GMA X3100 in the future, I believe that X3100 also supports Clear Video.
April 20, 2009 11:54 AM PDT

pacuro
pacuroTotal Points:
5
Registered User
Hi All!
When I was buying motherboard on G45 to build htpc I thought hw dxva acceleration shall work on XP.
Eric you can have EVR on XP when .net 3.0 installed. Could you try to implement hw dxva under XP?
Without it there is no difference between my mobo and other older Intel chipsets.
I do not want to upgrade to Vista. I do not want to change for integrated NV9300.
If nothing changes I will be forced to leave g45 :(
May 22, 2009 1:26 PM PDT


mdstoner
This is awesome! You deserve a medal... Thanks!
June 11, 2009 2:20 PM PDT


Luc
> Thanks for the comment. Yes, I'll be working on VC1/dxva next

Any updates on VC-1 support for GMA500 support? Many people would love to be able to playback WMVHD...
I have not come across any drivers yet unfortunately.
July 21, 2009 12:07 AM PDT


LCP
Hi,

It's been a while, has the H.264/AVC multi-slice support been worked on yet? I have been following the MPC-HC releases but did not see any updated version with multi-slice support. It is rather annoying to suddenly find a video file, in the midst of a group of similar files) that won't play properly and have to resort to settings change just to re-enable software decoding.

Also, does the code works on both the x86 and 64-bit MPC-HC versions?

Thanks.
July 21, 2009 12:44 PM PDT


qqq
Second the question for multi-slice support. This blog is closest to the "action" where it is happening.
August 12, 2009 9:45 AM PDT

Eric Sardella (Intel)
Eric Sardella (Intel)Total Points:
2,162
Status Points:
1,662
Brown Belt
I just got multislice working yesterday and sent the fix (procedure) to Casimir. I have not recieved a reply as of this morning.

If you have the code...
In DecodeFrame, the pSliceLong.RefList[][] entries for Slice 1 - X did not match the entries in Slice 0. Simply copy the pSliceLong.RefList[][0] to pSliceLong.RefList[][1-x] when nSlices > 1. That should do it.

The fix might still need some tuning, but I am seeing pictures which is good
August 27, 2009 6:25 AM PDT


guosongyou
Hi, Eric
Could it work on G43/G41 variants?
It seems I have no luck to get it working on my G43 mobo.
August 28, 2009 8:42 PM PDT


LCP
I believe the multislice AVC is working now on MPC-HC build 1247 onwards, I am also seeing pictures where previously there was just some broken up picture. Thanks!
September 29, 2009 6:05 PM PDT


Ganesh
Eric, Thanks to you and casimier66 for implementing DXVA for H264 on the Intel 4500MHD using MPC-HC.

I was pleasantly surprised by the capability of the 4500MHD and how it even outperformed my ATI 3450 : http://twitter.com/ganeshts/status/4483070522

I look forward to getting VC-1 acceleration soon on MPC-HC using the 4500MHD (with your inputs, obviously!)
October 21, 2009 1:38 AM PDT

gowthamhk
gowthamhkTotal Points:
95
Status Points:
45
Green Belt
Hi Eric,

Off the topic but related, what about MPEG2 DXVA? For that also separate GUID? I appreciate any info (references if already present) on MPEG2 DXVA on Intel boards.

Thanks

Trackbacks (0)


Leave a comment  

To obtain technical support, please go to Software Support.
Name (required)*

Email (required; will not be displayed on this page)*

Your URL (optional)


Comment*