YV12 has different U/V plane order compared to I420. This patch fixes the YUV() method in the dfb driver accordingly. Without the patch YV12 has wrong colours.

-- Heikki Lindholm
--- video-dfb.c.old     2006-09-16 14:28:07.000000000 +0300
+++ video-dfb.c 2006-09-16 14:31:30.000000000 +0300
@@ -1336,6 +1336,13 @@
     } else {
 #endif // HAVE_CLE266_MPEG_DECODER
       videoSurface->Lock(DSLF_WRITE, (void **)&dst, &pitch);
+      if (pixelformat == DSPF_YV12)
+      {
+        // compared to I420, YV12 has reversed U/V plane order
+        uint8_t *tmp = Pu;
+        Pu = Pv;
+        Pv = tmp;
+      } 
       if (pixelformat == DSPF_I420 || pixelformat == DSPF_YV12)
       {
 #if HAVE_SetSourceLocation
_______________________________________________
Softdevice-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/softdevice-devel

Reply via email to