[Mesa-dev] [PATCH 1/7] gallium: try to cleanup a bit of the format mess created with pipe-video merge
e0425955 at student.tuwien.ac.at
Thu Sep 1 09:15:50 PDT 2011
On 01.09.2011 18:05, Christian König wrote:
> Am Donnerstag, den 01.09.2011, 17:08 +0200 schrieb Christoph Bumiller:
>> On 01.09.2011 17:02, Younes Manton wrote:
>>> On Thu, Sep 1, 2011 at 10:56 AM, Michel Dänzer <michel at daenzer.net> wrote:
>>>> On Don, 2011-09-01 at 15:50 +0200, Christian König wrote:
>>>>> Start with correctly defining IA44 and AI44 formats.
>>>>> Signed-off-by: Christian König <deathsimple at vodafone.de>
>>>>> src/gallium/auxiliary/util/u_format.csv | 6 +++-
>>>>> src/gallium/auxiliary/util/u_format_yuv.c | 38 ---------------------------
>>>>> src/gallium/auxiliary/util/u_format_yuv.h | 40 -----------------------------
>>>>> 3 files changed, 4 insertions(+), 80 deletions(-)
>>>>> diff --git a/src/gallium/auxiliary/util/u_format.csv b/src/gallium/auxiliary/util/u_format.csv
>>>>> index a3d2aae..b1a85a5 100644
>>>>> --- a/src/gallium/auxiliary/util/u_format.csv
>>>>> +++ b/src/gallium/auxiliary/util/u_format.csv
>>>>> @@ -265,5 +265,7 @@ PIPE_FORMAT_YV16 , other, 1, 1, x8 , x8 , x8 , x8 , xyzw, y
>>>>> PIPE_FORMAT_IYUV , other, 1, 1, x8 , x8 , x8 , x8 , xyzw, yuv
>>>>> PIPE_FORMAT_NV12 , other, 1, 1, x8 , x8 , x8 , x8 , xyzw, yuv
>>>>> PIPE_FORMAT_NV21 , other, 1, 1, x8 , x8 , x8 , x8 , xyzw, yuv
>>>>> -PIPE_FORMAT_IA44 , other, 1, 1, x8 , x8 , x8 , x8 , xyzw, yuv
>>>>> -PIPE_FORMAT_AI44 , other, 1, 1, x8 , x8 , x8 , x8 , xyzw, yuv
>>>>> +# Indexed with Alpha
>>>>> +PIPE_FORMAT_IA44 , plain, 1, 1, un4 , un4 , , , y00x, rgb
>>>>> +PIPE_FORMAT_AI44 , plain, 1, 1, un4 , un4 , , , x00y, rgb
>>>> I think the 'I' stands for 'intensity', not 'indexed'? Same issue in
>>>> patch 4.
>>>> I didn't notice any other issues in the patches.
>>> It's an index actually, 4 bits, into a 16-entry palette.
>> I'm curious, where is this palette ? I don't see it in the gallium
>> interface ...
> The index is actually unrelated to the format of the palette it's
> indexing in. For example, XvMC is using it with an YUV palette while
> VDPAU is using it with and RGB one (there could be monochrome or
> whatever also).
>> And if you have to explicitly look it up in the shader, then this is
>> just R4_UINT_A4_UNORM (or even just R4A4_UNORM).
> I wanted to stick with the fourcc name initially, but R4A4_UNORM sound
> like making the most sense here, since the formats in gallium not only
> defines the memory layout, but also how values end up in a shader
You could still use IA44 with hardware that actually supports palettized
textures (see José's message about using two separate formats).
I was only confused about the meaning of the 'I' because I couldn't see
a texture-unit-handled palette anywhere.
An intensity-alpha format doesn't make sense anyway since intensity
means that the intensity value is also put in the alpha component.
More information about the mesa-dev