Skip to content

Commit

Permalink
[Encode] clean KW issue and coverity issue
Browse files Browse the repository at this point in the history
clean KW issue and coverity issue.
  • Loading branch information
DaShi-Git authored and intel-mediadev committed Sep 5, 2023
1 parent c57bdcc commit cd39214
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ MOS_STATUS AvcVdencPreEnc::PreparePreEncConfig(void *params)

uint8_t depth = 0;
uint32_t poc = 0;
if (m_preEncConfig.GopRefDist = 0)
if (m_preEncConfig.GopRefDist == 0)
{
return MOS_STATUS_INVALID_PARAMETER;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -687,13 +687,13 @@ namespace encode {
// Copy over huffman data to the other two data buffers for JPEG picture header
for (uint32_t i = 0; i < m_numHuffBuffers; i++)
{
m_jpegHuffmanTable->m_huffmanData[i + 2].m_tableClass = m_jpegHuffmanTable->m_huffmanData[i].m_tableClass;
m_jpegHuffmanTable->m_huffmanData[i + 2].m_tableID = m_jpegHuffmanTable->m_huffmanData[i].m_tableID;

if ((i + 2) >= JPEG_NUM_ENCODE_HUFF_BUFF)
{
return MOS_STATUS_INVALID_PARAMETER;
}
m_jpegHuffmanTable->m_huffmanData[i + 2].m_tableClass = m_jpegHuffmanTable->m_huffmanData[i].m_tableClass;
m_jpegHuffmanTable->m_huffmanData[i + 2].m_tableID = m_jpegHuffmanTable->m_huffmanData[i].m_tableID;

ENCODE_CHK_STATUS_RETURN(MOS_SecureMemcpy(&m_jpegHuffmanTable->m_huffmanData[i + 2].m_bits[0],
sizeof(uint8_t) * JPEG_NUM_HUFF_TABLE_AC_BITS,
&m_jpegHuffmanTable->m_huffmanData[i].m_bits[0],
Expand Down

0 comments on commit cd39214

Please sign in to comment.