Resolution 720p

Resolution 720p

Hi,

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!!

AttachmentSize
Download error.png0 bytes
Download Untitled.png0 bytes
8 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hi lance7!
Could you debug the sample code further to find out why and where CBaseEncoder::m_bStop is flipped to true?
Nina

eric-sardella (Intel)'s picture

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

Eric,

I have changed the decoder to MSDK H264 decoder, but the error still occured.

Thanks!!!

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!!

Hi Lance,I have a guess that the problem is with the upstream filter - Color Space Converter (I will refer to it as CSC further).

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

Nina,

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!

Good to hear! Thanks for sharing back your solution.
Nina

Login to leave a comment.