Home | History | Annotate | Download | only in enc

Lines Matching refs:nb

70 static int CalcSkipProba(uint64_t nb, uint64_t total) {
71 return (int)(total ? (total - nb) * 255 / total : 255);
170 static int CalcTokenProba(int nb, int total) {
171 assert(nb <= total);
172 return nb ? (255 - nb * 255 / total) : 255;
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);
189 const int nb = (stats >> 0) & 0xffff;
193 const int new_p = CalcTokenProba(nb, total);
194 const int old_cost = BranchCost(nb, total, old_p)
196 const int new_cost = BranchCost(nb, total, new_p)