[Mplayer-cvslog] CVS: main/libvo vo_dxr3.c,1.64,1.65

David Holm mswitch at mplayer.dev.hu
Tue Mar 19 16:08:18 CET 2002


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

Modified Files:
	vo_dxr3.c 
Log Message:
Automatically use avcodec if it exists, otherwise fall back to fame (due
to some unresolved problems with fame)
Bitrate is set to a constant 6e6
Fixed a bug occuring with round()
Fixed a little #elif bug that would cause compilation to fail when not
compiling with avcodec


Index: vo_dxr3.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_dxr3.c,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -r1.64 -r1.65
--- vo_dxr3.c	16 Mar 2002 15:49:26 -0000	1.64
+++ vo_dxr3.c	19 Mar 2002 15:08:15 -0000	1.65
@@ -75,6 +75,11 @@
 #include "../postproc/rgb2rgb.h"
 #include "../postproc/swscale.h"
 
+#ifndef USE_LIBAVCODEC
+#  define USE_LIBFAME
+#else
+#  undef USE_LIBFAME
+#endif
 #ifdef USE_LIBFAME
 #include "../libfame/fame.h"
 static unsigned char *outbuf = NULL;
@@ -276,10 +281,10 @@
 		fame_params.width = s_width;
 		fame_params.height = s_height;
 		fame_params.coding = "I";
-		fame_params.quality = 100;
-		fame_params.bitrate = 0;
+		fame_params.quality = 90;
+		fame_params.bitrate = 6e6;
 		fame_params.slices_per_frame = 1;
-		fame_params.frames_per_sequence = (int) round(vo_fps);
+		fame_params.frames_per_sequence = (int) (vo_fps + 0.5);
 		fame_params.shape_quality = 100;
 		fame_params.search_range = 8;
 		fame_params.verbose = 0;
@@ -337,7 +342,7 @@
 			avc_context->gop_size = 15;
 		}
 		avc_context->frame_rate = (int) vo_fps * FRAME_RATE_BASE;
-		avc_context->bit_rate = 8e6;
+		avc_context->bit_rate = 6e6;
 		avc_context->flags = CODEC_FLAG_HQ | CODEC_FLAG_QSCALE;
 		avc_context->quality = 2;
 		avc_context->pix_fmt = PIX_FMT_YUV420P;
@@ -423,7 +428,7 @@
 #ifdef USE_LIBFAME
 		size = fame_encode_frame(fame_ctx, &fame_yuv, NULL);
 		write(fd_video, outbuf, size);
-#else USE_LIBAVCODEC
+#elif USE_LIBAVCODEC
 		size = avcodec_encode_video(avc_context, picture_data[0], avc_outbuf_size, &avc_picture);
 		write(fd_video, picture_data[0], size);
 #endif
@@ -499,7 +504,7 @@
 	int fdflags = O_WRONLY;
 
 #ifdef USE_LIBFAME
-	printf("VO: [dxr3] You are using fame, due to a small problem I have to disable prebuffering\n");
+	printf("VO: [dxr3] Prebuffering is temporarily disabled\n");
 	noprebuf = 1;
 #else
 	/* Open the control interface */




More information about the MPlayer-cvslog mailing list