Вы находитесь на странице: 1из 7

Intel

PVS-Studio
:
: 19.04.2012
Intel Performance Primitives Library
PVS-Studio.
, Intel . IPP
. -, . -,
. -, .
, IPP Samples ( , ).
, , IPP,
.
, .
IPP Samples . ,
PVS-Studio .
, .
.
, PVS-Studio v4.60. ,
. , ,
. IPP
. ,
. .
, IPP Samples.

N1.
AACStatus bsacdecSetNumChannels(Ipp32s channelConfiguration,
AACDec *state)
{
state->com.m_channel_number = channelConfiguration;
if (channelConfiguration == 7) {
state->com.m_channel_number;
}

return AAC_OK;
}
PVS-Studio: V607 Ownerless expression 'state>com.m_channel_number'. aac_dec aac_dec_api_fp.c 1404
"state->com.m_channel_number;" . ,
- .

N2.
IPP Samples ,
malloc() memset().
, , . ,
, , -
.
, _MediaDataEx :
virtual bool TryStrongCasting(....) const;
virtual bool TryWeakCasting(....) const;

:
Status VC1Splitter::Init(SplitterParams& rInit)
{
MediaDataEx::_MediaDataEx *m_stCodes;
...
m_stCodes = (MediaDataEx::_MediaDataEx *)
ippsMalloc_8u(
START_CODE_NUMBER*2*sizeof(Ipp32s)+
sizeof(MediaDataEx::_MediaDataEx));
...
memset(m_stCodes, 0,
(START_CODE_NUMBER*2*sizeof(Ipp32s)+
sizeof(MediaDataEx::_MediaDataEx)));
...
}

PVS-Studio: V598 The 'memset' function is used to nullify the fields of


'_MediaDataEx' class. Virtual method table will be damaged by this. vc1_spl umc_vc1_spl.cpp 131

, , .
:
V598 The 'memset' function is used to nullify the fields of '_MediaDataEx' class. Virtual method table
will be damaged by this. vc1_dec umc_vc1_video_decoder.cpp 641 False
V598 The 'memset' function is used to nullify the fields of 'AVS_DISASSEMBLING_CONTEXT' class. Virtual
method table will be damaged by this. avs_enc umc_avs_enc_slice.cpp 45
V598 The 'memset' function is used to nullify the fields of 'AVS_DISASSEMBLING_CONTEXT' class. Virtual
method table will be damaged by this. avs_enc umc_avs_enc_slice.cpp 29
V598 The 'memset' function is used to nullify the fields of 'AVS_DISASSEMBLING_CONTEXT' class. Virtual
method table will be damaged by this. avs_enc umc_avs_enc_slice.cpp 22
V598 The 'memcpy' function is used to copy the fields of 'AVSVideoEncoderParams' class. Virtual
method table will be damaged by this. avs_enc umc_avs_enc.cpp 115
V598 The 'memset' function is used to nullify the fields of 'AVS_DECODING_CONTEXT' class. Virtual
method table will be damaged by this. avs_dec umc_avs_dec_slice_init.cpp 65
V598 The 'memset' function is used to nullify the fields of 'AVS_DEBLOCKING_CONTEXT' class. Virtual
method table will be damaged by this. avs_common umc_avs_slice.cpp 153
V598 The 'memset' function is used to nullify the fields of 'AVS_RECONSTRUCTING_CONTEXT' class.
Virtual method table will be damaged by this. avs_common umc_avs_slice.cpp 133
V598 The 'memset' function is used to nullify the fields of 'AVS_DEBLOCKING_CONTEXT' class. Virtual
method table will be damaged by this. avs_common umc_avs_slice.cpp 43
V598 The 'memset' function is used to nullify the fields of 'AVS_RECONSTRUCTING_CONTEXT' class.
Virtual method table will be damaged by this. avs_common umc_avs_slice.cpp 42
V598 The 'memset' function is used to nullify the fields of 'AVS_DECODING_CONTEXT' class. Virtual
method table will be damaged by this. avs_common umc_avs_slice.cpp 41
V598 The 'memset' function is used to nullify the fields of 'AVS_DEBLOCKING_CONTEXT' class. Virtual
method table will be damaged by this. avs_common umc_avs_slice.cpp 32
V598 The 'memset' function is used to nullify the fields of 'AVS_RECONSTRUCTING_CONTEXT' class.
Virtual method table will be damaged by this. avs_common umc_avs_slice.cpp 31
V598 The 'memset' function is used to nullify the fields of 'AVS_DECODING_CONTEXT' class. Virtual
method table will be damaged by this. avs_common umc_avs_slice.cpp 30

