[Mplayer-cvslog] CVS: main/libmpcodecs ve_xvid4.c,1.5,1.6

Ivan Kalvachev CVS syncmail at mplayerhq.hu
Sat Feb 7 00:45:56 CET 2004


CVS change done by Ivan Kalvachev CVS

Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var2/tmp/cvs-serv6096

Modified Files:
	ve_xvid4.c 
Log Message:
allow using of float fixed_quant

Index: ve_xvid4.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ve_xvid4.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ve_xvid4.c	4 Feb 2004 23:18:25 -0000	1.5
+++ ve_xvid4.c	6 Feb 2004 23:45:53 -0000	1.6
@@ -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,




More information about the MPlayer-cvslog mailing list