if(use_permuted_idct) #ifdef SIMPLE_IDCT for(i=0; i<64; i++) permutation[i]= simple_mmx_permutation[i]; #else for(i=0; i<64; i++) permutation[i]= (i & 0x38) | ((i & 6) >> 1) | ((i & 1) << 2); #endif else for(i=0; i<64; i++) permutation[i]=i;
void dsputil_init(void){    int i, j;    int use_permuted_idct;    for(i=0;i<256;i++) cropTbl[i + MAX_NEG_CROP] = i;    for(i=0;i<MAX_NEG_CROP;i++) {        cropTbl[i] = 0;        cropTbl[i + MAX_NEG_CROP + 256] = 255;    }    for(i=0;i<512;i++) {        squareTbl[i] = (i - 256) * (i - 256);    }#ifdef SIMPLE_IDCT    ff_idct = simple_idct;#else    ff_idct = j_rev_dct;#endif    get_pixels = get_pixels_c;    put_pixels_clamped = put_pixels_clamped_c;    add_pixels_clamped = add_pixels_clamped_c;    pix_abs16x16 = pix_abs16x16_c;    pix_abs16x16_x2 = pix_abs16x16_x2_c;    pix_abs16x16_y2 = pix_abs16x16_y2_c;    pix_abs16x16_xy2 = pix_abs16x16_xy2_c;    av_fdct = jpeg_fdct_ifast;    use_permuted_idct = 1;#ifdef HAVE_MMX    dsputil_init_mmx();#endif#ifdef ARCH_ARMV4L    dsputil_init_armv4l();#endif#ifdef HAVE_MLIB    dsputil_init_mlib();    use_permuted_idct = 0;#endif#ifdef SIMPLE_IDCT    if(ff_idct == simple_idct) use_permuted_idct=0;#endif    if (use_permuted_idct) {        /* permute for IDCT */        for(i=0;i<64;i++) {            j = zigzag_direct[i];            zigzag_direct[i] = block_permute_op(j);            j = ff_alternate_horizontal_scan[i];            ff_alternate_horizontal_scan[i] = block_permute_op(j);            j = ff_alternate_vertical_scan[i];            ff_alternate_vertical_scan[i] = block_permute_op(j);        }        block_permute(default_intra_matrix);        block_permute(default_non_intra_matrix);    }}