ff_init_scantable(s->dsp.idct_permutation, &s->inter_scantable  , ff_zigzag_direct); ff_init_scantable(s->dsp.idct_permutation, &s->intra_scantable  , ff_zigzag_direct);
if(s->alternate_scan){ ff_init_scantable(s->dsp.idct_permutation, &s->inter_scantable  , ff_alternate_vertical_scan); ff_init_scantable(s->dsp.idct_permutation, &s->intra_scantable  , ff_alternate_vertical_scan); }else{ ff_init_scantable(s->dsp.idct_permutation, &s->inter_scantable  , ff_zigzag_direct); ff_init_scantable(s->dsp.idct_permutation, &s->intra_scantable  , ff_zigzag_direct); }
int DCT_common_init(MpegEncContext *s){    s->dct_unquantize_h263_intra = dct_unquantize_h263_intra_c;    s->dct_unquantize_h263_inter = dct_unquantize_h263_inter_c;    s->dct_unquantize_mpeg1_intra = dct_unquantize_mpeg1_intra_c;    s->dct_unquantize_mpeg1_inter = dct_unquantize_mpeg1_inter_c;    s->dct_unquantize_mpeg2_intra = dct_unquantize_mpeg2_intra_c;    s->dct_unquantize_mpeg2_inter = dct_unquantize_mpeg2_inter_c;#ifdef CONFIG_ENCODERS    s->dct_quantize= dct_quantize_c;#endif        #ifdef HAVE_MMX    MPV_common_init_mmx(s);#endif#ifdef ARCH_ALPHA    MPV_common_init_axp(s);#endif#ifdef HAVE_MLIB    MPV_common_init_mlib(s);#endif#ifdef HAVE_MMI    MPV_common_init_mmi(s);#endif#ifdef ARCH_ARMV4L    MPV_common_init_armv4l(s);#endif#ifdef ARCH_POWERPC    MPV_common_init_ppc(s);#endif#ifdef CONFIG_ENCODERS    s->fast_dct_quantize= s->dct_quantize;    if(s->flags&CODEC_FLAG_TRELLIS_QUANT){        s->dct_quantize= dct_quantize_trellis_c; //move before MPV_common_init_*    }#endif //CONFIG_ENCODERS    /* load & permutate scantables       note: only wmv uses differnt ones     */    ff_init_scantable(s->dsp.idct_permutation, &s->inter_scantable  , ff_zigzag_direct);    ff_init_scantable(s->dsp.idct_permutation, &s->intra_scantable  , ff_zigzag_direct);    ff_init_scantable(s->dsp.idct_permutation, &s->intra_h_scantable, ff_alternate_horizontal_scan);    ff_init_scantable(s->dsp.idct_permutation, &s->intra_v_scantable, ff_alternate_vertical_scan);    s->picture_structure= PICT_FRAME;        return 0;}