[Mplayer-cvslog] CVS: main/libmpcodecs ve_lavc.c,1.6,1.7

Arpi of Ize arpi at mplayer.dev.hu
Mon Apr 15 15:39:56 CEST 2002


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

Modified Files:
	ve_lavc.c 
Log Message:
2-pass qscale fixed

Index: ve_lavc.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ve_lavc.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- ve_lavc.c	14 Apr 2002 23:16:55 -0000	1.6
+++ ve_lavc.c	15 Apr 2002 13:39:48 -0000	1.7
@@ -153,7 +153,8 @@
 		    5) == -1){
 	    mp_msg(MSGT_MENCODER,MSGL_ERR,"2pass failed: filename=%s\n", passtmpfile);
 	    pass=0;
-	}
+	} else
+	    lavc_venc_context.flags|=CODEC_FLAG_QSCALE|CODEC_FLAG_TYPE; // VBR
 	break;
     }
 
@@ -199,13 +200,8 @@
     if(pass==2){ // handle 2-pass:
 	lavc_venc_context.flags|=CODEC_FLAG_QSCALE; // enable VBR
 	lavc_venc_context.quality=VbrControl_get_quant();
-#ifdef CODEC_FLAG_TYPE
-	lavc_venc_context.flags|=CODEC_FLAG_TYPE; // force keyframes
 	lavc_venc_context.key_frame=VbrControl_get_intra();
 	lavc_venc_context.gop_size=0x3fffffff;
-#else
-#error you should upgrade libavcodec... get latest CVS
-#endif
 	out_size = avcodec_encode_video(&lavc_venc_context, mux_v->buffer, mux_v->buffer_size,
 	    &lavc_venc_picture);
 	VbrControl_update_2pass_vbr_encoding(lavc_venc_context.mv_bits,




More information about the MPlayer-cvslog mailing list