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.

Exception in MFXVideoDECODE_DecodeHeader

Jordan_C_
Beginner
817 Views

I'm using Intel Media SDK API Version 1.17 on Windows 10 x64, Intel Iris Graphics 540 driver version 20.19.15.4352

When trying to decode an AVC stream, I get the following exception when trying to decode the header using MFXVideoDECODE_DecodeHeader

First-chance exception at 0x00007FFB37991F08 in vrd.exe: Microsoft C++ exception: UMC::h264_exception at memory location 0x00000073437FBB40.

The exception is continuable and eventually, after enough data has been read into the bitstream, the function returns successfully.

This exception only occurs when you tell Visual Studio to break on all thrown exceptions.

Is there a way to prevent this exception from being thrown?

0 Kudos
3 Replies
Harshdeep_B_Intel
817 Views

Hi Jordan, 

Media SDK works on a frame by frame basis. For best performance, of the Media SDK decoder is to use it in a asynchronous fashion, and it reads frame until enough frame data is available for decoding and hence exception is raised until enough frame data is available for decoding.  

Can you provide more background on the application you are using to decode AVC stream. Can you please try with sample_decode (https://github.com/Intel-Media-SDK/samples). 

Thanks,

0 Kudos
Jordan_C_
Beginner
817 Views

We are using custom code, not the media samples. Data comes into the decoder either from a file or over the network. Our decoder logic appends this data to a bitstream and calls MFXVideoDECODE_DecodeHeader. I could provide code, but it relies on lots of our custom software, so it wouldn't be easy to reproduce.

Is there some rule about how much data we need to read into a bitstream before MFXVideoDECODE_DecodeHeader will execute successfully without throwing the exception?

0 Kudos
Harshdeep_B_Intel
817 Views

Hi Jordan, 

In streaming use cases throughput is likely not the most central feature but instead latency and robustness etc. If you are requiring encoder to deliver frames in a ordered manner you have to make some changes to introduce either additional sync points or by reordering the bit stream chunks delivered after SyncOperation is called. As, the incoming data over streaming depending on received over channel, I suggest adding a sync point and query before calling MFXVideoDECODE_DecodeHeader function which checks if enough data is received by decoder for next step. You may be interested in taking a look at MediaSDK framework here: https://software.intel.com/en-us/articles/framework-for-developing-applications-using-media-sdk

Thanks,

0 Kudos
Reply