Commit e1e207ae authored by Frank Bossen's avatar Frank Bossen

Fix #1370: use stack instead of heap for local arrays

parent f8cd28b7
Pipeline #6009 passed with stage
in 15 minutes and 10 seconds
......@@ -2867,14 +2867,10 @@ void EncCu::xCheckRDCostMergeGeo2Nx2N(CodingStructure *&tempCS, CodingStructure
m_pcRdCost->setDistParam(distParamWholeBlk, tempCS->getOrgBuf().Y(), m_acMergeBuffer[0].Y().buf, m_acMergeBuffer[0].Y().stride, sps.getBitDepth(CHANNEL_TYPE_LUMA), COMPONENT_Y);
Distortion bestWholeBlkSad = MAX_UINT64;
double bestWholeBlkCost = MAX_DOUBLE;
Distortion *sadWholeBlk;
sadWholeBlk = new Distortion[maxNumMergeCandidates];
int *pocMrg;
Mv *MrgMv;
bool *isSkipThisCand;
pocMrg = new int[maxNumMergeCandidates];
MrgMv = new Mv[maxNumMergeCandidates];
isSkipThisCand = new bool[maxNumMergeCandidates];
Distortion sadWholeBlk[MRG_MAX_NUM_CANDS];
int pocMrg[MRG_MAX_NUM_CANDS];
Mv MrgMv[MRG_MAX_NUM_CANDS];
bool isSkipThisCand[MRG_MAX_NUM_CANDS];
for (int i = 0; i < maxNumMergeCandidates; i++)
isSkipThisCand[i] = false;
for (uint8_t mergeCand = 0; mergeCand < maxNumMergeCandidates; mergeCand++)
......@@ -2966,10 +2962,6 @@ void EncCu::xCheckRDCostMergeGeo2Nx2N(CodingStructure *&tempCS, CodingStructure
m_GeoCostList.insert(splitDir, 1, mergeCand, (double)sadSmall + (double)bitsCand * sqrtLambdaForFirstPass);
}
}
delete[] sadWholeBlk;
delete[] pocMrg;
delete[] MrgMv;
delete[] isSkipThisCand;
for (int splitDir = 0; splitDir < GEO_NUM_PARTITION_MODE; splitDir++)
{
......
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