diff options
author | Tao Bao <tbao@google.com> | 2018-09-11 03:21:35 +0000 |
---|---|---|
committer | Tao Bao <tbao@google.com> | 2018-09-10 20:25:06 -0700 |
commit | c4af2b09ada22257ff12967537264627a3936822 (patch) | |
tree | bbbd0739556711089201e0448c444e8cf8bc547f /c/enc/hash_longest_match64_inc.h | |
parent | 885730d69b5f844f1c59f6de809495726290ae22 (diff) | |
download | brotli-c4af2b09ada22257ff12967537264627a3936822.tar.gz |
Revert "Merge tag 'v1.0.5' into HEAD"
This reverts commit 885730d69b5f844f1c59f6de809495726290ae22.
Reason for revert: b/114832768 (32-bit
recovery_component_test.UpdaterTest#brotli_new_data on marlin is
broken).
Bug: 114832768
Test: The above test passes w/ the revert.
Change-Id: I9d6ad3ce44069a94bc78020ed28c5aa1a6d10ce8
Diffstat (limited to 'c/enc/hash_longest_match64_inc.h')
-rwxr-xr-x[-rw-r--r--] | c/enc/hash_longest_match64_inc.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/c/enc/hash_longest_match64_inc.h b/c/enc/hash_longest_match64_inc.h index e099edf..6b0697b 100644..100755 --- a/c/enc/hash_longest_match64_inc.h +++ b/c/enc/hash_longest_match64_inc.h @@ -20,7 +20,7 @@ static BROTLI_INLINE size_t FN(HashTypeLength)(void) { return 8; } static BROTLI_INLINE size_t FN(StoreLookahead)(void) { return 8; } /* HashBytes is the function that chooses the bucket to place the address in. */ -static BROTLI_INLINE uint32_t FN(HashBytes)(const uint8_t* data, +static BROTLI_INLINE uint32_t FN(HashBytes)(const uint8_t *data, const uint64_t mask, const int shift) { const uint64_t h = (BROTLI_UNALIGNED_LOAD64LE(data) & mask) * kHashMul64Long; @@ -105,7 +105,7 @@ static BROTLI_INLINE size_t FN(HashMemAllocInBytes)( /* Look at 4 bytes at &data[ix & mask]. Compute a hash from these, and store the value of ix at that position. */ -static BROTLI_INLINE void FN(Store)(HasherHandle handle, const uint8_t* data, +static BROTLI_INLINE void FN(Store)(HasherHandle handle, const uint8_t *data, const size_t mask, const size_t ix) { HashLongestMatch* self = FN(Self)(handle); uint16_t* num = FN(Num)(self); @@ -119,7 +119,7 @@ static BROTLI_INLINE void FN(Store)(HasherHandle handle, const uint8_t* data, } static BROTLI_INLINE void FN(StoreRange)(HasherHandle handle, - const uint8_t* data, const size_t mask, const size_t ix_start, + const uint8_t *data, const size_t mask, const size_t ix_start, const size_t ix_end) { size_t i; for (i = ix_start; i < ix_end; ++i) { @@ -158,11 +158,11 @@ static BROTLI_INLINE void FN(PrepareDistanceCache)( Writes the best match into |out|. |out|->score is updated only if a better match is found. */ static BROTLI_INLINE void FN(FindLongestMatch)(HasherHandle handle, - const BrotliEncoderDictionary* dictionary, + const BrotliDictionary* dictionary, const uint16_t* dictionary_hash, const uint8_t* BROTLI_RESTRICT data, const size_t ring_buffer_mask, const int* BROTLI_RESTRICT distance_cache, const size_t cur_ix, const size_t max_length, const size_t max_backward, const size_t gap, - const size_t max_distance, HasherSearchResult* BROTLI_RESTRICT out) { + HasherSearchResult* BROTLI_RESTRICT out) { HasherCommon* common = GetHasherCommon(handle); HashLongestMatch* self = FN(Self)(handle); uint16_t* num = FN(Num)(self); @@ -257,9 +257,9 @@ static BROTLI_INLINE void FN(FindLongestMatch)(HasherHandle handle, ++num[key]; } if (min_score == out->score) { - SearchInStaticDictionary(dictionary, - handle, &data[cur_ix_masked], max_length, max_backward + gap, - max_distance, out, BROTLI_FALSE); + SearchInStaticDictionary(dictionary, dictionary_hash, + handle, &data[cur_ix_masked], max_length, max_backward + gap, out, + BROTLI_FALSE); } } |