diff --git a/source/Lib/CommonLib/TrQuant.cpp b/source/Lib/CommonLib/TrQuant.cpp index 1c6a54089baf80e3f6c3c5738ebc87f662cbb0d8..744174de06afd9d73bea621571c4168589d41b1d 100644 --- a/source/Lib/CommonLib/TrQuant.cpp +++ b/source/Lib/CommonLib/TrQuant.cpp @@ -963,7 +963,8 @@ void TrQuant::transformNxN(TransformUnit &tu, const ComponentID &compID, const Q int numTests = 0; for (auto &itC: trCosts) { - const bool testTr = itC.first <= (itC.second == 1 ? thrTS : thr) && numTests <= maxCand; + const bool isTS = trModes.at(itC.second).first == MtsType::SKIP; + const bool testTr = itC.first <= (isTS ? thrTS : thr) && numTests <= maxCand; trModes.at(itC.second).second = testTr; numTests += testTr;