Lines Matching defs:token
1147 static inline int get_eob_run(GetBitContext *gb, int token)
1149 int v = eob_run_table[token].base;
1150 if (eob_run_table[token].bits)
1151 v += get_bits(gb, eob_run_table[token].bits);
1155 static inline int get_coeff(GetBitContext *gb, int token, int16_t *coeff)
1159 bits_to_get = coeff_get_bits[token];
1162 *coeff = coeff_tables[token][bits_to_get];
1164 zero_run = zero_run_base[token];
1165 if (zero_run_get_bits[token])
1166 zero_run += get_bits(gb, zero_run_get_bits[token]);
1178 * This function returns a residual eob run. E.g, if a particular token gave
1189 int token;
1218 // insert fake EOB token to cover the split between planes or zzi
1223 /* decode a VLC into a token */
1224 token = get_vlc2(gb, vlc_table, 11, 3);
1225 /* use the token to get a zero run, a coefficient, and an eob run */
1226 if ((unsigned) token <= 6U) {
1227 eob_run = get_eob_run(gb, token);
1244 } else if (token >= 0) {
1245 zero_run = get_coeff(gb, token, &coeff);
1252 // other tokens. We still need the token in dct_tokens[]
1273 av_log(s->avctx, AV_LOG_ERROR, "Invalid token %d\n", token);
1412 int token;
1422 token = get_vlc2(gb, vlc_tables[coeff_i]->table, 11, 3);
1424 /* use the token to get a zero run, a coefficient, and an eob run */
1425 if ((unsigned) token <= 6U) {
1426 eob_run = get_eob_run(gb, token);
1430 } else if (token >= 0) {
1431 zero_run = get_coeff(gb, token, &coeff);
1452 av_log(s->avctx, AV_LOG_ERROR, "Invalid token %d\n", token);
1871 int token = *s->dct_tokens[plane][i];
1872 switch (token & 3) {
1874 if (--token < 4) // 0-3 are token types so the EOB run must now be 0
1877 *s->dct_tokens[plane][i] = token & ~3;
1881 i += (token >> 2) & 0x7f;
1886 block[perm[i]] = (token >> 9) * dequantizer[perm[i]];
1890 block[perm[i]] = (token >> 2) * dequantizer[perm[i]];
2852 int token;
2857 token = get_bits(gb, 5);
2858 ff_dlog(avctx, "code length %d, curr entry %d, token %d\n",
2859 length, huff->nb_entries, token);
2860 huff->entries[huff->nb_entries++] = (HuffEntry){ length, token };