Skip to content

Commit

Permalink
[vpp] refine vfi d3d11/ocl surface sharing
Browse files Browse the repository at this point in the history
1. Mark vfi input/output surface allocation request as MFX_MEMTYPE_SHARED_RESOURCE to avoid extra copy between D3D/OCL.
2. Add surface pool to avoid allocation each frame.
3. Import clFinish for explicit synchronization on OCL task.
  • Loading branch information
MicroYY authored and gfxVPLsdm committed Sep 4, 2024
1 parent 1e3004d commit 89a4de8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _studio/mfx_lib/vpp/src/mfx_vpp_ai_frame_interpolation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ mfxStatus MFXVideoFrameInterpolation::InitVppAndAllocateSurface(

mfxFrameAllocRequest requestRGB = {};
requestRGB.Info = vppParams.vpp.Out;
requestRGB.Type = MFX_MEMTYPE_VIDEO_MEMORY_PROCESSOR_TARGET | MFX_MEMTYPE_FROM_VPPOUT;
requestRGB.Type = MFX_MEMTYPE_VIDEO_MEMORY_PROCESSOR_TARGET | MFX_MEMTYPE_FROM_VPPOUT | MFX_MEMTYPE_SHARED_RESOURCE;
requestRGB.NumFrameMin = (mfxU16)m_ratio + 1;
requestRGB.NumFrameSuggested = (mfxU16)m_ratio + 1;
MFX_CHECK_STS(m_core->AllocFrames(&requestRGB, &m_rgbSurfForFiIn));
Expand Down

0 comments on commit 89a4de8

Please sign in to comment.