Skip to content

Commit

Permalink
[Encode] Fix unchecked return issue
Browse files Browse the repository at this point in the history
* [Encode] Fix unchecked return issue

Fix coverity unchecked return issue
  • Loading branch information
Bossonor authored and intel-mediadev committed Dec 20, 2023
1 parent f47b26f commit b86b4e6
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,26 +53,26 @@ MOS_STATUS Av1VdencPipelineXe_Hpm::Init(void *settings)
ENCODE_CHK_NULL_RETURN(task);

Av1BrcInitPkt* brcInitpkt = MOS_New(Av1BrcInitPkt, this, task, m_hwInterface);
RegisterPacket(Av1HucBrcInit, brcInitpkt);
ENCODE_CHK_STATUS_RETURN(RegisterPacket(Av1HucBrcInit, brcInitpkt));
ENCODE_CHK_STATUS_RETURN(brcInitpkt->Init());

Av1BrcUpdatePkt* brcUpdatepkt = MOS_New(Av1BrcUpdatePkt, this, task, m_hwInterface);
RegisterPacket(Av1HucBrcUpdate, brcUpdatepkt);
ENCODE_CHK_STATUS_RETURN(RegisterPacket(Av1HucBrcUpdate, brcUpdatepkt));
ENCODE_CHK_STATUS_RETURN(brcUpdatepkt->Init());

Av1VdencPktXe_Hpm *av1Vdencpkt = MOS_New(Av1VdencPktXe_Hpm, this, task, m_hwInterface);
RegisterPacket(Av1VdencPacket, av1Vdencpkt);
ENCODE_CHK_STATUS_RETURN(RegisterPacket(Av1VdencPacket, av1Vdencpkt));
ENCODE_CHK_STATUS_RETURN(av1Vdencpkt->Init());

if (m_dualEncEnable)
{
Av1PakIntegratePkt *av1PakIntPkt = MOS_New(Av1PakIntegratePkt, this, task, m_hwInterface);
RegisterPacket(Av1PakIntegrate, av1PakIntPkt);
ENCODE_CHK_STATUS_RETURN(RegisterPacket(Av1PakIntegrate, av1PakIntPkt));
ENCODE_CHK_STATUS_RETURN(av1PakIntPkt->Init());
}

Av1BackAnnotationPkt *av1BackAnnotationpkt = MOS_New(Av1BackAnnotationPkt, this, task, m_hwInterface);
RegisterPacket(Av1BackAnnotation, av1BackAnnotationpkt);
ENCODE_CHK_STATUS_RETURN(RegisterPacket(Av1BackAnnotation, av1BackAnnotationpkt));
ENCODE_CHK_STATUS_RETURN(av1BackAnnotationpkt->Init());

return MOS_STATUS_SUCCESS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,19 @@ MOS_STATUS Av1VdencPipelineXe_M_Base::Init(void *settings)
ENCODE_CHK_NULL_RETURN(task);

Av1BrcInitPkt* brcInitpkt = MOS_New(Av1BrcInitPkt, this, task, m_hwInterface);
RegisterPacket(Av1HucBrcInit, brcInitpkt);
ENCODE_CHK_STATUS_RETURN(RegisterPacket(Av1HucBrcInit, brcInitpkt));
ENCODE_CHK_STATUS_RETURN(brcInitpkt->Init());

Av1BrcUpdatePkt* brcUpdatepkt = MOS_New(Av1BrcUpdatePkt, this, task, m_hwInterface);
RegisterPacket(Av1HucBrcUpdate, brcUpdatepkt);
ENCODE_CHK_STATUS_RETURN(RegisterPacket(Av1HucBrcUpdate, brcUpdatepkt));
ENCODE_CHK_STATUS_RETURN(brcUpdatepkt->Init());

Av1VdencPktXe_M_Base *av1Vdencpkt = MOS_New(Av1VdencPktXe_M_Base, this, task, m_hwInterface);
RegisterPacket(Av1VdencPacket, av1Vdencpkt);
ENCODE_CHK_STATUS_RETURN(RegisterPacket(Av1VdencPacket, av1Vdencpkt));
ENCODE_CHK_STATUS_RETURN(av1Vdencpkt->Init());

Av1BackAnnotationPkt *av1BackAnnotationpkt = MOS_New(Av1BackAnnotationPkt, this, task, m_hwInterface);
RegisterPacket(Av1BackAnnotation, av1BackAnnotationpkt);
ENCODE_CHK_STATUS_RETURN(RegisterPacket(Av1BackAnnotation, av1BackAnnotationpkt));
ENCODE_CHK_STATUS_RETURN(av1BackAnnotationpkt->Init());

