c->h263_h_loop_filter= h263_h_loop_filter_c; c->h263_v_loop_filter= h263_v_loop_filter_c;
void dsputil_init(DSPContext* c, AVCodecContext *avctx){    int i;#ifdef CONFIG_ENCODERS    if(avctx->dct_algo==FF_DCT_FASTINT) {        c->fdct = fdct_ifast;	c->fdct248 = fdct_ifast248;    }     else if(avctx->dct_algo==FF_DCT_FAAN) {        c->fdct = ff_faandct;	c->fdct248 = ff_faandct248;     }     else {        c->fdct = ff_jpeg_fdct_islow; //slow/accurate/default	c->fdct248 = ff_fdct248_islow;    }#endif //CONFIG_ENCODERS    if(avctx->idct_algo==FF_IDCT_INT){        c->idct_put= ff_jref_idct_put;        c->idct_add= ff_jref_idct_add;        c->idct    = j_rev_dct;        c->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM;    }else{ //accurate/default        c->idct_put= simple_idct_put;        c->idct_add= simple_idct_add;        c->idct    = simple_idct;        c->idct_permutation_type= FF_NO_IDCT_PERM;    }    c->get_pixels = get_pixels_c;    c->diff_pixels = diff_pixels_c;    c->put_pixels_clamped = put_pixels_clamped_c;    c->add_pixels_clamped = add_pixels_clamped_c;    c->gmc1 = gmc1_c;    c->gmc = gmc_c;    c->clear_blocks = clear_blocks_c;    c->pix_sum = pix_sum_c;    c->pix_norm1 = pix_norm1_c;    c->sse[0]= sse16_c;    c->sse[1]= sse8_c;    /* TODO [0] 16  [1] 8 */    c->pix_abs16x16     = pix_abs16x16_c;    c->pix_abs16x16_x2  = pix_abs16x16_x2_c;    c->pix_abs16x16_y2  = pix_abs16x16_y2_c;    c->pix_abs16x16_xy2 = pix_abs16x16_xy2_c;    c->pix_abs8x8     = pix_abs8x8_c;    c->pix_abs8x8_x2  = pix_abs8x8_x2_c;    c->pix_abs8x8_y2  = pix_abs8x8_y2_c;    c->pix_abs8x8_xy2 = pix_abs8x8_xy2_c;#define dspfunc(PFX, IDX, NUM) \    c->PFX ## _pixels_tab[IDX][0] = PFX ## _pixels ## NUM ## _c;     \    c->PFX ## _pixels_tab[IDX][1] = PFX ## _pixels ## NUM ## _x2_c;  \    c->PFX ## _pixels_tab[IDX][2] = PFX ## _pixels ## NUM ## _y2_c;  \    c->PFX ## _pixels_tab[IDX][3] = PFX ## _pixels ## NUM ## _xy2_c    dspfunc(put, 0, 16);    dspfunc(put_no_rnd, 0, 16);    dspfunc(put, 1, 8);    dspfunc(put_no_rnd, 1, 8);    dspfunc(put, 2, 4);    dspfunc(put, 3, 2);    dspfunc(avg, 0, 16);    dspfunc(avg_no_rnd, 0, 16);    dspfunc(avg, 1, 8);    dspfunc(avg_no_rnd, 1, 8);    dspfunc(avg, 2, 4);    dspfunc(avg, 3, 2);#undef dspfunc    c->put_tpel_pixels_tab[ 0] = put_tpel_pixels_mc00_c;    c->put_tpel_pixels_tab[ 1] = put_tpel_pixels_mc10_c;    c->put_tpel_pixels_tab[ 2] = put_tpel_pixels_mc20_c;    c->put_tpel_pixels_tab[ 4] = put_tpel_pixels_mc01_c;    c->put_tpel_pixels_tab[ 5] = put_tpel_pixels_mc11_c;    c->put_tpel_pixels_tab[ 6] = put_tpel_pixels_mc21_c;    c->put_tpel_pixels_tab[ 8] = put_tpel_pixels_mc02_c;    c->put_tpel_pixels_tab[ 9] = put_tpel_pixels_mc12_c;    c->put_tpel_pixels_tab[10] = put_tpel_pixels_mc22_c;    c->avg_tpel_pixels_tab[ 0] = avg_tpel_pixels_mc00_c;    c->avg_tpel_pixels_tab[ 1] = avg_tpel_pixels_mc10_c;    c->avg_tpel_pixels_tab[ 2] = avg_tpel_pixels_mc20_c;    c->avg_tpel_pixels_tab[ 4] = avg_tpel_pixels_mc01_c;    c->avg_tpel_pixels_tab[ 5] = avg_tpel_pixels_mc11_c;    c->avg_tpel_pixels_tab[ 6] = avg_tpel_pixels_mc21_c;    c->avg_tpel_pixels_tab[ 8] = avg_tpel_pixels_mc02_c;    c->avg_tpel_pixels_tab[ 9] = avg_tpel_pixels_mc12_c;    c->avg_tpel_pixels_tab[10] = avg_tpel_pixels_mc22_c;#define dspfunc(PFX, IDX, NUM) \    c->PFX ## _pixels_tab[IDX][ 0] = PFX ## NUM ## _mc00_c; \    c->PFX ## _pixels_tab[IDX][ 1] = PFX ## NUM ## _mc10_c; \    c->PFX ## _pixels_tab[IDX][ 2] = PFX ## NUM ## _mc20_c; \    c->PFX ## _pixels_tab[IDX][ 3] = PFX ## NUM ## _mc30_c; \    c->PFX ## _pixels_tab[IDX][ 4] = PFX ## NUM ## _mc01_c; \    c->PFX ## _pixels_tab[IDX][ 5] = PFX ## NUM ## _mc11_c; \    c->PFX ## _pixels_tab[IDX][ 6] = PFX ## NUM ## _mc21_c; \    c->PFX ## _pixels_tab[IDX][ 7] = PFX ## NUM ## _mc31_c; \    c->PFX ## _pixels_tab[IDX][ 8] = PFX ## NUM ## _mc02_c; \    c->PFX ## _pixels_tab[IDX][ 9] = PFX ## NUM ## _mc12_c; \    c->PFX ## _pixels_tab[IDX][10] = PFX ## NUM ## _mc22_c; \    c->PFX ## _pixels_tab[IDX][11] = PFX ## NUM ## _mc32_c; \    c->PFX ## _pixels_tab[IDX][12] = PFX ## NUM ## _mc03_c; \    c->PFX ## _pixels_tab[IDX][13] = PFX ## NUM ## _mc13_c; \    c->PFX ## _pixels_tab[IDX][14] = PFX ## NUM ## _mc23_c; \    c->PFX ## _pixels_tab[IDX][15] = PFX ## NUM ## _mc33_c    dspfunc(put_qpel, 0, 16);    dspfunc(put_no_rnd_qpel, 0, 16);    dspfunc(avg_qpel, 0, 16);    /* dspfunc(avg_no_rnd_qpel, 0, 16); */    dspfunc(put_qpel, 1, 8);    dspfunc(put_no_rnd_qpel, 1, 8);    dspfunc(avg_qpel, 1, 8);    /* dspfunc(avg_no_rnd_qpel, 1, 8); */    dspfunc(put_h264_qpel, 0, 16);    dspfunc(put_h264_qpel, 1, 8);    dspfunc(put_h264_qpel, 2, 4);    dspfunc(avg_h264_qpel, 0, 16);    dspfunc(avg_h264_qpel, 1, 8);    dspfunc(avg_h264_qpel, 2, 4);#undef dspfunc    c->put_h264_chroma_pixels_tab[0]= put_h264_chroma_mc8_c;    c->put_h264_chroma_pixels_tab[1]= put_h264_chroma_mc4_c;    c->put_h264_chroma_pixels_tab[2]= put_h264_chroma_mc2_c;    c->avg_h264_chroma_pixels_tab[0]= avg_h264_chroma_mc8_c;    c->avg_h264_chroma_pixels_tab[1]= avg_h264_chroma_mc4_c;    c->avg_h264_chroma_pixels_tab[2]= avg_h264_chroma_mc2_c;    c->put_mspel_pixels_tab[0]= put_mspel8_mc00_c;    c->put_mspel_pixels_tab[1]= put_mspel8_mc10_c;    c->put_mspel_pixels_tab[2]= put_mspel8_mc20_c;    c->put_mspel_pixels_tab[3]= put_mspel8_mc30_c;    c->put_mspel_pixels_tab[4]= put_mspel8_mc02_c;    c->put_mspel_pixels_tab[5]= put_mspel8_mc12_c;    c->put_mspel_pixels_tab[6]= put_mspel8_mc22_c;    c->put_mspel_pixels_tab[7]= put_mspel8_mc32_c;            c->hadamard8_diff[0]= hadamard8_diff16_c;    c->hadamard8_diff[1]= hadamard8_diff_c;    c->hadamard8_abs = hadamard8_abs_c;        c->dct_sad[0]= dct_sad16x16_c;    c->dct_sad[1]= dct_sad8x8_c;        c->sad[0]= sad16x16_c;    c->sad[1]= sad8x8_c;        c->quant_psnr[0]= quant_psnr16x16_c;    c->quant_psnr[1]= quant_psnr8x8_c;    c->rd[0]= rd16x16_c;    c->rd[1]= rd8x8_c;    c->bit[0]= bit16x16_c;    c->bit[1]= bit8x8_c;            c->add_bytes= add_bytes_c;    c->diff_bytes= diff_bytes_c;    c->sub_hfyu_median_prediction= sub_hfyu_median_prediction_c;    c->bswap_buf= bswap_buf;#ifdef HAVE_MMX    dsputil_init_mmx(c, avctx);#endif#ifdef ARCH_ARMV4L    dsputil_init_armv4l(c, avctx);#endif#ifdef HAVE_MLIB    dsputil_init_mlib(c, avctx);#endif#ifdef ARCH_ALPHA    dsputil_init_alpha(c, avctx);#endif#ifdef ARCH_POWERPC    dsputil_init_ppc(c, avctx);#endif#ifdef HAVE_MMI    dsputil_init_mmi(c, avctx);#endif#ifdef ARCH_SH4    dsputil_init_sh4(c,avctx);#endif    switch(c->idct_permutation_type){    case FF_NO_IDCT_PERM:        for(i=0; i<64; i++)            c->idct_permutation[i]= i;        break;    case FF_LIBMPEG2_IDCT_PERM:        for(i=0; i<64; i++)            c->idct_permutation[i]= (i & 0x38) | ((i & 6) >> 1) | ((i & 1) << 2);        break;    case FF_SIMPLE_IDCT_PERM:        for(i=0; i<64; i++)            c->idct_permutation[i]= simple_mmx_permutation[i];        break;    case FF_TRANSPOSE_IDCT_PERM:        for(i=0; i<64; i++)            c->idct_permutation[i]= ((i&7)<<3) | (i>>3);        break;    default:        av_log(avctx, AV_LOG_ERROR, "Internal error, IDCT permutation not set\n");    }}