Lines Matching refs:tree
56 /* This function will create a Huffman tree.
58 The catch here is that the tree cannot be arbitrarily deep.
63 and this minimum value is raised until the tree matches the
74 HuffmanTree* tree,
92 InitHuffmanTree(&tree[n++], count, -1, (int16_t)i);
97 depth[tree[0].index_right_or_value_] = 1; /* Only one element. */
101 SortHuffmanTreeItems(tree, n, SortHuffmanTree);
110 tree[n] = sentinel;
111 tree[n + 1] = sentinel;
117 if (tree[i].total_count_ <= tree[j].total_count_) {
124 if (tree[i].total_count_ <= tree[j].total_count_) {
135 tree[j_end].total_count_ =
136 tree[left].total_count_ + tree[right].total_count_;
137 tree[j_end].index_left_ = (int16_t)left;
138 tree[j_end].index_right_or_value_ = (int16_t)right;
141 tree[j_end + 1] = sentinel;
144 if (BrotliSetDepth((int)(2 * n - 1), &tree[0], depth, tree_limit)) {
145 /* We need to pack the Huffman tree in tree_limit bits. If this was not
168 uint8_t* tree,
172 tree[*tree_size] = value;
178 tree[*tree_size] = value;
186 tree[*tree_size] = value;
194 tree[*tree_size] = BROTLI_REPEAT_PREVIOUS_CODE_LENGTH;
203 Reverse(tree, start, *tree_size);
211 uint8_t* tree,
214 tree[*tree_size] = 0;
222 tree[*tree_size] = 0;
230 tree[*tree_size] = BROTLI_REPEAT_ZERO_CODE_LENGTH;
239 Reverse(tree, start, *tree_size);
408 uint8_t* tree,
446 reps, tree_size, tree, extra_bits_data);
450 tree, extra_bits_data);