Commit 67bfc0cd authored by Frank Bossen's avatar Frank Bossen
Browse files

Merge branch 'master' into 'master'

Fix #1467: Replace std::sort() with std::stable_sort() to avoid cross-platform performance mismatch

See merge request jvet/VVCSoftware_VTM!2022
parents 7512abae 2fb49692
......@@ -3562,7 +3562,7 @@ void EncAdaptiveLoopFilter::determineControlIdcValues(CodingStructure &cs, const
{
std::copy_n(curFilterEnabled, MAX_NUM_CC_ALF_FILTERS, filterEnabled);
std::sort(filterIdxCount, filterIdxCount + MAX_NUM_CC_ALF_FILTERS, compareCounts);
std::stable_sort(filterIdxCount, filterIdxCount + MAX_NUM_CC_ALF_FILTERS, compareCounts);
int filterIdc = 1;
ccAlfFilterCount = 0;
......
......@@ -97,7 +97,7 @@ public:
GeoComboCostList() {};
~GeoComboCostList() {};
std::vector<GeoMergeCombo> list;
void sortByCost() { std::sort(list.begin(), list.end(), SmallerThanComboCost()); };
void sortByCost() { std::stable_sort(list.begin(), list.end(), SmallerThanComboCost()); };
};
struct SingleGeoMergeEntry
{
......
......@@ -5838,7 +5838,7 @@ bool IntraSearch::xSortISPCandList(double bestCostSoFar, double bestNonISPCost,
m_ispCandListVer.clear();
// we sort the normal intra modes according to their full RD costs
std::sort(m_regIntraRDListWithCosts.begin(), m_regIntraRDListWithCosts.end(), ModeInfoWithCost::compareModeInfoWithCost);
std::stable_sort(m_regIntraRDListWithCosts.begin(), m_regIntraRDListWithCosts.end(), ModeInfoWithCost::compareModeInfoWithCost);
// we get the best angle from the regular intra list
int bestNormalIntraAngle = -1;
......
Supports Markdown
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