--- branches/dev-api-4/xvidcore/src/encoder.c 2003/08/03 10:10:54 1108 +++ branches/dev-api-4/xvidcore/src/encoder.c 2003/08/03 10:20:12 1109 @@ -21,7 +21,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: encoder.c,v 1.95.2.36 2003-08-02 15:08:19 edgomez Exp $ + * $Id: encoder.c,v 1.95.2.37 2003-08-03 10:20:12 syskin Exp $ * ****************************************************************************/ @@ -1285,6 +1285,10 @@ { unsigned int i,j; int quant = frame->quant; + if (quant > 31) + frame->quant = quant = 31; + else if (quant < 1) + frame->quant = quant = 1; for (j=0; jmb_height; j++) for (i=0; imb_width; i++) { @@ -1292,7 +1296,7 @@ quant += pMB->dquant; if (quant > 31) quant = 31; - if (quant < 1) + else if (quant < 1) quant = 1; pMB->quant = quant; }