histogram: cosmetics

fix indent + other minor spelling / whitespace changes

Change-Id: I6e4462b75c98994e3c53c115de07047dbe71ce3c
This commit is contained in:
James Zern 2014-11-25 15:53:19 -08:00
parent f399d30764
commit c6d0f9e758

View File

@ -264,8 +264,7 @@ static void UpdateHistogramCost(VP8LHistogram* const h) {
VP8LExtraCost(h->literal_ + NUM_LITERAL_CODES, VP8LExtraCost(h->literal_ + NUM_LITERAL_CODES,
NUM_LENGTH_CODES); NUM_LENGTH_CODES);
h->red_cost_ = VP8LPopulationCost(h->red_, NUM_LITERAL_CODES, &red_sym); h->red_cost_ = VP8LPopulationCost(h->red_, NUM_LITERAL_CODES, &red_sym);
h->blue_cost_ = h->blue_cost_ = VP8LPopulationCost(h->blue_, NUM_LITERAL_CODES, &blue_sym);
VP8LPopulationCost(h->blue_, NUM_LITERAL_CODES, &blue_sym);
h->bit_cost_ = h->literal_cost_ + h->red_cost_ + h->blue_cost_ + h->bit_cost_ = h->literal_cost_ + h->red_cost_ + h->blue_cost_ +
alpha_cost + distance_cost; alpha_cost + distance_cost;
if ((alpha_sym | red_sym | blue_sym) == VP8L_NON_TRIVIAL_SYM) { if ((alpha_sym | red_sym | blue_sym) == VP8L_NON_TRIVIAL_SYM) {
@ -304,7 +303,6 @@ static void HistogramBuild(
VP8LHistogram** const histograms = image_histo->histograms; VP8LHistogram** const histograms = image_histo->histograms;
VP8LRefsCursor c = VP8LRefsCursorInit(backward_refs); VP8LRefsCursor c = VP8LRefsCursorInit(backward_refs);
assert(histo_bits > 0); assert(histo_bits > 0);
// Construct the Histo from a given backward references.
while (VP8LRefsCursorOk(&c)) { while (VP8LRefsCursorOk(&c)) {
const PixOrCopy* const v = c.cur_pos; const PixOrCopy* const v = c.cur_pos;
const int ix = (y >> histo_bits) * histo_xsize + (x >> histo_bits); const int ix = (y >> histo_bits) * histo_xsize + (x >> histo_bits);
@ -816,7 +814,7 @@ int VP8LGetHistoImageSymbols(int xsize, int ysize,
// bin_map[n][0] = num_histo; // The number of histograms in that bin. // bin_map[n][0] = num_histo; // The number of histograms in that bin.
// bin_map[n][1] = index of first histogram in that bin; // bin_map[n][1] = index of first histogram in that bin;
// bin_map[n][num_histo] = index of last histogram in that bin; // bin_map[n][num_histo] = index of last histogram in that bin;
// bin_map[n][num_histo + 1] ... bin_map[n][bin_depth - 1] = un-used indices. // bin_map[n][num_histo + 1] ... bin_map[n][bin_depth - 1] = unused indices.
const int bin_depth = image_histo_raw_size + 1; const int bin_depth = image_histo_raw_size + 1;
int16_t* bin_map = NULL; int16_t* bin_map = NULL;
VP8LHistogramSet* const histos = VP8LAllocateHistogramSet(2, cache_bits); VP8LHistogramSet* const histos = VP8LAllocateHistogramSet(2, cache_bits);