- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The RunEncode() function returned MFX_ERR_NOT_INITIALIZED when I tried to encode a video stream using the h264_enc_filter.
My Graph snapshot is uploaded, named as capturegraph.png
It was the function EncodeFrameAsync() that returned MFX_ERR_NOT_INITIALIZED.
The video capture source has a resolution of 1280*720@50frame/s and the color format is YUY2.
The graph can be run by inserting a AVI Decompressor between Infinite Pin Tee and H264 Encoder, the AVI Decompressor actually changed the color format from YUY2 to RGB32.
What was going wrong with my graph?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tony Pabon (Intel) wrote:Hi,Tony I had recalled a piece of important information that I didn’t think of before. Due to my own need, I had cancelled if(nMin > (mfxU32)props.cBuffers) { hr = E_FAIL; } in CEncoderInputPin::NotifyAllocator() method.(My post with this issue: http://software.intel.com/en-us/forums/topic/339247) This works fine with my webcam. But the video source was replaced by a hd video capture card this time(as you can see in capturegraph.png). Today, I rebuilt the filter by bringing the buffer number judgment statement back to the NotifyAllocator() method. Now graphedit automatically inserts a AVI Compressor everytime I tried to connect Infinite_Pin_Tee_Filter to h264_enc_filter . I think this implied that Infinite_Pin_Tee_Filter and h264_enc_filter failed to make an agreement(mMin>cBuffers) on the allocator. This is why on yesterday I could directly connect Infinite_Pin_Tee_Filter to h264_enc_filter but the encoder returned an error in runtime. How can I modify the Infinite_Pin_Tee_Filter to collaborate with h264_enc_filter directly and perfectly?(Fortunately, Mircosoft provides the sample code for the infinite_pin_tee in Windows SDK. ).I don't want the existance of AVI Decompressor because it takes a great CPU load. Many thanks. -PatrickHi,
I believe I've reproduced the same issue and I'm investigating.-Tony
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tony Pabon (Intel) wrote:Hi,Tony I had just roughly gone through the infinite_pin_tee source code and discovered that it has overloaded the DecideAllocator() method and it assigned the allocator to the one from the upstream. I will upgrade this post if I make any progress. Thank you. -PatrickHi Patrick,
This would explain some of the behavior I was seeing too. I see others have seen this issue as well (http://software.intel.com/en-us/forums/topic/311877). I suspect the Infinite_Pin_Tee_Filter could be modified to require more cBuffers from the source filter, but I am not familiar with that code.
-Tony
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tony Pabon (Intel) wrote:Hi, I have modified the inifinite pin tee filter to require more buffers in the following code: STDMETHODIMP CTeeInputPin::NotifyAllocator(IMemAllocator *pAllocator, BOOL bReadOnly) { CheckPointer(pAllocator,E_FAIL); CAutoLock lock_it(m_pLock); // Free the old allocator if any if (m_pTee->m_pAllocator) m_pTee->m_pAllocator->Release(); // Store away the new allocator pAllocator->AddRef(); m_pTee->m_pAllocator = pAllocator; //Require 10 buffers ALLOCATOR_PROPERTIES props; pAllocator->GetProperties(&props); props.cBuffers = 10; ALLOCATOR_PROPERTIES actual; pAllocator->SetProperties(&props,&actual); // Notify the base class about the allocator return CBaseInputPin::NotifyAllocator(pAllocator,bReadOnly); } // NotifyAllocator The MFX_ERR_NOT_INITIALIZED error still occurs after the graph starts. (EncodeFrameAsync returns MFX_ERROR_NONE for several times before it returns MFX_ERR_NOT_INITIALIZED). It seems that the samples have not been released in the CBaseEncoder::DeliverNextFrame() method. The running code has not stepped into the sample release statements before the error is thrown. if (!jt->pmfxSurface->Data.Locked) { MSDK_SAFE_DELETE(jt->pmfxSurface); jt->pSample->Release();//has not been executed before MFX_ERR_NOT_INITIALIZED error pEncoder->m_InputList.erase(jt); break; } I’ve uploaded the inftee project files for you to investigate my problem. What else should I do to the inftee filter? Thanks. -PatrickHi Patrick,
This would explain some of the behavior I was seeing too. I see others have seen this issue as well (http://software.intel.com/en-us/forums/topic/311877). I suspect the Infinite_Pin_Tee_Filter could be modified to require more cBuffers from the source filter, but I am not familiar with that code.
-Tony
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page