[Ffmpeg-devel] PIX_FMT_RGB555 and alpha channel

Michael Niedermayer michaelni
Sat Oct 21 21:32:22 CEST 2006


Hi

On Sat, Oct 21, 2006 at 11:24:53AM +1100, Steven Johnson wrote:
[...]
> >>>could you elaborate on why the alpha channel bit is a problem?
> >>>
> >>>[...]
> >>> 
> >>>      
> >>I will elaborate.  Alex and I are implementing FLC/FLX and DTA encoding 
> >>into ffmpeg.  We are a little way from having stuff ready to submit, but 
> >>there is a problem with compression when the Alpha bit is set in an 
> >>RGB555 pixel, for the FLX format.  It means we have to mask every pixel 
> >>coming in, to take the spurious alpha bit out, or that bit prevents run 
> >>length compression from being effective.  The format is really wanting 
> >>to use RGB555, without alpha, so that black is 0x0000 and not 0x8000 but 
> >>    
> >
> >why does RLE compression not work with the alpha bit set?
> >and why exactly is the alpha bit set at all? if imgconvert.c sets it, IMO
> >fix imgconvert.c so it doesnt
> >  
> Because the FLX format stupidly makes runs of bytes, not pixels. 
> therefore 0x80, 0x00, 0x80, 0x00 is uncompressable whereas 0x00, 0x00, 
> 0x00, 0x00 is.

then FLX RLE will pretty much just work with total black (=pretty useless)
also by inteligently setting the alpha bit per pixel (the decoder ignores
it anyway i assume) the compression could be improved

[...]


-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is




More information about the ffmpeg-devel mailing list