Author: post
Date: 2009-07-07 19:55:39 +0200 (Tue, 07 Jul 2009)
New Revision: 82

Modified:
   RawSpeed/NefDecoder.cpp
   RawSpeed/RawDecoder.cpp
   RawSpeed/TiffParser.cpp
   cameras.xml
Log:
- Removed bitblit function from MSB-order copying, to avoid Nikon D3 distortion.
- Re-added support for D3.
- Added detection for "NIKON" make.
- Explicitly disabled support for several Nikon Coolpix cameras.

Modified: RawSpeed/NefDecoder.cpp
===================================================================
--- RawSpeed/NefDecoder.cpp     2009-07-07 17:24:52 UTC (rev 81)
+++ RawSpeed/NefDecoder.cpp     2009-07-07 17:55:39 UTC (rev 82)
@@ -234,36 +234,4 @@
 
   setMetaData(meta, make, model,"");
 
-/*  vector<TiffIFD*> data = mRootIFD->getIFDsWithTag(MODEL);
-
-  if (data.empty())
-    ThrowRDE("CR2 Decoder: Model name found");
-
-  string model(data[0]->getEntry(MODEL)->getString());
-
-  if (!model.compare("NIKON D2H")  ||
-      !model.compare("NIKON D40X") ||
-      !model.compare("NIKON D60") ||
-      !model.compare("NIKON D90") ||
-      !model.compare("NIKON D80") )
-  {
-    mRaw->cfa.setCFA(CFA_GREEN2, CFA_BLUE, CFA_RED, CFA_GREEN);   
-  }
-
-  if (!model.compare("NIKON D100 ") ||
-    !model.compare("NIKON D200") )
-  {
-    mRaw->cfa.setCFA(CFA_GREEN2, CFA_RED, CFA_BLUE, CFA_GREEN);   
-  }
-
-  if (!model.compare("NIKON D1 ") ||
-    !model.compare("NIKON D1H") ||
-    !model.compare("NIKON D40")  ||
-    !model.compare("NIKON D50") ||
-    !model.compare("NIKON D70s") ||  
-    !model.compare("NIKON D70") )
-  {
-    mRaw->cfa.setCFA(CFA_BLUE, CFA_GREEN, CFA_GREEN2, CFA_RED);
-  }
-*/
 }
\ No newline at end of file

Modified: RawSpeed/RawDecoder.cpp
===================================================================
--- RawSpeed/RawDecoder.cpp     2009-07-07 17:24:52 UTC (rev 81)
+++ RawSpeed/RawDecoder.cpp     2009-07-07 17:55:39 UTC (rev 82)
@@ -57,12 +57,6 @@
   guint y = offset.y;
   h = MIN(h+(guint)offset.y,(guint)mRaw->dim.y);
 
-  if (bitPerPixel==16)  {
-    BitBlt(&data[offset.x*sizeof(gushort)*cpp+y*outPitch],outPitch,
-      in,inputPitch,w*mRaw->bpp,h-y);
-    return;
-  }
-
   if (MSBOrder) {
     BitPumpMSB bits(&input);
     w *= cpp;
@@ -74,7 +68,15 @@
       }
       bits.skipBits(skipBits);
     }
+
   } else {
+
+    if (bitPerPixel==16)  {
+      BitBlt(&data[offset.x*sizeof(gushort)*cpp+y*outPitch],outPitch,
+        in,inputPitch,w*mRaw->bpp,h-y);
+      return;
+    }
+
     BitPumpPlain bits(&input);
     w *= cpp;
     for (; y < h; y++) {

Modified: RawSpeed/TiffParser.cpp
===================================================================
--- RawSpeed/TiffParser.cpp     2009-07-07 17:24:52 UTC (rev 81)
+++ RawSpeed/TiffParser.cpp     2009-07-07 17:55:39 UTC (rev 82)
@@ -111,6 +111,9 @@
       if (!make.compare("NIKON CORPORATION")) {
         return new NefDecoder(mRootIFD,mInput);
       }
+      if (!make.compare("NIKON")) {
+        return new NefDecoder(mRootIFD,mInput);
+      }
       if (!make.compare("OLYMPUS IMAGING CORP.  ")) {
         return new OrfDecoder(mRootIFD,mInput);
       }

Modified: cameras.xml
===================================================================
--- cameras.xml 2009-07-07 17:24:52 UTC (rev 81)
+++ cameras.xml 2009-07-07 17:55:39 UTC (rev 82)
@@ -271,7 +271,7 @@
     <Crop x="0" y="0" width="4312" height="2868"/>
     <Sensor black="0" white="3880"/>
   </Camera>
-  <Camera make="NIKON CORPORATION" model="NIKON D3" supported="no">
+  <Camera make="NIKON CORPORATION" model="NIKON D3">
     <CFA width="2" height="2">
       <Color x="0" y="0">RED</Color>
       <Color x="1" y="0">GREEN</Color>
@@ -279,7 +279,7 @@
       <Color x="1" y="1">BLUE</Color>
     </CFA>
     <Crop x="0" y="0" width="4284" height="2844"/>
-    <Sensor black="0" white="65535"/>
+    <Sensor black="0" white="16384"/>
   </Camera>
   <Camera make="NIKON CORPORATION" model="NIKON D300">
     <CFA width="2" height="2">
@@ -401,8 +401,18 @@
     <Crop x="0" y="0" width="2576" height="1924"/>
     <Sensor black="0" white="4095"/>
   </Camera>
-  <Camera make="NIKON" model="E8800">
+  <Camera make="NIKON" model="COOLPIX P6000" supported="no">    
     <CFA width="2" height="2">
+      <Color x="0" y="0">GREEN</Color>
+      <Color x="1" y="0">UNKNOWN</Color>
+      <Color x="0" y="1">UNKNOWN</Color>
+      <Color x="1" y="1">UNKNOWN</Color>
+    </CFA>
+    <Crop x="0" y="0" width="2576" height="1924"/>
+    <Sensor black="0" white="4095"/>
+  </Camera>
+  <Camera make="NIKON" model="E8800" supported="no">
+    <CFA width="2" height="2">
       <Color x="0" y="0">BLUE</Color>
       <Color x="1" y="0">GREEN</Color>
       <Color x="0" y="1">GREEN</Color>


_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit

Reply via email to