Lines Matching refs:total
68 uint32_t total) in opus_rc_dec_update() argument
70 rc->value -= scale * (total - high); in opus_rc_dec_update()
72 : rc->range - scale * (total - high); in opus_rc_dec_update()
92 unsigned int k, scale, total, symbol, low, high; in ff_opus_rc_dec_cdf() local
94 total = *cdf++; in ff_opus_rc_dec_cdf()
96 scale = rc->range / total; in ff_opus_rc_dec_cdf()
98 symbol = total - FFMIN(symbol, total); in ff_opus_rc_dec_cdf()
104 opus_rc_dec_update(rc, scale, low, high, total); in ff_opus_rc_dec_cdf()
184 uint32_t bits, k, scale, total; in ff_opus_rc_dec_uint() local
187 total = (bits > 8) ? ((size - 1) >> (bits - 8)) + 1 : size; in ff_opus_rc_dec_uint()
189 scale = rc->range / total; in ff_opus_rc_dec_uint()
191 k = total - FFMIN(k, total); in ff_opus_rc_dec_uint()
192 opus_rc_dec_update(rc, scale, k, k + 1, total); in ff_opus_rc_dec_uint()
214 uint32_t k, scale, symbol, total = (k0+1)*3 + k0; in ff_opus_rc_dec_uint_step() local
215 scale = rc->range / total; in ff_opus_rc_dec_uint_step()
217 symbol = total - FFMIN(symbol, total); in ff_opus_rc_dec_uint_step()
222 (k <= k0) ? 3*(k+1) : (k-0-k0) + 3*(k0+1), total); in ff_opus_rc_dec_uint_step()
236 uint32_t k, scale, symbol, total, low, center; in ff_opus_rc_dec_uint_tri() local
238 total = ((qn>>1) + 1) * ((qn>>1) + 1); in ff_opus_rc_dec_uint_tri()
239 scale = rc->range / total; in ff_opus_rc_dec_uint_tri()
241 center = total - FFMIN(center, total); in ff_opus_rc_dec_uint_tri()
243 if (center < total >> 1) { in ff_opus_rc_dec_uint_tri()
248 k = (2*(qn + 1) - ff_sqrt(8*(total - center - 1) + 1)) >> 1; in ff_opus_rc_dec_uint_tri()
249 low = total - ((qn + 1 - k) * (qn + 2 - k) >> 1); in ff_opus_rc_dec_uint_tri()
253 opus_rc_dec_update(rc, scale, low, low + symbol, total); in ff_opus_rc_dec_uint_tri()
260 uint32_t symbol, low, total; in ff_opus_rc_enc_uint_tri() local
262 total = ((qn>>1) + 1) * ((qn>>1) + 1); in ff_opus_rc_enc_uint_tri()
268 low = total - ((qn + 1 - k) * (qn + 2 - k) >> 1); in ff_opus_rc_enc_uint_tri()
272 opus_rc_enc_update(rc, low, low + symbol, total, 0); in ff_opus_rc_enc_uint_tri()