Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
Announcements
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.

Resolution 720p

lance7
Beginner
2,062 Views
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!!

0 Kudos
7 Replies
Nina_K_Intel
Employee
2,062 Views
Hi lance7!

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

Nina
0 Kudos
Eric_S_Intel
Employee
2,062 Views

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

0 Kudos
lance7
Beginner
2,062 Views

Eric,

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

Thanks!!!

0 Kudos
lance7
Beginner
2,062 Views

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

0 Kudos
Nina_K_Intel
Employee
2,062 Views
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

0 Kudos
lance7
Beginner
2,062 Views
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!

0 Kudos
Nina_K_Intel
Employee
2,062 Views
Good to hear! Thanks for sharing back your solution.

Nina
0 Kudos
Reply