[patch] support 14bit NEF
hub at figuiere.net
Tue Jul 1 08:36:28 PDT 2008
On Tue, 2008-07-01 at 00:27 +0100, Rafael Espíndola wrote:
> I got too early to an Airport, so I had some time to work on
> I converted unpack_be12to16 into unpack_BEto16. I then discovered that
> 14 bit NEFs are not packed :-(
> The attached patch include both unpack_BEto16 that is now just a
> refactoring (unless there is a packed 14 bit format out there...) and
> the real support for 14 bit NEFs. It also contains a small fix.
> unpack_be12to16 would not scale the data. When converting from 12 bit
> to 16 bit one must multiply by 2^(16 - 12). unpack_BEto16 has such a
I don't want the scaling to be done at that point. There are min() and
max() for the RawData for that purpose that give the valid range of
values, that can be used to actually scale the color data if needed.
The sole goal of unpack is to store each value in 16 bits to be usable
So as of today I don't really see any need for this patch since you
don't need to unpack 14-bits data :-) Sure it makes it more generic, but
it is basically dead code. And possibly slower.
More information about the Libopenraw-dev