--- idct.c 2003/06/09 01:19:37 1.6.2.1 +++ idct.c 2004/03/22 22:36:23 1.7 @@ -1,4 +1,28 @@ -/* idct.c, inverse fast discrete cosine transform */ +/***************************************************************************** + * + * XVID MPEG-4 VIDEO CODEC + * - Inverse DCT - + * + * These routines are from Independent JPEG Group's free JPEG software + * Copyright (C) 1991-1998, Thomas G. Lane (see the file README.IJG) + * + * 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 + * the Free Software Foundation ; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY ; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program ; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * $Id: idct.c,v 1.7 2004/03/22 22:36:23 edgomez Exp $ + * + ****************************************************************************/ /* Copyright (C) 1996, MPEG Software Simulation Group. All Rights Reserved. */ @@ -33,7 +57,7 @@ * v0.16B22 idct_FAST() renamed to idct_int32() * also merged idct_FAST() into a single function, to help VC++ * optimize it. - * + * * v0.14 changed int to long, to avoid confusion when compiling on x86 * platform ( in VC++ "int" -> 32bits ) */ @@ -100,7 +124,7 @@ X8 = W3*(X6+X7); X6 = X8 - (W3-W5)*X6; X7 = X8 - (W3+W5)*X7; - + /* second stage */ X8 = X0 + X1; X0 -= X1; @@ -111,7 +135,7 @@ X4 -= X6; X6 = X5 + X7; X5 -= X7; - + /* third stage */ X7 = X8 + X3; X8 -= X3; @@ -119,7 +143,7 @@ X0 -= X2; X2 = (181*(X4+X5)+128)>>8; X4 = (181*(X4-X5)+128)>>8; - + /* fourth stage */ blk[0] = (X7+X1)>>8; blk[1] = (X3+X2)>>8; @@ -166,7 +190,7 @@ X8 = W3*(X6+X7) + 4; X6 = (X8-(W3-W5)*X6)>>3; X7 = (X8-(W3+W5)*X7)>>3; - + /* second stage */ X8 = X0 + X1; X0 -= X1; @@ -177,7 +201,7 @@ X4 -= X6; X6 = X5 + X7; X5 -= X7; - + /* third stage */ X7 = X8 + X3; X8 -= X3; @@ -185,7 +209,7 @@ X0 -= X2; X2 = (181*(X4+X5)+128)>>8; X4 = (181*(X4-X5)+128)>>8; - + /* fourth stage */ blk[8*0] = iclp[(X7+X1)>>14]; blk[8*1] = iclp[(X3+X2)>>14];