gallium: rename R4A4 and A4R4 formats to match their swizzle
authorMarek Olšák <marek.olsak@amd.com>
Tue, 4 Mar 2014 11:42:37 +0000 (12:42 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Fri, 7 Mar 2014 17:07:05 +0000 (18:07 +0100)
Like L4A4.

Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/auxiliary/util/u_format.csv
src/gallium/auxiliary/util/u_format.h
src/gallium/drivers/ilo/ilo_format.c
src/gallium/include/pipe/p_format.h
src/gallium/state_trackers/vdpau/vdpau_private.h
src/gallium/state_trackers/xvmc/subpicture.c

index 8d04b00c4526c61b5dc582c127a688e92c76c95b..8fb068b81778668a3ad775bece1d9465571e813a 100644 (file)
@@ -272,8 +272,8 @@ PIPE_FORMAT_NV12                  , other, 1, 1, x8  , x8  , x8  , x8  , xyzw, y
 PIPE_FORMAT_NV21                  , other, 1, 1, x8  , x8  , x8  , x8  , xyzw, yuv
 
 # Usually used to implement IA44 and AI44 formats in video decoding
-PIPE_FORMAT_R4A4_UNORM            , plain, 1, 1, un4 , un4 ,     ,     , y00x, rgb
-PIPE_FORMAT_A4R4_UNORM            , plain, 1, 1, un4 , un4 ,     ,     , x00y, rgb
+PIPE_FORMAT_A4R4_UNORM            , plain, 1, 1, un4 , un4 ,     ,     , y00x, rgb
+PIPE_FORMAT_R4A4_UNORM            , plain, 1, 1, un4 , un4 ,     ,     , x00y, rgb
 PIPE_FORMAT_R8A8_UNORM            , plain, 1, 1, un8 , un8 ,     ,     , x00y, rgb
 PIPE_FORMAT_A8R8_UNORM            , plain, 1, 1, un8 , un8 ,     ,     , y00x, rgb
 
index e36a9e2370ea909ec45c061fc1b590213e9152e8..747e1429d486ee29ff50a707af6bfc5af62d56cd 100644 (file)
@@ -1060,8 +1060,7 @@ util_format_luminance_to_red(enum pipe_format format)
       return PIPE_FORMAT_RGTC1_SNORM;
 
    case PIPE_FORMAT_L4A4_UNORM:
-      /* XXX A4R4 is defined as x00y in u_format.csv */
-      return PIPE_FORMAT_A4R4_UNORM;
+      return PIPE_FORMAT_R4A4_UNORM;
 
    case PIPE_FORMAT_L8A8_UNORM:
       return PIPE_FORMAT_R8A8_UNORM;
index 72575f43fb443ded83d7f19efb9e7b409a64ee7c..30e495837d561e26651c28754523431966788086 100644 (file)
@@ -504,8 +504,8 @@ ilo_translate_color_format(enum pipe_format format)
       [PIPE_FORMAT_IYUV]                  = 0,
       [PIPE_FORMAT_NV12]                  = 0,
       [PIPE_FORMAT_NV21]                  = 0,
-      [PIPE_FORMAT_R4A4_UNORM]            = 0,
       [PIPE_FORMAT_A4R4_UNORM]            = 0,
+      [PIPE_FORMAT_R4A4_UNORM]            = 0,
       [PIPE_FORMAT_R8A8_UNORM]            = 0,
       [PIPE_FORMAT_A8R8_UNORM]            = 0,
       [PIPE_FORMAT_R10G10B10A2_SSCALED]   = BRW_SURFACEFORMAT_R10G10B10A2_SSCALED,
index daa3be20d93574950b35bbd072a25b7d3bfb2aea..34ab66250fdbb22c37436e3c9c14a3d7f65a7dd9 100644 (file)
@@ -236,8 +236,8 @@ enum pipe_format {
    PIPE_FORMAT_NV12                    = 166,
    PIPE_FORMAT_NV21                    = 167,
 
-   PIPE_FORMAT_R4A4_UNORM              = 168,
-   PIPE_FORMAT_A4R4_UNORM              = 169,
+   PIPE_FORMAT_A4R4_UNORM              = 168,
+   PIPE_FORMAT_R4A4_UNORM              = 169,
    PIPE_FORMAT_R8A8_UNORM              = 170,
    PIPE_FORMAT_A8R8_UNORM              = 171,
 
index 078f0f9270cfe087f1b301bdab523690ee6ba473..ce6852b586a9bcfee3e1d9d0f017c6f4ee6ed0ad 100644 (file)
@@ -209,9 +209,9 @@ FormatIndexedToPipe(VdpRGBAFormat vdpau_format)
 {
    switch (vdpau_format) {
       case VDP_INDEXED_FORMAT_A4I4:
-         return PIPE_FORMAT_A4R4_UNORM;
-      case VDP_INDEXED_FORMAT_I4A4:
          return PIPE_FORMAT_R4A4_UNORM;
+      case VDP_INDEXED_FORMAT_I4A4:
+         return PIPE_FORMAT_A4R4_UNORM;
       case VDP_INDEXED_FORMAT_A8I8:
          return PIPE_FORMAT_A8R8_UNORM;
       case VDP_INDEXED_FORMAT_I8A8:
index 34973998d01b1428f525bee0a78fde94a56999ce..7a951fa7d779240c9fff79b47da099159f48f7e2 100644 (file)
@@ -55,10 +55,10 @@ static enum pipe_format XvIDToPipe(int xvimage_id)
          return PIPE_FORMAT_B8G8R8X8_UNORM;
 
       case FOURCC_AI44:
-         return PIPE_FORMAT_A4R4_UNORM;
+         return PIPE_FORMAT_R4A4_UNORM;
 
       case FOURCC_IA44:
-         return PIPE_FORMAT_R4A4_UNORM;
+         return PIPE_FORMAT_A4R4_UNORM;
 
       default:
          XVMC_MSG(XVMC_ERR, "[XvMC] Unrecognized Xv image ID 0x%08X.\n", xvimage_id);
@@ -90,8 +90,8 @@ static int PipeToComponentOrder(enum pipe_format format, char *component_order)
       case PIPE_FORMAT_B8G8R8X8_UNORM:
          return 0;
 
-      case PIPE_FORMAT_R4A4_UNORM:
       case PIPE_FORMAT_A4R4_UNORM:
+      case PIPE_FORMAT_R4A4_UNORM:
          component_order[0] = 'Y';
          component_order[1] = 'U';
          component_order[2] = 'V';