mirror of https://github.com/google/brotli
Fix another use of log2() in literal_cost.cc
This commit is contained in:
parent
1fce8b8086
commit
28135ea9e8
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue