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.
3058 Discussions

Sample_decode, how to synch MFXVideoDECODE_GetPayload results and Decoded data

naing__aung
Beginner
460 Views

I'm looking at extending Sample_decode and post-process decoded frame (in deliverOutput) function with decoded SEI data using MFXVideoDECODE_GetPayload. But, I'm not very clear on methods of synchronizing between encoded bistream frames and decoded frame.

 

 

0 Kudos
3 Replies
Mark_L_Intel1
Moderator
460 Views

Hi Aung,

I am trying to understand your question.

For SyncOp() call, it only wait for the hardware to come back when the surface get ready. Media SDK is using Intel hardware accelerated decoder, so decodeFrameAsync() just submit the request to the hardware while the SyncOp() will be blocked for the decoded frame being ready.

Does this answer your question?

Mark

0 Kudos
naing__aung
Beginner
460 Views

Hi Mark:

Deliver output is in a separate loop thread. There is synchronization via m_pDeliverOutputSemaphore only if there is rendering.

I have some SEI data that I parsed out from encoded data. I would like to synchronized that parsed data with final output in deliverOutput step. What's the BKM to achieve that?

I'm currently using frame->Info.FrameId.DependencyId to pass frame ID, to related between decoded and encoded frames. But, I don't think it is the correct way.

Aung.

 

 

0 Kudos
Mark_L_Intel1
Moderator
460 Views

Why not in the main thread, the same thread as decodeFrameAsync()? Since the call is asynced, it won't block the rendering, if the syncOp() call doesn't return the new frame, you can just render the old frame.

In sample_decode, there is "-r" argument which enable the rendering, you can look at that example for your design.

Mark

0 Kudos
Reply