[Mplayer-cvslog] CVS: main/libmpcodecs ve_divx4.c,1.1,1.2 ve_lavc.c,1.1,1.2 ve_rawrgb.c,1.1,1.2 ve_vfw.c,1.1,1.2

Arpi of Ize arpi at mplayer.dev.hu
Thu Apr 11 04:50:49 CEST 2002


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

Modified Files:
	ve_divx4.c ve_lavc.c ve_rawrgb.c ve_vfw.c 
Log Message:
soem fixes

Index: ve_divx4.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ve_divx4.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ve_divx4.c	10 Apr 2002 23:23:36 -0000	1.1
+++ ve_divx4.c	11 Apr 2002 02:50:47 -0000	1.2
@@ -72,6 +72,13 @@
     else if(divx4_param.bitrate<=16000) divx4_param.bitrate*=1000;
     if(!divx4_param.quality) divx4_param.quality=5; // the quality of compression ( 1 - fastest, 5 - best )
 
+    // set some usefull defaults:
+    if(!divx4_param.min_quantizer) divx4_param.min_quantizer=2;
+    if(!divx4_param.max_quantizer) divx4_param.max_quantizer=31;
+    if(!divx4_param.rc_period) divx4_param.rc_period=2000;
+    if(!divx4_param.rc_reaction_period) divx4_param.rc_reaction_period=10;
+    if(!divx4_param.rc_reaction_ratio) divx4_param.rc_reaction_ratio=20;
+
     divx4_param.handle=NULL;
     encore(NULL,ENC_OPT_INIT,&divx4_param,NULL);
     vf->priv->enc_handle=divx4_param.handle;
@@ -157,7 +164,7 @@
 					       enc_result.quantizer);
 	}
     }
-    mencoder_write_frame(mux_v,vf->priv->enc_frame.length,enc_result.is_key_frame?0x10:0);
+    mencoder_write_chunk(mux_v,vf->priv->enc_frame.length,enc_result.is_key_frame?0x10:0);
 }
 
 //===========================================================================//

Index: ve_lavc.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ve_lavc.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ve_lavc.c	10 Apr 2002 23:23:36 -0000	1.1
+++ ve_lavc.c	11 Apr 2002 02:50:47 -0000	1.2
@@ -225,9 +225,14 @@
     mencoder_write_chunk(mux_v,out_size,lavc_venc_context.key_frame?0x10:0);
 }
 
+static void uninit(struct vf_instance_s* vf){
+    avcodec_close(&lavc_venc_context);
+}
+
 //===========================================================================//
 
 static int vf_open(vf_instance_t *vf, char* args){
+    vf->uninit=uninit;
     vf->config=config;
     vf->control=control;
     vf->query_format=query_format;

Index: ve_rawrgb.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ve_rawrgb.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ve_rawrgb.c	10 Apr 2002 23:23:36 -0000	1.1
+++ ve_rawrgb.c	11 Apr 2002 02:50:47 -0000	1.2
@@ -66,6 +66,7 @@
     mux_v->bih->biHeight=0;
     mux_v->bih->biCompression=0;
     mux_v->bih->biPlanes=1;
+    mux_v->bih->biBitCount=24;
 
     return 1;
 }

Index: ve_vfw.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ve_vfw.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ve_vfw.c	10 Apr 2002 23:23:36 -0000	1.1
+++ ve_vfw.c	11 Apr 2002 02:50:47 -0000	1.2
@@ -37,9 +37,12 @@
     vfw_bih->biWidth=width;
     vfw_bih->biHeight=height;
     vfw_bih->biSizeImage=width*height*((vfw_bih->biBitCount+7)/8);
-    mux_v->bih->biWidth=width;
-    mux_v->bih->biHeight=height;
-    mux_v->bih->biSizeImage=width*height*((mux_v->bih->biBitCount+7)/8);
+
+    if(!vfw_start_encoder(vfw_bih, mux_v->bih)) return 0;
+
+//    mux_v->bih->biWidth=width;
+//    mux_v->bih->biHeight=height;
+//    mux_v->bih->biSizeImage=width*height*((mux_v->bih->biBitCount+7)/8);
 
     return 1;
 }




More information about the MPlayer-cvslog mailing list