Transition Guide
Visible to Intel only — GUID: GUID-8BED83FE-1E3A-46F8-94C1-64666B88D22E
Using Internal Memory
The simple use of external memory allocation is shown in legacy-decode:
sts = MFXVideoDECODE_Init(session, &mfxDecParams);Query number required surfaces for decoder MFXVideoDECODE_QueryIOSurf(session, &mfxDecParams, &decRequest); // External (application) allocation of decode surfaces decSurfPool = (mfxFrameSurface1 *)calloc(sizeof(mfxFrameSurface1), decRequest.NumFrameSuggested); sts = AllocateExternalSystemMemorySurfacePool(&decOutBuf, decSurfPool, mfxDecParams.mfx.FrameInfo, decRequest.NumFrameSuggested);
When processing with externally allocated frames, the application must find a free surface in the pool and supply it to oneVPL. It must also use 1.x API synchronization to access the data.
For a decode example using internal allocation, see hello-decode. Note that the application does not need to allocate a surface pool or find free surfaces.
sts = MFXVideoDECODE_DecodeFrameAsync(session, (isDraining) ? NULL : &bitstream, NULL, &decSurfaceOut, &syncp);