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

Commit

Permalink
[hevce] Add check for intra refresh with B-frames
Browse files Browse the repository at this point in the history
Intra refresh isn't supported with B-frames.

Fixes #2571
  • Loading branch information
yskuridi authored and dmitryermilov committed Apr 16, 2021
1 parent e418206 commit f547205
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3728,6 +3728,13 @@ mfxStatus Legacy::CheckIntraRefresh(
|| !CheckOrZero<mfxU16>(pCO3->IntRefCycleDist, 0)
, sts, MFX_ERR_UNSUPPORTED);

// B-Frames should be disabled for intra refresh
if (pCO2->IntRefType && par.mfx.GopRefDist > 1)
{
pCO2->IntRefType = MFX_REFRESH_NO;
++changed;
}

// refresh cycle length shouldn't be greater or equal to GOP size
bool bInvalidCycle =
pCO2->IntRefCycleSize != 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,10 @@ class GetDefault
return par.mvp.mfx.GopRefDist;
}
auto GopPicSize = par.base.GetGopPicSize(par);
const mfxExtCodingOption2* pCO2 = ExtBuffer::Get(par.mvp);
bool bNoB =
par.base.GetNumTemporalLayers(par) > 1
(pCO2 && pCO2->IntRefType)
|| par.base.GetNumTemporalLayers(par) > 1
|| par.caps.SliceIPOnly
|| GopPicSize < 3
|| par.mvp.mfx.NumRefFrame == 1;
Expand Down

0 comments on commit f547205

Please sign in to comment.