[patch] compressed nef support

Hubert Figuiere hub at figuiere.net
Mon Jun 16 20:58:53 PDT 2008


On Mon, 2008-06-16 at 19:38 -0400, Rafael Espíndola wrote:
> The attached patch is more of a prototype than a final implementation,
> but I would like to put it out for review.
> 
> It is able to decode all d40 nefs I tried and one d300 (the number of
> columns is wrong for the d300).
> 
> I have divided the processing into 3 layers. A bit iterator, a huffman
> + diff computation and a CFA decoder. This might look a bit too much
> but I think I can reuse most of the code for the lossless jpeg.

What's wrong with the current lossless jpeg? 

> The metadata handling is very incomplete.
> 
> My current plan is to first change the asserts with proper error
> codes, try to get this committed and then implement support for more
> cameras. Once this is done I would like to try to share some code with
> the lossless jpeg implementation. This should be nice for reducing
> code duplication and I think my huffman implementation is faster :-)

A few comments. Class names: I planned on use less uppercase in class
names. NEFFile would turn to NefFile, etc. It is even more visible with
your NEFCFAIterator... I hadn't changed them all yet because it was low
on my list, but on the other hand no creating new one.

Member variable: they use the m_ prefix instead of the _ suffix. This is
just a matter of taste, but for the sake of consistency, I'd prefer we
stick to it.

Also it does not survive to my testsuite:

running test NEF-test D100 on
file /home/hub/samples/nef/D100/dsc_0007.nef
testsuite: ../../lib/neffile.cpp:180: const
OpenRaw::Internals::NEFFile::NEFCompressionInfo
OpenRaw::Internals::NEFFile::_getCompressionCurve(OpenRaw::RawData&):
Assertion `curveEntry' failed.
/bin/sh: line 4: 16125 Aborted                 (core dumped) ${dir}$tst
FAIL: testsuite

OOPS

I can give you that file if you want :-) Hint: it is not compressed.

Otherwise it looks good. Good work !

Hub



More information about the Libopenraw-dev mailing list