Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Yonatan Shiferaw
vtm partial output
Commits
2fb49692
Commit
2fb49692
authored
Feb 18, 2021
by
Han Huang
Browse files
Replace std::sort() with std::stable_sort() to avoid cross-platform performance mismatch.
parent
7512abae
Changes
3
Hide whitespace changes
Inline
Side-by-side
source/Lib/EncoderLib/EncAdaptiveLoopFilter.cpp
View file @
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
;
...
...
source/Lib/EncoderLib/EncCu.h
View file @
2fb49692
...
...
@@ -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
{
...
...
source/Lib/EncoderLib/IntraSearch.cpp
View file @
2fb49692
...
...
@@ -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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment