- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Using guidlines and information from this forum, i'm attempting to minimize latency in the Intel Media SDK decoder.
When i add the following code:
MSDK_ZERO_MEMORY(m_extCO);
m_extCO.Header.BufferId = MFX_EXTBUFF_CODING_OPTION;
m_extCO.Header.BufferSz = sizeof(mfxExtCodingOption);
m_extCO.MaxDecFrameBuffering = 1;
m_extBuffersInit[0] = reinterpret_cast(&m_extCO);
m_mfxVideoParams.NumExtParam = 1;
m_mfxVideoParams.ExtParam = m_extBuffersInit;
MFXVideoDECODE_Init returns -15 (MFX_ERR_INVALID_VIDEO_PARAM)
I'm running on SW mode,
And my machine is core i7 Intel.
(If i do not add that code everything works perfectly, apart from the lag...)
Any help is appreciated - i do not understand why this returns as "unsupported".
EDIT:
After all of the recommended changes to reduce latency (apart from extra params i'm having trouble to use) the frame latency got from 12 to 3. What i need is latency of 1. (And i encode H264 that way using a different lib, which i know for sure that it was not encoded with any latency requirement)
When i add the following code:
MSDK_ZERO_MEMORY(m_extCO);
m_extCO.Header.BufferId = MFX_EXTBUFF_CODING_OPTION;
m_extCO.Header.BufferSz = sizeof(mfxExtCodingOption);
m_extCO.MaxDecFrameBuffering = 1;
m_extBuffersInit[0] = reinterpret_cast
m_mfxVideoParams.NumExtParam = 1;
m_mfxVideoParams.ExtParam = m_extBuffersInit;
MFXVideoDECODE_Init returns -15 (MFX_ERR_INVALID_VIDEO_PARAM)
I'm running on SW mode,
And my machine is core i7 Intel.
(If i do not add that code everything works perfectly, apart from the lag...)
Any help is appreciated - i do not understand why this returns as "unsupported".
EDIT:
After all of the recommended changes to reduce latency (apart from extra params i'm having trouble to use) the frame latency got from 12 to 3. What i need is latency of 1. (And i encode H264 that way using a different lib, which i know for sure that it was not encoded with any latency requirement)
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
mfxExtCodingOption external buffer is aimed to supply additional settings for the encoder. Decoder doesn't support it so it returns an error when you attach this type of buffer to mfxVideoParam.
Configuring decoder for low latency doesn't require any external buffers to be attached. Are you using AsyncDepth=1 and NumThread=1 already?
Regards,
Nina
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your quick reply.
Yes, i am using NumThread=1 and AsyncDepth=1
How much latency is expected in the decoder? as i said in the edit, what i currently have is 3 frames latency.
Yes, i am using NumThread=1 and AsyncDepth=1
How much latency is expected in the decoder? as i said in the edit, what i currently have is 3 frames latency.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
With mentioned settings there should be no latency in frames, i.e. decoder outputs the frame right after it is decoded. I suspect that your input stream doesn't really have zero latency as you expect. You may check with some stream analyzing tool if there are B frames in the stream and what is the value of max_dec_frame_buffering. Another suggestion - you can generate a low-latency stream using Media SDK encoder via sample_videoconf (you can find it under samples folder of MSDK 3.0 Beta) and then decode this stream to check latency.
Regards,
Nina
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page