Lines Matching refs:histogram
12 double FN(BrotliPopulationCost)(const HistogramType* histogram) {
22 if (histogram->total_count_ == 0) {
26 if (histogram->data_[i] > 0) {
36 return (kTwoSymbolHistogramCost + (double)histogram->total_count_);
39 const uint32_t histo0 = histogram->data_[s[0]];
40 const uint32_t histo1 = histogram->data_[s[1]];
41 const uint32_t histo2 = histogram->data_[s[2]];
52 histo[i] = histogram->data_[s[i]];
70 /* In this loop we compute the entropy of the histogram and simultaneously
71 build a simplified histogram of the code length codes where we use the
75 const double log2total = FastLog2(histogram->total_count_);
77 if (histogram->data_[i] > 0) {
80 double log2p = log2total - FastLog2(histogram->data_[i]);
83 bits += histogram->data_[i] * log2p;
94 and 17 code length codes to the code length code histogram. */
97 for (k = i + 1; k < data_size && histogram->data_[k] == 0; ++k) {
119 /* Add the estimated encoding cost of the code length code histogram. */
121 /* Add the entropy of the code length code histogram. */