[Rawstudio-commit] rawspeed r61 - RawSpeed

Klaus Post klauspost at gmail.com
Thu Feb 12 18:36:48 CET 2009


Author: post
Date: 2009-02-12 18:36:48 +0100 (Thu, 12 Feb 2009)
New Revision: 61

Modified:
   RawSpeed/Cr2Decoder.cpp
   RawSpeed/rawstudio-plugin-api.cpp
Log:
- Don't (attempt) to hide CR2 errors in first slice, bail out instead (current behaviour, but unintended).

Modified: RawSpeed/Cr2Decoder.cpp
===================================================================
--- RawSpeed/Cr2Decoder.cpp	2009-02-08 15:23:13 UTC (rev 60)
+++ RawSpeed/Cr2Decoder.cpp	2009-02-12 17:36:48 UTC (rev 61)
@@ -1,22 +1,22 @@
 #include "StdAfx.h"
 #include "Cr2Decoder.h"
-/* 
-    RawSpeed - RAW file decoder.
-
-    Copyright (C) 2009 Klaus Post
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
+/* 
+    RawSpeed - RAW file decoder.
+
+    Copyright (C) 2009 Klaus Post
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library; if not, write to the Free Software
     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
 
     http://www.klauspost.com
@@ -98,9 +98,11 @@
       l.addSlices(s_width);
       l.mUseBigtable = true;
       l.startDecoder(slice.offset, slice.count, 0, offY);
-    } catch (RawDecoderException* e) { 
+    } catch (RawDecoderException e) { 
+      if (i == 0)
+        throw;
       // These may just be single slice error - store the error and move on
-      errors.push_back(_strdup(e->what()));
+      errors.push_back(_strdup(e.what()));
     }
     offY += slice.w;
   }

Modified: RawSpeed/rawstudio-plugin-api.cpp
===================================================================
--- RawSpeed/rawstudio-plugin-api.cpp	2009-02-08 15:23:13 UTC (rev 60)
+++ RawSpeed/rawstudio-plugin-api.cpp	2009-02-12 17:36:48 UTC (rev 61)
@@ -76,6 +76,12 @@
 			if (r->isCFA)
 				image->filters = r->cfa.getDcrawFilter();
 
+			if (r->isCFA) 
+			{
+				printf("DCRAW filter:%x\n",r->cfa.getDcrawFilter());
+				printf(r->cfa.asString().c_str());
+			}
+
 			/* Calculate black and white point */
 			for(row=100;row<image->h-100;row++)
 			{




More information about the Rawstudio-commit mailing list