On Dienstag, 15. Juni 2004 20:52, Ville Syrj�l� wrote: > On Tue, Jun 15, 2004 at 11:46:53AM +0200, Stefan Lucke wrote:
[ .. ] > > But with I420 and YV12 output formats I get sig11s with my radeon. Pitch > > value returned from videoSurface->Lock seems to be bogous, see my mail on > > directfb-users list. > > I lost the original mail but I looked at the archives... > > The pitch 752 does seem strange. It's a multiple of 16 but so is 720 > so I don't know why it would choose 752. The pitch value was 1472 which would be reasonable for YUY2 format 736*2. The segfault happens after Y values where copied. Commenting out U and Y copy loop I get a picture which looks bad (with green vertical color stripes). Screen resolution is 1280x1024. > > As for the segfault it looks like a bug in the softdevice code since it's > clearly trying to copy too much data. > > I just had a look at vdr-softdevice-0.0.5 and it doesn't even handle > planar YUV. What code are you using? Im using softdevice-0.0.6 with patch_post02 + some small changes to get dircetFB out running (separate remote for directfb key event handling, ++). As I'm current maintainer of softdevice code is available via http://www.lucke.in-berlin.de Copy loop used is void cDFBVideoOut::YUV(uint8_t *Py, uint8_t *Pu, uint8_t *Pv, int Width, int Height, int Ystride, int UVstride) { uint8_t *dst; int pitch; int hi; static int old_pitch = 0; SetParams(Width, Height); //fprintf(stderr, "[dfb] draw frame (%d x %d) Y: %d UV: %d\n", Width, Height, Ystride, UVstride); videoSurface->Lock(DSLF_WRITE, (void **)&dst, &pitch); if (pitch != old_pitch) { fprintf (stderr, "pitch change %d -> %d\n", old_pitch, pitch); old_pitch = pitch; } //fprintf(stderr, "videosurface now locked\n"); if (pixelformat == DSPF_I420) { //fprintf (stderr, "pixelformat I420 dst = 0x%08x\n", dst); for(hi=0; hi < Height; hi++){ memcpy(dst, Py, Width); Py += Ystride; dst += pitch; } //#if 1 // fprintf (stderr, "y values done line dst = 0x%08x\n", dst); for(hi=0; hi < Height/2; hi++) { memcpy(dst, Pu, Width/2); Pu += UVstride; dst += pitch / 2; } for(hi=0; hi < Height/2; hi++) { // fprintf (stderr, "v line %d\n",hi); memcpy(dst, Pv, Width/2); Pv += UVstride; dst += pitch / 2; } //#endif } else if (pixelformat == DSPF_YUY2) { Stefan Lucke
