[FFmpeg-devel] [RFC] Handling 8 < bit depth < 16

Kostya kostya.shishkov
Sun Sep 5 07:53:29 CEST 2010


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).
 
> Dark Shikari



More information about the ffmpeg-devel mailing list