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.

How/When is 'mfxU16 mfxFrameData.Locked;' cleared?

celli4
New Contributor I
577 Views

 Question regarding field mfxU16 mfxFrameData.Locked;


I have a question about how/when mfxFrameData::Locked is cleared in the tutorials.

I can clearly see it being set, usually in  GetFreeSurfaceIndex(...),
but it is not clear when it is being cleared.
It seems as though the IMSDK is clearing mfxFrameData.Locked

My question, is how/when is mfxFrameData.Locked cleared?

It is cleared completely asynchronously by the IMSDK?
or 
Is it cleared by MFXVideoCORE_SyncOperation() ? [or another call?]

It seems to me if the IMSDK cleared mfxFrameData.Locked completely asynchronously, without regard to the
application, GetFreeSurfaceIndex() [in the samples] would be returning surfaces that have not yet had the frame data retrieved 
by the application, in effect trashing valid frame data. 

Thank you
Cameron

 

0 Kudos
4 Replies
OTorg
New Contributor III
577 Views

mfxFrameData.Locked is cleared asynchronously by the IMSDK, when that's frame data became needless for encoder/decoder/etc.

0 Kudos
Petter_L_Intel
Employee
577 Views

Let me also add that "GetFreeSurfaceIndex()" does NOT modify the Locked parameter. The value is modified by SDK at the moment the surface is submitted to an SDK component (for instance via EncodeFrameAsync). And as dj_alek noted, Locked gets set to 0 again by the SDK asynchronously when the surface has been fully processed, thus allowing to to be reused.

0 Kudos
Chintan_M_
Beginner
577 Views

What is the purpose of mfxU8/mfxU16/mfxU32? Do these serve same or similar purposes or are they completely different? Please provide a basic idea. I couldn't find their explanation in the documentation. TIA

0 Kudos
Mark_L_Intel1
Moderator
577 Views

The purpose of these types is to align the type to different pixel format, for example, align mfxU32 to RGBA format.

Mark

0 Kudos
Reply