- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
As there's no real control over the latency of the hardware decoder in 3.0beta2, I've switched out video conf application to a combination of hardware encoding, software decoding.
This gave rise to a new issue : the MFXVideoDECODE_QueryIOSurf function, called by the decoder (software) to decode the incoming stream (hardware) returns an insufficient number of buffers, causing the application to hang, looking for a free buffer to use.
Namely, it returns 1 buffer, when testing has shown that 9 are required for it to work properly (with much greater latency than with the software encoder, for some reason !)
in short, only this combination of hardware encoder and software decoder seems to have this issue (all settings are for lowest possible latency). Following is the code for the decoder.
Please inform me what else is needed to identify the issue (full source ? a recorded stream ?).
regards
Jack Chimasera
memset (&m_DecodedVideoParameters,0,sizeof (m_DecodedVideoParameters));
m_DecodedVideoParameters.mfx.CodecId=MFX_CODEC_AVC;
m_DecodedVideoParameters.AsyncDepth=1;
Status=MFXVideoDECODE_DecodeHeader (m_DecodingSession, m_InputBitStream,&m_DecodedVideoParameters);
m_DecodedVideoParameters.mfx.NumThread=1;
if (Status==MFX_ERR_NONE)
{
// initialize
m_DecodedVideoParameters.IOPattern = MFX_IOPATTERN_OUT_SYSTEM_MEMORY;
m_DecodedVideoParameters.mfx.DecodedOrder = 0;
Status=MFXVideoDECODE_Init (m_DecodingSession,&m_DecodedVideoParameters);
if (CheckError (Status,L"MFXVideoDECODE_Init")) return;
if (Status==MFX_ERR_NONE)
{
// initialize the frames
mfxFrameAllocRequest AllocRequest;
Status=MFXVideoDECODE_QueryIOSurf (m_EncodingSession,&m_DecodedVideoParameters,&AllocRequest);
if (CheckError (Status,L"MFXVideoDECODE_QueryIOSurf")) return;
AllocRequest.NumFrameMin+=8;
AllocRequest.NumFrameSuggested+=8;
mfxFrameAllocResponse AllocResponse;
Status=m_SysmemAllocator->Alloc (m_SysmemAllocator->pthis,&AllocRequest,&AllocResponse);
As there's no real control over the latency of the hardware decoder in 3.0beta2, I've switched out video conf application to a combination of hardware encoding, software decoding.
This gave rise to a new issue : the MFXVideoDECODE_QueryIOSurf function, called by the decoder (software) to decode the incoming stream (hardware) returns an insufficient number of buffers, causing the application to hang, looking for a free buffer to use.
Namely, it returns 1 buffer, when testing has shown that 9 are required for it to work properly (with much greater latency than with the software encoder, for some reason !)
in short, only this combination of hardware encoder and software decoder seems to have this issue (all settings are for lowest possible latency). Following is the code for the decoder.
Please inform me what else is needed to identify the issue (full source ? a recorded stream ?).
regards
Jack Chimasera
memset (&m_DecodedVideoParameters,0,sizeof (m_DecodedVideoParameters));
m_DecodedVideoParameters.mfx.CodecId=MFX_CODEC_AVC;
m_DecodedVideoParameters.AsyncDepth=1;
Status=MFXVideoDECODE_DecodeHeader (m_DecodingSession, m_InputBitStream,&m_DecodedVideoParameters);
m_DecodedVideoParameters.mfx.NumThread=1;
if (Status==MFX_ERR_NONE)
{
// initialize
m_DecodedVideoParameters.IOPattern = MFX_IOPATTERN_OUT_SYSTEM_MEMORY;
m_DecodedVideoParameters.mfx.DecodedOrder = 0;
Status=MFXVideoDECODE_Init (m_DecodingSession,&m_DecodedVideoParameters);
if (CheckError (Status,L"MFXVideoDECODE_Init")) return;
if (Status==MFX_ERR_NONE)
{
// initialize the frames
mfxFrameAllocRequest AllocRequest;
Status=MFXVideoDECODE_QueryIOSurf (m_EncodingSession,&m_DecodedVideoParameters,&AllocRequest);
if (CheckError (Status,L"MFXVideoDECODE_QueryIOSurf")) return;
AllocRequest.NumFrameMin+=8;
AllocRequest.NumFrameSuggested+=8;
mfxFrameAllocResponse AllocResponse;
Status=m_SysmemAllocator->Alloc (m_SysmemAllocator->pthis,&AllocRequest,&AllocResponse);
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Jack,
I believe the problem is in passing m_EncodingSession to DECODE_QueryIOSurf which is the hw session as far as I understood. It's not consistent to call DECODE methods with different sessions.
Please try fixing this.
Regards,
Nina
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Jack,
I believe the problem is in passing m_EncodingSession to DECODE_QueryIOSurf which is the hw session as far as I understood. It's not consistent to call DECODE methods with different sessions.
Please try fixing this.
Regards,
Nina
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You are obviously correct, how utterly embarassing...
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