Fix broken decode for files from Sony DSC-RX1RM2, fixes #3358
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
--- dcraw.c 2016-06-17 13:44:42 +0000
|
||||
+++ dcraw.cc 2016-06-17 14:49:21 +0000
|
||||
--- dcraw.c 2016-06-24 11:50:34 +0000
|
||||
+++ dcraw.cc 2016-06-24 12:40:36 +0000
|
||||
@@ -1,3 +1,16 @@
|
||||
+/*RT*/#include <glib.h>
|
||||
+/*RT*/#include <glib/gstdio.h>
|
||||
@@ -1013,11 +1013,11 @@
|
||||
- int dir[5] = { 1, width, -1, -width, 1 };
|
||||
- int row, col, diff[2], guess[2], c, d, i;
|
||||
- ushort (*pix)[4];
|
||||
+/* RT: delete interpolation functions */
|
||||
|
||||
-
|
||||
- border_interpolate(3);
|
||||
- if (verbose) fprintf (stderr,_("PPG interpolation...\n"));
|
||||
-
|
||||
+/* RT: delete interpolation functions */
|
||||
|
||||
-/* Fill in the green layer with gradients and pattern recognition: */
|
||||
- for (row=3; row < height-3; row++)
|
||||
- for (col=3+(FC(row,3) & 1), c=FC(row,col); col < width-3; col+=2) {
|
||||
@@ -1080,7 +1080,7 @@
|
||||
- char (*homo)[TS][TS], *buffer;
|
||||
-
|
||||
- if (verbose) fprintf (stderr,_("AHD interpolation...\n"));
|
||||
|
||||
-
|
||||
- cielab (0,0);
|
||||
- border_interpolate(5);
|
||||
- buffer = (char *) malloc (26*TS*TS);
|
||||
@@ -1091,7 +1091,7 @@
|
||||
-
|
||||
- for (top=2; top < height-5; top += TS-6)
|
||||
- for (left=2; left < width-5; left += TS-6) {
|
||||
-
|
||||
|
||||
-/* Interpolate green horizontally and vertically: */
|
||||
- for (row=top; row < top+TS && row < height-2; row++) {
|
||||
- col = left + (FC(row,left) & 1);
|
||||
@@ -1717,7 +1717,30 @@
|
||||
} else if (!strcmp(model,"C770UZ")) {
|
||||
height = 1718;
|
||||
width = 2304;
|
||||
@@ -9357,6 +9472,18 @@
|
||||
@@ -9201,13 +9316,15 @@
|
||||
width -= 6;
|
||||
} else if (!strcmp(make,"Sony") && raw_width == 7392) {
|
||||
width -= 30;
|
||||
- } else if (!strcmp(make,"Sony") && raw_width == 8000) {
|
||||
- width -= 32;
|
||||
- if (!strncmp(model,"DSC",3)) {
|
||||
- tiff_bps = 14;
|
||||
- load_raw = &CLASS unpacked_load_raw;
|
||||
- black = 512;
|
||||
- }
|
||||
+// this was introduced with update to dcraw 9.27
|
||||
+// but led to broken decode for compressed files from Sony DSC-RX1RM2
|
||||
+// } else if (!strcmp(make,"Sony") && raw_width == 8000) {
|
||||
+// width -= 32;
|
||||
+// if (!strncmp(model,"DSC",3)) {
|
||||
+// tiff_bps = 14;
|
||||
+// load_raw = &CLASS unpacked_load_raw;
|
||||
+// black = 512;
|
||||
+// }
|
||||
} else if (!strcmp(model,"DSLR-A100")) {
|
||||
if (width == 3880) {
|
||||
height--;
|
||||
@@ -9357,6 +9474,18 @@
|
||||
memcpy (rgb_cam, cmatrix, sizeof cmatrix);
|
||||
raw_color = 0;
|
||||
}
|
||||
@@ -1736,7 +1759,7 @@
|
||||
if (raw_color) adobe_coeff (make, model);
|
||||
if (load_raw == &CLASS kodak_radc_load_raw)
|
||||
if (raw_color) adobe_coeff ("Apple","Quicktake");
|
||||
@@ -9371,9 +9498,9 @@
|
||||
@@ -9371,9 +9500,9 @@
|
||||
if (raw_width < width ) raw_width = width;
|
||||
}
|
||||
if (!tiff_bps) tiff_bps = 12;
|
||||
@@ -1748,7 +1771,7 @@
|
||||
is_raw = 0;
|
||||
#ifdef NO_JASPER
|
||||
if (load_raw == &CLASS redcine_load_raw) {
|
||||
@@ -9452,199 +9579,250 @@
|
||||
@@ -9452,199 +9581,250 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -2182,7 +2205,7 @@
|
||||
struct tiff_tag {
|
||||
ushort tag, type;
|
||||
int count;
|
||||
@@ -9667,594 +9845,11 @@
|
||||
@@ -9667,594 +9847,11 @@
|
||||
char desc[512], make[64], model[64], soft[32], date[20], artist[64];
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user