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.

MFXVideoDECODE_DecodeHeader issue

innes
Beginner
372 Views

Hi,

I use IMSDK to decode video streams. I am facing an issue using the h264 decoder. I feed the decoder NAL by NAL, using the MFX_BITSTREAM_COMPLETE_FRAME flag : it is more convenient to us because our architecture produces a different buffer for each frame. The framework above my application just gives me SPS and PPS as first buffer. Actual payload, including first frame, comes after, and I would prefer not to wait that long since adding delay at this point would increase global latency. So, I call MFXVideoDECODE_DecodeHeader as soon as possible with just SPS and PPS bitstream to initialize the decoder.

Usually, this function returns MFX_ERR_NONE and it seems to be OK to initialize the decoder with such a short bitstream. However, sometimes, it returns -10 (MFX_ERR_MORE_DATA).

I made a test to test this case (zip file).

I tested on three different platforms :

1) A desktop PC, Intel Core i7 (http://ark.intel.com/products/65719/Intel-Core-i7-3770-Processor-8M-Cache-up-to-3_90-GHz), Graphics Driver 9.18.10.3071, Windows 8 64bit, IMSDK API HW 1.6 => MFXVideoDECODE_DecodeHeader returns 0

2) A Intel NUC DC3217IYE (http://www.intel.com/p/en_US/support/highlights/dsktpboards/dk-dc3217iye), Intel Core i3 (http://ark.intel.com/products/65697/Intel-Core-i3-3217U-Processor-), Graphics Driver 9.18.10.3257, Windows 7 Pro 32bit, IMSDK API HW 1.7 => MFXVideoDECODE_DecodeHeader returns 0

3) A laptop PC, Intel Core i5 (http://ark.intel.com/products/64903/Intel-Core-i5-3427U-Processor-3M-Cache-up-to-2_80-GHz), Graphics Driver 9.17.10.2867, Windows 8 64bit, IMSDK API HW 1.5 => MFXVideoDECODE_DecodeHeader returns -10

I do not understand at this point why the result of the header parsing function depends on hardware. Do you have any clue to get through decoder initialization without feeding it with the first frame ?

Thanks,

0 Kudos
4 Replies
Petter_L_Intel
Employee
372 Views

Hi,

The behavior of DecodeHeader have changed in recent releases of the the Intel graphics driver and Media SDK.  If you are using an old driver you may have to resort to padding the stream header with an I-frame NAL header to ensure correct behavior. This issue has been discussed in a few earlier forum posts, such as this one: http://software.intel.com/en-us/forums/topic/311640

Regards,
Petter 

0 Kudos
innes
Beginner
372 Views

I guess I did my research using wrong keywords.

Just a last question : do we have to insert relevant frame headers at the end of bitstream buffer using mpeg-2 and VC1 decoders too ?

Thanks a lot.

Regards,

0 Kudos
Petter_L_Intel
Employee
372 Views

Older drivers also had issues with VC1, thus requiring padding.   MPEG2 should be fine.

0 Kudos
innes
Beginner
372 Views

OK.

Thanks a lot

Regards

0 Kudos
Reply