[Mplayer-cvslog] CVS: main/libmpcodecs ve_xvid.c,1.1,1.2

Kim Minh Kaplan CVS kmkaplan at mplayerhq.hu
Sat Sep 21 15:10:00 CEST 2002


Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var/tmp.root/cvs-serv31438

Modified Files:
	ve_xvid.c 
Log Message:
Use string selection to choose mode


Index: ve_xvid.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ve_xvid.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ve_xvid.c	21 Sep 2002 12:34:02 -0000	1.1
+++ ve_xvid.c	21 Sep 2002 13:09:57 -0000	1.2
@@ -77,7 +77,23 @@
     -1,				/* fixed_quant */
 };
 
+static struct config mode_conf[] = {
+    /* cbr, vbrqual, vbrquant, 2pass-1, 2pass-2-int, 2pass-2-ext */
+    { "cbr", &xvidenc_param.mode, CONF_TYPE_FLAG, 0, 0, XVID_MODE_CBR, NULL},
+    { "fixedquant", &xvidenc_param.mode, CONF_TYPE_FLAG, 0, 0, XVID_MODE_FIXED_QUANT, NULL},
+    { "2pass-1", &xvidenc_param.mode, CONF_TYPE_FLAG, 0, 0, XVID_MODE_2PASS_1, NULL},
+    { "2pass-2", &xvidenc_param.mode, CONF_TYPE_FLAG, 0, 0, XVID_MODE_2PASS_2, NULL},
+    { "help", "\nAvailable modes: \n"
+      "    cbr         - Constant Bit Rate\n"
+      "    2pass-1     - First pass of two pass mode\n"
+      "    2pass-2     - Second pass of two pass mode\n"
+      "    fixedquant  - Fixed quantizer mode\n"
+      "\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+    { NULL, NULL, 0, 0, 0, 0, NULL}
+};
+
 struct config xvidencopts_conf[] = {
+    { "mode", mode_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
     { "quality", &xvidenc_param.quality, CONF_TYPE_INT, CONF_RANGE, 0,
       sizeof(divx4_motion_presets) / sizeof(divx4_motion_presets[0]) - 1, NULL},
     { "br", &xvidenc_param.bitrate, CONF_TYPE_INT, 0, 0, 0, NULL},
@@ -87,11 +103,6 @@
     { "max_quantizer", &xvidenc_param.max_quantizer, CONF_TYPE_INT, 0, 0, NULL},
     { "min_quantizer", &xvidenc_param.max_quantizer, CONF_TYPE_INT, 0, 0, NULL},
     { "max_key_interval", &xvidenc_param.max_key_interval, CONF_TYPE_INT, 0, 0, NULL},
-    /* cbr, vbrqual, vbrquant, 2pass-1, 2pass-2-int, 2pass-2-ext */
-    { "cbr", &xvidenc_param.mode, CONF_TYPE_FLAG, 0, 0, XVID_MODE_CBR, NULL},
-    { "2pass-1", &xvidenc_param.mode, CONF_TYPE_FLAG, 0, 0, XVID_MODE_2PASS_1, NULL},
-    { "2pass-2", &xvidenc_param.mode, CONF_TYPE_FLAG, 0, 0, XVID_MODE_2PASS_2, NULL},
-    { "fixedquant", &xvidenc_param.mode, CONF_TYPE_FLAG, 0, 0, XVID_MODE_FIXED_QUANT, NULL},
     { "nodebug", &xvidenc_param.debug, CONF_TYPE_FLAG, 0, 0, 0, NULL},
     { "debug", &xvidenc_param.debug, CONF_TYPE_FLAG, 0, 0, 1, NULL},
     { "statsfile", &xvidenc_param.stats_file, CONF_TYPE_STRING, 0, 0, 0, NULL},	/* for XVID_MODE_2PASS_1/22 */




More information about the MPlayer-cvslog mailing list