Commit df6277c6 authored by Karsten Suehring's avatar Karsten Suehring

GCC 10 comile fix

Silence warnings for potentially invalid array indexes by adding explicit checks.
parent 77aed029
......@@ -922,6 +922,7 @@ void PU::getInterMergeCandidates( const PredictionUnit &pu, MergeCtx& mrgCtx,
const CodingStructure &cs = *pu.cs;
const Slice &slice = *pu.cs->slice;
const uint32_t maxNumMergeCand = pu.cs->sps->getMaxNumMergeCand();
CHECK (maxNumMergeCand > MRG_MAX_NUM_CANDS, "selected maximum number of merge candidate exceeds global limit");
for (uint32_t ui = 0; ui < maxNumMergeCand; ++ui)
{
mrgCtx.BcwIdx[ui] = BCW_DEFAULT;
......
......@@ -2664,6 +2664,7 @@ void InterSearch::predInterSearch(CodingUnit& cu, Partitioner& partitioner)
RefPicList eCurRefList = (curRefList ? REF_PIC_LIST_1 : REF_PIC_LIST_0);
int refIdxCur = cs.slice->getSymRefIdx( curRefList );
int refIdxTar = cs.slice->getSymRefIdx( tarRefList );
CHECK (refIdxCur==-1 || refIdxTar==-1, "Uninitialized reference index not allowed");
if ( aacAMVPInfo[curRefList][refIdxCur].mvCand[0] == aacAMVPInfo[curRefList][refIdxCur].mvCand[1] )
aacAMVPInfo[curRefList][refIdxCur].numCand = 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment