Skip to content

Commit

Permalink
[Encode] fixing vp8 cqp issue
Browse files Browse the repository at this point in the history
fixing vp8 cqp issue.
  • Loading branch information
DaShi-Git authored and intel-mediadev committed Sep 6, 2023
1 parent b099627 commit 390884a
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions media_driver/agnostic/common/codec/hal/codechal_encode_vp8.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1287,11 +1287,18 @@ MOS_STATUS CodechalEncodeVp8::SetPictureStructs()
else
{
m_averagePFrameQp = averageQp;
if (m_vp8SeqParams->GopPicSize == 0)
if (m_vp8SeqParams->RateControlMethod == RATECONTROL_CQP)
{
return MOS_STATUS_INVALID_PARAMETER;
m_pFramePositionInGop = 0;
}
else
{
if (m_vp8SeqParams->GopPicSize == 0)
{
return MOS_STATUS_INVALID_PARAMETER;
}
m_pFramePositionInGop = (m_storeData - 1) % m_vp8SeqParams->GopPicSize;
}
m_pFramePositionInGop = m_vp8SeqParams->RateControlMethod == RATECONTROL_CQP ? 0 : (m_storeData - 1) % m_vp8SeqParams->GopPicSize;
}

numRef = 0;
Expand Down

0 comments on commit 390884a

Please sign in to comment.