Ticket #129: cpr-patch.patch

File cpr-patch.patch, 781 bytes (added by gordon, 5 years ago)
  • source/Lib/EncoderLib/InterSearch.cpp

    diff --git a/source/Lib/EncoderLib/InterSearch.cpp b/source/Lib/EncoderLib/InterSearch.cpp
    index dfdc068..63c9876 100644
    a b void InterSearch::xCPREstimation(PredictionUnit& pu, PelUnitBuf& origBuf, 
    12981298          ruiCost = p->second;
    12991299          buffered = true;
    13001300        }
     1301        else if (p->second == ruiCost)
     1302        {
     1303          // STABILISATION HACK
     1304          // CHOOSE SMALLEST X THEN SMALLEST Y.
     1305          if (bv.hor < rcMv.getHor()
     1306            || (bv.hor == rcMv.getHor() && bv.ver < rcMv.getVer()))
     1307          {
     1308            rcMv = bv;
     1309            ruiCost = p->second; // although same.
     1310            buffered = true;
     1311          }
     1312        }
    13011313      }
    13021314    }
    13031315  }