return MOS_STATUS_SUCCESS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,18 @@ MOS_STATUS Av1VdencPipelineXe_LPM_Plus::Init(void *settings)
#else
auto av1Vdencpkt = MOS_New(Av1VdencPktXe_Lpm_Plus, this, task, m_hwInterface);
#endif // !(_MEDIA_RESERVED)
RegisterPacket(Av1VdencPacket, av1Vdencpkt);
ENCODE_CHK_STATUS_RETURN(RegisterPacket(Av1VdencPacket, av1Vdencpkt));
ENCODE_CHK_STATUS_RETURN(av1Vdencpkt->Init());

if (m_dualEncEnable)
{
Av1PakIntegratePkt* av1PakIntPkt = MOS_New(Av1PakIntegratePkt, this, task, m_hwInterface);
RegisterPacket(Av1PakIntegrate, av1PakIntPkt);
ENCODE_CHK_STATUS_RETURN(RegisterPacket(Av1PakIntegrate, av1PakIntPkt));
ENCODE_CHK_STATUS_RETURN(av1PakIntPkt->Init());
}

auto av1BackAnnotationpkt = MOS_New(Av1BackAnnotationPkt, this, task, m_hwInterface);
RegisterPacket(Av1BackAnnotation, av1BackAnnotationpkt);
ENCODE_CHK_STATUS_RETURN(RegisterPacket(Av1BackAnnotation, av1BackAnnotationpkt));
ENCODE_CHK_STATUS_RETURN(av1BackAnnotationpkt->Init());

m_sfcItf = m_hwInterface->GetMediaSfcInterface();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,37 +55,37 @@ MOS_STATUS Vp9VdencPipelineXe_Lpm_Plus::Init(void *settings)
Vp9HucBrcInitPkt *brcInitPkt = MOS_New(Vp9HucBrcInitPkt, this, task, m_hwInterface);
ENCODE_CHK_NULL_RETURN(brcInitPkt);
ENCODE_CHK_STATUS_RETURN(RegisterPacket(HucBrcInit, brcInitPkt));
brcInitPkt->Init();
ENCODE_CHK_STATUS_RETURN(brcInitPkt->Init());

Vp9HucBrcUpdatePkt *brcUpdatePkt = MOS_New(Vp9HucBrcUpdatePkt, this, task, m_hwInterface);
ENCODE_CHK_NULL_RETURN(brcUpdatePkt);
ENCODE_CHK_STATUS_RETURN(RegisterPacket(HucBrcUpdate, brcUpdatePkt));
brcUpdatePkt->Init();
ENCODE_CHK_STATUS_RETURN(brcUpdatePkt->Init())

Vp9HpuPkt *hucProbPkt = MOS_New(Vp9HpuPkt, this, task, m_hwInterface);
ENCODE_CHK_NULL_RETURN(hucProbPkt);
ENCODE_CHK_STATUS_RETURN(RegisterPacket(Vp9HucProb, hucProbPkt));
hucProbPkt->Init();
ENCODE_CHK_STATUS_RETURN(hucProbPkt->Init());

Vp9HpuSuperFramePkt *hucSuperFramePkt = MOS_New(Vp9HpuSuperFramePkt, task, hucProbPkt);
ENCODE_CHK_NULL_RETURN(hucSuperFramePkt);
ENCODE_CHK_STATUS_RETURN(RegisterPacket(Vp9HucSuperFrame, hucSuperFramePkt));
hucSuperFramePkt->Init();
ENCODE_CHK_STATUS_RETURN(hucSuperFramePkt->Init());

Vp9DynamicScalPktXe_Lpm_Plus *vp9DynamicScalPkt = MOS_New(Vp9DynamicScalPktXe_Lpm_Plus, this, task, m_hwInterface);
ENCODE_CHK_NULL_RETURN(vp9DynamicScalPkt);
ENCODE_CHK_STATUS_RETURN(RegisterPacket(Vp9DynamicScal, vp9DynamicScalPkt));
vp9DynamicScalPkt->Init();
ENCODE_CHK_STATUS_RETURN(vp9DynamicScalPkt->Init());

