c->sad[0]= sad16x16_mmx2; c->sad[1]= sad8x8_mmx2;
void dsputil_init_mmx(DSPContext* c, unsigned mask){    mm_flags = mm_support();#if 0    fprintf(stderr, "libavcodec: CPU flags:");    if (mm_flags & MM_MMX)        fprintf(stderr, " mmx");    if (mm_flags & MM_MMXEXT)        fprintf(stderr, " mmxext");    if (mm_flags & MM_3DNOW)        fprintf(stderr, " 3dnow");    if (mm_flags & MM_SSE)        fprintf(stderr, " sse");    if (mm_flags & MM_SSE2)        fprintf(stderr, " sse2");    fprintf(stderr, "\n");#endif    if (mm_flags & MM_MMX) {        c->get_pixels = get_pixels_mmx;        c->diff_pixels = diff_pixels_mmx;        c->put_pixels_clamped = put_pixels_clamped_mmx;        c->add_pixels_clamped = add_pixels_clamped_mmx;        c->clear_blocks = clear_blocks_mmx;        c->pix_sum = pix_sum16_mmx;        c->pix_abs16x16     = pix_abs16x16_mmx;        c->pix_abs16x16_x2  = pix_abs16x16_x2_mmx;        c->pix_abs16x16_y2  = pix_abs16x16_y2_mmx;        c->pix_abs16x16_xy2 = pix_abs16x16_xy2_mmx;        c->pix_abs8x8     = pix_abs8x8_mmx;        c->pix_abs8x8_x2  = pix_abs8x8_x2_mmx;        c->pix_abs8x8_y2  = pix_abs8x8_y2_mmx;        c->pix_abs8x8_xy2 = pix_abs8x8_xy2_mmx;        c->put_pixels_tab[0][0] = put_pixels16_mmx;        c->put_pixels_tab[0][1] = put_pixels16_x2_mmx;        c->put_pixels_tab[0][2] = put_pixels16_y2_mmx;        c->put_pixels_tab[0][3] = put_pixels16_xy2_mmx;        c->put_no_rnd_pixels_tab[0][0] = put_pixels16_mmx;        c->put_no_rnd_pixels_tab[0][1] = put_no_rnd_pixels16_x2_mmx;        c->put_no_rnd_pixels_tab[0][2] = put_no_rnd_pixels16_y2_mmx;        c->put_no_rnd_pixels_tab[0][3] = put_no_rnd_pixels16_xy2_mmx;        c->avg_pixels_tab[0][0] = avg_pixels16_mmx;        c->avg_pixels_tab[0][1] = avg_pixels16_x2_mmx;        c->avg_pixels_tab[0][2] = avg_pixels16_y2_mmx;        c->avg_pixels_tab[0][3] = avg_pixels16_xy2_mmx;        c->avg_no_rnd_pixels_tab[0][0] = avg_no_rnd_pixels16_mmx;        c->avg_no_rnd_pixels_tab[0][1] = avg_no_rnd_pixels16_x2_mmx;        c->avg_no_rnd_pixels_tab[0][2] = avg_no_rnd_pixels16_y2_mmx;        c->avg_no_rnd_pixels_tab[0][3] = avg_no_rnd_pixels16_xy2_mmx;        c->put_pixels_tab[1][0] = put_pixels8_mmx;        c->put_pixels_tab[1][1] = put_pixels8_x2_mmx;        c->put_pixels_tab[1][2] = put_pixels8_y2_mmx;        c->put_pixels_tab[1][3] = put_pixels8_xy2_mmx;        c->put_no_rnd_pixels_tab[1][0] = put_pixels8_mmx;        c->put_no_rnd_pixels_tab[1][1] = put_no_rnd_pixels8_x2_mmx;        c->put_no_rnd_pixels_tab[1][2] = put_no_rnd_pixels8_y2_mmx;        c->put_no_rnd_pixels_tab[1][3] = put_no_rnd_pixels8_xy2_mmx;        c->avg_pixels_tab[1][0] = avg_pixels8_mmx;        c->avg_pixels_tab[1][1] = avg_pixels8_x2_mmx;        c->avg_pixels_tab[1][2] = avg_pixels8_y2_mmx;        c->avg_pixels_tab[1][3] = avg_pixels8_xy2_mmx;        c->avg_no_rnd_pixels_tab[1][0] = avg_no_rnd_pixels8_mmx;        c->avg_no_rnd_pixels_tab[1][1] = avg_no_rnd_pixels8_x2_mmx;        c->avg_no_rnd_pixels_tab[1][2] = avg_no_rnd_pixels8_y2_mmx;        c->avg_no_rnd_pixels_tab[1][3] = avg_no_rnd_pixels8_xy2_mmx;                c->add_bytes= add_bytes_mmx;        c->diff_bytes= diff_bytes_mmx;        if (mm_flags & MM_MMXEXT) {            c->pix_abs16x16     = pix_abs16x16_mmx2;            c->pix_abs16x16_x2  = pix_abs16x16_x2_mmx2;            c->pix_abs16x16_y2  = pix_abs16x16_y2_mmx2;            c->pix_abs16x16_xy2 = pix_abs16x16_xy2_mmx2;            c->pix_abs8x8     = pix_abs8x8_mmx2;            c->pix_abs8x8_x2  = pix_abs8x8_x2_mmx2;            c->pix_abs8x8_y2  = pix_abs8x8_y2_mmx2;            c->pix_abs8x8_xy2 = pix_abs8x8_xy2_mmx2;            c->put_pixels_tab[0][1] = put_pixels16_x2_mmx2;            c->put_pixels_tab[0][2] = put_pixels16_y2_mmx2;            c->put_no_rnd_pixels_tab[0][1] = put_no_rnd_pixels16_x2_mmx2;            c->put_no_rnd_pixels_tab[0][2] = put_no_rnd_pixels16_y2_mmx2;            c->avg_pixels_tab[0][0] = avg_pixels16_mmx2;            c->avg_pixels_tab[0][1] = avg_pixels16_x2_mmx2;            c->avg_pixels_tab[0][2] = avg_pixels16_y2_mmx2;            c->avg_pixels_tab[0][3] = avg_pixels16_xy2_mmx2;            c->put_pixels_tab[1][1] = put_pixels8_x2_mmx2;            c->put_pixels_tab[1][2] = put_pixels8_y2_mmx2;            c->put_no_rnd_pixels_tab[1][1] = put_no_rnd_pixels8_x2_mmx2;            c->put_no_rnd_pixels_tab[1][2] = put_no_rnd_pixels8_y2_mmx2;            c->avg_pixels_tab[1][0] = avg_pixels8_mmx2;            c->avg_pixels_tab[1][1] = avg_pixels8_x2_mmx2;            c->avg_pixels_tab[1][2] = avg_pixels8_y2_mmx2;            c->avg_pixels_tab[1][3] = avg_pixels8_xy2_mmx2;        } else if (mm_flags & MM_3DNOW) {            c->put_pixels_tab[0][1] = put_pixels16_x2_3dnow;            c->put_pixels_tab[0][2] = put_pixels16_y2_3dnow;            c->put_no_rnd_pixels_tab[0][1] = put_no_rnd_pixels16_x2_3dnow;            c->put_no_rnd_pixels_tab[0][2] = put_no_rnd_pixels16_y2_3dnow;            c->avg_pixels_tab[0][0] = avg_pixels16_3dnow;            c->avg_pixels_tab[0][1] = avg_pixels16_x2_3dnow;            c->avg_pixels_tab[0][2] = avg_pixels16_y2_3dnow;            c->avg_pixels_tab[0][3] = avg_pixels16_xy2_3dnow;            c->put_pixels_tab[1][1] = put_pixels8_x2_3dnow;            c->put_pixels_tab[1][2] = put_pixels8_y2_3dnow;            c->put_no_rnd_pixels_tab[1][1] = put_no_rnd_pixels8_x2_3dnow;            c->put_no_rnd_pixels_tab[1][2] = put_no_rnd_pixels8_y2_3dnow;            c->avg_pixels_tab[1][0] = avg_pixels8_3dnow;            c->avg_pixels_tab[1][1] = avg_pixels8_x2_3dnow;            c->avg_pixels_tab[1][2] = avg_pixels8_y2_3dnow;            c->avg_pixels_tab[1][3] = avg_pixels8_xy2_3dnow;        }    }#if 0    // for speed testing    get_pixels = just_return;    put_pixels_clamped = just_return;    add_pixels_clamped = just_return;    pix_abs16x16 = just_return;    pix_abs16x16_x2 = just_return;    pix_abs16x16_y2 = just_return;    pix_abs16x16_xy2 = just_return;    put_pixels_tab[0] = just_return;    put_pixels_tab[1] = just_return;    put_pixels_tab[2] = just_return;    put_pixels_tab[3] = just_return;    put_no_rnd_pixels_tab[0] = just_return;    put_no_rnd_pixels_tab[1] = just_return;    put_no_rnd_pixels_tab[2] = just_return;    put_no_rnd_pixels_tab[3] = just_return;    avg_pixels_tab[0] = just_return;    avg_pixels_tab[1] = just_return;    avg_pixels_tab[2] = just_return;    avg_pixels_tab[3] = just_return;    avg_no_rnd_pixels_tab[0] = just_return;    avg_no_rnd_pixels_tab[1] = just_return;    avg_no_rnd_pixels_tab[2] = just_return;    avg_no_rnd_pixels_tab[3] = just_return;    //av_fdct = just_return;    //ff_idct = just_return;#endif}