[Mplayer-cvslog] CVS: 0_90/libvo vo_dfbmga.c,1.9,1.10

Arpi of Ize arpi at mplayerhq.hu
Fri Feb 21 20:36:58 CET 2003


Update of /cvsroot/mplayer/0_90/libvo
In directory mail:/var/tmp.root/cvs-serv4751/libvo

Modified Files:
	vo_dfbmga.c 
Log Message:
Add support for selecting field parity. A new sub-option "fieldparity=n"
where n=0 or 1. 0=top field first, 1=bottom field first. Requires cvs
DirectFB.
Ville Syrjälä  syrjala at sci.fi


Index: vo_dfbmga.c
===================================================================
RCS file: /cvsroot/mplayer/0_90/libvo/vo_dfbmga.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- vo_dfbmga.c	21 Feb 2003 19:36:27 -0000	1.9
+++ vo_dfbmga.c	21 Feb 2003 19:36:56 -0000	1.10
@@ -91,6 +91,7 @@
 static int use_crtc2;
 static int use_spic;
 static int use_input;
+static int field_parity;
 
 static int osd_changed;
 static int osd_dirty;
@@ -223,6 +224,7 @@
      use_crtc2 = 1;
      use_spic = 1;
      use_input = 1;
+     field_parity = -1;
 
      if (vo_subdevice) {
           int opt_no = 0;
@@ -243,6 +245,14 @@
                     use_spic = !opt_no;
                     vo_subdevice += 5;
                     opt_no = 0;
+               } else if (!strncmp(vo_subdevice, "fieldparity=", 12)) {
+                    vo_subdevice += 12;
+                    if (*vo_subdevice == '0' ||
+                        *vo_subdevice == '1') {
+                         field_parity = *vo_subdevice - '0';
+                         vo_subdevice++;
+                    }
+                    opt_no = 0;
                } else if (!strncmp(vo_subdevice, "no", 2)) {
                     vo_subdevice += 2;
                     opt_no = 1;
@@ -410,6 +420,13 @@
           dlc.flags      = DLCONF_PIXELFORMAT | DLCONF_BUFFERMODE;
           dlc.buffermode = DLBM_BACKVIDEO;
 
+#if DIRECTFBVERSION > 916
+          if (field_parity != -1) {
+               dlc.flags   |= DLCONF_OPTIONS;
+               dlc.options  = DLOP_FIELD_PARITY;
+          }
+#endif
+
           switch (dlc.pixelformat) {
           case DSPF_I420:
           case DSPF_YV12:
@@ -433,6 +450,12 @@
                return -1;
           }
           crtc2->SetConfiguration( crtc2, &dlc );
+
+#if DIRECTFBVERSION > 916
+          if (field_parity != -1)
+               crtc2->SetFieldParity( crtc2, field_parity );
+#endif
+
           crtc2->GetSurface( crtc2, &c2frame );
 
           c2frame->GetSize( c2frame, &screen_width, &screen_height );



More information about the MPlayer-cvslog mailing list