Hi,
in softdevice I have some special code for clearing an YUY2 surface.
It looks like Clear() does not works as expected (or did nothing).
code with comment:
videoSurface=dfb->CreateSurface(vidDsc);
/*
--------------------------------------------------------------------
* Here is probably a bug in DirectFB, as Clear() does _not_ work
* the same, as manual wipe out YUY2 surface. I tried Clear() on my
* tests, but it did not solve the problem. That happens with my
* Matrox G550.
* videoSurface->Clear(0,0,0,0);
* The workaround code assumes that in case of stretchBlit,
pixelformat
* YUY2 is used.
*/
{
int *dst, i, j;
int pitch;
videoSurface->Lock(DSLF_WRITE, (void **)&dst, &pitch);
for(i = 0; i < vidDsc.height; ++i, dst += pitch/4)
for (j = 0; j < vidDsc.width / 2; ++j)
dst [j] = 0x80008000;
videoSurface->Unlock();
}
--
Stefan Lucke
_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev