[FFmpeg-devel] [RFC] Handling 8 < bit depth < 16
Sun Sep 5 10:36:43 CEST 2010
On date Sunday 2010-09-05 08:53:29 +0300, Kostya encoded:
> On Sat, Sep 04, 2010 at 07:25:12PM -0700, Jason Garrett-Glaser wrote:
> > Bit depths greater than 8 and less than 16 are inherently problematic.
> > We only have pixel formats for 8 and 16, but in practice, many
> > encoders want numbers like 10. Furthermore, a proper converter
> > between these numbers should dither, making conversion slightly less
> > than trivial. Thus, imagine the following situation:
> > Decode 16-bit RGB files from camera
> > Convert to 16-bit YUV
> > Pass to 10-bit x264
> > Encode
> > Somewhere in here, we have to go from 16 bit to 10 bit, but there's no
> > pixel format for these, nor is there a way for libx264.c in ffmpeg to
> > tell ffmpeg that it needs 10-bit. But it would be stupid, ugly, and
> > hacky to have libx264 itself perform the conversion -- pixel format
> > conversions should stay out of an encoder. And this doesn't solve the
> > problem of other encoders; x264 isn't the only encoder that does or we
> > want to have >8-bit support for.
> > What's the best approach here?
> Introduce new format and join bikeshedding about 10-bit format representation
> (IIRC we have two different raw 10-bpp decoders already).
Yes, if these formats can be represented by a pixel format descriptor
then they should be defined in pixfmt.h/pixdesc.h and convertion
utilities added to libswscale, otherwise they should be considered
like coded formats.
FFmpeg = Fancy Fascinating Most Portable Elected Governor
More information about the ffmpeg-devel