Graphics
Intel® graphics drivers and software, compatibility, troubleshooting, performance, and optimization
20784 Discussions

QuickSync/MFX encoding performance regression

Henry_G_
Beginner
850 Views

Hello,

We use the Intel MFX h.264 encoder to support the Steam In-Home Streaming feature (along with other GPU hardware encoders, when available). We've noticed a severe performance regression with the new 15.40 series of drivers on older 4th gen chips, and we believe that this is due to contention with other Direct3D applications.

The way that our streaming and broadcasting features work is that a game (for example, The Witcher 3) runs in a normal fullscreen or windowed mode, and we read back the frame buffer from the Direct3D device via our own code injection. We transfer each frame across processes through the use of shared memory, do further processing on the software image, and then perform h.264 encoding in the Steam.exe process, all asynchronous to the game.

Crucially, this means that the process doing the MFX h.264 video encode (Steam.exe) is using only system memory buffers, not Direct3D textures, and runs a different process than the game which is performing Direct3D rendering.

On our test system (i7-4770R @ 3.2ghz, Iris Pro 5200), under the original Windows 10 drivers, we are seeing great performance - the encoding time is always under 12 milliseconds and has very little impact on the game's framerate.

When that same system is updated to either the latest public or beta drivers, we see a highly variable encode time that can goes as high as 120 milliseconds to process a single frame, and the game framerate is adversely affected. This makes the MFX encoder useless for our purposes.

Additional testing on our part indicates that new 6th gen cores (Intel HD 530) also have the same performance issue unless we set the LowPower flag on the encoder. Setting the LowPower flag restores the behavior we used to see on all chips, which is that there is no interference between MFX encoding and Direct3D performance, and we are doing this now. Performance is fine on our 6th-gen test system. However, the LowPower flag is not supported on 5th or 4th gen chips, and does nothing to help them.

 

We would greatly appreciate if someone from Intel could advise us on how to avoid this performance drop and restore the original performance of the system-memory MFX encode path. I can be reached at henryg [at] valvesoftware [dot] com, if email is a more appropriate contact method.

 

 

0 Kudos
2 Replies
Henry_G_
Beginner
850 Views

And in case it helps -

System Setup Information:
-----------------------------------------

System Used: custom build
CPU SKU: Intel Core i7-4770 @ 3.20 Ghz
GPU SKU: Iris Pro 5200
Graphics Driver Version: 15.40.10.64.4300

OS Version: Windows 10
API: Media SDK MFX Encoder, software input buffer

Steps to Reproduce:
-------------------------------
1. Run a graphically intensive D3D game with heavy texture usage such as The Witcher 3 or GTA V.
2. In another process, submit system-memory frames to a MFX encoder session set to low latency, best speed, no B-frames, small-ish output buffer size (500kb), initialized with HARDWARE_ANY and IMPL_ANY, and record the processing time for each frame of output.
3. Observe extremely high variation in the frame processing time.

Expected Results:
-------------------------------

Frames should be processed in relatively constant time, regardless of D3D usage, and faster than realtime - a single frame should not take more than 15ms to encode. This works correctly on older drivers.

 

Actual Results:
-------------------------------

Individual frames sometimes take over 100ms to encode.

 

0 Kudos
Michael_C_Intel2
Employee
850 Views

Hi Henry,

Thanks for the additional details it does help. I have gotten a ticket filed and am talking to the development team.

-Michael

0 Kudos
Reply