Skip to content

Commit

Permalink
[Encode] Clean Coverity Encode Issue
Browse files Browse the repository at this point in the history
Clean up encode coverity issues.
  • Loading branch information
Bossonor authored and intel-mediadev committed Sep 4, 2023
1 parent d1336b4 commit 964ffce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1564,7 +1564,7 @@ class CodechalEncoderState : public Codechal
// PAK Scratch Buffers
MOS_RESOURCE m_resDeblockingFilterRowStoreScratchBuffer = {}; //!< Handle of deblock row store surface
MOS_RESOURCE m_resMPCRowStoreScratchBuffer = {}; //!< Handle of mpc row store surface
MOS_RESOURCE m_resStreamOutBuffer[CODECHAL_ENCODE_RECYCLED_BUFFER_NUM]; //!< Handle of streamout data surface
MOS_RESOURCE m_resStreamOutBuffer[CODECHAL_ENCODE_RECYCLED_BUFFER_NUM] = {}; //!< Handle of streamout data surface

// Scaling
MHW_KERNEL_STATE m_scaling4xKernelStates[CODEC_NUM_FIELDS_PER_FRAME]; //!< Scaling 4x Kernel States
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,11 @@ MOS_STATUS HevcHeaderPacker::LoadSliceHeaderParams(CodecEncodeHevcSliceHeaderPar
m_spsParams.log2_max_pic_order_cnt_lsb_minus4 = pSH->log2_max_pic_order_cnt_lsb_minus4;
m_sliceParams.pic_order_cnt_lsb &= ~(0xFFFFFFFF << (m_spsParams.log2_max_pic_order_cnt_lsb_minus4 + 4));
m_sliceParams.num_long_term_pics = pSH->num_long_term_pics;

if(m_sliceParams.num_long_term_pics > MAX_NUM_LONG_TERM_PICS)
{
return MOS_STATUS_INVALID_PARAMETER;
}
for (int i = 0; i < m_sliceParams.num_long_term_pics; i++)
{
m_sliceParams.lt[i].used_by_curr_pic_lt_flag = pSH->lt[i].used_by_curr_pic_lt_flag;
Expand Down

0 comments on commit 964ffce

Please sign in to comment.