Lines Matching full:proba
57 // Reset the statistics about: number of skips, token proba, level cost,...
60 VP8Proba* const proba = &enc->proba_;
61 VP8CalculateLevelCosts(proba);
62 proba->nb_skip_ = 0;
76 VP8Proba* const proba = &enc->proba_;
78 const int nb_events = proba->nb_skip_;
80 proba->skip_proba_ = CalcSkipProba(nb_events, nb_mbs);
81 proba->use_skip_proba_ = (proba->skip_proba_ < SKIP_PROBA_THRESHOLD);
83 if (proba->use_skip_proba_) {
84 size += nb_events * VP8BitCost(1, proba->skip_proba_)
85 + (nb_mbs - nb_events) * VP8BitCost(0, proba->skip_proba_);
95 VP8Proba* const proba = &enc->proba_;
96 memset(proba->stats_, 0, sizeof(proba->stats_));
99 // Record proba context used
175 // Cost of coding 'nb' 1's and 'total-nb' 0's using 'proba' probability.
176 static int BranchCost(int nb, int total, int proba) {
177 return nb * VP8BitCost(1, proba) + (total - nb) * VP8BitCost(0, proba);
180 static int FinalizeTokenProbas(VP8Proba* const proba) {
188 const proba_t stats = proba->stats_[t][b][c][p];
201 if (use_new_p) { // only use proba that seem meaningful enough.
202 proba->coeffs_[t][b][c][p] = new_p;
206 proba->coeffs_[t][b][c][p] = old_p;
212 proba->dirty_ = has_changed;
222 : (255 * a + total / 2) / total; // rounded proba
911 // Roughly refresh the proba height times per pass
915 VP8Proba* const proba = &enc->proba_;
923 assert(proba->use_skip_proba_ == 0);
938 FinalizeTokenProbas(proba);
939 VP8CalculateLevelCosts(proba); // refresh cost tables for rd-opt
958 FinalizeTokenProbas(proba);
960 (const uint8_t*)proba->coeffs_, 1);