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

Commit

Permalink
[hevce] Expand zero ROI to minimum supported size
Browse files Browse the repository at this point in the history
Fixes #2013.
Change (0 0 0 0) ROIs instead of removing them.
  • Loading branch information
yskuridi authored and dmitryermilov committed Nov 16, 2020
1 parent 235e60b commit 48c64a9
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ static mfxStatus CheckAndFixRect(
changed += AlignUp(rect.Right, blockSize);
changed += AlignUp(rect.Bottom, blockSize);

if(rect.Left == 0 && rect.Top == 0 && rect.Right == 0 && rect.Bottom == 0)
{
rect.Right = blockSize;//expand zero rectangle to min supported size
rect.Bottom = blockSize;
changed++;
}

MFX_CHECK(!changed, MFX_WRN_INCOMPATIBLE_VIDEO_PARAM);
return MFX_ERR_NONE;
}
Expand Down

0 comments on commit 48c64a9

Please sign in to comment.