[Mplayer-cvslog] CVS: main cfg-mencoder.h,1.23,1.24 mencoder.c,1.75,1.76

Richard Felker CVS rfelker at mplayer.dev.hu
Tue Jan 29 17:27:30 CET 2002


Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv32539

Modified Files:
	cfg-mencoder.h mencoder.c 
Log Message:
added constant-qscale encoding support with lavc, fixed slightly incorrect definition for the vme lavc option

Index: cfg-mencoder.h
===================================================================
RCS file: /cvsroot/mplayer/main/cfg-mencoder.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- cfg-mencoder.h	26 Jan 2002 16:32:06 -0000	1.23
+++ cfg-mencoder.h	29 Jan 2002 16:27:21 -0000	1.24
@@ -53,7 +53,8 @@
 	{"vcodec", &lavc_param_vcodec, CONF_TYPE_STRING, 0, 0, 0, NULL},
 	{"vbitrate", &lavc_param_vbitrate, CONF_TYPE_INT, CONF_RANGE, 4, 24000000, NULL},
 	{"vhq", &lavc_param_vhq, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-	{"vme", &lavc_param_vme, CONF_TYPE_FLAG, CONF_RANGE, 0, 3, NULL},
+	{"vme", &lavc_param_vme, CONF_TYPE_INT, CONF_RANGE, 0, 3, NULL},
+	{"vqscale", &lavc_param_vqscale, CONF_TYPE_INT, CONF_RANGE, 1, 31, NULL},
 	{"keyint", &lavc_param_keyint, CONF_TYPE_INT, 0, 0, 0, NULL},
 	{NULL, NULL, 0, 0, 0, 0, NULL}
 };

Index: mencoder.c
===================================================================
RCS file: /cvsroot/mplayer/main/mencoder.c,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -r1.75 -r1.76
--- mencoder.c	28 Jan 2002 07:29:17 -0000	1.75
+++ mencoder.c	29 Jan 2002 16:27:21 -0000	1.76
@@ -72,6 +72,7 @@
 int lavc_param_vbitrate = -1;
 int lavc_param_vhq = 0; /* default is realtime encoding */
 int lavc_param_vme = 3;
+int lavc_param_vqscale = 0;
 int lavc_param_keyint = -1;
 #endif
 
@@ -988,11 +989,13 @@
        encoder context - FIXME */
     motion_estimation_method = lavc_param_vme;
 
-#if 0
     /* fixed qscale :p */
-    lavc_venc_context.flags |= CODEC_FLAG_QSCALE;
-    lavc_venc_context.quality = 1;
-#endif
+    if (lavc_param_vqscale)
+    {
+	printf("Using constant qscale = %d (VBR)\n", lavc_param_vqscale);
+	lavc_venc_context.flags |= CODEC_FLAG_QSCALE;
+	lavc_venc_context.quality = lavc_param_vqscale;
+    }
 
     if (avcodec_open(&lavc_venc_context, lavc_venc_codec) != 0)
     {




More information about the MPlayer-cvslog mailing list