[gst-devel] RGB caps

Benjamin Otte in7y118 at public.uni-hamburg.de
Wed Nov 26 03:12:02 CET 2003


On Tue, 25 Nov 2003, David Schleef wrote:

> 1) 16 bit formats truly do have a endianness, since the green bits are
> split between the bytes.
>
Didn't think about that.

> 2) depth is not the same as bpp.
>
What do you need it for that can't be done with masks?

> 3) Changing masks to be host-endian goes against the second statement
> below.
>
I did mean to say "they stay as they are". :)

> > Reasons for this:
> > - There should never be the possibility to specify the same format with
> > different caps. (endianness and depth allowed this with adapting the masks.)
> > - gst_caps_to_string must result in the same string for the same format on any
> > machine. Storing masks as real masks would break that.
>
> The current system already guarantees both of these.
>
No. Examples where two caps mean the same format:

video/x-raw-rgb,bpp=32,depth=24,red_mask=0xFF0000,green_mask=0x00FF00,blue_mask=0x0000FF
video/x-raw-rgb,bpp=32,depth=32,red_mask=0xFF000000,green_mask=0x00FF0000,blue_mask=0x0000FF00

video/x-raw-rgb,bpp=32,depth=24,endianness=G_BIG_ENDIAN,red_mask=0xFF0000,green_mask=0x00FF00,blue_mask=0x0000FF
video/x-raw-rgb,bpp=32,depth=24,endianness=G_LITTLE_ENDIAN,red_mask=0x0000FF,green_mask=0x00FF00,blue_mask=0xFF0000


> I have no problems with changing to a new standard for video/x-raw-rgb,
> but the standard needs to be well-thought out and documented.
>
So I guess it's ok for endianness. We'll define it as optional. If a caps
can be represented with both endiannesses, you must use G_BIG_ENDIAN.

Now I only need an example for why we need depth.


Benjamin
>
>
> dave...
>
>





More information about the gstreamer-devel mailing list