- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
When the implementation of the
sts = m_pmfxDEC->Init(&m_mfxVideoParams);
return value is -4 (MFX_ERR_MEMORY_ALLOC)
May I ask what factors produced this result?
Thanks
When the implementation of the
sts = m_pmfxDEC->Init(&m_mfxVideoParams);
return value is -4 (MFX_ERR_MEMORY_ALLOC)
May I ask what factors produced this result?
Thanks
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
In your case Intel Media SDK failed to allocate the memory required to create decoder surfaces.
Regards,
In your case Intel Media SDK failed to allocate the memory required to create decoder surfaces.
Your system has likely run out of memory. You may try to free up some memory used by other applications or try other lower resolution workload, or expand your system with additonal RAM.
Regards,
Petter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have the exact same problem but I do have enough RAM and when I run the intel example it's work fine.. but I changed it and now it's not working this way. here is my code for initializing decoder :
mfxStatus decoder::initDecoder(HWND window, mfxBitstream *Header) { mfxStatus sts = MFX_ERR_NONE; mfxVersion ver = { { 0, 1 } }; mfxVideoParam mfxVideoParams; mfxFrameAllocator mfxAllocator; mfxFrameAllocResponse mfxResponse; sts = m_mfxSession.Init(MFX_IMPL_AUTO_ANY, &ver); //sts = MFX_ERR_NONE if (sts == MFX_ERR_NONE) { sts = m_mfxSession.SetHandle(MFX_HANDLE_DIRECT3D_DEVICE_MANAGER9, m_renderer.initD3d(GetIntelDeviceAdapterNum(), window)); //sts = MFX_ERR_NONE if (sts == MFX_ERR_NONE) { mfxAllocator.pthis = m_mfxSession; sts = m_mfxSession.SetFrameAllocator(&mfxAllocator); //sts = MFX_ERR_NONE if (sts == MFX_ERR_NONE) { MFXVideoDECODE mfxDEC(m_mfxSession); m_mfxVideoDecode = mfxDEC; memset(&mfxVideoParams, 0, sizeof(mfxVideoParams)); mfxVideoParams.mfx.CodecId = MFX_CODEC_AVC; mfxVideoParams.IOPattern = MFX_IOPATTERN_OUT_VIDEO_MEMORY; sts = m_mfxVideoDecode.DecodeHeader(Header, &mfxVideoParams); //sts = MFX_ERR_NONE if (sts == MFX_ERR_NONE) { memset(&m_mfxRequest, 0, sizeof(m_mfxRequest)); sts = m_mfxVideoDecode.Query(&mfxVideoParams, &mfxVideoParams); sts = m_mfxVideoDecode.QueryIOSurf(&mfxVideoParams, &m_mfxRequest); //sts = MFX_ERR_NONE if (sts == MFX_ERR_NONE) { sts = m_renderer.allocSurfaces(mfxAllocator.pthis, &m_mfxRequest, &mfxResponse); if (sts == MFX_ERR_NONE) { m_pmfxSurfaces = new mfxFrameSurface1 *[m_mfxRequest.NumFrameSuggested]; for (int i = 0; i < m_mfxRequest.NumFrameSuggested; i++) { m_pmfxSurfaces = new mfxFrameSurface1; memset(m_pmfxSurfaces, 0, sizeof(mfxFrameSurface1)); memcpy(&(m_pmfxSurfaces->Info), &(mfxVideoParams.mfx.FrameInfo), sizeof(mfxFrameInfo)); // MID (memory id) represents one video NV12 surface m_pmfxSurfaces->Data.MemId = mfxResponse.mids; }; sts = m_mfxVideoDecode.Init(&mfxVideoParams); //sts = MFX_ERR_MEMORY_ALLOC } } } } } } return sts; }
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