# HG changeset patch # User kabi # Date 1012241188 0 # Node ID fe243b4aec02c250f4857e5fd9805f867ca61e68 # Parent 0b234715e20513059500c351205533c07bb54031 * temporal solution for shared lib compilation * using ALPHA code optimalization for non ARCH_I386 diff -r 0b234715e205 -r fe243b4aec02 msmpeg4.c --- a/msmpeg4.c Sun Jan 27 13:30:18 2002 +0000 +++ b/msmpeg4.c Mon Jan 28 18:06:28 2002 +0000 @@ -437,7 +437,7 @@ necessitate to modify mpegvideo.c. The problem comes from the fact they decided to store the quantized DC (which would lead to problems if Q could vary !) */ -#ifdef ARCH_X86 +#if defined ARCH_X86 && !defined PIC /* using 16bit divisions as they are large enough and 2x as fast */ asm volatile( "movl %3, %%eax \n\t" @@ -460,9 +460,11 @@ : "r" (scale) : "%eax", "%edx" ); -#elif defined (ARCH_ALPHA) +#else + /* #elif defined (ARCH_ALPHA) */ /* Divisions are extremely costly on Alpha; optimize the most - common case. */ + common case. But they are costly everywhere... + */ if (scale == 8) { a = (a + (8 >> 1)) / 8; b = (b + (8 >> 1)) / 8; @@ -472,10 +474,6 @@ b = (b + (scale >> 1)) / scale; c = (c + (scale >> 1)) / scale; } -#else - a = (a + (scale >> 1)) / scale; - b = (b + (scale >> 1)) / scale; - c = (c + (scale >> 1)) / scale; #endif /* XXX: WARNING: they did not choose the same test as MPEG4. This is very important ! */