Skip to content

Commit

Permalink
[Decode] fix some cov issue
Browse files Browse the repository at this point in the history
resource leak; error coding
  • Loading branch information
shawnli2 authored and intel-mediadev committed Aug 22, 2023
1 parent c2f4503 commit a596d46
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3391,7 +3391,7 @@ MOS_STATUS MhwVdboxHcpInterfaceG12::AddHcpEncodeSliceStateCmd(
}
cmd.DW3.Sliceqp = abs(hevcSliceParams->slice_qp_delta + hevcPicParams->QpY);
cmd.DW3.SliceCbQpOffset = hevcSliceParams->slice_cb_qp_offset;
cmd.DW3.SliceCbQpOffset = hevcSliceParams->slice_cr_qp_offset;
cmd.DW3.SliceCrQpOffset = hevcSliceParams->slice_cr_qp_offset;

cmd.DW3.Intrareffetchdisable = hevcSliceState->bIntraRefFetchDisable;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,6 @@ void CodechalOcaDumper::SetAvcDecodeParam(

offset += sizeof(CODECHAL_OCA_DECODE_AVC_PIC_PARAM);
CODECHAL_OCA_DECODE_AVC_SLICE_PARAM* pSliceParam = (CODECHAL_OCA_DECODE_AVC_SLICE_PARAM *)((char*)m_pOcaDecodeParam + offset);
if (nullptr == pPicParam || nullptr == pSliceParam)
{
return;
}

if (picParams)
{
Expand Down Expand Up @@ -163,10 +159,6 @@ void CodechalOcaDumper::SetHevcDecodeParam(

offset += sizeof(CODECHAL_OCA_DECODE_HEVC_PIC_PARAM);
CODECHAL_OCA_DECODE_HEVC_SLICE_PARAM* pSliceParam = (CODECHAL_OCA_DECODE_HEVC_SLICE_PARAM *)((char*)m_pOcaDecodeParam + offset);
if (nullptr == pPicParam || nullptr == pSliceParam)
{
return;
}

if (picParams)
{
Expand Down

0 comments on commit a596d46

Please sign in to comment.