mirror of
https://github.com/google/brotli.git
synced 2025-01-01 04:40:08 +00:00
Merge pull request #8 from szabadka/master
Minor tuning of encoder heuristics.
This commit is contained in:
commit
f580616386
@ -33,7 +33,7 @@ namespace brotli {
|
||||
|
||||
static const int kMaxLiteralHistograms = 100;
|
||||
static const int kMaxCommandHistograms = 50;
|
||||
static const double kLiteralBlockSwitchCost = 26;
|
||||
static const double kLiteralBlockSwitchCost = 28.1;
|
||||
static const double kCommandBlockSwitchCost = 13.5;
|
||||
static const double kDistanceBlockSwitchCost = 14.6;
|
||||
static const int kLiteralStrideLength = 70;
|
||||
|
@ -194,8 +194,9 @@ class HashLongestMatch {
|
||||
bool match_found = false;
|
||||
// Don't accept a short copy from far away.
|
||||
double best_score = 8.115;
|
||||
if (insert_length_ < 4) {
|
||||
double cost_diff[4] = { 0.10, 0.04, 0.02, 0.01 };
|
||||
if (insert_length_ < 8) {
|
||||
double cost_diff[8] =
|
||||
{ 0.1, 0.038, 0.019, 0.013, 0.001, 0.001, 0.001, 0.001 };
|
||||
best_score += cost_diff[insert_length_];
|
||||
}
|
||||
size_t best_len = *best_len_out;
|
||||
|
Loading…
Reference in New Issue
Block a user