Merge "cosmetics: VP8LCreateHuffmanTree: fix indent"

This commit is contained in:
pascal massimino 2012-05-09 13:23:24 -07:00 committed by Gerrit Code Review
commit e1b9b05258

View File

@ -90,7 +90,6 @@ int VP8LCreateHuffmanTree(const int* const histogram, int histogram_size,
if (tree == NULL) return 0; if (tree == NULL) return 0;
tree_pool = tree + tree_size_orig; tree_pool = tree + tree_size_orig;
// For block sizes with less than 64k symbols we never need to do a // For block sizes with less than 64k symbols we never need to do a
// second iteration of this loop. // second iteration of this loop.
// If we actually start running inside this loop a lot, we would perhaps // If we actually start running inside this loop a lot, we would perhaps
@ -98,7 +97,6 @@ int VP8LCreateHuffmanTree(const int* const histogram, int histogram_size,
assert(tree_size_orig <= (1 << (tree_depth_limit - 1))); assert(tree_size_orig <= (1 << (tree_depth_limit - 1)));
for (count_min = 1; ; count_min *= 2) { for (count_min = 1; ; count_min *= 2) {
int tree_size = tree_size_orig; int tree_size = tree_size_orig;
{
// We need to pack the Huffman tree in tree_depth_limit bits. // We need to pack the Huffman tree in tree_depth_limit bits.
// So, we try by faking histogram entries to be at least 'count_min'. // So, we try by faking histogram entries to be at least 'count_min'.
int idx = 0; int idx = 0;
@ -114,10 +112,9 @@ int VP8LCreateHuffmanTree(const int* const histogram, int histogram_size,
++idx; ++idx;
} }
} }
}
// Build the Huffman tree. // Build the Huffman tree.
qsort((void*)tree, tree_size, sizeof(*tree), CompareHuffmanTrees); qsort(tree, tree_size, sizeof(*tree), CompareHuffmanTrees);
if (tree_size > 1) { // Normal case. if (tree_size > 1) { // Normal case.
int tree_pool_size = 0; int tree_pool_size = 0;