N3.

, ,
. ,
, .
:
VIDEO_DRV_CREATE_BUFFERS_FUNC(....)
{
...
VideoDrvVideoMemInfo* drv_vm = &(driver->m_VideoMemInfo);
...
if ((NULL == driver) || (NULL == bufs))
{
ERR_SET(VM_NULL_PTR, "null ptr");
}
...
}
PVS-Studio: V595 The 'driver' pointer was utilized before it was verified
against nullptr. Check lines: 40, 46. video_renders drv.c 40
,
"driver==NULL" .
:
Ipp16s *pNewSpeech = encoderObj->stEncState.pSpeechPtrNew;
if (NULL==encoderObj || NULL==src || NULL ==dst )
return APIGSMAMR_StsBadArgErr;
PVS-Studio: V595 The 'encoderObj' pointer was utilized before it was
verified against nullptr. Check lines: 296, 298. speech encgsmamr.c 296

m_pAVSCompressorParams = DynamicCast<AVSVideoEncoderParams> (pParams);


...
m_qp = m_pAVSCompressorParams->m_iConstQuant;
// check error(s)
if (NULL == m_pAVSCompressorParams)

return UMC_ERR_NULL_PTR;
PVS-Studio: V595 The 'm_pAVSCompressorParams' pointer was utilized
before it was verified against nullptr. Check lines: 88, 91. avs_enc umc_avs_enc_fusion_core.cpp 88

N4.
','. :
void GetIntraDCPredictors(VC1Context* pContext)
{
DCPred.DC[13] = pC->DCBlkPred[5].DC,QurrQuant;
...
}
PVS-Studio: V521 Such expressions using the ',' operator are dangerous.
Make sure the expression is correct. vc1_dec umc_vc1_dec_mb_com.cpp 370
, - .
:
V521 Such expressions using the ',' operator are dangerous. Make sure the expression is correct. speech
usc_dtmf.c 309
static int DTMF_16s(....)
{
...
for (i = pIppTDParams->dtmf_fs, j = 0;
i < dtmf_frame_size+pIppTDParams->dtmf_fs, j < nbytes;
i++, j++)
}
PVS-Studio: V521 Such expressions using the ',' operator are dangerous.
Make sure the expression is correct. speech usc_dtmf.c 309
, . ,
. , :
i < dtmf_frame_size+pIppTDParams->dtmf_fs && j < nbytes

N5.

class MeMV
{
public:
MeMV(){};
MeMV(int a0){x = (Ipp16s)a0; y=(Ipp16s)a0;};
MeMV(int a0, int a1){x = (Ipp16s)a0; y=(Ipp16s)a1;};
...
}

MeMV MePredictCalculatorVC1::GetPrediction8x8()
{
...
default:
return false;
...
}
PVS-Studio: V601 The 'false' value becomes a class object. me
umc_vec_prediction.cpp 754
GetPrediction8x8() MeMV. ,
'false'. int MeMV(int a0).
, - .
:
V601 The 'false' value becomes a class object. me umc_vec_prediction.cpp 717

N6.
IPP Samples ,
. .
.
, - ,
: " , . ".
: ipp-samples-ub.txt.


IPP IPP Samples, .
PVS-Studio,
.
.
@Code_Analysis.
++, ,
PVS-Studio.

Вам также может понравиться