Skip to content
This repository has been archived by the owner on May 17, 2023. It is now read-only.

Commit

Permalink
vpp: allow a2rgb10 input for copy pass thru
Browse files Browse the repository at this point in the history
fixes: #1654
  • Loading branch information
Anton Grishin authored and dmitryermilov committed Jul 10, 2020
1 parent d019e2e commit a786fde
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
3 changes: 3 additions & 0 deletions _studio/mfx_lib/vpp/src/mfx_vpp_hw.cpp
Expand Up @@ -6327,6 +6327,9 @@ mfxStatus ConfigureExecuteParams(
if (true == executeParams.bComposite && 0 == executeParams.dstRects.size()) // composition was enabled via DO USE
return MFX_ERR_INVALID_VIDEO_PARAM;

// A2RGB10 input supported only to copy pass thru
MFX_CHECK(!(!config.m_bCopyPassThroughEnable && videoParam.vpp.In.FourCC == MFX_FOURCC_A2RGB10), MFX_ERR_INVALID_VIDEO_PARAM);

return (bIsFilterSkipped) ? MFX_WRN_FILTER_SKIPPED : MFX_ERR_NONE;

} // mfxStatus ConfigureExecuteParams(...)
Expand Down
5 changes: 4 additions & 1 deletion _studio/mfx_lib/vpp/src/mfx_vpp_sw_core.cpp
Expand Up @@ -934,6 +934,7 @@ mfxStatus VideoVPPBase::Query(VideoCORE * core, mfxVideoParam *in, mfxVideoParam

if ( out->vpp.In.FourCC != MFX_FOURCC_P010 &&
out->vpp.In.FourCC != MFX_FOURCC_P210 &&
out->vpp.In.FourCC != MFX_FOURCC_A2RGB10 &&
out->vpp.Out.FourCC == MFX_FOURCC_A2RGB10 ){
if( out->vpp.In.FourCC )
{
Expand Down Expand Up @@ -985,7 +986,9 @@ mfxStatus VideoVPPBase::Query(VideoCORE * core, mfxVideoParam *in, mfxVideoParam
out->vpp.In.FourCC != MFX_FOURCC_Y216 &&
out->vpp.In.FourCC != MFX_FOURCC_Y416 &&
#endif
out->vpp.In.FourCC != MFX_FOURCC_AYUV)
out->vpp.In.FourCC != MFX_FOURCC_AYUV &&
// A2RGB10 supported as input in case of passthru copy
out->vpp.In.FourCC != MFX_FOURCC_A2RGB10 )
{
if( out->vpp.In.FourCC )
{
Expand Down
4 changes: 2 additions & 2 deletions _studio/mfx_lib/vpp/src/mfx_vpp_utils.cpp
Expand Up @@ -1344,6 +1344,8 @@ mfxStatus CheckFrameInfo(mfxFrameInfo* info, mfxU32 request, eMFXHWType platform
case MFX_FOURCC_NV16:
case MFX_FOURCC_YUY2:
case MFX_FOURCC_AYUV:
// A2RGB10 supported as input in case of passthru copy
case MFX_FOURCC_A2RGB10:
break;
#if (MFX_VERSION >= 1027)
case MFX_FOURCC_Y210:
Expand Down Expand Up @@ -1375,8 +1377,6 @@ mfxStatus CheckFrameInfo(mfxFrameInfo* info, mfxU32 request, eMFXHWType platform
#ifdef MFX_ENABLE_RGBP
case MFX_FOURCC_RGBP:
#endif
case MFX_FOURCC_A2RGB10:
// 10bit RGB supported as output format only
if (VPP_IN == request)
return MFX_ERR_INVALID_VIDEO_PARAM;

Expand Down
2 changes: 2 additions & 0 deletions _studio/shared/src/mfx_vpp_vaapi.cpp
Expand Up @@ -469,6 +469,8 @@ mfxStatus VAAPIVideoProcessing::QueryCapabilities(mfxVppCaps& caps)
case MFX_FOURCC_Y416:
#endif
case MFX_FOURCC_P010:
// A2RGB10 supported as input in case of passthru copy
case MFX_FOURCC_A2RGB10:
caps.mFormatSupport[fourcc] |= MFX_FORMAT_SUPPORT_INPUT;
break;
default:
Expand Down
2 changes: 1 addition & 1 deletion samples/sample_vpp/src/sample_vpp_utils.cpp
Expand Up @@ -1326,7 +1326,7 @@ mfxStatus CRawVideoReader::LoadNextFrame(mfxFrameData* pData, mfxFrameInfo* pInf
IOSTREAM_MSDK_CHECK_NOT_EQUAL(nBytesRead, 3*w, MFX_ERR_MORE_DATA);
}
}
else if (pInfo->FourCC == MFX_FOURCC_RGB4)
else if (pInfo->FourCC == MFX_FOURCC_RGB4 || pInfo->FourCC == MFX_FOURCC_A2RGB10)
{
MSDK_CHECK_POINTER(pData->R, MFX_ERR_NOT_INITIALIZED);
MSDK_CHECK_POINTER(pData->G, MFX_ERR_NOT_INITIALIZED);
Expand Down

0 comments on commit a786fde

Please sign in to comment.