Merge pull request #34 from szabadka/master

Fix another use of log2() in literal_cost.cc
This commit is contained in:
szabadka 2015-02-27 16:54:15 +01:00
commit ca29aa22c2

View File

@ -158,7 +158,7 @@ void EstimateBitCostsForLiterals(size_t pos, size_t len, size_t mask,
if (histo == 0) {
histo = 1;
}
float lit_cost = log2(static_cast<double>(in_window) / histo);
float lit_cost = FastLog2(in_window) - FastLog2(histo);
lit_cost += 0.029;
if (lit_cost < 1.0) {
lit_cost *= 0.5;