On Tue, 2002-06-11 at 05:04, Jiří Svoboda wrote:

> 
> P.S.:I've attached "draft" version vo_directfb.c where I've encountered
> decscribed problems.
> P.S.S.: if anybody can test on other hw than mga G400 and tell me, how
> it behave, I'd be happy.

After placing DFBM_BACKVIDEO to dlc.buffermode (as what Denis
suggested), flipping works.  However the resulting video was shaky and
still has tearing.  I tested this with the i810 gfxdriver which I wrote
so I'm not sure if this is due to the i810's implementation of
FlipBuffers.

If I use your old implementation, but just add an extra instruction to
flip, ie. draw to frame, copy/blit from frame to primary, then flip
primary, the resulting video was smooth and steady.

Tony

--- vo_directfb.c-orig  Wed Jun 12 21:26:49 2002
+++ vo_directfb.c       Wed Jun 12 23:09:19 2002
@@ -646,13 +646,13 @@
 #ifdef FLIPPING
             // try to set flipping for videolayer
             dlc.flags = DLCONF_BUFFERMODE;
-            dlc.options = DLBM_BACKVIDEO;
+            dlc.buffermode = DLBM_BACKVIDEO;
             invram = 1;
             flipping = 1;
             ret =videolayer->SetConfiguration( videolayer, &dlc );
             if (ret!=DFB_OK) {
                invram = 0;
-               dlc.options = DLBM_BACKSYSTEM;
+               dlc.buffermode = DLBM_BACKSYSTEM;
                ret =videolayer->SetConfiguration( videolayer, &dlc );
                if (ret!=DFB_OK) {
                    flipping = 0;
@@ -810,14 +810,6 @@
 
  if (((out_width != in_width) || (out_height != in_height)) && (!videolayeractive)) 
{stretch = 1;} else stretch=0; //yuy doesn't like strech and should not be needed
 
-#ifdef FLIPPING
-    // frame will not be allocated in case of overlay or nonstrech blit on primary
-    if (flipping && (!stretch)) {
-     frame = primary;
-     frameallocated = 0;
-     if (verbose) printf("DirectFB: Frame is NOT used (flipping is active).\n");
-    } else {
-#endif
      dsc.caps  = DSCAPS_SYSTEMONLY;
      DFBCHECK (dfb->CreateSurface( dfb, &dsc, &frame));
      frameallocated=1;
@@ -827,7 +819,6 @@
      } else {
        printf("DirectFB: Frame created (flipping is NOT active).\n");
      };
-    };
 #endif
   
   DFBCHECK (frame->GetPixelFormat (frame, &frame_format));
@@ -1365,9 +1356,6 @@
                 DFBCHECK (primary->StretchBlit(primary,frame,NULL,&rect));
                 }
         else    {
-#ifdef FLIPPING
-        if (!flipping) {
-#endif
 #ifdef HAVE_DIRECTFB099
                if (!memcpyBitBlt) {
 #endif
@@ -1412,9 +1400,6 @@
                    primary->Unlock(primary);
                };
 #endif
-#ifdef FLIPPING
-        };
-#endif         
         };
 #ifdef FLIPPING
     if (flipping) { 

Reply via email to