Media (Intel® oneAPI 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
The Intel sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.
3002 Discussions

H264 decoder MFXVideoDECODE_DecodeFrameAsync returns MFX_ERR_LOCK_MEMORY



I am writing a plugin to use quick sync h264 decoder. My reference is sample decode application provided along with media sdk. I am trying to invoke quick sync h264 decoder by feeding exactly one frame worth of bitstream at every call to MFXVideoDECODE_DecodeFrameAsync. I have allocated enough surfaces as returned by call to MFXVideoDECODE_QueryIOSurf.

Hardware decoding seems to work fine but when I force software mode I get MFX_ERR_LOCK_MEMORY. Also I am checking the flag pmfxSurfaces[0]->Data.Locked before and after call to  MFXVideoDECODE_DecodeFrameAsync. I see that the flag gets set to 1 indicating that surface is locked, yet returns the error of MFX_ERR_LOCK_MEMORY. Please let me know my setup of feeding only one frame every call to MFXVideoDECODE_DecodeFrameAsync could be an issue.

0 Kudos
1 Reply

Sorry for the delayed reply.  You should not need to worry about feeding only 1 frame of data per call to DecodeFrameAsync.  However, the fact that you see different behavior for the HW and SW implementations with the same code indicates that this may be a SW implementation bug.  If feeding only 1 frame is indeed an issue it should be easy to test by temporarily adding a few frames of buffering.  

Another starting reference point to consider is the tutorials at the Media Solutions Portal.