for (i = 0; i <= 1; i++) { for (n = 0; n <= 2; n++) { int newqr; if (i > 0 || n > 0) newqr = get_bits(&gb, 1); else newqr = 1; if (!newqr) { if (i > 0) get_bits(&gb, 1); } else { int qi = 0; skip_bits(&gb, av_log2(2)+1); while (qi < 63) { qi += get_bits(&gb, av_log2(63-qi)+1) + 1; skip_bits(&gb, av_log2(2)+1); } if (qi > 63) av_log(NULL, AV_LOG_ERROR, "error...\n"); } } }  for (s->hti = 0; s->hti < 80; s->hti++) { s->entries = 0; s->huff_code_size = 1; if (!get_bits(&gb, 1)) { s->hbits = 0; read_huffman_tree(avctx, &gb); s->hbits = 1; read_huffman_tree(avctx, &gb); } }
static int theora_decode_tables(AVCodecContext *avctx, GetBitContext gb){    Vp3DecodeContext *s = avctx->priv_data;    int i, n;    if (s->theora >= 0x030200) {        n = get_bits(&gb, 3);        /* loop filter table */        for (i = 0; i < 64; i++)            skip_bits(&gb, n);    }        if (s->theora >= 0x030200)        n = get_bits(&gb, 4) + 1;    else        n = 16;    /* quality threshold table */    for (i = 0; i < 64; i++)	s->coded_ac_scale_factor[i] = get_bits(&gb, n);    if (s->theora >= 0x030200)        n = get_bits(&gb, 4) + 1;    else        n = 16;    /* dc scale factor table */    for (i = 0; i < 64; i++)	s->coded_dc_scale_factor[i] = get_bits(&gb, n);    if (s->theora >= 0x030200)        n = get_bits(&gb, 9) + 1;    else        n = 3;    if (n != 3) {        av_log(NULL,AV_LOG_ERROR, "unsupported nbms : %d\n", n);        return -1;    }    /* y coeffs */    for (i = 0; i < 64; i++)	s->coded_intra_y_dequant[i] = get_bits(&gb, 8);    /* uv coeffs */    for (i = 0; i < 64; i++)	s->coded_intra_c_dequant[i] = get_bits(&gb, 8);    /* inter coeffs */    for (i = 0; i < 64; i++)	s->coded_inter_dequant[i] = get_bits(&gb, 8);    /* FIXME: read huffmann tree.. */        s->theora_tables = 1;        return 0;}