Home | History | Annotate | Download | only in utils

Lines Matching refs:counts

29 // Change the population counts in a way that the consequent
31 static int OptimizeHuffmanForRle(int length, int* const counts) {
39 if (counts[length - 1] != 0) {
40 // Now counts[0..length - 1] does not have trailing zeros.
44 // 2) Let's mark all population counts that already can be encoded
54 int symbol = counts[0];
57 if (i == length || counts[i] != symbol) {
67 symbol = counts[i];
74 // 3) Let's replace those population counts that lead to more rle codes.
77 int limit = counts[0];
82 !ValuesShouldBeCollapsedToStrideAverage(counts[i], limit)) {
95 // We don't want to change value at counts[i],
97 counts[i - k - 1] = count;
105 limit = (counts[i] + counts[i + 1] +
106 counts[i + 2] + counts[i + 3] + 2) / 4;
108 limit = counts[i];
115 sum += counts[i];
161 // (data,length): population counts.
174 // especially when population counts are longer than 2**tree_limit, but