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.

Availability of pure hw decoding session

youaresoomeangooglem
454 Views

Hi,

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!

 

regards,

Stephan

 

0 Kudos
5 Replies
Anthony_P_Intel
Employee
454 Views

Hi,

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.

0 Kudos
youaresoomeangooglem
454 Views

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

 

0 Kudos
Anthony_P_Intel
Employee
454 Views

Hi,

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.

0 Kudos
youaresoomeangooglem
454 Views

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..

 

--

Stephan

 

0 Kudos
Anthony_P_Intel
Employee
454 Views

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.

0 Kudos
Reply