On Sun, 2002-05-19 at 23:05, Jiří Svoboda wrote:
> Hi,
> > I have added Overlay support the the i810 gfxdriver that I 
> > wrote.  I noticed that rendering to the backbuffer is not 
> > supported.  Significant 'tearing' effects can be seen when 
> > playing video using 'mplayer -vo directfb'.  Mplayer, by 
> > default, blits or memcopies to the frontbuffer directly which 
> > causes the 'tearing' effects. 
> > I traced this to allocate_surface() which creates a surface 
> > with a DSCAPS_FRONTONLY capability.  Is is possible that it 
> > also passes a DSCAPS_FLIPPING if config->buffermode == 
> > DLBM_BACKVIDEO aside from writing a gfxdriver-specific 
> > xxxAllocateSurface?
> > 
> > Because I wanted to eliminte this 'tearing' effect, I modified
> > allocate_surface() so it also passes DSCAPS_FLIPPING 
> > depending on the buffermode.  I also experimented with 
> > mplayer and modified it so it renders to the backbuffer then 
> > calls layer->Flip() afterwards. The tearing effects disappear 
> > this way.  Also, flipping, instead of blitting, effectively 
> > bypasses the YV12 blit problem.  
> 
> Because this is not first complain about tearing. I would like to change
> 
> Mplayer's code to support flipping for all cards. 
> So let me ask - how to create surface with flipping on "videolayer"?
> I only found and use GetSurface - but this doesn't allow me or request
> flipping.
> Any hint appreciated

Hi, 

Thanks for writing the directfb backend for mplayer.

Theoretically, calling SetConfiguration() with dlc.flags =
DLCONF_BUFFERMODE and dlc.buffermode = DLBM_BACKVIDEO will do the job. 
But right now it doesn't work yet since all drivers do not implement
FlipBuffers, and buffermode changes are not supported. Even if the
drivers default_config is DLBM_BACKVIDEO, it will still fail.

By the way, I've noticed an oversight with the saturation control in
vo_directfb.c.  Saturation is tested against hue.


Tony

--- vo_directfb.c-orig  Sun May 19 10:02:29 2002
+++ vo_directfb.c       Sun May 19 10:02:49 2002
@@ -1339,7 +1339,7 @@
            if (verbose) printf("DirectFB: SetVEq Hue 0x%X %i\n",ca.hue,info->hue);
        }
 
-       if ((videolayercaps.saturation)&&(info->cap&VEQ_CAP_HUE)) {
+       if ((videolayercaps.saturation)&&(info->cap&VEQ_CAP_SATURATION)) {
            ca.saturation = info->saturation * factor + 0x8000;
            ca.flags |= DCAF_SATURATION;
            if (verbose) printf("DirectFB: SetVEq Saturation 0x%X 
%i\n",ca.saturation,info->saturation);



--
Info:  To unsubscribe send a mail to [EMAIL PROTECTED] with
"unsubscribe directfb-dev" as subject.

Reply via email to