Skip to content

Commit b6ac79a

Browse files
MicroYYgfxVPLsdm
authored andcommitted
[vfi] add platform caps check for Query API
1 parent cd44e77 commit b6ac79a

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

_studio/mfx_lib/vpp/include/mfx_vpp_ai_frame_interpolation.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ class MFXVideoFrameInterpolation
4848
MFXVideoFrameInterpolation();
4949
virtual ~MFXVideoFrameInterpolation();
5050

51+
static mfxStatus Query(VideoCORE* core);
52+
5153
mfxStatus Init(
5254
VideoCORE* core,
5355
const mfxFrameInfo& inInfo,

_studio/mfx_lib/vpp/src/mfx_vpp_ai_frame_interpolation.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -736,4 +736,18 @@ mfxStatus MFXVideoFrameInterpolation::AddTaskQueue(mfxU32 taskIndex)
736736
m_outStamp = 0;
737737
}
738738
return MFX_ERR_NONE;
739+
}
740+
741+
mfxStatus MFXVideoFrameInterpolation::Query(VideoCORE* core)
742+
{
743+
MFX_CHECK_NULL_PTR1(core);
744+
auto platform = core->GetHWType();
745+
if (platform == MFX_HW_DG2 || platform >= MFX_HW_MTL)
746+
{
747+
return MFX_ERR_NONE;
748+
}
749+
else
750+
{
751+
MFX_RETURN(MFX_ERR_UNSUPPORTED);
752+
}
739753
}

_studio/mfx_lib/vpp/src/mfx_vpp_sw_internal.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ bool IsCompositionMode(mfxVideoParam* pParam)
384384
return false;
385385
}
386386

387-
mfxStatus ExtendedQuery(VideoCORE *, mfxU32 filterName, mfxExtBuffer* pHint)
387+
mfxStatus ExtendedQuery(VideoCORE *core, mfxU32 filterName, mfxExtBuffer* pHint)
388388
{
389389
if( MFX_EXTBUFF_VPP_DENOISE == filterName
390390
|| MFX_EXTBUFF_VPP_DENOISE2 == filterName
@@ -437,6 +437,10 @@ mfxStatus ExtendedQuery(VideoCORE *, mfxU32 filterName, mfxExtBuffer* pHint)
437437
{
438438
MFX_RETURN(CheckScalingParam(pHint));
439439
}
440+
else if (MFX_EXTBUFF_VPP_AI_FRAME_INTERPOLATION == filterName)
441+
{
442+
MFX_RETURN(MFXVideoFrameInterpolation::Query(core));
443+
}
440444
else // ignore
441445
{
442446
return MFX_ERR_NONE;

0 commit comments

Comments
 (0)