mirror of
https://github.com/google/brotli.git
synced 2024-12-28 02:31:05 +00:00
Merge pull request #34 from szabadka/master
Fix another use of log2() in literal_cost.cc
This commit is contained in:
commit
ca29aa22c2
@ -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
Block a user