Added fix for Hasselblad H5D-50c 3FR parsing

This commit is contained in:
torger
2015-01-09 20:53:14 +01:00
parent 8e378fb77d
commit 3dfa00a059
3 changed files with 22 additions and 11 deletions

View File

@@ -1,5 +1,5 @@
--- dcraw.c 2014-07-24 16:15:36.700261700 +0200
+++ dcraw.cc 2015-01-04 18:44:56.900751624 +0100
+++ dcraw.cc 2015-01-09 20:51:19.047096313 +0100
@@ -1,3 +1,15 @@
+/*RT*/#include <glib.h>
+/*RT*/#include <glib/gstdio.h>
@@ -1384,7 +1384,7 @@
width -= 46;
} else if (!strcmp(model,"D4") ||
!strcmp(model,"Df")) {
@@ -8567,24 +8605,46 @@
@@ -8567,24 +8605,52 @@
if (load_raw == &CLASS lossless_jpeg_load_raw)
load_raw = &CLASS hasselblad_load_raw;
if (raw_width == 7262) {
@@ -1415,6 +1415,12 @@
+ width = 8196;
+ top_margin = 4;
+ left_margin = 44;
+ } else if (raw_width == 8374) { // RT, CFV-50c, H5D-50c, "H5D-50c MS", "H5D-200c MS"
+ if (!strcmp(model, "H5D")) strcpy(model, "H5D-50c");
+ height = 6208;
+ width = 8280;
+ top_margin = 96;
+ left_margin = 48;
} else if (raw_width == 9044) {
height = 6716;
width = 8964;
@@ -1433,7 +1439,7 @@
} else if (raw_width == 4090) {
strcpy (model, "V96C");
height -= (top_margin = 6);
@@ -8637,6 +8697,7 @@
@@ -8637,6 +8703,7 @@
filters = 0x16161616;
}
} else if (!strcmp(make,"Leica") || !strcmp(make,"Panasonic")) {
@@ -1441,7 +1447,7 @@
if ((flen - data_offset) / (raw_width*8/7) == raw_height)
load_raw = &CLASS panasonic_load_raw;
if (!load_raw) {
@@ -8654,6 +8715,7 @@
@@ -8654,6 +8721,7 @@
}
filters = 0x01010101 * (uchar) "\x94\x61\x49\x16"
[((filters-1) ^ (left_margin & 1) ^ (top_margin << 1)) & 3];
@@ -1449,7 +1455,7 @@
} else if (!strcmp(model,"C770UZ")) {
height = 1718;
width = 2304;
@@ -8883,6 +8945,14 @@
@@ -8883,6 +8951,14 @@
memcpy (rgb_cam, cmatrix, sizeof cmatrix);
raw_color = 0;
}
@@ -1464,7 +1470,7 @@
if (raw_color) adobe_coeff (make, model);
if (load_raw == &CLASS kodak_radc_load_raw)
if (raw_color) adobe_coeff ("Apple","Quicktake");
@@ -8899,7 +8969,7 @@
@@ -8899,7 +8975,7 @@
if (!tiff_bps) tiff_bps = 12;
if (!maximum) maximum = (1 << tiff_bps) - 1;
if (!load_raw || height < 22 || width < 22 ||
@@ -1473,7 +1479,7 @@
is_raw = 0;
#ifdef NO_JASPER
if (load_raw == &CLASS redcine_load_raw) {
@@ -8978,195 +9048,250 @@
@@ -8978,195 +9054,250 @@
}
#endif
@@ -1899,7 +1905,7 @@
struct tiff_tag {
ushort tag, type;
int count;
@@ -9188,585 +9313,12 @@
@@ -9188,585 +9319,12 @@
unsigned gps[26];
char desc[512], make[64], model[64], soft[32], date[20], artist[64];
};