30 int max_count,
int update_factor)
32 unsigned ct = ct0 + ct1, p2, p1;
37 update_factor =
FASTDIV(update_factor *
FFMIN(ct, max_count), max_count);
39 p2 = ((((int64_t) ct0) << 8) + (ct >> 1)) / ct;
40 p2 = av_clip(p2, 1, 255);
43 *p = p1 + (((p2 - p1) * update_factor + 128) >> 8);
53 for (i = 0; i < 4; i++)
54 for (j = 0; j < 2; j++)
55 for (k = 0; k < 2; k++)
56 for (l = 0; l < 6; l++)
57 for (m = 0; m < 6; m++) {
59 unsigned *e = s->
counts.
eob[i][j][k][l][m];
79 for (i = 0; i < 3; i++)
84 for (i = 0; i < 4; i++)
90 for (i = 0; i < 5; i++)
97 for (i = 0; i < 5; i++)
103 for (i = 0; i < 5; i++) {
113 for (i = 0; i < 4; i++)
114 for (j = 0; j < 4; j++) {
118 adapt_prob(&pp[0], c[0], c[1] + c[2] + c[3], 20, 128);
119 adapt_prob(&pp[1], c[1], c[2] + c[3], 20, 128);
125 for (i = 0; i < 2; i++) {
132 adapt_prob(&p->
tx32p[i][0], c32[0], c32[1] + c32[2] + c32[3], 20, 128);
140 for (i = 0; i < 4; i++) {
144 adapt_prob(&pp[0], c[0], c[1] + c[2], 20, 128);
150 for (i = 0; i < 7; i++) {
154 adapt_prob(&pp[0], c[2], c[1] + c[0] + c[3], 20, 128);
155 adapt_prob(&pp[1], c[0], c[1] + c[3], 20, 128);
164 adapt_prob(&pp[0], c[0], c[1] + c[2] + c[3], 20, 128);
165 adapt_prob(&pp[1], c[1], c[2] + c[3], 20, 128);
170 for (i = 0; i < 2; i++) {
172 unsigned *
c, (*c2)[2], sum;
179 sum = c[1] + c[2] + c[3] + c[4] + c[5] +
180 c[6] + c[7] + c[8] + c[9] + c[10];
185 adapt_prob(&pp[2], c[2] + c[3], sum, 20, 128);
188 adapt_prob(&pp[4], c[4] + c[5], sum, 20, 128);
192 adapt_prob(&pp[7], c[7] + c[8], c[9] + c[10], 20, 128);
200 for (j = 0; j < 10; j++)
201 adapt_prob(&pp[j], c2[j][0], c2[j][1], 20, 128);
203 for (j = 0; j < 2; j++) {
206 adapt_prob(&pp[0], c[0], c[1] + c[2] + c[3], 20, 128);
207 adapt_prob(&pp[1], c[1], c[2] + c[3], 20, 128);
212 adapt_prob(&pp[0], c[0], c[1] + c[2] + c[3], 20, 128);
213 adapt_prob(&pp[1], c[1], c[2] + c[3], 20, 128);
226 for (i = 0; i < 4; i++) {
230 sum = c[0] + c[1] + c[3] + c[4] + c[5] + c[6] + c[7] + c[8] + c[9];
251 for (i = 0; i < 10; i++) {
255 sum = c[0] + c[1] + c[3] + c[4] + c[5] + c[6] + c[7] + c[8] + c[9];
VP5 and VP6 compatible video decoder (common features)
void ff_vp9_adapt_probs(VP9Context *s)
struct ProbContext::@145 mv_comp[2]
uint8_t coef[4][2][2][6][6][3]
uint8_t partition[4][4][3]
struct VP9Context::@149::@151 mv_comp[2]
unsigned eob[4][2][2][6][6][2]
unsigned single_ref[5][2][2]
unsigned partition[4][4][4]
struct VP9Context::@147 prob_ctx[4]
struct VP9Context::@148 prob
struct VP9Context::@149 counts
static av_always_inline void adapt_prob(uint8_t *p, unsigned ct0, unsigned ct1, int max_count, int update_factor)