On Sonntag 07 Mai 2006 11:24, Denis Oliver Kropp wrote:
> Stefan Lucke wrote:
> > On Samstag 06 Mai 2006 13:13, Stefan Lucke wrote:
> > 
> >>Hi,
> >>
> >>I'm trying to implement the blitting flag DSBLIT_INTERLACED.
> >>That should be a solution for a 4:3 TVout downscaleing problem.
> >>Discussion first starts here:
> >>http://mail.directfb.org/pipermail/directfb-users/2005-October/000770.html
> >>
> >>When forced to do a separate stretchblit for each field, it works.
> >>But for some unkown reason, I could not get SetBlittingFlags(value)
> >>to be passed to matrox driver.
> >>
> >>      scrSurface->SetBlittingFlags(DSBLIT_INTERLACED);
> >>      scrSurface->StretchBlit(videoSurface, &src, &dst);
> >>
> > 
> > 
> > Oh damm compiler !!!!
> > 
> > I added a trace fprintf() and saw DSBLIT_INTERLACED arrived in matroc.c
> > 
> > So I changed:
> > mdev->blit_interlaced   = flags & DSBLIT_INTERLACED;
> > 
> > to
> > mdev->blit_interlaced   = (flags & DSBLIT_INTERLACED) ? true : false;
> > 
> > And SetBlittingFlags() works (test is now successfull) !!
> > 
> > But I guess many other code parts don*t work as expected,
> > as 'bool bvalue = flags & MASK' is quite common in DirectFB code.
> 
> Yes, as Direct's bool is 8 bit now, only flags in the lowest eight
> bit will result in true. Does it work in C++ because the compiler
> takes care of converting it to bool BEFORE converting it to 8 bit?
> 

Don't know.

> Anyways, all places must be corrected. I'm still not sure what looks
> better, "(expr) ? true : false" or "!!(expr)", or even a macro.

A macro would make it a bit more clean.

What do you think of the original intention: adding the capability
of doing a field based stretchblit (DSBLIT_INTERLACED) ?

-- 
Stefan Lucke

_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to