st/vdpau: cleanup YCBCR matching functions
authorChristian König <deathsimple@vodafone.de>
Fri, 2 Mar 2012 12:07:01 +0000 (13:07 +0100)
committerChristian König <deathsimple@vodafone.de>
Thu, 8 Mar 2012 10:37:02 +0000 (11:37 +0100)
Signed-off-by: Christian König <deathsimple@vodafone.de>
src/gallium/state_trackers/vdpau/vdpau_private.h

index 2898a863243041a71e18ad258eef61eba71a0991..b0272d7c938427bafb6357746b453dadc14410b9 100644 (file)
@@ -102,10 +102,10 @@ FormatYCBCRToPipe(VdpYCbCrFormat vdpau_format)
          return PIPE_FORMAT_UYVY;
       case VDP_YCBCR_FORMAT_YUYV:
          return PIPE_FORMAT_YUYV;
-      case VDP_YCBCR_FORMAT_Y8U8V8A8: /* Not defined in p_format.h */
-         return PIPE_FORMAT_NONE;
+      case VDP_YCBCR_FORMAT_Y8U8V8A8:
+         return PIPE_FORMAT_R8G8B8A8_UNORM;
       case VDP_YCBCR_FORMAT_V8U8Y8A8:
-            return PIPE_FORMAT_VUYA;
+         return PIPE_FORMAT_B8G8R8A8_UNORM;
       default:
          assert(0);
    }
@@ -125,9 +125,9 @@ PipeToFormatYCBCR(enum pipe_format p_format)
          return VDP_YCBCR_FORMAT_UYVY;
       case PIPE_FORMAT_YUYV:
          return VDP_YCBCR_FORMAT_YUYV;
-      //case PIPE_FORMAT_YUVA:
-        // return VDP_YCBCR_FORMAT_Y8U8V8A8;
-      case PIPE_FORMAT_VUYA:
+      case PIPE_FORMAT_R8G8B8A8_UNORM:
+        return VDP_YCBCR_FORMAT_Y8U8V8A8;
+      case PIPE_FORMAT_B8G8R8A8_UNORM:
          return VDP_YCBCR_FORMAT_V8U8Y8A8;
       default:
          assert(0);