Skip to content

Commit cb65eea

Browse files
author
Ashok Kumar Mishra
committed
fix output mismatch for pme mode when --limit-mode is enabled
1 parent e84e1d9 commit cb65eea

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

source/encoder/search.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2025,7 +2025,8 @@ void Search::singleMotionEstimation(Search& master, Mode& interMode, const Predi
20252025

20262026
/* Get total cost of partition, but only include MV bit cost once */
20272027
bits += m_me.bitcost(outmv);
2028-
uint32_t cost = (satdCost - m_me.mvcost(outmv)) + m_rdCost.getCost(bits);
2028+
uint32_t mvCost = m_me.mvcost(outmv);
2029+
uint32_t cost = (satdCost - mvCost) + m_rdCost.getCost(bits);
20292030

20302031
/* Refine MVP selection, updates: mvpIdx, bits, cost */
20312032
mvp = checkBestMVP(amvp, outmv, mvpIdx, bits, cost);
@@ -2041,6 +2042,7 @@ void Search::singleMotionEstimation(Search& master, Mode& interMode, const Predi
20412042
bestME[list].ref = ref;
20422043
bestME[list].cost = cost;
20432044
bestME[list].bits = bits;
2045+
bestME[list].mvCost = mvCost;
20442046
}
20452047
}
20462048

@@ -2153,8 +2155,6 @@ void Search::predInterSearch(Mode& interMode, const CUGeom& cuGeom, bool bChroma
21532155
refMask >>= 16;
21542156
}
21552157

2156-
2157-
21582158
if (pme.m_jobTotal > 2)
21592159
{
21602160
pme.tryBondPeers(*m_frame->m_encData->m_jobProvider, pme.m_jobTotal - 1);

0 commit comments

Comments
 (0)