H264 decoder MFXVideoDECODE_DecodeFrameAsync returns MFX_ERR_LOCK_MEMORY

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.

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

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.


Leave a Comment

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