--- xvid.c 2003/03/26 11:01:03 1.45.2.2 +++ xvid.c 2003/06/11 14:10:40 1.45.2.8 @@ -3,6 +3,8 @@ * XVID MPEG-4 VIDEO CODEC * - Native API implementation - * + * Copyright(C) 2001-2003 Peter Ross + * * 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 @@ -17,7 +19,7 @@ * along with this program ; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: xvid.c,v 1.45.2.2 2003/03/26 11:01:03 suxen_drol Exp $ + * $Id: xvid.c,v 1.45.2.8 2003/06/11 14:10:40 Isibaar Exp $ * ****************************************************************************/ @@ -45,6 +47,10 @@ #include "utils/timer.h" #include "bitstream/mbcoding.h" +#if defined(_DEBUG) +unsigned int xvid_debug = 0; /* xvid debug mask */ +#endif + #if defined(ARCH_IS_IA32) #if defined(_MSC_VER) @@ -282,8 +288,7 @@ #if defined(ARCH_IS_IA32) - if ((cpu_flags & XVID_CPU_ASM)) - { + if ((cpu_flags & XVID_CPU_ASM)) { vfilter_31 = xvid_VFilter_31_x86; hfilter_31 = xvid_HFilter_31_x86; } @@ -482,8 +487,10 @@ dev16 = dev16_sse2; #endif /* Forward and Inverse DCT */ +#if 0 /* Both function are known to be unprecise, better keep them deactivated */ idct = idct_sse2; fdct = fdct_sse2; +#endif } #endif @@ -532,7 +539,11 @@ } #endif - return 0; +#if defined(_DEBUG) + xvid_debug = init->debug; +#endif + + return 0; } @@ -568,7 +579,9 @@ if (XVID_MAJOR(convert->version) != 1) /* v1.x.x */ return XVID_ERR_VERSION; - // const int flip1 = (convert->input.colorspace & XVID_CSP_VFLIP) ^ (convert->output.colorspace & XVID_CSP_VFLIP); +#if 0 + const int flip1 = (convert->input.colorspace & XVID_CSP_VFLIP) ^ (convert->output.colorspace & XVID_CSP_VFLIP); +#endif width = convert->width; height = convert->height; width2 = convert->width/2; @@ -640,7 +653,7 @@ { int i, diff = 0; for (i = 0; i < size; i++) - diff += ABS(blockA[i]-blockB[i]); + diff += abs(blockA[i]-blockB[i]); return diff; }