Home | History | Annotate | Download | only in utils

Lines Matching refs:counts

27 // Change the population counts in a way that the consequent
29 static int OptimizeHuffmanForRle(int length, int* const counts) {
37 if (counts[length - 1] != 0) {
38 // Now counts[0..length - 1] does not have trailing zeros.
42 // 2) Let's mark all population counts that already can be encoded
52 int symbol = counts[0];
55 if (i == length || counts[i] != symbol) {
65 symbol = counts[i];
72 // 3) Let's replace those population counts that lead to more rle codes.
75 int limit = counts[0];
80 !ValuesShouldBeCollapsedToStrideAverage(counts[i], limit)) {
93 // We don't want to change value at counts[i],
95 counts[i - k - 1] = count;
103 limit = (counts[i] + counts[i + 1] +
104 counts[i + 2] + counts[i + 3] + 2) / 4;
106 limit = counts[i];
113 sum += counts[i];
159 // (data,length): population counts.
172 // especially when population counts are longer than 2**tree_limit, but