File sd990.diff of Package dcraw

Index: dcraw.c
===================================================================
--- dcraw.c.orig
+++ dcraw.c
@@ -6756,8 +6756,10 @@ void CLASS adobe_coeff (const char *make
     { "Canon PowerShot A640", 0, 0,	/* DJC */
 	{ 13124,-5329,-1390,-3602,11658,1944,-1612,2863,4885 } },
     { "Canon PowerShot A650", 0, 0,	/* DJC */
 	{ 9427,-3036,-959,-2581,10671,1911,-1039,1982,4430 } },
+    { "Canon PowerShot SD990", 0, 0,	/* DJC */
+        { 8372,-2901,-1282,-1278,6439,530,44,884,2242 } },
     { "Canon PowerShot A720", 0, 0,	/* DJC */
 	{ 14573,-5482,-1546,-1266,9799,1468,-1040,1912,3810 } },
     { "Canon PowerShot S3 IS", 0, 0,	/* DJC */
 	{ 14062,-5199,-1446,-4712,12470,2243,-1286,2028,4836 } },
@@ -7587,8 +7589,10 @@ void CLASS identify()
     { 10341600,3336,2480, 6, 5,32, 3,40,0x94,0,2,"Canon","PowerShot A720 IS" },
     { 10383120,3344,2484,12, 6,44, 6,40,0x94,0,2,"Canon","PowerShot A630" },
     { 12945240,3736,2772,12, 6,52, 6,40,0x94,0,2,"Canon","PowerShot A640" },
     { 15636240,4104,3048,48,12,24,12,40,0x94,0,2,"Canon","PowerShot A650" },
+/*  { 22498560,4480,3348,12,12,36,12,40,0x49,0,2,"Canon","PowerShot SD990" }, */
+    { 22498560,4480,3348,20,17,44,19,40,0x94,0,2,"Canon","PowerShot SD990" },
     { 15467760,3720,2772, 6,12,30, 0,40,0x94,0,2,"Canon","PowerShot SX110 IS" },
     { 15534576,3728,2778,12, 9,44, 9,40,0x94,0,2,"Canon","PowerShot SX120 IS" },
     { 18653760,4080,3048,24,12,24,12,40,0x94,0,2,"Canon","PowerShot SX20 IS" },
     { 19131120,4168,3060,92,16, 4, 1, 8,0x94,0,2,"Canon","PowerShot SX220 HS" },
@@ -7999,8 +8003,23 @@ canon_a5:
   } else if (!strcmp(model,"PowerShot Pro90 IS") ||
 	     !strcmp(model,"PowerShot G1")) {
     colors = 4;
     filters = 0xb4b4b4b4;
+  } else if (!strcmp(model,"PowerShot SD990")) {
+    /* Only use the outermost 8 pixels for black calibration */
+    mask[0][0] = mask[1][0] = top_margin;
+    mask[0][2] = mask[1][2] = top_margin+height;
+    mask[0][3] = 4;
+    mask[1][1] = raw_width-8;
+    mask[1][3] = raw_width;
+
+    /*
+    mask[2][1] = mask[3][1] = left_margin;
+    mask[2][3] = mask[3][3] = left_margin+width;
+    mask[2][2] = 8;
+    mask[3][0] = raw_height-8;
+    mask[3][2] = raw_height;
+     */
   } else if (!strcmp(model,"PowerShot A610")) {
     if (canon_s2is()) strcpy (model+10, "S2 IS");
   } else if (!strcmp(model,"PowerShot SX220 HS")) {
     mask[0][0] = top_margin = 16;