--- simple_idct.c 2003/06/09 19:42:21 1.2.2.3 +++ simple_idct.c 2010/03/09 10:00:14 1.6 @@ -6,7 +6,7 @@ * Copyright (c) 2001 Michael Niedermayer * * Originally distributed under the GNU LGPL License (ffmpeg). - * It is licensed under the GNU GPL for the XviD tree. + * It is licensed under the GNU GPL for the Xvid tree. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,13 +22,13 @@ * along with this program ; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: simple_idct.c,v 1.2.2.3 2003/06/09 19:42:21 edgomez Exp $ + * $Id: simple_idct.c,v 1.6 2010/03/09 10:00:14 Isibaar Exp $ * ****************************************************************************/ /* based upon some outcommented c code from mpeg2dec (idct_mmx.c - written by Aaron Holtzman ) + written by Aaron Holtzman ) */ #include "../portab.h" @@ -56,7 +56,12 @@ #define COL_SHIFT 20 /* 6 */ #endif -#if defined(ARCH_IS_PPC) +/* + PPC mac operation. Causes compile problems on newer ppc targets + + Was originally: #if defined(ARCH_IS_PPC) + */ +#if 0 /* signed 16x16 -> 32 multiply add accumulate */ #define MAC16(rt, ra, rb) \ @@ -91,7 +96,7 @@ #else #define ROW0_MASK 0xffffLL #endif - if ( ((((uint64_t *)row)[0] & ~ROW0_MASK) | + if ( ((((uint64_t *)row)[0] & ~ROW0_MASK) | ((uint64_t *)row)[1]) == 0) { temp = (row[0] << 3) & 0xffff; temp += temp << 16; @@ -103,7 +108,7 @@ #else if (!(((uint32_t*)row)[1] | ((uint32_t*)row)[2] | - ((uint32_t*)row)[3] | + ((uint32_t*)row)[3] | row[1])) { temp = (row[0] << 3) & 0xffff; temp += temp << 16; @@ -146,13 +151,13 @@ MAC16(b0, W5, row[5]); MAC16(b0, W7, row[7]); - + MAC16(b1, -W1, row[5]); MAC16(b1, -W5, row[7]); - + MAC16(b2, W7, row[5]); MAC16(b2, W3, row[7]); - + MAC16(b3, W3, row[5]); MAC16(b3, -W1, row[7]); } @@ -236,7 +241,7 @@ int i; for(i=0; i<8; i++) idctRowCondDC(block + i*8); - + for(i=0; i<8; i++) idctSparseCol(block + i); }