Update of /cvsroot/ufraw/ufraw
In directory vz-cvs-3.sog:/tmp/cvs-serv24054

Modified Files:
        dcraw_api.cc dcraw_indi.c 
Log Message:
API changes for DCRaw 9.15.

Index: dcraw_api.cc
===================================================================
RCS file: /cvsroot/ufraw/ufraw/dcraw_api.cc,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -d -r1.82 -r1.83
--- dcraw_api.cc        25 May 2012 02:30:50 -0000      1.82
+++ dcraw_api.cc        26 Jun 2012 16:45:35 -0000      1.83
@@ -136,6 +136,7 @@
         FORC3 if ((unsigned)i > d->cblack[c]) i = d->cblack[c];
         FORC4 d->cblack[c] -= i;
         d->black += i;
+        FORC4 d->cblack[c] += d->black;
         h->black = d->black;
         h->shrink = d->shrink = (h->filters != 0);
         h->pixel_aspect = d->pixel_aspect;
@@ -203,6 +204,7 @@
         g_free(d->messageBuffer);
         d->messageBuffer = NULL;
         d->lastStatus = DCRAW_SUCCESS;
+        d->raw_image = 0;
         if (setjmp(d->failure)) {
             d->dcraw_message(DCRAW_ERROR, _("Fatal internal error\n"));
             h->message = d->messageBuffer;
@@ -221,17 +223,27 @@
         }
         h->raw.colors = d->colors;
         h->fourColorFilters = d->filters;
+        if (d->filters) {
+            d->raw_image = (ushort *) calloc((d->raw_height + 7) * 
d->raw_width, 2);
+        }
         d->dcraw_message(DCRAW_VERBOSE, _("Loading %s %s image from %s ...\n"),
                          d->make, d->model, d->ifname_display);
         fseek(d->ifp, 0, SEEK_END);
         d->ifpSize = ftell(d->ifp);
         fseek(d->ifp, d->data_offset, SEEK_SET);
         (d->*d->load_raw)();
+        if (d->raw_image) {
+            d->crop_masked_pixels();
+            free(d->raw_image);
+        }
         if (!--d->data_error) d->lastStatus = DCRAW_ERROR;
         if (d->zero_is_bad) d->remove_zeroes();
         d->bad_pixels(NULL);
         if (d->is_foveon) {
-            d->foveon_interpolate();
+            if (d->model[0] == 'D') {
+                for (i = 0; i < d->height * d->width * 4; i++)
+                    if ((short) d->image[0][i] < 0) d->image[0][i] = 0;
+            } else d->foveon_interpolate();
             h->raw.width = h->width = d->width;
             h->raw.height = h->height = d->height;
         }
@@ -703,9 +715,9 @@
 
         /* It might be better to report an error here: */
         /* (dcraw also forbids AHD for Fuji rotated images) */
-        if (interpolation == dcraw_ahd_interpolation && h->colors > 3)
+        if (interpolation == dcraw_ahd_interpolation && (h->colors > 3 || 
h->filters < 1000))
             interpolation = dcraw_vng_interpolation;
-        if (interpolation == dcraw_ppg_interpolation && h->colors > 3)
+        if (interpolation == dcraw_ppg_interpolation && (h->colors > 3 || 
h->filters < 1000))
             interpolation = dcraw_vng_interpolation;
         f4 = h->fourColorFilters;
         for (r = 0; r < h->height; r++)

Index: dcraw_indi.c
===================================================================
RCS file: /cvsroot/ufraw/ufraw/dcraw_indi.c,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -d -r1.98 -r1.99
--- dcraw_indi.c        23 May 2012 13:45:32 -0000      1.98
+++ dcraw_indi.c        26 Jun 2012 16:45:35 -0000      1.99
@@ -98,12 +98,12 @@
         { 0, 2, 1, 2, 0, 1 }
     };
 
-    if (filters > 1000) return FC(row, col);
-    if (filters == 2) return filter2[(row + 6) % 6][(col + 6) % 6];
     /* Assume that we are handling the Leaf CatchLight with
      * top_margin = 8; left_margin = 18; */
-//  return filter[(row+top_margin) & 15][(col+left_margin) & 15];
-    return filter[(row + 8) & 15][(col + 18) & 15];
+//  if (filters == 1) return filter[(row+top_margin) & 15][(col+left_margin) & 
15];
+    if (filters == 1) return filter[(row + 8) & 15][(col + 18) & 15];
+    if (filters == 2) return filter2[(row + 6) % 6][(col + 6) % 6];
+    return FC(row, col);
 }
 
 static void CLASS merror(void *ptr, char *where)


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
ufraw-cvs mailing list
ufraw-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ufraw-cvs

Reply via email to