[FFmpeg-devel] dcp encoding + new pixel format request/sponsorship

Michael Bradshaw mjbshaw at gmail.com
Tue Jan 22 16:08:22 CET 2013


On Jan 22, 2013 7:58 AM, "Carl Eugen Hoyos" <cehoyos at ag.or.at> wrote:
>
> Michael Bradshaw <mjbshaw <at> gmail.com> writes:
>
> > > Is there any reason to add a 12 bit per component format
> > > instead of using the 16 bit one and telling the encoder
> > > it should discard 4 bit?
> >
> > Out of curiosity, how would that work? Which 4 bits do you discard?
>
> I believe when we "scale" from 16 to 8 bits, we simply discard
> the 8 least significant bit, the same can be done for the
> 16 -> 12 case.
>
> > openjpeg itself can, in theory, save 12-bit RGB, but lavc
> > would provide frames in 16-bit RGB; simply discarding bits
> > would give improper results. A proper/scaling 16-bit to
> > 12-bit conversion would need to be done, and it
> > hardly seems like the encoder is the right place to put that.
>
> It would simplify things to do it like that.
>
> > We also wouldn't be able to decode it without a 12-bit pixel format.
>
> The decoder would simply shift the most significant 4 bits
> into the least significant bits and set bits_per_coded_sample
> to 12.

Thanks for the added thoughts. Thinking about it, this would be easy enough
to implement.

I'd be fine with it, I suppose, but I'd prefer if it weren't a permanent
solution


More information about the ffmpeg-devel mailing list