Mercurial > libavcodec.hg
comparison imgresample.c @ 2:2e2c46c87460 libavcodec
fixed config for direct mplayer build compatibility
author | glantau |
---|---|
date | Mon, 23 Jul 2001 20:06:54 +0000 |
parents | 986e461dc072 |
children | b69fe46fd708 |
comparison
equal
deleted
inserted
replaced
1:383bfb30fc84 | 2:2e2c46c87460 |
---|---|
128 dst++; | 128 dst++; |
129 s++; | 129 s++; |
130 } | 130 } |
131 } | 131 } |
132 | 132 |
133 #ifdef CONFIG_MMX | 133 #ifdef HAVE_MMX |
134 | 134 |
135 #include "i386/mmx.h" | 135 #include "i386/mmx.h" |
136 | 136 |
137 #define FILTER4(reg) \ | 137 #define FILTER4(reg) \ |
138 {\ | 138 {\ |
315 n = (((src_width - NB_TAPS + 1) << POS_FRAC_BITS) - 1 - src_start) / | 315 n = (((src_width - NB_TAPS + 1) << POS_FRAC_BITS) - 1 - src_start) / |
316 src_incr; | 316 src_incr; |
317 } else { | 317 } else { |
318 n = dst_width; | 318 n = dst_width; |
319 } | 319 } |
320 #ifdef CONFIG_MMX | 320 #ifdef HAVE_MMX |
321 if ((mm_flags & MM_MMX) && NB_TAPS == 4) | 321 if ((mm_flags & MM_MMX) && NB_TAPS == 4) |
322 h_resample_fast4_mmx(dst, n, | 322 h_resample_fast4_mmx(dst, n, |
323 src, src_width, src_start, src_incr, filters); | 323 src, src_width, src_start, src_incr, filters); |
324 else | 324 else |
325 #endif | 325 #endif |
372 new_line, owidth); | 372 new_line, owidth); |
373 } | 373 } |
374 } | 374 } |
375 /* apply vertical filter */ | 375 /* apply vertical filter */ |
376 phase_y = get_phase(src_y); | 376 phase_y = get_phase(src_y); |
377 #ifdef CONFIG_MMX | 377 #ifdef HAVE_MMX |
378 /* desactivated MMX because loss of precision */ | 378 /* desactivated MMX because loss of precision */ |
379 if ((mm_flags & MM_MMX) && NB_TAPS == 4 && 0) | 379 if ((mm_flags & MM_MMX) && NB_TAPS == 4 && 0) |
380 v_resample4_mmx(output, owidth, | 380 v_resample4_mmx(output, owidth, |
381 s->line_buf + (ring_y - NB_TAPS + 1) * owidth, owidth, | 381 s->line_buf + (ring_y - NB_TAPS + 1) * owidth, owidth, |
382 &s->v_filters[phase_y][0]); | 382 &s->v_filters[phase_y][0]); |
514 } | 514 } |
515 printf("\n"); | 515 printf("\n"); |
516 } | 516 } |
517 } | 517 } |
518 | 518 |
519 #ifdef CONFIG_MMX | 519 #ifdef HAVE_MMX |
520 int mm_flags; | 520 int mm_flags; |
521 #endif | 521 #endif |
522 | 522 |
523 int main(int argc, char **argv) | 523 int main(int argc, char **argv) |
524 { | 524 { |
586 sprintf(buf, "/tmp/out%d.pgm", i); | 586 sprintf(buf, "/tmp/out%d.pgm", i); |
587 save_pgm(buf, img1, xsize, ysize); | 587 save_pgm(buf, img1, xsize, ysize); |
588 } | 588 } |
589 | 589 |
590 /* mmx test */ | 590 /* mmx test */ |
591 #ifdef CONFIG_MMX | 591 #ifdef HAVE_MMX |
592 printf("MMX test\n"); | 592 printf("MMX test\n"); |
593 fact = 0.72; | 593 fact = 0.72; |
594 xsize = (int)(XSIZE * fact); | 594 xsize = (int)(XSIZE * fact); |
595 ysize = (int)(YSIZE * fact); | 595 ysize = (int)(YSIZE * fact); |
596 mm_flags = MM_MMX; | 596 mm_flags = MM_MMX; |