Skip to content

Commit

Permalink
[vfi] add platform caps check for Query API
Browse files Browse the repository at this point in the history
  • Loading branch information
MicroYY authored and gfxVPLsdm committed Oct 22, 2024
1 parent cd44e77 commit b6ac79a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
2 changes: 2 additions & 0 deletions _studio/mfx_lib/vpp/include/mfx_vpp_ai_frame_interpolation.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ class MFXVideoFrameInterpolation
MFXVideoFrameInterpolation();
virtual ~MFXVideoFrameInterpolation();

static mfxStatus Query(VideoCORE* core);

mfxStatus Init(
VideoCORE* core,
const mfxFrameInfo& inInfo,
Expand Down
14 changes: 14 additions & 0 deletions _studio/mfx_lib/vpp/src/mfx_vpp_ai_frame_interpolation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -736,4 +736,18 @@ mfxStatus MFXVideoFrameInterpolation::AddTaskQueue(mfxU32 taskIndex)
m_outStamp = 0;
}
return MFX_ERR_NONE;
}

mfxStatus MFXVideoFrameInterpolation::Query(VideoCORE* core)
{
MFX_CHECK_NULL_PTR1(core);
auto platform = core->GetHWType();
if (platform == MFX_HW_DG2 || platform >= MFX_HW_MTL)
{
return MFX_ERR_NONE;
}
else
{
MFX_RETURN(MFX_ERR_UNSUPPORTED);
}
}
6 changes: 5 additions & 1 deletion _studio/mfx_lib/vpp/src/mfx_vpp_sw_internal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ bool IsCompositionMode(mfxVideoParam* pParam)
return false;
}

mfxStatus ExtendedQuery(VideoCORE *, mfxU32 filterName, mfxExtBuffer* pHint)
mfxStatus ExtendedQuery(VideoCORE *core, mfxU32 filterName, mfxExtBuffer* pHint)
{
if( MFX_EXTBUFF_VPP_DENOISE == filterName
|| MFX_EXTBUFF_VPP_DENOISE2 == filterName
Expand Down Expand Up @@ -437,6 +437,10 @@ mfxStatus ExtendedQuery(VideoCORE *, mfxU32 filterName, mfxExtBuffer* pHint)
{
MFX_RETURN(CheckScalingParam(pHint));
}
else if (MFX_EXTBUFF_VPP_AI_FRAME_INTERPOLATION == filterName)
{
MFX_RETURN(MFXVideoFrameInterpolation::Query(core));
}
else // ignore
{
return MFX_ERR_NONE;
Expand Down

0 comments on commit b6ac79a

Please sign in to comment.