Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return MFX_ERR_INCOMPATIBLE_VIDEO_PARAM once parameter is changed #41

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions _studio/mfx_lib/decode/h264/src/mfx_h264_dec_decode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1258,6 +1258,7 @@ mfxStatus VideoDECODEH264::DecodeFrameCheck(mfxBitstream *bs, mfxFrameSurface1 *
}

MFX_CHECK(umcRes != UMC::UMC_NTF_NEW_RESOLUTION, MFX_ERR_INCOMPATIBLE_VIDEO_PARAM);
MFX_CHECK(sts != MFX_WRN_VIDEO_PARAM_CHANGED, MFX_ERR_INCOMPATIBLE_VIDEO_PARAM);
}

if (umcRes == UMC::UMC_ERR_INVALID_STREAM)
Expand Down
3 changes: 2 additions & 1 deletion _studio/mfx_lib/decode/h265/src/mfx_h265_dec_decode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1050,7 +1050,8 @@ mfxStatus VideoDECODEH265::DecodeFrameCheck(mfxBitstream *bs, mfxFrameSurface1 *
{
if (!m_isFirstRun)
{
sts = MFX_WRN_VIDEO_PARAM_CHANGED;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not suggesting change this logic in VPL. MFX_WRN_VIDEO_PARAM_CHANGED means the decoder detected a new sequence header. Some parameters may be changed in the new sequence. For some parameters changed, decoder can still work fine without re-init decoder. Please try to call MFXVideoDECODE_GetVideoParam(session, &newParams) to get the new parameters after MFXVideoDECODE_DecodeFrameAsync returned MFX_WRN_VIDEO_PARAM_CHANGED in Codec2.0, if color aspects really differ, then close the decoder and re-init decoder.

//sts = MFX_WRN_VIDEO_PARAM_CHANGED;
sts = MFX_ERR_INCOMPATIBLE_VIDEO_PARAM;
}
else
{
Expand Down
Loading