[Ffmpeg-devel] New pixel formats

Luca Abeni lucabe72
Sun Aug 20 16:45:32 CEST 2006


Hi Michael,

On Sun, 2006-08-20 at 15:21 +0200, Michael Niedermayer wrote:
[...]
> >     PIX_FMT_RGB32,
> [...]
> >     PIX_FMT_BGR32,
> 
> >     PIX_FMT_BGR16,
> >     PIX_FMT_BGR15,
> 
> these are inconsistant to the existing 15/16bit format names
Ops... Sorry. What I did was to use a sed script to change IMGFT_ in
PIX_FMT_ for all the "unknown" formats, and then I tried to fix things
by hand. I did not notice this inconsistency. So, they should be
PIX_FMT_BGR565 and PIX_FMT_BGR555, right?

> >     PIX_FMT_RG4B,
> >     PIX_FMT_BG4B,
> 
> i dont like the names of the above, RGB4_CHAR, RGB4_BYTE, RGB4_PER_BYTE,
> RGB4_8BIT, ... are all better
Ok. I just converted the IMGFMT_ names used in libswscale without
thinking about it. I'll change them in RGB4_BYTE and BGR4_BYTE.

> >     PIX_FMT_YUYV422,
> 
> that one might be redundant
Ok. I see you changed avutil.h. I am still a little bit confused by all
these different names used for the same formats, but things are becoming
more clear ;-)

> >     PIX_FMT_BGRA32,
> >     PIX_FMT_ABGR32,
> >     PIX_FMT_ARGB32,
> 
> well, i dont know what these formats are supposed to be but there only
> exist 4 ARGB variants and with your proposal there would be 6 that means
> at least 2 must be duplicates
As I wrote, I was not sure about this ;-)
I saw that mplayer has RGB32, RGBA, ARGB, BGRA, and ABGR... But two of
them are a copy of other two, depending on the endianess
Ok, I'll try to do the same in libavutil

> also please add comments so its clear what each of these formats is
> exactly
Sorry about the lack of comments. Initially, I just changed IMGFMT_ in
PIX_FMT_, so I did not think about adding much comments. After that I
did some changes by hand and I forgot about commenting my changes.

I'll rewrite a (hopefully) more correct conversion table, and I'll post
it together with some comments.


			Thanks,
				Luca





More information about the ffmpeg-devel mailing list