--- adapt_quant.c 2003/02/15 15:22:19 1.14 +++ adapt_quant.c 2003/06/09 13:55:10 1.14.2.2 @@ -1,3 +1,29 @@ +/***************************************************************************** + * + * XVID MPEG-4 VIDEO CODEC + * - Deprecated code - + * + * Copyright(C) 2002 Peter Ross + * 2002 Christoph Lampert + * + * 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: adapt_quant.c,v 1.14.2.2 2003/06/09 13:55:10 edgomez Exp $ + * + ****************************************************************************/ + #include "../portab.h" #include "../global.h" #include "adapt_quant.h" @@ -61,7 +87,7 @@ int min_quant, int max_quant, int mb_width, - int mb_height) // no qstride because normalization + int mb_height) /* no qstride because normalization */ { int i, j, k, l; @@ -91,12 +117,12 @@ return(-1); for (k = 0; k < mb_height; k++) { - for (l = 0; l < mb_width; l++) // do this for all macroblocks individually + for (l = 0; l < mb_width; l++) /* do this for all macroblocks individually */ { quant[k * mb_width + l] = (float) framequant; - // calculate luminance-masking - ptr = &buf[16 * k * stride + 16 * l]; // address of MB + /* calculate luminance-masking */ + ptr = &buf[16 * k * stride + 16 * l]; /* address of MB */ val[k * mb_width + l] = 0.; @@ -117,7 +143,7 @@ if (((global GlobalDarkThres)) || (mid_range < MidRangeThres)) { for (k = 0; k < mb_height; k++) { - for (l = 0; l < mb_width; l++) // do this for all macroblocks individually + for (l = 0; l < mb_width; l++) /* do this for all macroblocks individually */ { if (val[k * mb_width + l] < DarkThres) quant[k * mb_width + l] +=