Dear Tech Support:
I am using the latest version of the Media SDK and trying to decode an H.264 bitstream and need it to provide me with a low latency result. Hence when I issue the decode call, I need it to provide me back a decoded frame ASAP and not queue up a bunch of them prior to providing me back a surface to draw into. Currently when I make the following call to decode my bitstream:
sts = m_pmfxDEC->DecodeFrameAsync(pBitstream, &(m_pCurrentFreeSurface->frame), &pOutSurface, &(m_pCurrentFreeOutputSurface->syncp));
it returns me back 16 consecutive MFX_ERR_MORE_SURFACE results until I get a MFX_ERR_NONE result for me to draw into the output surface via a valid non-NULL pOutSurface pointer. This creates a 16 frame delay and since I'm running in real-time, that creates over 1/2 second of delay for normal 30 FPS video - not cool.
I have the following during my initialization:
AsyncDepth = 1
bUseHWLib = 1
m_b_DecOutSystem = SYSTEM_MEMORY
memType = D3D9_MEMORY
and the bitstream data flag set for MFX_BITSTREAM_COMPLETE_FRAME
I am providing the decoder with an H.264 bitstream with IP only frames - no B Frames and the first frame I am providing it with is always an I frame. Can you tell me what I need to do in order for the H.264 decoder to provide me back an MFX_ERR_NONE and a non-null pOutSurface for me to use (hopefully after the first or no later that the 2nd decoder call) instead of having to wait for 16 frames before I can do so? Please advise as to what I am doing wrong.
Thanks,
Tim