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

clarification regarding MFXVideoCORE_SyncOperation API

shashwat_D_
Beginner
516 Views

Can someone please tell how MFXVideoCORE_SyncOperation() API works. The waitTime parameter specifies the maximum time to wait or is it a compulsory wait.

For instance if waitTime is 60000ms then it will start the operations queued and wait till:

1. 60000ms compulsorily even if the operation finished at a time<60000ms

2. or whichever occurs first (operation completion or 60000ms)?

0 Kudos
3 Replies
Surbhi_M_Intel
Employee
516 Views

Hi Shashwat,

The wait time specified in MFXVideoCORE_SyncOperation() is the compulsory wait time. You can find little more details in one of the threads - https://software.intel.com/en-us/forums/topic/485723  discussed before.

-Surbhi

0 Kudos
Manish_K_
Beginner
516 Views

How should one decide about the wait time to put in in this API.

I am running intel media HEVC HW encoder.

0 Kudos
Surbhi_M_Intel
Employee
516 Views

Hi,

I have discussed this with the experts and this is the maximum wait time you have to stay for the operation to get complete, but not the mandatory wait time. So whichever occurs the first either the wait time or operation complete. 

One of the ways wait interval defined in the sample encode -

#define MSDK_DEC_WAIT_INTERVAL 60000
#define MSDK_ENC_WAIT_INTERVAL 10000
#define MSDK_VPP_WAIT_INTERVAL 60000
#define MSDK_WAIT_INTERVAL MSDK_DEC_WAIT_INTERVAL+3*MSDK_VPP_WAIT_INTERVAL+MSDK_ENC_WAIT_INTERVAL // an estimate for the longest pipeline we have in samples

As mentioned in the code this is the longest pipeline, not necessarily it will wait for that many milliseconds. This is just an estimate for how long operation can perform. It is up to developers to change it.
Please check sample_encode to see how this works.

Thanks,
-Surbhi
 

 

0 Kudos
Reply