Lines Matching refs:size_t
21 static size_t UTF8Position(size_t last, size_t c, size_t clamp) { in UTF8Position()
25 return BROTLI_MIN(size_t, 1, clamp); in UTF8Position()
31 return BROTLI_MIN(size_t, 2, clamp); in UTF8Position()
36 static size_t DecideMultiByteStatsLevel(size_t pos, size_t len, size_t mask, in DecideMultiByteStatsLevel()
38 size_t counts[3] = { 0 }; in DecideMultiByteStatsLevel()
39 size_t max_utf8 = 1; /* should be 2, but 1 compresses better. */ in DecideMultiByteStatsLevel()
40 size_t last_c = 0; in DecideMultiByteStatsLevel()
41 size_t i; in DecideMultiByteStatsLevel()
43 size_t c = data[(pos + i) & mask]; in DecideMultiByteStatsLevel()
56 static void EstimateBitCostsForLiteralsUTF8(size_t pos, size_t len, size_t mask, in EstimateBitCostsForLiteralsUTF8()
60 const size_t max_utf8 = DecideMultiByteStatsLevel(pos, len, mask, data); in EstimateBitCostsForLiteralsUTF8()
61 size_t histogram[3][256] = { { 0 } }; in EstimateBitCostsForLiteralsUTF8()
62 size_t window_half = 495; in EstimateBitCostsForLiteralsUTF8()
63 size_t in_window = BROTLI_MIN(size_t, window_half, len); in EstimateBitCostsForLiteralsUTF8()
64 size_t in_window_utf8[3] = { 0 }; in EstimateBitCostsForLiteralsUTF8()
66 size_t i; in EstimateBitCostsForLiteralsUTF8()
68 size_t last_c = 0; in EstimateBitCostsForLiteralsUTF8()
69 size_t utf8_pos = 0; in EstimateBitCostsForLiteralsUTF8()
71 size_t c = data[(pos + i) & mask]; in EstimateBitCostsForLiteralsUTF8()
83 size_t c = in EstimateBitCostsForLiteralsUTF8()
85 size_t last_c = in EstimateBitCostsForLiteralsUTF8()
87 size_t utf8_pos2 = UTF8Position(last_c, c, max_utf8); in EstimateBitCostsForLiteralsUTF8()
93 size_t c = data[(pos + i + window_half - 1) & mask]; in EstimateBitCostsForLiteralsUTF8()
94 size_t last_c = data[(pos + i + window_half - 2) & mask]; in EstimateBitCostsForLiteralsUTF8()
95 size_t utf8_pos2 = UTF8Position(last_c, c, max_utf8); in EstimateBitCostsForLiteralsUTF8()
100 size_t c = i < 1 ? 0 : data[(pos + i - 1) & mask]; in EstimateBitCostsForLiteralsUTF8()
101 size_t last_c = i < 2 ? 0 : data[(pos + i - 2) & mask]; in EstimateBitCostsForLiteralsUTF8()
102 size_t utf8_pos = UTF8Position(last_c, c, max_utf8); in EstimateBitCostsForLiteralsUTF8()
103 size_t masked_pos = (pos + i) & mask; in EstimateBitCostsForLiteralsUTF8()
104 size_t histo = histogram[utf8_pos][data[masked_pos]]; in EstimateBitCostsForLiteralsUTF8()
127 void BrotliEstimateBitCostsForLiterals(size_t pos, size_t len, size_t mask, in BrotliEstimateBitCostsForLiterals()
133 size_t histogram[256] = { 0 }; in BrotliEstimateBitCostsForLiterals()
134 size_t window_half = 2000; in BrotliEstimateBitCostsForLiterals()
135 size_t in_window = BROTLI_MIN(size_t, window_half, len); in BrotliEstimateBitCostsForLiterals()
138 size_t i; in BrotliEstimateBitCostsForLiterals()
145 size_t histo; in BrotliEstimateBitCostsForLiterals()