Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
Announcements
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.

Media SDK 2015 R4 memory leak + performance issues

randy_s_2
Beginner
570 Views

I have run into a couple issues with the Media SDK, specifically around the hardware screen capture.

1.) The Decoder appears to leak memory. If you run the decode sample: 

sample_decode capture -p 22d62c07e672408fbb4cc20ed7a053e4 -h 1080 -w 1920 -r

After 10 minutes the memory usage grows from 10 MB to > 250 MB. I see the same thing in my own application using the media SDK calls directly. If you narrow it down, MFXVideoDECODE_DecodeFrameAsync() seems to be the culprit, if we skip this step and simply output blank frames, we do not have the issue. Please verify this issue.

 

2.) On a Haswell i7-4712HQ, the performance is still not great (was trying a Haswell i5-4250U before). The capture reports 63.7 Hz @ 1920 x 1080 (sufficient framerate if this is true), however the playback is choppy. Visually it looks like ~25 fps, possibly due to inconsistent frame capture intervals. A high speed camera shows a 1-3 frame variance in capture with a frame counter test pattern. Either way the visual appearance is poor. 

You can see the output here, the lower screen is playing the 60Hz video in VLC,  The upper is rendering the captured frame Notice how poor the frame rate is in the light parts of the scene. Download the video, do not watch in your browser player, they can be poor: https://drive.google.com/file/d/0B4f0irN0M8dacXpVLTNKWS1sTms/view?usp=sharing

 

This is what things look like capturing + encoding a 60Hz video on an nVidia K5000 card. This would be my expectation for the Intel Media SDK (again, download the video): https://drive.google.com/file/d/0B4f0irN0M8dacHBWcWVGN3k3MTg/view?usp=sharing

If you would like a more deterministic playback to observe, i.e. a Test pattern/frame counter, let me know.

 

 

3.) When using RGB4, the output indicates that the sample is still YUV420 and looks like a YUV420 frame, based on visual appearance and edge softness, displayed in the D3D renderer based on visual appearance:

C:\Intel Media Samples 6.0.0.49\_bin\x64>sample_decode capture -p 22d62c07e67240
8fbb4cc20ed7a053e4 -h 1080 -w 1920 -r -fourcc rgb4
plugin_loader.h :157 [INFO] Plugin was loaded from GUID
Decoding Sample Version 6.0.0.49


Input video     CAPT
Output format   YUV420
Resolution      1920x1088
Crop X,Y,W,H    0,0,1920,1080
Frame rate      0.00
Memory type             d3d
MediaSDK impl           hw
MediaSDK version        1.13

Decoding started
^Came number:  370, fps: 52.704, fread_fps: 0.000, fwrite_fps: 63.747


System Info:

C:\Program Files\Intel\Intel(R) Media Server Studio 2015 R4\Software Development

 Kit\tools\mediasdk_sys_analyzer>mediasdk_system_analyzer_64.exe
Intel Media SDK System Analyzer (64 bit)


The following versions of Media SDK API are supported by platform/driver:

        Version Target  Supported       Dec     Enc
        1.0     HW      Yes             X       X
        1.0     SW      Yes             X       X
        1.1     HW      Yes             X       X
        1.1     SW      Yes             X       X
        1.3     HW      Yes             X       X
        1.3     SW      Yes             X       X
        1.4     HW      Yes             X       X
        1.4     SW      Yes             X       X
        1.5     HW      Yes             X       X
        1.5     SW      Yes             X       X
        1.6     HW      Yes             X       X
        1.6     SW      Yes             X       X
        1.7     HW      Yes             X       X
        1.7     SW      Yes             X       X
        1.8     HW      Yes             X       X
        1.8     SW      Yes             X       X

Graphics Devices:
        Name                                         Version             State
        Intel(R) HD Graphics 4600                    10.18.14.4112       Active
        NVIDIA Quadro K1100M                         9.18.13.4075        Active <-- reported, but dis

System info:
        CPU:    Intel(R) Core(TM) i7-4712HQ CPU @ 2.30GHz
        OS:     Microsoft Windows 7 Enterprise
        Arch:   64-bit

Installed Media SDK packages (be patient...processing takes some time):

Installed Media SDK DirectShow filters:

Installed Intel Media Foundation Transforms:
  Intel« Hardware VC-1 Decoder MFT : {059A5BAE-5D7A-4C5E-8F7A-BFD57D1D6AAA}
  Intel« Hardware H.264 Decoder MFT : {45E5CE07-5AC7-4509-94E9-62DB27CF8F96}
  Intel« Hardware MPEG-2 Decoder MFT : {CD5BA7FF-9071-40E9-A462-8DC5152B1776}
  Intel« Quick Sync Video H.264 Encoder MFT : {4BE8D3C0-0515-4A37-AD55-E4BAE19AF
471}
  Intel« Hardware Preprocessing MFT : {EE69B504-1CBF-4EA6-8137-BB10F806B014}

 

Analysis complete... [press ENTER]

0 Kudos
3 Replies
Harshdeep_B_Intel
570 Views

Hi,

The Decoder appears to leak memory -> Can you please rerun the command line after updating to latest drivers from here (ver. 4222). We had this bug and was  fixed in latest release. Kindly let me know if you still see this issue after update to latest drivers. 

On a Haswell i7-4712HQ, the performance is still not great-> Can you please confirm if test scenario was run using HW/SW plugin implementation? If it was SW, please use HW (-hw) plugin implementation and you can view gain in performance. Let me know your results.

When using RGB4 -> Can you please try the command line with (-hw) after updating to latest drivers. The latest drivers provide support for (API 1.16). Please confirm if you still see the issue?

Thanks,

0 Kudos
randy_s_2
Beginner
570 Views

Thanks for getting back to me on this Harsh,

I had a look at upgrading the drivers from the link you provided, however I get a message indicating the machine is not supported. Its a Dell Laptop and it looks like dell did some sort of driver customization according to the Intel Update Utility (I get a message saying they are custom drivers), preventing me from installing the lastest drivers. The last drivers Dell has on its site for the M3800 laptop are from March.5. I'm not sure if Intel has influence on Dell to update their drivers, but until I have drivers I can install on the machine it looks like we are at a stand still.

Let me know if there is a way around this.

0 Kudos
Harshdeep_B_Intel
570 Views

Hi Randy,

Thank you providing the system information. We donot have information on dates for oem's custom driver updates. My suggestion as a work around to resolve the issue 1 is to try with latest drivers on your other system: i5-4250U. Let me know after driver update if you still see the issue 1.

Thanks,

0 Kudos
Reply