This minor change suggested by Martin Wache sorts out my incorrect colour 
issue when the GRAB command is used with softdevice when using Via CLE266 
hardware decoding.

I've not looked into what pixel[1] and pixel[2] actaully do in the 
PicBuffer structure but this small change fixes the GRAB command so that 
I get correct colours. It seems to work for me with and without picture 
mirroring or deinterlacing (i.e. using some form of postprocessing), both 
for the grabbed image and for live TV.

--- video-dfb.c.orig    2006-11-16 09:24:21.000000000 +0000
+++ video-dfb.c 2006-11-16 09:25:05.000000000 +0000
@@ -1462,8 +1462,8 @@

       // at this point I know that the buffer is not already allocated
       PicBuffer[i].pixel[0] = (uint8_t*) buf;
-      PicBuffer[i].pixel[2] = (uint8_t*) buf + height * mpegfb_stride;
-      PicBuffer[i].pixel[1] = (uint8_t*) PicBuffer[i].pixel[2]
+      PicBuffer[i].pixel[1] = (uint8_t*) buf + height * mpegfb_stride;
+      PicBuffer[i].pixel[2] = (uint8_t*) PicBuffer[i].pixel[1]
                                          +(height>>1)*(mpegfb_stride>>1);
       PicBuffer[i].stride[0] = mpegfb_stride;
       PicBuffer[i].stride[1] = PicBuffer[i].stride[2] = mpegfb_stride>>1;

Cheers,

Laz
_______________________________________________
Softdevice-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/softdevice-devel

Reply via email to