Skip to content

Commit

Permalink
[Encode] fix 1 coverity issue
Browse files Browse the repository at this point in the history
check untrusted index
  • Loading branch information
DaShi-Git authored and intel-mediadev committed Oct 22, 2024
1 parent f508ab3 commit 9bbd928
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions media_driver/agnostic/common/codec/hal/codechal_vdenc_avc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5830,6 +5830,11 @@ MOS_STATUS CodechalVdencAvcState::InitializePicture(const EncoderParams &params)
CODECHAL_ENCODE_AVC_TQ_INPUT_PARAMS tqInputParams;
tqInputParams.ucQP = sliceQP;
tqInputParams.ucTargetUsage = m_avcSeqParam->TargetUsage;
if (tqInputParams.ucTargetUsage >= NUM_VDENC_TARGET_USAGE_MODES)
{
CODECHAL_ENCODE_ASSERTMESSAGE("Invalid sequence parameter.");
return MOS_STATUS_INVALID_PARAMETER;
}
tqInputParams.wPictureCodingType = m_pictureCodingType;
tqInputParams.bBrcEnabled = false;
tqInputParams.bVdEncEnabled = true;
Expand Down

0 comments on commit 9bbd928

Please sign in to comment.