[Ffmpeg-devel] [PATCH] PNG 16-bit grayscale support

Michael Niedermayer michaelni
Wed Oct 18 10:34:09 CEST 2006


Hi

On Wed, Oct 18, 2006 at 08:07:29AM +0300, Kostya wrote:
> On Sun, Oct 15, 2006 at 05:18:20PM +0200, Michael Niedermayer wrote:
> > Hi
> > 
> [...]
> > >  
> > > +    PIX_FMT_GRAY16,     ///<        Y        , 16bpp big-endian
> > 
> > GRAY16 should be native endian, no realistic code besides memcpy and similar
> > will be able to handle non native 16bit efficiently
> > 
> > if a PIX_FMT_GRAY16BE and PIX_FMT_GRAY16LE is usefull or not is something iam
> > unsure about, id say we could always add them later if needed, but if you want
> > to add them then iam fine with that too
> 
> A serach for documentation showed that formats that are known to support
> 16-bit depth explicitly define it to be in "Network format order" (PNG spec)
> or "MSB first" (PGM spec). But renaming format PIX_FMT_GRAY16BE seems logical.

ive no objections to adding PIX_FMT_GRAY16BE but theres one aspect you seem to
forget and that is that this isnt only about raw or raw+generic compressor
formats, normal codecs be it dct or wavelet based will always output native
endian 16bit also filters will almost always use native endian 16bit as 
its a matter or a+b vs. be2me(be2me(a)+be2me(b))

[...]
-- 
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