xvmc: add a workaround for xines xxmc vo plugin
authorChristian König <deathsimple@vodafone.de>
Sat, 9 Apr 2011 18:46:24 +0000 (20:46 +0200)
committerChristian König <deathsimple@vodafone.de>
Sat, 9 Apr 2011 18:46:24 +0000 (20:46 +0200)
src/gallium/state_trackers/xorg/xvmc/surface.c

index 9585fffffc666eaf25a10471bd5c20949bba7400..68d003e470a3599d029d7e3267e790f10be86728 100644 (file)
@@ -101,7 +101,7 @@ MacroBlocksToPipe(struct pipe_screen *screen,
       mb->mbx = xvmc_mb->x;
       mb->mby = xvmc_mb->y;
 
-      if (!xvmc_mb->macroblock_type & XVMC_MB_TYPE_INTRA)
+      if (!(xvmc_mb->macroblock_type & XVMC_MB_TYPE_INTRA))
          mb->mo_type = MotionToPipe(xvmc_mb->motion_type, xvmc_picture_structure);
       /* Get rid of Valgrind 'undefined' warnings */
       else
@@ -128,8 +128,14 @@ MacroBlocksToPipe(struct pipe_screen *screen,
          break;
 
       default:
-         mb->mv[0].wheight = 0;
-         mb->mv[1].wheight = 0;
+         /* workaround for xines xxmc video out plugin */
+         if (!(xvmc_mb->macroblock_type & ~XVMC_MB_TYPE_PATTERN)) {
+            mb->mv[0].wheight = 255;
+            mb->mv[1].wheight = 0;
+         } else {
+            mb->mv[0].wheight = 0;
+            mb->mv[1].wheight = 0;
+         }
          break;
       }