# HG changeset patch # User iive # Date 1076111153 0 # Node ID d870d266634e659f78b5a5f94209aa5800f78d84 # Parent 7d603ceb4ac171f95f9f99bff1cc3f4fea9b96a4 allow using of float fixed_quant diff -r 7d603ceb4ac1 -r d870d266634e libmpcodecs/ve_xvid4.c --- a/libmpcodecs/ve_xvid4.c Fri Feb 06 20:44:09 2004 +0000 +++ b/libmpcodecs/ve_xvid4.c Fri Feb 06 23:45:53 2004 +0000 @@ -987,22 +987,20 @@ /* Quantizer mode uses the same plugin, we have only to define * a constant quantizer zone beginning at frame 0 */ if(pass == MODE_QUANT) { - int base, incr; - - base = 100; - incr = (int)xvidenc_quantizer*base; + XVIDRational squant; + squant = xvid_d2q(xvidenc_quantizer,128); create->zones[create->num_zones].mode = XVID_ZONE_QUANT; create->zones[create->num_zones].frame = 0; - create->zones[create->num_zones].base = base; - create->zones[create->num_zones].increment = incr; + create->zones[create->num_zones].base = squant.num; + create->zones[create->num_zones].increment = squant.den; create->num_zones++; mp_msg(MSGT_MENCODER, MSGL_INFO, "xvid: Fixed Quant Rate Control -- quantizer=%d/%d=%2.2f\n", - incr, - base, - (float)(incr)/(float)(base)); + squant.num, + squant.den, + (float)(squant.num)/(float)(squant.den)); } else { mp_msg(MSGT_MENCODER, MSGL_INFO,