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

David Holm mswitch at mplayer.dev.hu
Sat Mar 16 16:49:29 CET 2002


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

Modified Files:
	vo_dxr3.c 
Log Message:
Fixed some bugs with fame, had to disable prebuffering with fame though
as sync drifts off. But fame is alot more stable than avcodec and so far
I've noticed a small quality increase with some videos (not all).

Will have to work some more on the sync stuff... This one should be
stable though..


Index: vo_dxr3.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_dxr3.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -r1.63 -r1.64
--- vo_dxr3.c	16 Mar 2002 06:01:13 -0000	1.63
+++ vo_dxr3.c	16 Mar 2002 15:49:26 -0000	1.64
@@ -6,6 +6,11 @@
  */
 
 /* ChangeLog added 2002-01-10
+ * 2002-03-16:
+ *  Fixed problems with fame, it gives a better picture than avcodec,
+ *  but is slightly slower. Most notably the wobbling effect is gone
+ *  with fame.
+ *
  * 2002-03-13:
  *  Preliminary fame support added (it breaks after seeking, why?)
  *
@@ -164,11 +169,9 @@
 			/* Conversion needed | OSD Supported */
 			flag = 0x1 | 0x4;
 			break;
-		default:
-			printf("VO: [dxr3] Format unsupported, mail dholm at iname.com\n");
 #else
 		default:
-			printf("VO: [dxr3] You have disabled libavcodec support (Read DOCS/codecs.html)!\n");
+			printf("VO: [dxr3] You have disabled libavcodec/libfame support (Read DOCS/codecs.html)!\n");
 #endif
 		}
 		if (noprebuf) {
@@ -276,14 +279,38 @@
 		fame_params.quality = 100;
 		fame_params.bitrate = 0;
 		fame_params.slices_per_frame = 1;
-		fame_params.frames_per_sequence = 25;
-		fame_params.frame_rate_num = 25;
-		fame_params.frame_rate_den = 1;
+		fame_params.frames_per_sequence = (int) round(vo_fps);
 		fame_params.shape_quality = 100;
 		fame_params.search_range = 8;
 		fame_params.verbose = 0;
 		fame_params.profile = NULL;
 		
+		if (vo_fps < 24.0) {
+		    fame_params.frame_rate_num = 24000;
+		    fame_params.frame_rate_den = 1001;
+		} else if (vo_fps < 25.0) {
+		    fame_params.frame_rate_num = 24;
+		    fame_params.frame_rate_den = 1;
+		} else if (vo_fps < 29.0) {
+		    fame_params.frame_rate_num = 25;
+		    fame_params.frame_rate_den = 1;
+		} else if (vo_fps < 30.0) {
+		    fame_params.frame_rate_num = 30000;
+		    fame_params.frame_rate_den = 1001;
+		} else if (vo_fps < 50.0) {
+		    fame_params.frame_rate_num = 30;
+		    fame_params.frame_rate_den = 1;
+		} else if (vo_fps < 55.0) {
+		    fame_params.frame_rate_num = 50;
+		    fame_params.frame_rate_den = 1;
+		} else if (vo_fps < 60.0) {
+		    fame_params.frame_rate_num = 60000;
+		    fame_params.frame_rate_den = 1001;
+		} else {
+		    fame_params.frame_rate_num = 60;
+		    fame_params.frame_rate_den = 1;
+		}
+		
 		outbuf = malloc(100000);
 		fame_init(fame_ctx, &fame_params, outbuf, 100000);
 
@@ -471,13 +498,17 @@
 	char devname[80];
 	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");
+	noprebuf = 1;
+#else
 	/* Open the control interface */
 	if (arg && !strcmp("noprebuf", arg)) {
 		printf("VO: [dxr3] Disabling prebuffering.\n");
 		noprebuf = 1;
 		fdflags |= O_NONBLOCK;
 	}
-	
+#endif	
 	if (arg && !noprebuf) {
 		printf("VO: [dxr3] Forcing use of device %s\n", arg);
 		sprintf(devname, "/dev/em8300-%s", arg);




More information about the MPlayer-cvslog mailing list