- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The atachments is my transcoding graph and error messege.
Base on the graphI tried the resolution 640x480, it can render. But not with 720p.
The error is from intel H264 encoder: the m_bStop is TRUE, and return MFX_ERR_ABORTED.
(in base_encoder.cpp, CBaseEncoder::RunEncode)
Please help me to fix this problem.
Thanks for your reply!!
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
Hi lance,
This may or may not help but I debugged an issue where m_bStop was getting set unexpectedly and it turned out the entire graph
was being shut down by the downstream components. In my case, the Renderer didnt like the timestamps I was experimenting with.
The graph manager was calling StopStreaming which set m_bStop.
I notice the downstream component in your graph is not the MSDK decoder, are you sure it can handle 720p? Try to swap that decoder with the MSDK filter and let us know if the problem still occurs.
Thanks
-Eric
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Eric,
I have changed the decoder to MSDK H264 decoder, but the error still occured.
Thanks!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nina,
In "Base_encoder.cpp - CBaseEncoder::DeliverNextFrame",
line: sts = pEncoder->m_mfxVideoSession.SyncOperation(*it->psyncP, 0),
It returns -1(MFX_ERR_UNKNOWN), so "pEncoder->m_bStop = true".
Thanks!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think the error happens when encoder reads input frame surface data. It happens because surface buffer provided by CSC is smaller than encoder expects based on frame sizes.
To explain on your particular 720p example: MSDK encoder is initialized with frameInfo.W=1280 and H=736 and so is the input surface (H is aligned at 32 to cover Media SDK encoder requirement for interlaced input video). MSDK Encoder filter provides the requirement for MediaSample buffer through CEncoderInputPin->GetAllocatorRequirements method to be 1280*736*3/2 bytes. But I guess CSC filter allocates buffer of 1280*720*3/2 bytes. So when input mfxFrameSurface planes pointers are pointed at this buffer encoder crosses the boundary when reading the data.
Please try to modify your CSC filter to account for downstream filter buffer requirement (Intel Decoder sample filter does so please see DecideBufferSize method).
I hope this is the right reason, please let me know if suggested fix works.
Regards,
Nina
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your reply.
Based on your suggestion, Ichangemy CSC, but I can't find other CSC output NV12.
In "Why doesnt this simple Graph work?", itmentions that how to modify MSDK encoder to accept other format, so I do it.With RGB32, it can renderersuccessfully finally.
Thank you!
- 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