s->intra_scantable  = wmv1_scantable[1]; s->intra_h_scantable= wmv1_scantable[2]; s->intra_v_scantable= wmv1_scantable[3]; s->inter_scantable  = wmv1_scantable[0]; }else{ s->intra_scantable  = zigzag_direct; s->intra_h_scantable= ff_alternate_horizontal_scan; s->intra_v_scantable= ff_alternate_vertical_scan; s->inter_scantable  = zigzag_direct;
int i; ff_init_scantable(s, &s->intra_scantable  , wmv1_scantable[1]); ff_init_scantable(s, &s->intra_h_scantable, wmv1_scantable[2]); ff_init_scantable(s, &s->intra_v_scantable, wmv1_scantable[3]); ff_init_scantable(s, &s->inter_scantable  , wmv1_scantable[0]);
static void common_init(MpegEncContext * s){    static int inited=0;        switch(s->msmpeg4_version){    case 1:    case 2:        s->y_dc_scale_table=        s->c_dc_scale_table= ff_mpeg1_dc_scale_table;        break;    case 3:        if(s->workaround_bugs){            s->y_dc_scale_table= old_ff_y_dc_scale_table;            s->c_dc_scale_table= old_ff_c_dc_scale_table;        } else{            s->y_dc_scale_table= ff_mpeg4_y_dc_scale_table;            s->c_dc_scale_table= ff_mpeg4_c_dc_scale_table;        }        break;    case 4:        s->y_dc_scale_table= wmv1_y_dc_scale_table;        s->c_dc_scale_table= wmv1_c_dc_scale_table;        break;    }    if(s->msmpeg4_version==4){        s->intra_scantable  = wmv1_scantable[1];        s->intra_h_scantable= wmv1_scantable[2];        s->intra_v_scantable= wmv1_scantable[3];        s->inter_scantable  = wmv1_scantable[0];    }else{        s->intra_scantable  = zigzag_direct;         s->intra_h_scantable= ff_alternate_horizontal_scan;         s->intra_v_scantable= ff_alternate_vertical_scan;         s->inter_scantable  = zigzag_direct;     }        if(!inited){        int i;        inited=1;        init_h263_dc_for_msmpeg4();        /* permute for IDCT */        for(i=0; i<WMV1_SCANTABLE_COUNT; i++){            int k;            for(k=0;k<64;k++) {                int j = wmv1_scantable[i][k];                wmv1_scantable[i][k]= block_permute_op(j);            }        }    }}