Commit 204b2025 authored by Karsten Suehring's avatar Karsten Suehring

fix out of bound array access in MIP

parent 6ee74fa0
......@@ -1324,28 +1324,27 @@ void IntraSearch::estIntraPredLumaQT( CodingUnit &cu, Partitioner &partitioner,
#if JVET_N0217_MATRIX_INTRAPRED
m_bestCostNonMip = MAX_DOUBLE;
static_vector<ModeInfo, FAST_UDI_MAX_RDMODE_NUM> uiRdModeListTemp;
for( int i = 0; i < numModesForFullRD; i++)
for( int i = 0; i < uiRdModeList.size(); i++)
{
if( ! uiRdModeList[i].mipFlg )
{
uiRdModeListTemp.push_back( uiRdModeList[i] );
}
}
for( int i = 0; i < numModesForFullRD; i++)
for( int i = 0; i < uiRdModeList.size(); i++)
{
if( uiRdModeList[i].mipFlg )
{
uiRdModeListTemp.push_back( uiRdModeList[i] );
}
}
for( int i = 0; i < numModesForFullRD; i++)
for( int i = 0; i < uiRdModeList.size(); i++)
{
uiRdModeList[i] = uiRdModeListTemp[i];
}
#else
#endif
// just to be sure
numModesForFullRD = ( int ) uiRdModeList.size();
#endif
PartSplit intraSubPartitionsProcOrder = TU_NO_ISP;
int bestNormalIntraModeIndex = -1;
#if !JVET_N0217_MATRIX_INTRAPRED
......@@ -3754,4 +3753,4 @@ void IntraSearch::reduceHadCandList(static_vector<T, N>& candModeList, static_ve
candCostList = tempCandCostList;
numModesForFullRD = int(candModeList.size());
}
#endif
\ No newline at end of file
#endif
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