comparison msmpeg4.c @ 214:73df666cacc7 libavcodec

Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
author nickols_k
date Sun, 20 Jan 2002 14:48:02 +0000
parents 2eb04d6be309
children fe243b4aec02
comparison
equal deleted inserted replaced
213:e80ad397d30e 214:73df666cacc7
458 "movzwl %%ax, %2 \n\t" 458 "movzwl %%ax, %2 \n\t"
459 : "+r" (a), "+r" (b), "+r" (c) 459 : "+r" (a), "+r" (b), "+r" (c)
460 : "r" (scale) 460 : "r" (scale)
461 : "%eax", "%edx" 461 : "%eax", "%edx"
462 ); 462 );
463 #else 463 #elif defined (ARCH_ALPHA)
464 /* Divisions are extremely costly on Alpha; optimize the most
465 common case. */
466 if (scale == 8) {
467 a = (a + (8 >> 1)) / 8;
468 b = (b + (8 >> 1)) / 8;
469 c = (c + (8 >> 1)) / 8;
470 } else {
471 a = (a + (scale >> 1)) / scale;
472 b = (b + (scale >> 1)) / scale;
473 c = (c + (scale >> 1)) / scale;
474 }
475 #else
464 a = (a + (scale >> 1)) / scale; 476 a = (a + (scale >> 1)) / scale;
465 b = (b + (scale >> 1)) / scale; 477 b = (b + (scale >> 1)) / scale;
466 c = (c + (scale >> 1)) / scale; 478 c = (c + (scale >> 1)) / scale;
467 #endif 479 #endif
468 /* XXX: WARNING: they did not choose the same test as MPEG4. This 480 /* XXX: WARNING: they did not choose the same test as MPEG4. This