Community
cancel
Showing results for 
Search instead for 
Did you mean: 
kyviquel
Beginner
127 Views

Performance of the h264 encoder slowly decreasing when using VPP

Hello,

I tried using the sample video encoder (Video Encoding Sample 5.0.461.91752), and whenever VPP is involved, whether it is for converting the image format or for de-interlacing (I had to slightly modify the sample code to do that), the throughput of the encoder is slowly decreasing over time (after 10k+ frames. We have a "real-world" application using this workflow and this bug is definitely a blocker.

I'm seeing it with the latest drivers on the HD4600 on various systems. Is there anything that could be done to circumvent this? Any plan on fixing it?

Thanks! 

0 Kudos
9 Replies
Surbhi_M_Intel
Employee
127 Views

Hi,

Thank you for reporting this, Can you please send us more information about the drivers your system has. It would be great to include more details which are mentioned in this post - https://software.intel.com/en-us/forums/topic/531083 for us to debug this issue better.
I am assuming you are using video memory instead of system memory (help to reduce the extra copy to CPU)- you can check the tutorials here - https://software.intel.com/en-us/media-solutions-portal (download v0.0.3 tutorials).

Thanks,
-Surbhi

kyviquel
Beginner
127 Views

Hello,

Below are more details about the issue. I'm confident you can fairly easily reproduce it. I attached a screenshot taken with ProcessExplorer showing the throughput decreasing (I/O Bytes/seconds written to disk decreasing over time, and CPU increasing and reaching a plateau).

I'd be very interested if there is a workaround... The best solution would be of course a driver update with a fix!

Please tell me if you need anything else that could help.

Thank you!
Regards.

Processor Type: i7 4770 (reproduced the issue on 3 different systems).
Driver Version: Reproduced with the following drivers: 15.33.22.64.3621, 15.36.64.3652  (beta),  15.36.3.64.3907.
                         Not reproduced with the following driver: 15.33.18.64.3496
                         Not reproduced on another system with a HD4000 with any driver.

Operating System: Windows 7 and Windows 8.1

Media SDK System Analyzer: 
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.10.3907       Active
        NVIDIA Quadro FX 5800                        9.18.13.4066        Active

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

Installed Media SDK packages (be patient...processing takes some time):
        Intel« Media SDK Video Processing Sample 5.0.461.91752
        Intel« Media SDK 2014 for Clients (x64)
        Intel« Media SDK Full Transcoding Sample 5.0.461.91752
        Intel« Media SDK Video Encoding Sample 5.0.461.91752
        Intel« Media SDK Video Transcoding Sample 5.0.461.91752
        Intel« Media SDK 2014 R2 for Clients (x64)

Installed Media SDK DirectShow filters:

Installed Intel Media Foundation Transforms:
  Intel« Hardware M-JPEG Decoder MFT : {00C69F81-0524-48C0-A353-4DD9D54F9A6E}
  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-E4BAE19AF471}
  Intel« Hardware Preprocessing MFT : {EE69B504-1CBF-4EA6-8137-BB10F806B014}

Quick Reproducer Code: You can reproduce the issue with the sample code "Video Encoding Sample 5.0.461.91752" by slightly modifying it to use VPP by having an interlaced input and a progressive output or by having YV12 input (which needs to be converted to NV12 for the encoder). I also modified the code to loop forever on the input file as the issue happens after a while. I'll attach the code that is using the deinterlacer, and to run it I use the following command: "h264 -i Inputfile.yuv -o OutputFile.264 -w 1920 -h 1080 -hw -d3d -q balanced -b 25000 -tff".

For the repro steps with a YV12 input, I just remove "-tff" from the command line and hardcode the input format for VPP to YV12 and the output to NV12.

Concise Description of the Issue: When doing a QSV h264 capture involving VPP in the pipeline, the CPU usage is increasing and then, after the CPU usage reaches a plateau, the throughput of the encoding pipeline is slowly decreasing over time.

Priority: High

Input File: You can use any YUV file or NV12 file as the input.

kyviquel
Beginner
127 Views

I forgot to include "sample_utils.cpp" into the attached file. I just modified it to loop forever in the function LoadNextFrame(...).

At line 173 :

        if (w != nBytesRead)
        {
            //return MFX_ERR_MORE_DATA;
            fseek(m_fSource, 0, SEEK_SET);
            LoadNextFrame(pSurface);
        }

Surbhi_M_Intel
Employee
127 Views

Hi there,

Thank you so much for a detailed information. I am able to successfully reproduce the behavior on 15.36.3.64.3907 on a Haswell Machine(Iris Pro Graphics 5200) like you are able to reproduce on i7 4700, and not reproducible on 15.33.18.64.3496 on same machine (as you saw as well). Thank you for finding and reporting this. We will get in touch with the experts and update you as soon as we have more information.

Thanks,
-Surbhi

 

Michael_R_5
Beginner
127 Views

Hi, I'm having a similar problem. We're using the VPP to crop and scale from 1920x1080 to 720x480. Environment: o Haswell 4770 o HD Graphics 4600 o Media SDK hardware mode One of the Media SDK threads starts out using 7% of a core. It increases by about 5% per hour (108,000 frames). After 17 hours, the cpu use reaches 90% and real-time constrains are not met. The problem doesn't happen with these driver versions: o 15.33.64.3496 o 15.33.64.3574 o 15.33.22.64.3621 The problem does happen with these driver versions: o 15.36.3.64.3907 o 15.36.7.64.3960
Surbhi_M_Intel
Employee
127 Views

Hi Michael,

Can you please explain the use case pipeline? Are you encoding+VPP or decoding+VPP?
Also can you let me know the i/p & o/p arguments like cropX, cropY, cropW and cropH ?
It might be a similar issue, but to confirm that i would need these details to reproduce the issue locally. 

Thanks,
-Surbhi

Surbhi_M_Intel
Employee
127 Views

Hi kyviquel,

One of the fix for the issue you have reported could be fixed by my moving to 15.33-3970 driver.You can find it on downloadcenter.intel.com, if not then I can forward it to you. That should solve the purpose for now. In the mean time we are working on 15.36-3960 driver.   

Thanks,
-Surbhi
 

Karine_Y_
Beginner
127 Views

Hi Surbhi,

I'm kyviquel, sorry for the confusion, I changed my account last week .

I checked intel download center and there are no new drivers. I also want to specify that we are waiting on HD4600 platform drivers since we see this issue only on this platform.

I also want to tell you that last week we had a conference call with Jeffrey Mcallister about this issue and he knows what we are waiting for.

thanks

 

 

Surbhi_M_Intel
Employee
127 Views

Hi Karine, 

Yeah I have got looped into the email today. Me and Jeff had a quick sync up regarding the issue you are seeing and we can help you with the latest drivers on 15.33. Will take up the issue and it's solution on the email now.

Thanks,
-Surbhi

Reply