Home | History | Annotate | Download | only in enc

Lines Matching defs:proba

96 // Reset the statistics about: number of skips, token proba, level cost,...
99 VP8Proba* const proba = &enc->proba_;
100 VP8CalculateLevelCosts(proba);
101 proba->nb_skip_ = 0;
115 VP8Proba* const proba = &enc->proba_;
117 const int nb_events = proba->nb_skip_;
119 proba->skip_proba_ = CalcSkipProba(nb_events, nb_mbs);
120 proba->use_skip_proba_ = (proba->skip_proba_ < SKIP_PROBA_THRESHOLD);
122 if (proba->use_skip_proba_) {
123 size += nb_events * VP8BitCost(1, proba->skip_proba_)
124 + (nb_mbs - nb_events) * VP8BitCost(0, proba->skip_proba_);
137 // Cost of coding 'nb' 1's and 'total-nb' 0's using 'proba' probability.
138 static int BranchCost(int nb, int total, int proba) {
139 return nb * VP8BitCost(1, proba) + (total - nb) * VP8BitCost(0, proba);
143 VP8Proba* const proba = &enc->proba_;
144 memset(proba->stats_, 0, sizeof(proba->stats_));
147 static int FinalizeTokenProbas(VP8Proba* const proba) {
155 const proba_t stats = proba->stats_[t][b][c][p];
168 if (use_new_p) { // only use proba that seem meaningful enough.
169 proba->coeffs_[t][b][c][p] = new_p;
173 proba->coeffs_[t][b][c][p] = old_p;
179 proba->dirty_ = has_changed;
189 : (255 * a + total / 2) / total; // rounded proba
741 // Roughly refresh the proba eight times per pass
746 VP8Proba* const proba = &enc->proba_;
760 assert(proba->use_skip_proba_ == 0);
782 FinalizeTokenProbas(proba);
783 VP8CalculateLevelCosts(proba); // refresh cost tables for rd-opt
808 (const uint8_t*)proba->coeffs_);
838 (const uint8_t*)proba->coeffs_, 1);