From: Marek Olšák <marek.ol...@amd.com>
Like L4A4.
---
src/gallium/auxiliary/util/u_format.csv | 4 ++--
src/gallium/auxiliary/util/u_format.h | 3 +--
src/gallium/drivers/ilo/ilo_format.c | 2 +-
src/gallium/include/pipe/p_format.h | 4 ++--
src/gallium/state_trackers/vdpau/vdpau_private.h | 4 ++--
src/gallium/state_trackers/xvmc/subpicture.c | 6 +++---
6 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/src/gallium/auxiliary/util/u_format.csv
b/src/gallium/auxiliary/util/u_format.csv
index 8d04b00..8fb068b 100644
--- a/src/gallium/auxiliary/util/u_format.csv
+++ b/src/gallium/auxiliary/util/u_format.csv
@@ -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
diff --git a/src/gallium/auxiliary/util/u_format.h
b/src/gallium/auxiliary/util/u_format.h
index e36a9e2..747e142 100644
--- a/src/gallium/auxiliary/util/u_format.h
+++ b/src/gallium/auxiliary/util/u_format.h
@@ -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;
diff --git a/src/gallium/drivers/ilo/ilo_format.c
b/src/gallium/drivers/ilo/ilo_format.c
index 72575f4..30e4958 100644
--- a/src/gallium/drivers/ilo/ilo_format.c
+++ b/src/gallium/drivers/ilo/ilo_format.c
@@ -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,
diff --git a/src/gallium/include/pipe/p_format.h
b/src/gallium/include/pipe/p_format.h
index daa3be2..34ab662 100644
--- a/src/gallium/include/pipe/p_format.h
+++ b/src/gallium/include/pipe/p_format.h
@@ -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,
diff --git a/src/gallium/state_trackers/vdpau/vdpau_private.h
b/src/gallium/state_trackers/vdpau/vdpau_private.h
index 078f0f9..ce6852b 100644
--- a/src/gallium/state_trackers/vdpau/vdpau_private.h
+++ b/src/gallium/state_trackers/vdpau/vdpau_private.h
@@ -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:
diff --git a/src/gallium/state_trackers/xvmc/subpicture.c
b/src/gallium/state_trackers/xvmc/subpicture.c
index 3497399..7a951fa 100644
--- a/src/gallium/state_trackers/xvmc/subpicture.c
+++ b/src/gallium/state_trackers/xvmc/subpicture.c
@@ -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';