[Mplayer-cvslog] CVS: main/libmpcodecs ve_lavc.c,1.48,1.49

Michael Niedermayer CVS michael at mplayerhq.hu
Sat Dec 28 01:04:23 CET 2002


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

Modified Files:
	ve_lavc.c 
Log Message:
lavc 4647


Index: ve_lavc.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ve_lavc.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- ve_lavc.c	27 Dec 2002 22:43:19 -0000	1.48
+++ ve_lavc.c	28 Dec 2002 00:04:20 -0000	1.49
@@ -107,6 +107,11 @@
 static char *lavc_param_format="YV12";
 static int lavc_param_debug= 0;
 static int lavc_param_psnr= 0;
+static int lavc_param_me_cmp= 0;
+static int lavc_param_me_sub_cmp= 0;
+static int lavc_param_mb_cmp= 0;
+static int lavc_param_dia_size= 0;
+static int lavc_param_qpel= 0;
 
 #include "cfgparser.h"
 
@@ -170,6 +175,11 @@
 #if LIBAVCODEC_BUILD >= 4643
         {"psnr", &lavc_param_psnr, CONF_TYPE_FLAG, 0, 0, CODEC_FLAG_PSNR, NULL},
 #endif 
+        {"cmp", &lavc_param_me_cmp, CONF_TYPE_INT, CONF_RANGE, 0, 2000, NULL},
+        {"subcmp", &lavc_param_me_sub_cmp, CONF_TYPE_INT, CONF_RANGE, 0, 2000, NULL},
+        {"mbcmp", &lavc_param_mb_cmp, CONF_TYPE_INT, CONF_RANGE, 0, 2000, NULL},
+        {"dia", &lavc_param_dia_size, CONF_TYPE_INT, CONF_RANGE, 0, 2000, NULL},
+	{"qpel", &lavc_param_qpel, CONF_TYPE_FLAG, 0, 0, CODEC_FLAG_QPEL, NULL},
 	{NULL, NULL, 0, 0, 0, 0, NULL}
 };
 #endif
@@ -316,12 +326,14 @@
     else
 	lavc_venc_context->flags = 0;
 
-     /* 4mv is currently buggy with B frames */
-    if (lavc_param_vmax_b_frames > 0 && lavc_param_v4mv) {
-        printf("4MV with B-Frames not yet supported -> 4MV disabled\n");
-        lavc_param_v4mv = 0;
-    }
-
+#if LIBAVCODEC_BUILD >= 4647
+    lavc_venc_context->me_cmp= lavc_param_me_cmp;
+    lavc_venc_context->me_sub_cmp= lavc_param_me_sub_cmp;
+    lavc_venc_context->mb_cmp= lavc_param_mb_cmp;
+    lavc_venc_context->dia_size= lavc_param_dia_size;
+    lavc_venc_context->flags|= lavc_param_qpel;
+#endif 
+        
     lavc_venc_context->flags|= lavc_param_v4mv ? CODEC_FLAG_4MV : 0;
     lavc_venc_context->flags|= lavc_param_data_partitioning;
     if(lavc_param_gray) lavc_venc_context->flags|= CODEC_FLAG_GRAY;
@@ -549,6 +561,12 @@
 	memset(mux_v->bih, 0, sizeof(BITMAPINFOHEADER)+1000);
 	mux_v->bih->biSize=sizeof(BITMAPINFOHEADER)+1000;
     }
+    else if (lavc_param_vcodec && !strcasecmp(lavc_param_vcodec, "wmv2"))
+    {
+	mux_v->bih=malloc(sizeof(BITMAPINFOHEADER)+4);
+	memset(mux_v->bih, 0, sizeof(BITMAPINFOHEADER)+4);
+	mux_v->bih->biSize=sizeof(BITMAPINFOHEADER)+4;
+    }
     else
     {
 	mux_v->bih=malloc(sizeof(BITMAPINFOHEADER));
@@ -581,6 +599,8 @@
 	mux_v->bih->biCompression = mmioFOURCC('M', 'P', '4', '2');
     else if (!strcasecmp(lavc_param_vcodec, "wmv1"))
 	mux_v->bih->biCompression = mmioFOURCC('W', 'M', 'V', '1');
+    else if (!strcasecmp(lavc_param_vcodec, "wmv2"))
+	mux_v->bih->biCompression = mmioFOURCC('W', 'M', 'V', '2');
     else if (!strcasecmp(lavc_param_vcodec, "huffyuv"))
 	mux_v->bih->biCompression = mmioFOURCC('H', 'F', 'Y', 'U');
     else




More information about the MPlayer-cvslog mailing list