Skip to content

Commit

Permalink
[Encode] Fix AV1 Encode SW BRC and Real BRC Output Mismatch Issue
Browse files Browse the repository at this point in the history
Driver mistokenly submits wrong BRC frame type to HuC and causing HuC outputs mismatch bitstreams. This patch is to fix this issue by checking unsupported frame type before submitting to HuC.
  • Loading branch information
chenhao5-Intel authored and intel-mediadev committed Nov 19, 2024
1 parent 51d7af8 commit 020ae63
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,10 @@ namespace encode
dmem->UPD_CurrFrameType = hierchLevelPlus1_to_brclevel.count(picParams->HierarchLevelPlus1) ? hierchLevelPlus1_to_brclevel[picParams->HierarchLevelPlus1] : AV1_BRC_FRAME_TYPE_INVALID;
//Invalid HierarchLevelPlus1 or LBD frames at level 3 eror check.
if ((dmem->UPD_CurrFrameType == AV1_BRC_FRAME_TYPE_INVALID) ||
(m_basicFeature->m_ref.IsLowDelay() && dmem->UPD_CurrFrameType == AV1_BRC_FRAME_TYPE_B2))
(m_basicFeature->m_ref.IsLowDelay() && dmem->UPD_CurrFrameType == AV1_BRC_FRAME_TYPE_B2) ||
(m_rcMode != RATECONTROL_CQL && dmem->UPD_CurrFrameType == AV1_BRC_FRAME_TYPE_B3))
{
ENCODE_VERBOSEMESSAGE("AV1_BRC_FRAME_TYPE_INVALID or LBD picture doesn't support Level 4\n");
ENCODE_VERBOSEMESSAGE("AV1_BRC_FRAME_TYPE_INVALID or LBD picture doesn't support Level 4, or AV1_BRC_FRAME_TYPE_B3 only supported in RATECONTROL_CQL mode\n");
dmem->UPD_CurrFrameType = AV1_BRC_FRAME_TYPE_B2;
}
}
Expand Down

0 comments on commit 020ae63

Please sign in to comment.