diff options
Diffstat (limited to 'c/enc/backward_references_inc.h')
-rw-r--r-- | c/enc/backward_references_inc.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/c/enc/backward_references_inc.h b/c/enc/backward_references_inc.h index 38a48d3..81c783c 100644 --- a/c/enc/backward_references_inc.h +++ b/c/enc/backward_references_inc.h @@ -8,7 +8,8 @@ /* template parameters: EXPORT_FN, FN */ static BROTLI_NOINLINE void EXPORT_FN(CreateBackwardReferences)( - size_t num_bytes, size_t position, + const BrotliDictionary* dictionary, + const uint16_t* dictionary_hash, size_t num_bytes, size_t position, const uint8_t* ringbuffer, size_t ringbuffer_mask, const BrotliEncoderParams* params, HasherHandle hasher, int* dist_cache, size_t* last_insert_len, Command* commands, size_t* num_commands, @@ -41,10 +42,9 @@ static BROTLI_NOINLINE void EXPORT_FN(CreateBackwardReferences)( sr.len_code_delta = 0; sr.distance = 0; sr.score = kMinScore; - FN(FindLongestMatch)(hasher, ¶ms->dictionary, - ringbuffer, ringbuffer_mask, dist_cache, position, - max_length, max_distance, gap, - params->dist.max_distance, &sr); + FN(FindLongestMatch)(hasher, dictionary, dictionary_hash, ringbuffer, + ringbuffer_mask, dist_cache, position, + max_length, max_distance, gap, &sr); if (sr.score > kMinScore) { /* Found a match. Let's look for something even better ahead. */ int delayed_backward_references_in_row = 0; @@ -58,9 +58,9 @@ static BROTLI_NOINLINE void EXPORT_FN(CreateBackwardReferences)( sr2.distance = 0; sr2.score = kMinScore; max_distance = BROTLI_MIN(size_t, position + 1, max_backward_limit); - FN(FindLongestMatch)(hasher, ¶ms->dictionary, - ringbuffer, ringbuffer_mask, dist_cache, position + 1, max_length, - max_distance, gap, params->dist.max_distance, &sr2); + FN(FindLongestMatch)(hasher, dictionary, dictionary_hash, ringbuffer, + ringbuffer_mask, dist_cache, position + 1, + max_length, max_distance, gap, &sr2); if (sr2.score >= sr.score + cost_diff_lazy) { /* Ok, let's just write one byte for now and start a match from the next byte. */ @@ -89,8 +89,8 @@ static BROTLI_NOINLINE void EXPORT_FN(CreateBackwardReferences)( dist_cache[0] = (int)sr.distance; FN(PrepareDistanceCache)(hasher, dist_cache); } - InitCommand(commands++, ¶ms->dist, insert_length, - sr.len, sr.len_code_delta, distance_code); + InitCommand(commands++, insert_length, sr.len, sr.len_code_delta, + distance_code); } *num_literals += insert_length; insert_length = 0; |