Developing Games on Intel Graphics
If you are gaming on graphics integrated in your Intel Processor, this is the place for you! Find answers to your questions or post your issues with PC games
486 Discussions

Using Hardware Acceleration for Video Decoding in C++ with IPP on Intel's ATOM in connection with IEGD

Detlev_Petersen
Beginner
905 Views
Dear reader,

in our own video decoder software we use the IPP to decode simple CIF videos with 352x288 as resolution.

On our target this video format is scaled to fill the complete LCD aera with 800x600 as resolution.

Our customer is not happy about the video quality. Indeed VLC manages it to show the same video better than our own software using the latest IPP.

We analysed that deinterlacing and hardware overlay support cannot be the difference between our software and VLC. We supposed that VLC uses another YUV format and other scaling functions for their better video decoding result.

We do not know if we are using all features of the ATOM's hardware video decoding acceleration, but it is sure, that it is possible, to get a better decoding quality. At the moment we do not know how we can reach the same quality as VLC has it.

VLC needs a bigger amount of the system's performance to decode videos. Most of the system's load for VLC are in kernel mode. I suppose that VLC uses special driver calls of Intel's hardware to ensure the best video decoding quality even in spite of other parallel processes in user mode.

How can we configure video decoding of MPEG2 in different YUV formats by using the IPP and does this have any influence on the ATOM's scaling functions?

Is it possible to use Intel standard drivers or special IPP functions to shift copying of decoded frames from the renderer to the graphics device from user level to kernel level during execution?

With help of the IPP support I got the informations that the IPP itself does not provide any special functions to use acceleration features of the IEGD driver.

Are there any known tricks how to see if all hardware acceleration features of Intel's ATOM are active and how it is possible to use them with the IPP?

How can we get such special support to use all features of our given hardware and software libraries in the best way?

Best regards
Detlev
0 Kudos
8 Replies
Stephen_H_Intel
Employee
905 Views
Hi Detlev

Let me know what system exactly you are using and I will try to find out how to enable the hardware decoder. If you can post a DXDiag output that will be fine if you are running windows, or something equivalent if you are on Linux.

The first thing I notice is that the aspect ratio of the video is not the same as the aspect ratio of the display you are rendering it to. If you are just stretching the image to fit the screen, this may cause artefacts in the final image. I imagine VLC is taking this into account as it presents its frame data.Is it possible to render to a smaller area of the screen which is 704x576 (double the original size) and see if the quality improves?


Regards

Steve
0 Kudos
Detlev_Petersen
Beginner
905 Views
Hi Steve,

I thank you very much for your response.

Here are some more facts about our environment:

- Q7 ATOM module with 1.1 GHZ and 1.6GHz
- C++ MS Studio 2008
- IPP 7-0-1
- OS is XPe

I don't see any quality differences if the videois shown in its original size of 352x288 on the screen. I quess that the scaling makes the difference. We suppose that VLC uses another YUV format and other scaling functions.

A D1 video with 720x576 has a better quality on the screen. Nevertheless VLC manages it to show it in better quality slightly. For example the video shows a logo "CCL" and we can see 4 little noses which are not there if VLC decodes it. On the other hand quality differences can be found on text output as part of the video.

Our player software does something like DXDiag.exe at start-up and logs some characteristics of the used graphic device interface:

2011-06-09 20:06:10:000 I _T("CPU: Processor supports 64 bit extension (24), frequency 1097 MHz, cache size 512 bytes, features MMX, SSE, SSE2, SSE3, SSSE3, MOVBE, ")

2011-06-09 20:06:10:000 I _T("DirectDraw Caps: Monitor 0, display, Primary Display Driver, valid 1")
2011-06-09 20:06:10:000 I _T("\t\t HasOverlay 1")
2011-06-09 20:06:10:000 I _T("\t\t HasOverlayFourCC 1")
2011-06-09 20:06:10:000 I _T("\t\t CanDeinterlace 1")
2011-06-09 20:06:10:000 I _T("\t\t HasColorKey 1")
2011-06-09 20:06:10:000 I _T("\t\t CanStretch 1")
2011-06-09 20:06:10:000 I _T("\t\t CanBltStretchN 1")
2011-06-09 20:06:10:000 I _T("\t\t CanBltStretchX 1")
2011-06-09 20:06:10:000 I _T("\t\t CanBltFourcc 1")
2011-06-09 20:06:10:000 I _T("\t\t AlignBoundarySrc 0, 0")
2011-06-09 20:06:10:000 I _T("\t\t AlignBoundaryDest 0, 0")
2011-06-09 20:06:10:000 I _T("\t\t AlignSizeSrc 0, 0")
2011-06-09 20:06:10:000 I _T("\t\t AlignSizeDest 0, 0")
2011-06-09 20:06:10:000 I _T("DirectDraw Caps: Monitor 1, \\.\DISPLAY1, Intel Corporation US15 Embedded Graphics Chipset Function 0, valid 1")
2011-06-09 20:06:10:000 I _T("\t\t HasOverlay 1")
2011-06-09 20:06:10:000 I _T("\t\t HasOverlayFourCC 1")
2011-06-09 20:06:10:000 I _T("\t\t CanDeinterlace 1")
2011-06-09 20:06:10:000 I _T("\t\t HasColorKey 1")
2011-06-09 20:06:10:000 I _T("\t\t CanStretch 1")
2011-06-09 20:06:10:000 I _T("\t\t CanBltStretchN 1")
2011-06-09 20:06:10:000 I _T("\t\t CanBltStretchX 1")
2011-06-09 20:06:10:000 I _T("\t\t CanBltFourcc 1")
2011-06-09 20:06:10:000 I _T("\t\t AlignBoundarySrc 0, 0")
2011-06-09 20:06:10:000 I _T("\t\t AlignBoundaryDest 0, 0")
2011-06-09 20:06:10:000 I _T("\t\t AlignSizeSrc 0, 0")
2011-06-09 20:06:10:000 I _T("\t\t AlignSizeDest 0, 0")
2011-06-09 20:06:10:000 I _T("DirectDraw Caps: Monitor 2, \\.\DISPLAY2, Intel Corporation US15 Embedded Graphics Chipset Function 0, valid 1")
2011-06-09 20:06:10:000 I _T("\t\t HasOverlay 1")
2011-06-09 20:06:10:000 I _T("\t\t HasOverlayFourCC 1")
2011-06-09 20:06:10:000 I _T("\t\t CanDeinterlace 1")
2011-06-09 20:06:10:000 I _T("\t\t HasColorKey 1")
2011-06-09 20:06:10:000 I _T("\t\t CanStretch 1")
2011-06-09 20:06:10:000 I _T("\t\t CanBltStretchN 1")
2011-06-09 20:06:10:000 I _T("\t\t CanBltStretchX 1")
2011-06-09 20:06:10:000 I _T("\t\t CanBltFourcc 1")
2011-06-09 20:06:10:000 I _T("\t\t AlignBoundarySrc 0, 0")
2011-06-09 20:06:10:000 I _T("\t\t AlignBoundaryDest 0, 0")
2011-06-09 20:06:10:000 I _T("\t\t AlignSizeSrc 0, 0")
2011-06-09 20:06:10:000 I _T("\t\t AlignSizeDest 0, 0")

