Availability of pure hw decoding session

Availability of pure hw decoding session


is there any way to find out if i am out of hw decoding resources? Neither MFXInit nor any MFXVideoDECODE_ functions return with a

warning or error in my case, while after 8 or 9 sessions (1080p) or 4 sessions (4k) the decoder delivered no more frames.

Ideally i'd like to get an error or warning from MFXInit to switch to software decoding.

Thanks for any hints!





6 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.


Submission of requests to a hardware session are queued and managed by the session, and you will not see your session switch to software decoding based on hardware use.  The overall pipeline is designed to make maximum use of the various hardware resources, including memory.  If ASyncDepth=1, the decoder should always deliver frames when requested.

This should be a fairly common use-case, isn't it? 

Isn't there any straighforward way to query the available hardware resources?
Or how do applications using MFX avoid overloading the HW?

Any hints are highly appreciated!

Thanks alot!
-- Stephan



Transcoding with full HW utilization is very common (as fast as possible without regard for latency).  Playback with minimal HW usage is also very common.  Streaming with low latency, is common for single streams, but managing latency and multiple live streams is less common.

There are many hardware components involved, including many 'shared resources', and the amount there is not a single/simple hardware query.  While queued requests are managed well, there is not a guaranteed completion time.  Also, power/performance policies of hardware can change at any time, so there is not an easy method to know if hardware is going to be too busy to complete full execution at a specific performance level when initializing.

Hi Tony,

so it's complicated ;) Does that mean there's no way to find out if one overloads the gpu? Or what does intel suggest in this case?

I can think of tracking the number of frames in the decoding queues and measuring the decoding times. But for memory, there doesnt seem
to be any API to query the remaining amount of gpu mem. The DX11 docs explicitly state that "it's not possible" to determine the exact amount due to paging etc..





Yes, memory is dynamic, as is the execution speed.  For example, modern Intel graphics processors support dynamic frequency that can range from ~350 MHz to 1.2 GHz.

One suggestion is to sense if a frame is not delivered "soon enough", and once slow performance is sensed switch to Software/CPU (but there is no guarantee that CPU would result in faster performance, as CPU may also be taxed.

I think I understand your question here, and I'll ask some other experts about this usage.

Leave a Comment

Please sign in to add a comment. Not a member? Join today