Home | History | Annotate | Download | only in enc

Lines Matching refs:histograms

105                             + sizeof(*set->histograms) * size
112 set->histograms = (VP8LHistogram**)memory;
113 memory += size * sizeof(*set->histograms);
117 set->histograms[i] = (VP8LHistogram*)memory;
119 set->histograms[i]->literal_ = (uint32_t*)(memory + sizeof(VP8LHistogram));
120 VP8LHistogramInit(set->histograms[i], cache_bits);
121 // There's no padding/alignment between successive histograms.
423 // Construct the histograms from backward references.
429 VP8LHistogram** const histograms = image_histo->histograms;
436 VP8LHistogramAddSinglePixOrCopy(histograms[ix], v);
446 // Copies the histograms and computes its bit_cost.
451 VP8LHistogram** const orig_histograms = orig_histo->histograms;
452 VP8LHistogram** const histograms = image_histo->histograms;
456 // Copy histograms from orig_histo[] to image_histo[].
457 HistogramCopy(histo, histograms[i]);
461 // Partition histograms to different entropy bins for three dominant (literal,
466 VP8LHistogram** const histograms = image_histo->histograms;
474 VP8LHistogram* const histo = histograms[i];
478 // bin-hash histograms on three of the dominant (literal, red and blue)
482 VP8LHistogram* const histo = histograms[i];
486 // histograms in that bin.
496 // head and moving the ones that have been merged to other histograms towards
503 VP8LHistogram** const histograms = image_histo->histograms;
505 while (start <= end && histograms[start] != NULL &&
506 histograms[start]->bit_cost_ != 0.) {
509 while (start <= end && histograms[end]->bit_cost_ == 0.) {
510 histograms[end] = NULL;
514 assert(histograms[start] != NULL);
515 assert(histograms[end] != NULL);
516 HistogramCopy(histograms[end], histograms[start]);
517 histograms[end] = NULL;
530 VP8LHistogram** const histograms = image_histo->histograms;
539 const double bit_cost_idx2 = histograms[idx2]->bit_cost_;
543 HistogramAddEval(histograms[idx1], histograms[idx2],
546 HistogramCopy(cur_combo, histograms[idx1]);
547 histograms[idx2]->bit_cost_ = 0.;
574 VP8LHistogram** const histograms = image_histo->histograms;
575 VP8LHistogram* cur_combo = histos->histograms[0]; // trial histogram
576 VP8LHistogram* best_combo = histos->histograms[1]; // best histogram so far
578 // Collapse similar histograms in 'image_histo'.
590 // Choose two histograms at random and try to combine them.
601 curr_cost_diff = HistogramAddEval(histograms[idx1], histograms[idx2],
604 { // swap cur/best combo histograms
616 HistogramCopy(best_combo, histograms[best_idx1]);
620 HistogramCopy(histograms[image_histo_size], histograms[best_idx2]);
621 histograms[image_histo_size] = NULL;
635 // Find the best 'out' histogram for each of the 'in' histograms.
641 VP8LHistogram** const orig_histograms = orig_histo->histograms;
642 VP8LHistogram** const histograms = image_histo->histograms;
646 HistogramAddThresh(histograms[0], orig_histograms[i], MAX_COST);
650 HistogramAddThresh(histograms[k], orig_histograms[i], best_bits);
661 HistogramClear(histograms[i]);
666 VP8LHistogramAdd(orig_histograms[i], histograms[idx], histograms[idx]);
690 // bin_map[n][0] = num_histo; // The number of histograms in that bin.
705 // histograms of small sizes, as bin_map will be very sparse and;
714 // Construct the histograms from backward references.
716 // Copies the histograms and computes its bit_cost.
723 // Collapse histograms with similar entropy.
724 HistogramCombineEntropyBin(image_histo, histos->histograms[0],
728 // Collapse similar histograms by random histogram-pair compares.
731 // Find the optimal map from original histograms to the final ones.