Best regards
Detlev

0 Kudos
Detlev_Petersen
Beginner
905 Views
Hi Steve,

one interesting response I got from the IPP premium support. See the following point 3. I talked with our devolper then. He said that we are using hardware accelerated scaling. Our platfrom has not enough speed to do scaling by software. It can be that the IPP support shows us a way to get a better scaling result. But our problem is that we have to do it with the help of the hardware. So the solution can be the knowledge how to activate better scaling functions with direct hardware support


3) Regarding the software decoder quality itself.

You mentioned," We analyzed that deinterlacing and hardware overlay support cannot be the difference", so the problem mainly are YUV format and scaling function.

Could you tell what scaling function/deinterlacing and YUV format are you using????

If IPP scaling function and deinterlacing function, IPP experts recommended that the best quality for 352x288 -> 800x600 will be achieved with ippiResizeSqrPixel with Lanczos interpolation mode instead of NN

or use ippiDeinterlaceFilterCAVT or ippiDeinterlaceMotionAdaptive instead of ippiDeinterlaceFilterTriangle.

YUV format, it call IPP color conversion function to produce what you expected. For example, YUV420->YUV422, ippiYCbCr420ToYCbCr422_8u_P3R

Best regards
Detlev

0 Kudos
Stephen_H_Intel
Employee
905 Views
Hi Detlev

So if you are definately using a HW decoder the next question are: what OS are you using? What is the driver ID number?

Steve
0 Kudos
Detlev_Petersen
Beginner
905 Views
Hi Steve,

we are using XP embedded as OS and IEGD 10.3 as driver for the graphics device.

Best regards
Detlev
0 Kudos
Detlev_Petersen
Beginner
905 Views
Hi Steve,

as driver we use the IEGD 10.3 for the ATOM US15W chipset. Driver iegdmini.sys has the version 6.14.1.1550. It is the Intel EGMD or Embedded Graphics Miniport Driver.

YUV conversion is done by IPP functions on demand. Deinterlacing is done by IPP functions.

As color format we use UYVY at the moment. The simple MS function IDirectDrawSurface7::Blt() is used to show video frames. This Blt() function does the scaling from 352x288 to 800x600.

http://msdn.microsoft.com/en-us/library/gg426181%28v=vs.85%29.aspx

With regard to VLC I can say that VLC uses hardware overlay and acceleration on our hardware platform. Even conversion from YUV to RGB is activated. Deinterlacing is set on blend mode. To see a video on the screen DirectX output must be activated in VLC's preferences for video decoding.

So the hardware and the OS should support various hardware accelerated functions. VLC manages it to show a better scaling result of the SIF video on the 800x600 screen.

Nevertheless VLC consumes a lot the system's performance in kernel instead of Windows' user mode. For example VLC needs 20% of the system's performance and 15% of the 20% runs in kernel mode. Our player with the IPP needs 15% of the system's performance and a maximum of 3% are in kernel mode. I guess VLC does a lot with the graphics driver in a direct way.

Best regards
Detlev

0 Kudos
Detlev_Petersen
Beginner
905 Views
Hi Steve,

in addition to previous mail I have further version informations of our driver for you.

As driver we use the IEGD 10.3 for the ATOM US15W chipset. Driver iegdmini.sys has the version 6.14.1.1550. It is the Intel EGMD or Embedded Graphics Miniport Driver.

Best regards
Detlev

0 Kudos
Detlev_Petersen
Beginner
905 Views
Hi Steve,

I got further informations from Ying and Rob. They give me some hints from Intel's EMGD team. I will try to get more informations from Intel's embedded site.

Best regards
Detlev
0 Kudos
Reply