Skip to content

Commit b88adaf

Browse files
stellawuintelgfxVPLsdm
authored andcommitted
[decode][mediasdk] Fix Coverity issues in decode and test components (CIDs 3568170, 3584109, 3301792, 3388910, 3403404, 3403405)
- CID 3568170 (RULE_OF_ZERO_THREE_FIVE): Add delete move constructor and move assignment operator to DecVppSfc to satisfy Rule of Five. Class already explicitly defines copy ctor, copy assign, and destructor. - CID 3584109 (MISSING_LOCK): Add std::lock_guard<std::mutex> guard(m_mGuard) in GetDecodeStat before accessing decoder->m_stat to protect against concurrent modification. - CID 3301792 (COPY_INSTEAD_OF_MOVE): Use std::move(dpb) at last use in PackAU to avoid an unnecessary copy of the DPB list when passing to PackSliceParam (dpb is not used after this call). - CIDs 3388910, 3403404, 3403405 (COPY_INSTEAD_OF_MOVE): Use std::move in Field constructor and STRUCT macro to avoid redundant copies when constructing tsStruct Field objects from std::string _name parameter. False positives (no fix needed): - CID 3584110 (MISSING_LOCK): Decode routine is intentionally called concurrently by scheduler threads; adding a lock would break parallelism. - CIDs 3390335, 3390336 (SLEEP): Same pattern as H265/H264 decoders; SurfaceSource::Reset/Close under m_guard is by design. - CID 3583235 (INTEGER_OVERFLOW): size >= 1 is guaranteed by loop break at line 168, so size -= 1 cannot underflow. Coverity: CIDs 3568170, 3584109, 3301792, 3388910, 3403404, 3403405
1 parent 3e7441f commit b88adaf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

_studio/shared/umc/codec/vvc_dec/src/umc_vvc_va_packer_vaapi.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -953,7 +953,7 @@ namespace UMC_VVC_DECODER
953953
PackSliceStructParams(sliceStruct, pFirstSlice);
954954

955955
// slice control buffer packing
956-
PackSliceParam(picParam,dpb,pSliceInfo);
956+
PackSliceParam(picParam,std::move(dpb),pSliceInfo);
957957

958958
// Mark APS after sending buffer pack
959959
pFirstSlice->MarkAPS();

0 commit comments

Comments
 (0)