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

Michael Niedermayer michaelni at gmx.at
Tue Jan 22 17:02:18 CET 2013


On Tue, Jan 22, 2013 at 02:57:38PM +0000, Carl Eugen Hoyos 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.

There are 2 different cases here
12bit stored in 16bit and true 16bit
while they are very similar, converting to 12bit can be done in 2
ways,
A shift by 4
B more or less exact rescaling 

The difference is quite small but for true 16bit rescaling should
and i hope is used.
for 12bit stored in 16bit both the shift and the rescaling gives the
same result as long as the 12bit are reasonably correctly stored into
16bit, for example (i<<4) + (i>>8) will work

A encoder that wished to support 12bit in 16bit would thus be fine
with just using a >>4 and wouldnt need to care about the rest

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The real ebay dictionary, page 1
"Used only once"    - "Some unspecified defect prevented a second use"
"In good condition" - "Can be repaird by experienced expert"
"As is" - "You wouldnt want it even if you were payed for it, if you knew ..."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130122/f01ec952/attachment.asc>


More information about the ffmpeg-devel mailing list