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

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

 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

 

3 post / 0 nuovi
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione

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

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.

Lascia un commento

Eseguire l'accesso per aggiungere un commento. Non siete membri? Iscriviti oggi