Vp9VdencPktXe_Lpm_Plus *vp9VdencPkt = MOS_New(Vp9VdencPktXe_Lpm_Plus, this, task, m_hwInterface);
ENCODE_CHK_NULL_RETURN(vp9VdencPkt);
ENCODE_CHK_STATUS_RETURN(RegisterPacket(Vp9VdencPacket, vp9VdencPkt));
vp9VdencPkt->Init();
ENCODE_CHK_STATUS_RETURN(vp9VdencPkt->Init());

Vp9PakIntegratePktXe_Lpm_Plus *pakIntPkt = MOS_New(Vp9PakIntegratePktXe_Lpm_Plus, this, task, m_hwInterface);
ENCODE_CHK_NULL_RETURN(pakIntPkt);
ENCODE_CHK_STATUS_RETURN(RegisterPacket(Vp9PakIntegrate, pakIntPkt));
pakIntPkt->Init();
ENCODE_CHK_STATUS_RETURN(pakIntPkt->Init());

return MOS_STATUS_SUCCESS;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,37 +60,37 @@ MOS_STATUS Vp9VdencPipelineXe_Lpm_Plus_Base::Init(void *settings)
Vp9HucBrcInitPkt *brcInitPkt = MOS_New(Vp9HucBrcInitPkt, this, task, m_hwInterface);
ENCODE_CHK_NULL_RETURN(brcInitPkt);
ENCODE_CHK_STATUS_RETURN(RegisterPacket(HucBrcInit, brcInitPkt));
brcInitPkt->Init();
ENCODE_CHK_STATUS_RETURN(brcInitPkt->Init());

Vp9HucBrcUpdatePkt *brcUpdatePkt = MOS_New(Vp9HucBrcUpdatePkt, this, task, m_hwInterface);
ENCODE_CHK_NULL_RETURN(brcUpdatePkt);
ENCODE_CHK_STATUS_RETURN(RegisterPacket(HucBrcUpdate, brcUpdatePkt));
brcUpdatePkt->Init();
ENCODE_CHK_STATUS_RETURN(brcUpdatePkt->Init());

Vp9HpuPkt *hucProbPkt = MOS_New(Vp9HpuPkt, this, task, m_hwInterface);
ENCODE_CHK_NULL_RETURN(hucProbPkt);
ENCODE_CHK_STATUS_RETURN(RegisterPacket(Vp9HucProb, hucProbPkt));
hucProbPkt->Init();
ENCODE_CHK_STATUS_RETURN(hucProbPkt->Init());

Vp9HpuSuperFramePkt *hucSuperFramePkt = MOS_New(Vp9HpuSuperFramePkt, task, hucProbPkt);
ENCODE_CHK_NULL_RETURN(hucSuperFramePkt);
ENCODE_CHK_STATUS_RETURN(RegisterPacket(Vp9HucSuperFrame, hucSuperFramePkt));
hucSuperFramePkt->Init();
ENCODE_CHK_STATUS_RETURN(hucSuperFramePkt->Init());

Vp9DynamicScalPktXe_Lpm_Plus_Base *vp9DynamicScalPkt = MOS_New(Vp9DynamicScalPktXe_Lpm_Plus_Base, this, task, m_hwInterface);
ENCODE_CHK_NULL_RETURN(vp9DynamicScalPkt);
ENCODE_CHK_STATUS_RETURN(RegisterPacket(Vp9DynamicScal, vp9DynamicScalPkt));
vp9DynamicScalPkt->Init();
ENCODE_CHK_STATUS_RETURN(vp9DynamicScalPkt->Init());

Vp9VdencPktXe_Lpm_Plus_Base *vp9VdencPkt = MOS_New(Vp9VdencPktXe_Lpm_Plus_Base, this, task, m_hwInterface);
ENCODE_CHK_NULL_RETURN(vp9VdencPkt);
ENCODE_CHK_STATUS_RETURN(RegisterPacket(Vp9VdencPacket, vp9VdencPkt));
vp9VdencPkt->Init();
ENCODE_CHK_STATUS_RETURN(vp9VdencPkt->Init());

Vp9PakIntegratePkt *pakIntPkt = MOS_New(Vp9PakIntegratePkt, this, task, m_hwInterface);
ENCODE_CHK_NULL_RETURN(pakIntPkt);
ENCODE_CHK_STATUS_RETURN(RegisterPacket(Vp9PakIntegrate, pakIntPkt));
pakIntPkt->Init();
ENCODE_CHK_STATUS_RETURN(pakIntPkt->Init());

return MOS_STATUS_SUCCESS;
}
Expand Down

0 comments on commit b86b4e6

Please sign in to comment.