&ac_bias_0[i][0][0], 4, 2);
&ac_bias_0[i][0][0], 4, 2, 0);
static int vp3_decode_init(AVCodecContext *avctx){    Vp3DecodeContext *s = avctx->priv_data;    int i;    int c_width;    int c_height;    int y_superblock_count;    int c_superblock_count;    if (avctx->codec_tag == MKTAG('V','P','3','0'))	s->version = 0;    else	s->version = 1;    s->avctx = avctx;#if 0    s->width = avctx->width;    s->height = avctx->height;#else    s->width = (avctx->width + 15) & 0xFFFFFFF0;    s->height = (avctx->height + 15) & 0xFFFFFFF0;#endif    avctx->pix_fmt = PIX_FMT_YUV420P;    avctx->has_b_frames = 0;    dsputil_init(&s->dsp, avctx);    s->dsp.vp3_dsp_init();    /* initialize to an impossible value which will force a recalculation     * in the first frame decode */    s->quality_index = -1;    s->y_superblock_width = (s->width + 31) / 32;    s->y_superblock_height = (s->height + 31) / 32;    y_superblock_count = s->y_superblock_width * s->y_superblock_height;    /* work out the dimensions for the C planes */    c_width = s->width / 2;    c_height = s->height / 2;    s->c_superblock_width = (c_width + 31) / 32;    s->c_superblock_height = (c_height + 31) / 32;    c_superblock_count = s->c_superblock_width * s->c_superblock_height;    s->superblock_count = y_superblock_count + (c_superblock_count * 2);    s->u_superblock_start = y_superblock_count;    s->v_superblock_start = s->u_superblock_start + c_superblock_count;    s->superblock_coding = av_malloc(s->superblock_count);    s->macroblock_width = (s->width + 15) / 16;    s->macroblock_height = (s->height + 15) / 16;    s->macroblock_count = s->macroblock_width * s->macroblock_height;    s->fragment_width = s->width / FRAGMENT_PIXELS;    s->fragment_height = s->height / FRAGMENT_PIXELS;    /* fragment count covers all 8x8 blocks for all 3 planes */    s->fragment_count = s->fragment_width * s->fragment_height * 3 / 2;    s->u_fragment_start = s->fragment_width * s->fragment_height;    s->v_fragment_start = s->fragment_width * s->fragment_height * 5 / 4;    debug_init("  Y plane: %d x %d\n", s->width, s->height);    debug_init("  C plane: %d x %d\n", c_width, c_height);    debug_init("  Y superblocks: %d x %d, %d total\n",        s->y_superblock_width, s->y_superblock_height, y_superblock_count);    debug_init("  C superblocks: %d x %d, %d total\n",        s->c_superblock_width, s->c_superblock_height, c_superblock_count);    debug_init("  total superblocks = %d, U starts @ %d, V starts @ %d\n",         s->superblock_count, s->u_superblock_start, s->v_superblock_start);    debug_init("  macroblocks: %d x %d, %d total\n",        s->macroblock_width, s->macroblock_height, s->macroblock_count);    debug_init("  %d fragments, %d x %d, u starts @ %d, v starts @ %d\n",        s->fragment_count,        s->fragment_width,        s->fragment_height,        s->u_fragment_start,        s->v_fragment_start);    s->all_fragments = av_malloc(s->fragment_count * sizeof(Vp3Fragment));    s->coded_fragment_list = av_malloc(s->fragment_count * sizeof(int));    s->pixel_addresses_inited = 0;    if (!s->theora_tables)    {	for (i = 0; i < 64; i++)	    s->coded_dc_scale_factor[i] = vp31_dc_scale_factor[i];	for (i = 0; i < 64; i++)	    s->coded_ac_scale_factor[i] = vp31_ac_scale_factor[i];	for (i = 0; i < 64; i++)	    s->coded_intra_y_dequant[i] = vp31_intra_y_dequant[i];	for (i = 0; i < 64; i++)	    s->coded_intra_c_dequant[i] = vp31_intra_c_dequant[i];	for (i = 0; i < 64; i++)	    s->coded_inter_dequant[i] = vp31_inter_dequant[i];    }    /* init VLC tables */    for (i = 0; i < 16; i++) {        /* DC histograms */        init_vlc(&s->dc_vlc[i], 5, 32,            &dc_bias[i][0][1], 4, 2,            &dc_bias[i][0][0], 4, 2);        /* group 1 AC histograms */        init_vlc(&s->ac_vlc_1[i], 5, 32,            &ac_bias_0[i][0][1], 4, 2,            &ac_bias_0[i][0][0], 4, 2);        /* group 2 AC histograms */        init_vlc(&s->ac_vlc_2[i], 5, 32,            &ac_bias_1[i][0][1], 4, 2,            &ac_bias_1[i][0][0], 4, 2);        /* group 3 AC histograms */        init_vlc(&s->ac_vlc_3[i], 5, 32,            &ac_bias_2[i][0][1], 4, 2,            &ac_bias_2[i][0][0], 4, 2);        /* group 4 AC histograms */        init_vlc(&s->ac_vlc_4[i], 5, 32,            &ac_bias_3[i][0][1], 4, 2,            &ac_bias_3[i][0][0], 4, 2);    }    /* build quantization zigzag table */    for (i = 0; i < 64; i++)        zigzag_index[dezigzag_index[i]] = i;    /* work out the block mapping tables */    s->superblock_fragments = av_malloc(s->superblock_count * 16 * sizeof(int));    s->superblock_macroblocks = av_malloc(s->superblock_count * 4 * sizeof(int));    s->macroblock_fragments = av_malloc(s->macroblock_count * 6 * sizeof(int));    s->macroblock_coding = av_malloc(s->macroblock_count + 1);    init_block_mapping(s);    for (i = 0; i < 3; i++) {        s->current_frame.data[i] = NULL;        s->last_frame.data[i] = NULL;        s->golden_frame.data[i] = NULL;    }    return 0;}