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

Michael Niedermayer michaelni
Sun Oct 15 17:18:20 CEST 2006


Hi

On Sun, Oct 15, 2006 at 04:05:30PM +0300, Kostya wrote:
> On Sun, Oct 15, 2006 at 11:32:23AM +0200, Michael Niedermayer wrote:
> > Hi
> > 
> > On Sun, Oct 15, 2006 at 08:24:42AM +0300, Kostya wrote:
> > > On Sat, Oct 14, 2006 at 06:59:32PM +0200, Michael Niedermayer wrote:
> > > > Hi
> > > > 
> > > > On Sat, Oct 14, 2006 at 03:43:22PM +0300, Kostya wrote:
> > > > > This patch enables grayscale PNG decoding with 16-bit per sample size.
> > > > > Sample is here:
> > > > > http://samples.mplayerhq.hu/V-codecs/PNG/les_dns_xz.mov
> > > > > (playable with MPlayer)
> > > > 
> > > > i would prefer if 16bit gray and rgb(a) formats would be exported without
> > > > converting them to 8bit in the demuxer
> > > 
> > > And for now? Native 16bit depth is not supported.
> > 
> > add support :)
> > i will not accpet colorspace conversation from usefull formats
> > in the demuxer, ive never accepted that in the past either
> > for totaly obfuscated formats which no display device or encoder would be
> > able to use directly id make an exception but for normal 16bit rgb colorspace
> > i will not
> > 
> > IMO its not so hard to move your 16->8bit loop into swscale, iam not asking
> > that you rewrite swscale to actually be able to convert with 16bit precission
> > 
> > but converting in the demuxer means that no user application no matter if it
> > supports 16bit rgb or not will be forced to live with 8bit precission
> 
> Okay, here is my variant using imgconvert, I'm not accustomed to swscale yet.
> Mind that I don't value this as final patch, just RFC.
[...]
>  
> +    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


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