klauspost/rawspeed — pull request #21 by pedrocr (2014-06-24 22:50:30+00:00)
Title: Support for Kodak DCR and KDC and Epson ERF

Support for three new formats:

* DCR format used in the DCS Pro line. This uses a special encoding. I took the decoding code from dcraw and cleaned it up to match the rawspeed style. The files are actually 10bit raw generated by compressing 12bit with a curve. The reverse curve is embedded in the file and I applied it so this produces the exact same output as libraw. We could also just output the native 10bit format and let the app apply whatever curve it wants but since the camera was designed with this curve in mind it seems we may as well apply it.
* KDC format used in the Kodak bridge camera line (e.g., P880) which turns out to be a simple 12bit packed format with weird but straightforward locations for the image offset and dimensions. I initially implemented this one as a special case in the DCR decoder like I did for SR2 files in the ARW decoder, but since this is a different format that uses a different manufacturer string anyway it seemed cleaner to just put it in a separate decoder.
* ERF format as used on the Epson R-D1 digital rangefinder. As it turns out it's a very simple format, with a well-behaved tiff and a 12bit packed big-endian format with control every ten bytes like we saw in other formats. I added a new function as this one is big endian.

For each of the formats I really only had one example. All three are from rawsamples.ch.