Author: post
Date: 2012-05-13 17:11:52 +0200 (Sun, 13 May 2012)
New Revision: 423
Modified:
RawSpeed/SrwDecoder.cpp
data/cameras.xml
Log:
Add support for new firmware of Samsung NX200, and add initial support for
Samsung NX20.
Modified: RawSpeed/SrwDecoder.cpp
===================================================================
--- RawSpeed/SrwDecoder.cpp 2012-05-06 10:32:39 UTC (rev 422)
+++ RawSpeed/SrwDecoder.cpp 2012-05-13 15:11:52 UTC (rev 423)
@@ -30,7 +30,7 @@
SrwDecoder::SrwDecoder(TiffIFD *rootIFD, FileMap* file):
RawDecoder(file), mRootIFD(rootIFD) {
- decoderVersion = 1;
+ decoderVersion = 2;
}
SrwDecoder::~SrwDecoder(void) {
@@ -55,13 +55,21 @@
if (32769 == compression)
{
- this->decodeUncompressed(raw, false);
+ bool bit_order = false; // Default guess
+ map<string,string>::iterator msb_hint = hints.find("msb_override");
+ if (msb_hint != hints.end())
+ bit_order = (0 == (msb_hint->second).compare("true"));
+ this->decodeUncompressed(raw, bit_order);
return mRaw;
}
if (32770 == compression)
{
- this->decodeUncompressed(raw, bits == 12);
+ bool bit_order = (bits == 12); // Default guess
+ map<string,string>::iterator msb_hint = hints.find("msb_override");
+ if (msb_hint != hints.end())
+ bit_order = (0 == (msb_hint->second).compare("true"));
+ this->decodeUncompressed(raw, bit_order);
return mRaw;
}
ThrowRDE("Srw Decoder: Unsupported compression");
Modified: data/cameras.xml
===================================================================
--- data/cameras.xml 2012-05-06 10:32:39 UTC (rev 422)
+++ data/cameras.xml 2012-05-13 15:11:52 UTC (rev 423)
@@ -1914,14 +1914,28 @@
<Horizontal y="0" height="2"/>
</BlackAreas>
</Camera>
- <Camera make="SAMSUNG" model="NX200" decoder_version="1">
+ <Camera make="SAMSUNG" model="NX20" decoder_version="2">
<CFA width="2" height="2">
<Color x="0" y="0">GREEN</Color><Color x="1" y="0">BLUE</Color>
<Color x="0" y="1">RED</Color><Color x="1" y="1">GREEN</Color>
</CFA>
<Crop x="48" y="4" width="-60" height="-28"/>
<Sensor black="0" white="4095"/>
+ <Hints>
+ <Hint name="msb_override" value="false"/>
+ </Hints>
</Camera>
+ <Camera make="SAMSUNG" model="NX200" decoder_version="2">
+ <CFA width="2" height="2">
+ <Color x="0" y="0">GREEN</Color><Color x="1" y="0">BLUE</Color>
+ <Color x="0" y="1">RED</Color><Color x="1" y="1">GREEN</Color>
+ </CFA>
+ <Crop x="48" y="4" width="-60" height="-28"/>
+ <Sensor black="0" white="4095"/>
+ <Hints>
+ <Hint name="msb_override" value="false"/>
+ </Hints>
+ </Camera>
<Camera make="SAMSUNG" model="NX5">
<CFA width="2" height="2">
<Color x="0" y="0">BLUE</Color><Color x="1" y="0">GREEN</Color>
_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit