Community
cancel
Showing results for 
Search instead for 
Did you mean: 
naing__aung
Beginner
67 Views

Sample_decode, how to synch MFXVideoDECODE_GetPayload results and Decoded data

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

naing__aung
Beginner
67 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.

 

 

Mark_L_Intel1
Moderator
67 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

Reply