qmin==1 bugfix
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 17 May 2002 15:31:33 +0000 (15:31 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 17 May 2002 15:31:33 +0000 (15:31 +0000)
Originally committed as revision 511 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/ratecontrol.c

index 3abddb4a515ed0b8851f142be20b62f6bea8920e..d997dcca15598065c924ea1a6c215d33d2a46c08 100644 (file)
@@ -155,7 +155,7 @@ int ff_rate_estimate_qscale(MpegEncContext *s)
         qmin= (int)(qmin*s->b_quant_factor+0.5);
         qmax= (int)(qmax*s->b_quant_factor+0.5);
     }
-    if(qmin<2) qmin=2;
+    if(qmin<1) qmin=1;
     if(qmax>31) qmax=31;
     if(qmax<=qmin) qmax= qmin;
 
@@ -314,7 +314,7 @@ static int init_pass2(MpegEncContext *s)
                 qmin= (int)(qmin*s->b_quant_factor+0.5);
                 qmax= (int)(qmax*s->b_quant_factor+0.5);
             }
-            if(qmin<2) qmin=2;
+            if(qmin<1) qmin=1;
             if(qmax>31) qmax=31;
             if(qmax<=qmin) qmax= qmin;
             
@@ -386,7 +386,7 @@ int ff_rate_estimate_qscale_pass2(MpegEncContext *s)
         qmin= (int)(qmin*s->b_quant_factor+0.5);
         qmax= (int)(qmax*s->b_quant_factor+0.5);
     }
-    if(qmin<2) qmin=2;
+    if(qmin<1) qmin=1;
     if(qmax>31) qmax=31;
     if(qmax<=qmin) qmax= qmin;