Support for dcraw 9.19 (issue 1627)

This commit is contained in:
michael 2013-07-02 11:32:53 -04:00
parent e8f2dd3038
commit fbf5a98e1c
4 changed files with 2394 additions and 2614 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -71,7 +71,7 @@ protected:
FILE *ofp; FILE *ofp;
short order; short order;
const char *ifname; const char *ifname;
char *meta_data; char *meta_data, xtrans[6][6];
char cdesc[5], desc[512], make[64], model[64], model2[64], artist[64]; char cdesc[5], desc[512], make[64], model[64], model2[64], artist[64];
float flash_used, canon_ev, iso_speed, shutter, aperture, focal_len; float flash_used, canon_ev, iso_speed, shutter, aperture, focal_len;
time_t timestamp; time_t timestamp;
@ -264,11 +264,13 @@ private:
}; };
pana_bits_t pana_bits; pana_bits_t pana_bits;
void canon_rmf_load_raw();
void panasonic_load_raw(); void panasonic_load_raw();
void olympus_load_raw(); void olympus_load_raw();
void minolta_rd175_load_raw(); void minolta_rd175_load_raw();
void quicktake_100_load_raw(); void quicktake_100_load_raw();
void kodak_radc_load_raw(); void kodak_radc_load_raw();
void samsung_load_raw();
void kodak_jpeg_load_raw(); void kodak_jpeg_load_raw();
void lossy_dng_load_raw(); void lossy_dng_load_raw();
@ -317,6 +319,9 @@ void foveon_make_curves(short **curvep, float dq[3], float div[3], float filt);
int foveon_apply_curve (short *curve, int i); int foveon_apply_curve (short *curve, int i);
void foveon_interpolate(); void foveon_interpolate();
void xtrans_interpolate (int passes);
void cielab (ushort rgb[3], short lab[3]);
void remove_zeroes(); void remove_zeroes();
void bad_pixels (const char *cfname); void bad_pixels (const char *cfname);
void subtract (const char *fname); void subtract (const char *fname);
@ -350,7 +355,7 @@ int parse_tiff (int base);
void apply_tiff(); void apply_tiff();
void parse_external_jpeg(); void parse_external_jpeg();
void ciff_block_1030(); void ciff_block_1030();
void parse_ciff (int offset, int length); void parse_ciff (int offset, int length, int depth);
void parse_rollei(); void parse_rollei();
void parse_sinar_ia(); void parse_sinar_ia();
void parse_phase_one (int base); void parse_phase_one (int base);

View File

@ -1,5 +1,5 @@
--- dcraw.c 2012-12-26 13:09:14 -0500 --- dcraw.c 2013-06-28 08:27:29 -0400
+++ dcraw.cc 2013-04-09 23:51:55 -0400 +++ dcraw.cc 2013-06-29 20:49:02 -0400
@@ -1,3 +1,15 @@ @@ -1,3 +1,15 @@
+/*RT*/#include <glib.h> +/*RT*/#include <glib.h>
+/*RT*/#include <glib/gstdio.h> +/*RT*/#include <glib/gstdio.h>
@ -15,7 +15,7 @@
+ +
/* /*
dcraw.c -- Dave Coffin's raw photo decoder dcraw.c -- Dave Coffin's raw photo decoder
Copyright 1997-2012 by Dave Coffin, dcoffin a cybercom o net Copyright 1997-2013 by Dave Coffin, dcoffin a cybercom o net
@@ -29,17 +41,17 @@ @@ -29,17 +41,17 @@
#define _GNU_SOURCE #define _GNU_SOURCE
#endif #endif
@ -43,8 +43,8 @@
+#include <ctime> +#include <ctime>
#include <sys/types.h> #include <sys/types.h>
#ifdef NODEPS #if defined(DJGPP) || defined(__MINGW32__)
@@ -98,86 +110,37 @@ @@ -98,87 +110,37 @@
#define LONG_BIT (8 * sizeof (long)) #define LONG_BIT (8 * sizeof (long))
#endif #endif
@ -68,26 +68,27 @@
-FILE *ifp, *ofp; -FILE *ifp, *ofp;
-short order; -short order;
-const char *ifname; -const char *ifname;
-char *meta_data; -char *meta_data, xtrans[6][6];
-char cdesc[5], desc[512], make[64], model[64], model2[64], artist[64]; -char cdesc[5], desc[512], make[64], model[64], model2[64], artist[64];
-float flash_used, canon_ev, iso_speed, shutter, aperture, focal_len; -float flash_used, canon_ev, iso_speed, shutter, aperture, focal_len;
-time_t timestamp; -time_t timestamp;
-unsigned shot_order, kodak_cbpp, filters, exif_cfa, unique_id; -off_t strip_offset, data_offset;
-off_t strip_offset, data_offset; -off_t thumb_offset, meta_offset, profile_offset;
-off_t thumb_offset, meta_offset, profile_offset; -unsigned shot_order, kodak_cbpp, exif_cfa, unique_id;
-unsigned thumb_length, meta_length, profile_length; -unsigned thumb_length, meta_length, profile_length;
-unsigned thumb_misc, *oprof, fuji_layout, shot_select=0, multi_out=0; -unsigned thumb_misc, *oprof, fuji_layout, shot_select=0, multi_out=0;
-unsigned tiff_nifds, tiff_samples, tiff_bps, tiff_compress; -unsigned tiff_nifds, tiff_samples, tiff_bps, tiff_compress;
-unsigned black, cblack[4], maximum, mix_green, raw_color, zero_is_bad; -unsigned black, cblack[4], maximum, mix_green, raw_color, zero_is_bad;
-unsigned zero_after_ff, is_raw, dng_version, is_foveon, data_error; -unsigned zero_after_ff, is_raw, dng_version, is_foveon, data_error;
-unsigned tile_width, tile_length, gpsdata[32], load_flags; -unsigned tile_width, tile_length, gpsdata[32], load_flags;
-unsigned flip, tiff_flip, filters, colors;
-ushort raw_height, raw_width, height, width, top_margin, left_margin; -ushort raw_height, raw_width, height, width, top_margin, left_margin;
-ushort shrink, iheight, iwidth, fuji_width, thumb_width, thumb_height; -ushort shrink, iheight, iwidth, fuji_width, thumb_width, thumb_height;
-ushort *raw_image, (*image)[4]; -ushort *raw_image, (*image)[4];
-ushort white[8][8], curve[0x10000], cr2_slice[3], sraw_mul[4]; -ushort white[8][8], curve[0x10000], cr2_slice[3], sraw_mul[4];
-int mask[8][4], flip, tiff_flip, colors;
-double pixel_aspect, aber[4]={1,1,1,1}, gamm[6]={ 0.45,4.5,0,0,0,0 }; -double pixel_aspect, aber[4]={1,1,1,1}, gamm[6]={ 0.45,4.5,0,0,0,0 };
-float bright=1, user_mul[4]={0,0,0,0}, threshold=0; -float bright=1, user_mul[4]={0,0,0,0}, threshold=0;
-int mask[8][4];
-int half_size=0, four_color_rgb=0, document_mode=0, highlight=0; -int half_size=0, four_color_rgb=0, document_mode=0, highlight=0;
-int verbose=0, use_auto_wb=0, use_camera_wb=0, use_camera_matrix=-1; -int verbose=0, use_auto_wb=0, use_camera_wb=0, use_camera_matrix=-1;
-int output_color=1, output_bps=8, output_tiff=0, med_passes=0; -int output_color=1, output_bps=8, output_tiff=0, med_passes=0;
@ -146,7 +147,21 @@
#define SWAP(a,b) { a=a+b; b=a-b; a=a-b; } #define SWAP(a,b) { a=a+b; b=a-b; a=a-b; }
/* /*
@@ -293,6 +256,7 @@ @@ -250,10 +212,11 @@
{ 1,3,1,2,3,2,3,2,0,2,0,1,1,0,3,0 },
{ 0,2,0,3,1,0,0,1,1,3,3,2,3,2,2,1 },
{ 2,1,3,2,3,1,2,1,0,3,0,2,0,2,0,2 },
- { 0,3,1,0,0,2,0,3,2,1,3,1,1,3,1,3 } };
+ { 0,3,1,0,0,2,0,3,2,1,3,1,1,3,1,3 } };
- if (filters == 1) return filter[(row+top_margin)&15][(col+left_margin)&15];
+ if (filters == 1) return filter[(row+top_margin)&15][(col+left_margin)&15];
if (filters == 9) return xtrans[(row+top_margin+6)%6][(col+left_margin+6)%6];
+
return FC(row,col);
}
@@ -296,6 +259,7 @@
fprintf (stderr,_("Corrupt data near 0x%llx\n"), (INT64) ftello(ifp)); fprintf (stderr,_("Corrupt data near 0x%llx\n"), (INT64) ftello(ifp));
} }
data_error++; data_error++;
@ -154,7 +169,7 @@
} }
ushort CLASS sget2 (uchar *s) ushort CLASS sget2 (uchar *s)
@@ -366,7 +330,7 @@ @@ -369,7 +333,7 @@
{ {
if (fread (pixel, 2, count, ifp) < count) derror(); if (fread (pixel, 2, count, ifp) < count) derror();
if ((order == 0x4949) == (ntohs(0x1234) == 0x1234)) if ((order == 0x4949) == (ntohs(0x1234) == 0x1234))
@ -163,10 +178,10 @@
} }
void CLASS canon_600_fixed_wb (int temp) void CLASS canon_600_fixed_wb (int temp)
@@ -542,10 +506,10 @@ @@ -541,10 +505,10 @@
getbits(-1) initializes the buffer return 0;
getbits(n) where 0 <= n <= 25 returns an n-bit integer }
*/
-unsigned CLASS getbithuff (int nbits, ushort *huff) -unsigned CLASS getbithuff (int nbits, ushort *huff)
+unsigned CLASS getbithuff_t::operator() (int nbits, ushort *huff) +unsigned CLASS getbithuff_t::operator() (int nbits, ushort *huff)
{ {
@ -176,8 +191,8 @@
+/*RT static int vbits=0, reset=0; */ +/*RT static int vbits=0, reset=0; */
unsigned c; unsigned c;
if (nbits == -1) if (nbits > 25) return 0;
@@ -1208,14 +1172,14 @@ @@ -1209,14 +1173,14 @@
int i, nz; int i, nz;
char tail[424]; char tail[424];
@ -194,7 +209,7 @@
void CLASS ppm_thumb() void CLASS ppm_thumb()
{ {
@@ -1493,10 +1457,10 @@ @@ -1494,10 +1458,10 @@
} }
} }
@ -208,7 +223,7 @@
unsigned c; unsigned c;
if (nbits == -1) if (nbits == -1)
@@ -1736,10 +1700,10 @@ @@ -1757,10 +1721,10 @@
maximum = 0x3ff; maximum = 0x3ff;
} }
@ -222,7 +237,7 @@
int byte; int byte;
if (!nbits) return vbits=0; if (!nbits) return vbits=0;
@@ -2028,11 +1992,11 @@ @@ -2049,11 +2013,11 @@
METHODDEF(boolean) METHODDEF(boolean)
fill_input_buffer (j_decompress_ptr cinfo) fill_input_buffer (j_decompress_ptr cinfo)
{ {
@ -236,7 +251,7 @@
cinfo->src->next_input_byte = jpeg_buffer; cinfo->src->next_input_byte = jpeg_buffer;
cinfo->src->bytes_in_buffer = nbytes; cinfo->src->bytes_in_buffer = nbytes;
return TRUE; return TRUE;
@@ -2351,10 +2315,9 @@ @@ -2373,10 +2337,9 @@
maximum = (1 << (thumb_misc & 31)) - 1; maximum = (1 << (thumb_misc & 31)) - 1;
} }
@ -249,7 +264,7 @@
if (start) { if (start) {
for (p=0; p < 4; p++) for (p=0; p < 4; p++)
pad[p] = key = key * 48828125 + 1; pad[p] = key = key * 48828125 + 1;
@@ -2640,7 +2603,7 @@ @@ -2690,7 +2653,7 @@
void CLASS foveon_decoder (unsigned size, unsigned code) void CLASS foveon_decoder (unsigned size, unsigned code)
{ {
@ -258,9 +273,12 @@
struct decode *cur; struct decode *cur;
int i, len; int i, len;
@@ -3940,371 +3903,7 @@ @@ -4002,240 +3965,9 @@
image[row*width+col][c] = sum[c] / sum[c+4];
} }
} }
+
+/* RT: delete interpolation functions */
-void CLASS lin_interpolate() -void CLASS lin_interpolate()
-{ -{
@ -269,7 +287,7 @@
- ushort *pix; - ushort *pix;
- -
- if (verbose) fprintf (stderr,_("Bilinear interpolation...\n")); - if (verbose) fprintf (stderr,_("Bilinear interpolation...\n"));
- if (filters == 2) size = 6; - if (filters == 9) size = 6;
- border_interpolate(1); - border_interpolate(1);
- for (row=0; row < size; row++) - for (row=0; row < size; row++)
- for (col=0; col < size; col++) { - for (col=0; col < size; col++) {
@ -350,7 +368,7 @@
- if (verbose) fprintf (stderr,_("VNG interpolation...\n")); - if (verbose) fprintf (stderr,_("VNG interpolation...\n"));
- -
- if (filters == 1) prow = pcol = 16; - if (filters == 1) prow = pcol = 16;
- if (filters == 2) prow = pcol = 6; - if (filters == 9) prow = pcol = 6;
- ip = (int *) calloc (prow*pcol, 1280); - ip = (int *) calloc (prow*pcol, 1280);
- merror (ip, "vng_interpolate()"); - merror (ip, "vng_interpolate()");
- for (row=0; row < prow; row++) /* Precalculate for VNG */ - for (row=0; row < prow; row++) /* Precalculate for VNG */
@ -495,37 +513,31 @@
- pix[0][c] = CLIP((guess[0]+guess[1]) >> 2); - pix[0][c] = CLIP((guess[0]+guess[1]) >> 2);
- } - }
-} -}
-
void CLASS cielab (ushort rgb[3], short lab[3])
{
@@ -4496,112 +4228,7 @@
}
#undef fcol
-/* -/*
- Adaptive Homogeneity-Directed interpolation is based on - Adaptive Homogeneity-Directed interpolation is based on
- the work of Keigo Hirakawa, Thomas Parks, and Paul Lee. - the work of Keigo Hirakawa, Thomas Parks, and Paul Lee.
- */ - */
-#define TS 256 /* Tile Size */
-
-void CLASS ahd_interpolate() -void CLASS ahd_interpolate()
-{ -{
- int i, j, k, top, left, row, col, tr, tc, c, d, val, hm[2]; - int i, j, top, left, row, col, tr, tc, c, d, val, hm[2];
- ushort (*pix)[4], (*rix)[3];
- static const int dir[4] = { -1, 1, -TS, TS }; - static const int dir[4] = { -1, 1, -TS, TS };
- unsigned ldiff[2][4], abdiff[2][4], leps, abeps; - unsigned ldiff[2][4], abdiff[2][4], leps, abeps;
- float r, cbrt[0x10000], xyz[3], xyz_cam[3][4]; - ushort (*rgb)[TS][TS][3], (*rix)[3], (*pix)[4];
- ushort (*rgb)[TS][TS][3];
- short (*lab)[TS][TS][3], (*lix)[3]; - short (*lab)[TS][TS][3], (*lix)[3];
- char (*homo)[TS][TS], *buffer; - char (*homo)[TS][TS], *buffer;
- -
- if (verbose) fprintf (stderr,_("AHD interpolation...\n")); - if (verbose) fprintf (stderr,_("AHD interpolation...\n"));
- -
- for (i=0; i < 0x10000; i++) { - cielab (0,0);
- r = i / 65535.0;
- cbrt[i] = r > 0.008856 ? pow(r,1/3.0) : 7.787*r + 16/116.0;
- }
- for (i=0; i < 3; i++)
- for (j=0; j < colors; j++)
- for (xyz_cam[i][j] = k=0; k < 3; k++)
- xyz_cam[i][j] += xyz_rgb[i][k] * rgb_cam[k][j] / d65_white[i];
-
- border_interpolate(5); - border_interpolate(5);
- buffer = (char *) malloc (26*TS*TS); /* 1664 kB */ - buffer = (char *) malloc (26*TS*TS);
- merror (buffer, "ahd_interpolate()"); - merror (buffer, "ahd_interpolate()");
- rgb = (ushort(*)[TS][TS][3]) buffer; - rgb = (ushort(*)[TS][TS][3]) buffer;
- lab = (short (*)[TS][TS][3])(buffer + 12*TS*TS); - lab = (short (*)[TS][TS][3])(buffer + 12*TS*TS);
@ -533,9 +545,9 @@
- -
- for (top=2; top < height-5; top += TS-6) - for (top=2; top < height-5; top += TS-6)
- for (left=2; left < width-5; left += TS-6) { - for (left=2; left < width-5; left += TS-6) {
-
-/* Interpolate green horizontally and vertically: */ -/* Interpolate green horizontally and vertically: */
- for (row = top; row < top+TS && row < height-2; row++) { - for (row=top; row < top+TS && row < height-2; row++) {
- col = left + (FC(row,left) & 1); - col = left + (FC(row,left) & 1);
- for (c = FC(row,col); col < left+TS && col < width-2; col+=2) { - for (c = FC(row,col); col < left+TS && col < width-2; col+=2) {
- pix = image + row*width+col; - pix = image + row*width+col;
@ -569,18 +581,7 @@
- rix[0][c] = CLIP(val); - rix[0][c] = CLIP(val);
- c = FC(row,col); - c = FC(row,col);
- rix[0][c] = pix[0][c]; - rix[0][c] = pix[0][c];
- xyz[0] = xyz[1] = xyz[2] = 0.5; - cielab (rix[0],lix[0]);
- FORCC {
- xyz[0] += xyz_cam[0][c] * rix[0][c];
- xyz[1] += xyz_cam[1][c] * rix[0][c];
- xyz[2] += xyz_cam[2][c] * rix[0][c];
- }
- xyz[0] = cbrt[CLIP((int) xyz[0])];
- xyz[1] = cbrt[CLIP((int) xyz[1])];
- xyz[2] = cbrt[CLIP((int) xyz[2])];
- lix[0][0] = 64 * (116 * xyz[1] - 16);
- lix[0][1] = 64 * 500 * (xyz[0] - xyz[1]);
- lix[0][2] = 64 * 200 * (xyz[1] - xyz[2]);
- } - }
-/* Build homogeneity maps from the CIELab images: */ -/* Build homogeneity maps from the CIELab images: */
- memset (homo, 0, 2*TS*TS); - memset (homo, 0, 2*TS*TS);
@ -625,13 +626,10 @@
- } - }
- free (buffer); - free (buffer);
-} -}
-#undef TS #undef TS
-
+/* RT: delete interpolation function */
void CLASS median_filter() void CLASS median_filter()
{ @@ -4771,7 +4398,7 @@
ushort (*pix)[4];
@@ -4472,7 +4071,7 @@
} }
} }
@ -640,7 +638,7 @@
void CLASS parse_makernote (int base, int uptag) void CLASS parse_makernote (int base, int uptag)
{ {
@@ -4989,8 +4588,8 @@ @@ -5284,8 +4911,8 @@
} }
} }
@ -651,7 +649,7 @@
int CLASS parse_tiff_ifd (int base) int CLASS parse_tiff_ifd (int base)
{ {
@@ -5004,7 +4603,7 @@ @@ -5299,7 +4926,7 @@
unsigned sony_curve[] = { 0,0,0,0,0,4095 }; unsigned sony_curve[] = { 0,0,0,0,0,4095 };
unsigned *buf, sony_offset=0, sony_length=0, sony_key=0; unsigned *buf, sony_offset=0, sony_length=0, sony_key=0;
struct jhead jh; struct jhead jh;
@ -660,7 +658,7 @@
if (tiff_nifds >= sizeof tiff_ifd / sizeof tiff_ifd[0]) if (tiff_nifds >= sizeof tiff_ifd / sizeof tiff_ifd[0])
return 1; return 1;
@@ -5436,12 +5035,13 @@ @@ -5737,12 +5364,13 @@
fread (buf, sony_length, 1, ifp); fread (buf, sony_length, 1, ifp);
sony_decrypt (buf, sony_length/4, 1, sony_key); sony_decrypt (buf, sony_length/4, 1, sony_key);
sfp = ifp; sfp = ifp;
@ -680,7 +678,7 @@
ifp = sfp; ifp = sfp;
free (buf); free (buf);
} }
@@ -5465,6 +5065,7 @@ @@ -5766,6 +5394,7 @@
int CLASS parse_tiff (int base) int CLASS parse_tiff (int base)
{ {
int doff; int doff;
@ -688,25 +686,16 @@
fseek (ifp, base, SEEK_SET); fseek (ifp, base, SEEK_SET);
order = get2(); order = get2();
@@ -5539,7 +5140,7 @@ @@ -5843,7 +5472,7 @@
case 8: load_raw = &CLASS eight_bit_load_raw; break; case 8: load_raw = &CLASS eight_bit_load_raw; break;
case 12: if (tiff_ifd[raw].phint == 2) case 12: if (tiff_ifd[raw].phint == 2)
load_flags = 6; load_flags = 6;
- load_raw = &CLASS packed_load_raw; break; - load_raw = &CLASS packed_load_raw; break;
+ load_raw = &CLASS packed_load_raw; break; + load_raw = &CLASS packed_load_raw; break;
case 14: load_flags = 0; case 14: load_flags = 0;
case 16: load_raw = &CLASS unpacked_load_raw; break; case 16: load_raw = &CLASS unpacked_load_raw;
} if (!strncmp(make,"OLYMPUS",7) &&
@@ -5573,7 +5174,7 @@ @@ -5959,7 +5588,7 @@
}
if (!dng_version)
if ( (tiff_samples == 3 && tiff_ifd[raw].bytes &&
- tiff_bps != 14 && tiff_bps != 2048 &&
+ tiff_bps != 14 && tiff_bps != 2048 &&
tiff_compress != 32769 && tiff_compress != 32770)
|| (tiff_bps == 8 && !strstr(make,"KODAK") && !strstr(make,"Kodak") &&
!strstr(model2,"DEBUG RAW")))
@@ -5655,7 +5256,7 @@
{ {
const char *file, *ext; const char *file, *ext;
char *jname, *jfile, *jext; char *jname, *jfile, *jext;
@ -715,7 +704,7 @@
ext = strrchr (ifname, '.'); ext = strrchr (ifname, '.');
file = strrchr (ifname, '/'); file = strrchr (ifname, '/');
@@ -5677,13 +5278,14 @@ @@ -5981,13 +5610,14 @@
} else } else
while (isdigit(*--jext)) { while (isdigit(*--jext)) {
if (*jext != '9') { if (*jext != '9') {
@ -732,20 +721,19 @@
if (verbose) if (verbose)
fprintf (stderr,_("Reading metadata from %s ...\n"), jname); fprintf (stderr,_("Reading metadata from %s ...\n"), jname);
parse_tiff (12); parse_tiff (12);
@@ -6021,7 +5623,11 @@ @@ -6330,7 +5960,11 @@
order = get2(); order = get2();
hlen = get4(); hlen = get4();
if (get4() == 0x48454150) /* "HEAP" */ if (get4() == 0x48454150) /* "HEAP" */
- parse_ciff (save+hlen, len-hlen);
+/*RT*/ { +/*RT*/ {
+/*RT*/ ciff_base = save+hlen; +/*RT*/ ciff_base = save+hlen;
+/*RT*/ ciff_len = len-hlen; +/*RT*/ ciff_len = len-hlen;
+ parse_ciff (save+hlen, len-hlen); parse_ciff (save+hlen, len-hlen, 0);
+/*RT*/ } +/*RT*/ }
if (parse_tiff (save+6)) apply_tiff(); if (parse_tiff (save+6)) apply_tiff();
fseek (ifp, save+len, SEEK_SET); fseek (ifp, save+len, SEEK_SET);
} }
@@ -6273,7 +5879,8 @@ @@ -6582,7 +6216,8 @@
{ {
static const struct { static const struct {
const char *prefix; const char *prefix;
@ -753,9 +741,9 @@
+ unsigned short black, maximum; // RT: Change to UShort + unsigned short black, maximum; // RT: Change to UShort
+ short trans[12]; + short trans[12];
} table[] = { } table[] = {
{ "AGFAPHOTO DC-833m", 0, 0, /* DJC */ { "AgfaPhoto DC-833m", 0, 0, /* DJC */
{ 11438,-3762,-1115,-2409,9914,2497,-1227,2295,5300 } }, { 11438,-3762,-1115,-2409,9914,2497,-1227,2295,5300 } },
@@ -6287,42 +5894,42 @@ @@ -6596,30 +6231,30 @@
{ 9805,-2689,-1312,-5803,13064,3068,-2438,3075,8775 } }, { 9805,-2689,-1312,-5803,13064,3068,-2438,3075,8775 } },
{ "Canon EOS D60", 0, 0xfa0, { "Canon EOS D60", 0, 0xfa0,
{ 6188,-1341,-890,-7168,14489,2937,-2640,3228,8483 } }, { 6188,-1341,-890,-7168,14489,2937,-2640,3228,8483 } },
@ -795,9 +783,10 @@
- { 6719,-994,-925,-4408,12426,2211,-887,2129,6051 } }, - { 6719,-994,-925,-4408,12426,2211,-887,2129,6051 } },
+ { "Canon EOS 60D", 0, 0x2ff7, /* RT - Colin Walker */ + { "Canon EOS 60D", 0, 0x2ff7, /* RT - Colin Walker */
+ { 5678,-179,-718,-4389,12381,2243,-869,1819,6380 } }, + { 5678,-179,-718,-4389,12381,2243,-869,1819,6380 } },
{ "Canon EOS 100D", 0, 0x350f,
{ 6602,-841,-939,-4472,12458,2247,-975,2039,6148 } },
{ "Canon EOS 300D", 0, 0xfa0, { "Canon EOS 300D", 0, 0xfa0,
{ 8197,-2000,-1118,-6714,14335,2592,-2536,3178,8266 } }, @@ -6628,12 +6263,12 @@
{ "Canon EOS 350D", 0, 0xfff,
{ 6018,-617,-965,-8645,15881,2975,-1530,1719,7642 } }, { 6018,-617,-965,-8645,15881,2975,-1530,1719,7642 } },
{ "Canon EOS 400D", 0, 0xe8e, { "Canon EOS 400D", 0, 0xe8e,
{ 7054,-1501,-990,-8156,15544,2812,-1278,1414,7796 } }, { 7054,-1501,-990,-8156,15544,2812,-1278,1414,7796 } },
@ -814,7 +803,7 @@
{ "Canon EOS 600D", 0, 0x3510, { "Canon EOS 600D", 0, 0x3510,
{ 6461,-907,-882,-4300,12184,2378,-819,1944,5931 } }, { 6461,-907,-882,-4300,12184,2378,-819,1944,5931 } },
{ "Canon EOS 650D", 0, 0x354d, { "Canon EOS 650D", 0, 0x354d,
@@ -6339,8 +5946,8 @@ @@ -6652,8 +6287,8 @@
{ 6517,-602,-867,-8180,15926,2378,-1618,1771,7633 } }, { 6517,-602,-867,-8180,15926,2378,-1618,1771,7633 } },
{ "Canon EOS-1D Mark IV", 0, 0x3bb0, { "Canon EOS-1D Mark IV", 0, 0x3bb0,
{ 6014,-220,-795,-4109,12014,2361,-561,1824,5787 } }, { 6014,-220,-795,-4109,12014,2361,-561,1824,5787 } },
@ -825,7 +814,7 @@
{ "Canon EOS-1D Mark II N", 0, 0xe80, { "Canon EOS-1D Mark II N", 0, 0xe80,
{ 6240,-466,-822,-8180,15825,2500,-1801,1938,8042 } }, { 6240,-466,-822,-8180,15825,2500,-1801,1938,8042 } },
{ "Canon EOS-1D Mark II", 0, 0xe80, { "Canon EOS-1D Mark II", 0, 0xe80,
@@ -6359,12 +5966,12 @@ @@ -6672,12 +6307,12 @@
{ -5300,9846,1776,3436,684,3939,-5540,9879,6200,-1404,11175,217 } }, { -5300,9846,1776,3436,684,3939,-5540,9879,6200,-1404,11175,217 } },
{ "Canon PowerShot A5", 0, 0, { "Canon PowerShot A5", 0, 0,
{ -4801,9475,1952,2926,1611,4094,-5259,10164,5947,-1554,10883,547 } }, { -4801,9475,1952,2926,1611,4094,-5259,10164,5947,-1554,10883,547 } },
@ -842,7 +831,7 @@
{ "Canon PowerShot G15", 0, 0, { "Canon PowerShot G15", 0, 0,
{ 7474,-2301,-567,-4056,11456,2975,-222,716,4181 } }, { 7474,-2301,-567,-4056,11456,2975,-222,716,4181 } },
{ "Canon PowerShot G1 X", 0, 0, { "Canon PowerShot G1 X", 0, 0,
@@ -6428,7 +6035,7 @@ @@ -6743,7 +6378,7 @@
{ "Canon PowerShot S3 IS", 0, 0, /* DJC */ { "Canon PowerShot S3 IS", 0, 0, /* DJC */
{ 14062,-5199,-1446,-4712,12470,2243,-1286,2028,4836 } }, { 14062,-5199,-1446,-4712,12470,2243,-1286,2028,4836 } },
{ "Canon PowerShot SX110 IS", 0, 0, /* DJC */ { "Canon PowerShot SX110 IS", 0, 0, /* DJC */
@ -850,182 +839,186 @@
+ { 14134,-5576,-1527,-1991,10719,1273,-1158,1929,3581 } }, + { 14134,-5576,-1527,-1991,10719,1273,-1158,1929,3581 } },
{ "Canon PowerShot SX220", 0, 0, /* DJC */ { "Canon PowerShot SX220", 0, 0, /* DJC */
{ 13898,-5076,-1447,-1405,10109,1297,-244,1860,3687 } }, { 13898,-5076,-1447,-1405,10109,1297,-244,1860,3687 } },
{ "CASIO EX-S20", 0, 0, /* DJC */ { "Casio EX-S20", 0, 0, /* DJC */
@@ -6505,8 +6112,8 @@ @@ -6826,8 +6461,8 @@
{ 13690,-5358,-1474,-3369,11600,1998,-132,1554,4395 } }, { 12085,-4727,-953,-3257,11489,2002,-511,2046,4592 } },
{ "FUJIFILM HS3", 0, 0, { "Fujifilm X100S", 0, 0,
{ 13690,-5358,-1474,-3369,11600,1998,-132,1554,4395 } }, { 10592,-4262,-1008,-3514,11355,2465,-870,2025,6386 } },
- { "FUJIFILM X100", 0, 0, - { "Fujifilm X100", 0, 0,
- { 12161,-4457,-1069,-5034,12874,2400,-795,1724,6904 } }, - { 12161,-4457,-1069,-5034,12874,2400,-795,1724,6904 } },
+ { "FUJIFILM X100", 0, 0, /* RT - Colin Walker */ + { "Fujifilm X100", 0, 0, /* RT - Colin Walker */
+ { 10841,-3288,-807,-4652,12552,2344,-642,1355,7206 } }, + { 10841,-3288,-807,-4652,12552,2344,-642,1355,7206 } },
{ "FUJIFILM X10", 0, 0, { "Fujifilm X10", 0, 0,
{ 13509,-6199,-1254,-4430,12733,1865,-331,1441,5022 } }, { 13509,-6199,-1254,-4430,12733,1865,-331,1441,5022 } },
{ "FUJIFILM X-Pro1", 0, 0, { "Fujifilm X20", 0, 0,
@@ -6615,24 +6222,24 @@ @@ -6938,24 +6573,24 @@
{ 7702,-2245,-975,-9114,17242,1875,-2679,3055,8521 } }, { 7702,-2245,-975,-9114,17242,1875,-2679,3055,8521 } },
{ "NIKON D1", 0, 0, /* multiplied by 2.218750, 1.0, 1.148438 */ { "Nikon D1", 0, 0, /* multiplied by 2.218750, 1.0, 1.148438 */
{ 16772,-4726,-2141,-7611,15713,1972,-2846,3494,9521 } }, { 16772,-4726,-2141,-7611,15713,1972,-2846,3494,9521 } },
- { "NIKON D200", 0, 0xfbc, - { "Nikon D200", 0, 0xfbc,
- { 8367,-2248,-763,-8758,16447,2422,-1527,1550,8053 } }, - { 8367,-2248,-763,-8758,16447,2422,-1527,1550,8053 } },
+ { "NIKON D200", 0, 0xfbc, /* RT */ + { "Nikon D200", 0, 0xfbc, /* RT */
+ { 8498,-2633,-295,-5423,12869,2860,-777,1077,8124 } }, + { 8498,-2633,-295,-5423,12869,2860,-777,1077,8124 } },
{ "NIKON D2H", 0, 0, { "Nikon D2H", 0, 0,
{ 5710,-901,-615,-8594,16617,2024,-2975,4120,6830 } }, { 5710,-901,-615,-8594,16617,2024,-2975,4120,6830 } },
{ "NIKON D2X", 0, 0, { "Nikon D2X", 0, 0,
{ 10231,-2769,-1255,-8301,15900,2552,-797,680,7148 } }, { 10231,-2769,-1255,-8301,15900,2552,-797,680,7148 } },
- { "NIKON D3000", 0, 0, - { "Nikon D3000", 0, 0,
- { 8736,-2458,-935,-9075,16894,2251,-1354,1242,8263 } }, - { 8736,-2458,-935,-9075,16894,2251,-1354,1242,8263 } },
- { "NIKON D3100", 0, 0, - { "Nikon D3100", 0, 0,
- { 7911,-2167,-813,-5327,13150,2408,-1288,2483,7968 } }, - { 7911,-2167,-813,-5327,13150,2408,-1288,2483,7968 } },
+ { "NIKON D3000", 0, 0, /* RT */ + { "Nikon D3000", 0, 0, /* RT */
+ { 9211,-2521,-104,-6487,14280,2394,-754,1122,8033 } }, + { 9211,-2521,-104,-6487,14280,2394,-754,1122,8033 } },
+ { "NIKON D3100", 0, 0, /* RT */ + { "Nikon D3100", 0, 0, /* RT */
+ { 7729,-2212,-481,-5709,13148,2858,-1295,1908,8936 } }, + { 7729,-2212,-481,-5709,13148,2858,-1295,1908,8936 } },
{ "NIKON D3200", 0, 0xfb9, { "Nikon D3200", 0, 0xfb9,
{ 7013,-1408,-635,-5268,12902,2640,-1470,2801,7379 } }, { 7013,-1408,-635,-5268,12902,2640,-1470,2801,7379 } },
{ "NIKON D300", 0, 0, { "Nikon D300", 0, 0,
{ 9030,-1992,-715,-8465,16302,2255,-2689,3217,8069 } }, { 9030,-1992,-715,-8465,16302,2255,-2689,3217,8069 } },
{ "NIKON D3X", 0, 0, { "Nikon D3X", 0, 0,
{ 7171,-1986,-648,-8085,15555,2718,-2170,2512,7457 } }, { 7171,-1986,-648,-8085,15555,2718,-2170,2512,7457 } },
- { "NIKON D3S", 0, 0, - { "Nikon D3S", 0, 0,
- { 8828,-2406,-694,-4874,12603,2541,-660,1509,7587 } }, - { 8828,-2406,-694,-4874,12603,2541,-660,1509,7587 } },
+ { "NIKON D3S", 0, 0, /* RT */ + { "Nikon D3S", 0, 0, /* RT */
+ { 8792,-2663,-344,-5221,12764,2752,-1491,2165,8121 } }, + { 8792,-2663,-344,-5221,12764,2752,-1491,2165,8121 } },
{ "NIKON D3", 0, 0, { "Nikon D3", 0, 0,
{ 8139,-2171,-663,-8747,16541,2295,-1925,2008,8093 } }, { 8139,-2171,-663,-8747,16541,2295,-1925,2008,8093 } },
{ "NIKON D40X", 0, 0, { "Nikon D40X", 0, 0,
@@ -6645,16 +6252,20 @@ @@ -6968,7 +6603,7 @@
{ 7309,-1403,-519,-8474,16008,2622,-2433,2826,8064 } }, { 7309,-1403,-519,-8474,16008,2622,-2433,2826,8064 } },
{ "NIKON D5100", 0, 0x3de6, { "Nikon D5100", 0, 0x3de6,
{ 8198,-2239,-724,-4871,12389,2798,-1043,2050,7181 } }, { 8198,-2239,-724,-4871,12389,2798,-1043,2050,7181 } },
+ { "NIKON D5200", 0, 0, // color matrix copied from D5200 DNG D65 matrix - { "Nikon D5200", 0, 0,
+ { 8322, -3112,-1047,-6367,14342,2179,-988,1638,6394 } }, + { "Nikon D5200", 0, 0, // color matrix copied from D5200 DNG D65 matrix
{ "NIKON D50", 0, 0, { 8322,-3112,-1047,-6367,14342,2179,-988,1638,6394 } },
{ "Nikon D50", 0, 0,
{ 7732,-2422,-789,-8238,15884,2498,-859,783,7330 } }, { 7732,-2422,-789,-8238,15884,2498,-859,783,7330 } },
{ "NIKON D600", 0, 0x3e07, @@ -6976,12 +6611,12 @@
{ 8178,-2245,-609,-4857,12394,2776,-1207,2086,7298 } }, { 8178,-2245,-609,-4857,12394,2776,-1207,2086,7298 } },
{ "NIKON D60", 0, 0, { "Nikon D60", 0, 0,
{ 8736,-2458,-935,-9075,16894,2251,-1354,1242,8263 } }, { 8736,-2458,-935,-9075,16894,2251,-1354,1242,8263 } },
- { "NIKON D7000", 0, 0, - { "Nikon D7000", 0, 0,
- { 8198,-2239,-724,-4871,12389,2798,-1043,2050,7181 } }, - { 8198,-2239,-724,-4871,12389,2798,-1043,2050,7181 } },
- { "NIKON D700", 0, 0, - { "Nikon D7100", 0, 0,
- { 8139,-2171,-663,-8747,16541,2295,-1925,2008,8093 } }, + { "Nikon D7000", 0, 0, /* RT - Tanveer(tsk1979) */
+ { "NIKON D7000", 0, 0, /* RT - Tanveer(tsk1979) */
+ { 7530,-1942,-255,-4318,11390,3362,-926,1694,7649 } }, + { 7530,-1942,-255,-4318,11390,3362,-926,1694,7649 } },
+ { "NIKON D7100", 0, 0x3e00, // color matrix and WP copied from D7100 DNG D65 matrix + { "Nikon D7100", 0, 0, // color matrix and WP copied from D7100 DNG D65 matrix
+ { 8322,-3112,-1047,-6367,14342,2179,-988,1638,6394 } }, { 8322,-3112,-1047,-6367,14342,2179,-988,1638,6394 } },
+ { "NIKON D700", 0, 0, /* RT */ - { "Nikon D700", 0, 0,
- { 8139,-2171,-663,-8747,16541,2295,-1925,2008,8093 } },
+ { "Nikon D700", 0, 0, /* RT */
+ { 8364,-2503,-352,-6307,14026,2492,-1134,1512,8156 } }, + { 8364,-2503,-352,-6307,14026,2492,-1134,1512,8156 } },
{ "NIKON D70", 0, 0, { "Nikon D70", 0, 0,
{ 7732,-2422,-789,-8238,15884,2498,-859,783,7330 } }, { 7732,-2422,-789,-8238,15884,2498,-859,783,7330 } },
{ "NIKON D800", 0, 0, { "Nikon D800", 0, 0,
@@ -6689,6 +6300,8 @@ @@ -7020,8 +6655,8 @@
{ 8489,-2583,-1036,-8051,15583,2643,-1307,1407,7354 } }, { 8489,-2583,-1036,-8051,15583,2643,-1307,1407,7354 } },
{ "NIKON E8800", 0, 0, { "Nikon E8800", 0, 0,
{ 7971,-2314,-913,-8451,15762,2894,-1442,1520,7610 } }, { 7971,-2314,-913,-8451,15762,2894,-1442,1520,7610 } },
+ { "NIKON COOLPIX A", 0, 0x3e00, // color matrix and WP copied from "COOLPIX A" DNG D65 matrix - { "Nikon COOLPIX A", 0, 0,
- { 8198,-2239,-724,-4871,12389,2798,-1043,2050,7181 } },
+ { "Nikon COOLPIX A", 0, 0x3e00, // color matrix and WP copied from "COOLPIX A" DNG D65 matrix
+ { 8198,-2239,-724,-4871,12389,2798,-1043,205,7181 } }, + { 8198,-2239,-724,-4871,12389,2798,-1043,205,7181 } },
{ "NIKON COOLPIX P6000", 0, 0, { "Nikon COOLPIX P330", 0, 0,
{ 9698,-3367,-914,-4706,12584,2368,-837,968,5801 } }, { 10321,-3920,-931,-2750,11146,1824,-442,1545,5539 } },
{ "NIKON COOLPIX P7000", 0, 0, { "Nikon COOLPIX P6000", 0, 0,
@@ -6721,8 +6334,8 @@ @@ -7058,8 +6693,8 @@
{ 7828,-1761,-348,-5788,14071,1830,-2853,4518,6557 } }, { 7828,-1761,-348,-5788,14071,1830,-2853,4518,6557 } },
{ "OLYMPUS E-330", 0, 0, { "Olympus E-330", 0, 0,
{ 8961,-2473,-1084,-7979,15990,2067,-2319,3035,8249 } }, { 8961,-2473,-1084,-7979,15990,2067,-2319,3035,8249 } },
- { "OLYMPUS E-30", 0, 0xfbc, - { "Olympus E-30", 0, 0xfbc,
- { 8144,-1861,-1111,-7763,15894,1929,-1865,2542,7607 } }, - { 8144,-1861,-1111,-7763,15894,1929,-1865,2542,7607 } },
+ { "OLYMPUS E-30", 0, 0xfbc, /* RT - Colin Walker */ + { "Olympus E-30", 0, 0xfbc, /* RT - Colin Walker */
+ { 8510,-2355,-693,-4819,12520,2578,-1029,2067,7752 } }, + { 8510,-2355,-693,-4819,12520,2578,-1029,2067,7752 } },
{ "OLYMPUS E-3", 0, 0xf99, { "Olympus E-3", 0, 0xf99,
{ 9487,-2875,-1115,-7533,15606,2010,-1618,2100,7389 } }, { 9487,-2875,-1115,-7533,15606,2010,-1618,2100,7389 } },
{ "OLYMPUS E-400", 0, 0, { "Olympus E-400", 0, 0,
@@ -6739,26 +6352,26 @@ @@ -7076,26 +6711,26 @@
{ 8785,-2529,-1033,-7639,15624,2112,-1783,2300,7817 } }, { 8785,-2529,-1033,-7639,15624,2112,-1783,2300,7817 } },
{ "OLYMPUS E-520", 0, 0xfd2, { "Olympus E-520", 0, 0xfd2,
{ 8344,-2322,-1020,-7596,15635,2048,-1748,2269,7287 } }, { 8344,-2322,-1020,-7596,15635,2048,-1748,2269,7287 } },
- { "OLYMPUS E-5", 0, 0xeec, - { "Olympus E-5", 0, 0xeec,
- { 11200,-3783,-1325,-4576,12593,2206,-695,1742,7504 } }, - { 11200,-3783,-1325,-4576,12593,2206,-695,1742,7504 } },
+ { "OLYMPUS E-5", 0, 0, /* RT - Colin Walker */ + { "Olympus E-5", 0, 0xeec, /* RT - Colin Walker */
+ { 9732,-2629,-999,-4899,12931,2173,-1243,2353,7457 } }, + { 9732,-2629,-999,-4899,12931,2173,-1243,2353,7457 } },
{ "OLYMPUS E-600", 0, 0xfaf, { "Olympus E-600", 0, 0xfaf,
{ 8453,-2198,-1092,-7609,15681,2008,-1725,2337,7824 } }, { 8453,-2198,-1092,-7609,15681,2008,-1725,2337,7824 } },
{ "OLYMPUS E-620", 0, 0xfaf, { "Olympus E-620", 0, 0xfaf,
{ 8453,-2198,-1092,-7609,15681,2008,-1725,2337,7824 } }, { 8453,-2198,-1092,-7609,15681,2008,-1725,2337,7824 } },
- { "OLYMPUS E-P1", 0, 0xffd, - { "Olympus E-P1", 0, 0xffd,
- { 8343,-2050,-1021,-7715,15705,2103,-1831,2380,8235 } }, - { 8343,-2050,-1021,-7715,15705,2103,-1831,2380,8235 } },
- { "OLYMPUS E-P2", 0, 0xffd, - { "Olympus E-P2", 0, 0xffd,
- { 8343,-2050,-1021,-7715,15705,2103,-1831,2380,8235 } }, - { 8343,-2050,-1021,-7715,15705,2103,-1831,2380,8235 } },
- { "OLYMPUS E-P3", 0, 0, - { "Olympus E-P3", 0, 0,
- { 7575,-2159,-571,-3722,11341,2725,-1434,2819,6271 } }, - { 7575,-2159,-571,-3722,11341,2725,-1434,2819,6271 } },
- { "OLYMPUS E-PL1s", 0, 0, - { "Olympus E-PL1s", 0, 0,
- { 11409,-3872,-1393,-4572,12757,2003,-709,1810,7415 } }, - { 11409,-3872,-1393,-4572,12757,2003,-709,1810,7415 } },
- { "OLYMPUS E-PL1", 0, 0, - { "Olympus E-PL1", 0, 0,
- { 11408,-4289,-1215,-4286,12385,2118,-387,1467,7787 } }, - { 11408,-4289,-1215,-4286,12385,2118,-387,1467,7787 } },
- { "OLYMPUS E-PL2", 0, 0, - { "Olympus E-PL2", 0, 0xcf3,
- { 15030,-5552,-1806,-3987,12387,1767,-592,1670,7023 } }, - { 15030,-5552,-1806,-3987,12387,1767,-592,1670,7023 } },
- { "OLYMPUS E-PL3", 0, 0, - { "Olympus E-PL3", 0, 0,
- { 7575,-2159,-571,-3722,11341,2725,-1434,2819,6271 } }, - { 7575,-2159,-571,-3722,11341,2725,-1434,2819,6271 } },
+ { "OLYMPUS E-P1", 0, 0xffd, /* RT - Colin Walker */ + { "Olympus E-P1", 0, 0xffd, /* RT - Colin Walker */
+ { 8834,-2344,-804,-4691,12503,2448,-978,1919,7603 } }, + { 8834,-2344,-804,-4691,12503,2448,-978,1919,7603 } },
+ { "OLYMPUS E-P2", 0, 0xffd, /* RT - Colin Walker */ + { "Olympus E-P2", 0, 0xffd, /* RT - Colin Walker */
+ { 7758,-1619,-800,-5002,12886,2349,-985,1964,8305 } }, + { 7758,-1619,-800,-5002,12886,2349,-985,1964,8305 } },
+ { "OLYMPUS E-P3", 0, 0, /* RT - Colin Walker */ + { "Olympus E-P3", 0, 0, /* RT - Colin Walker */
+ { 7041,-1794,-336,-3790,11192,2984,-1364,2625,6217 } }, + { 7041,-1794,-336,-3790,11192,2984,-1364,2625,6217 } },
+ { "OLYMPUS E-PL1s", 0, 0, /* RT - Colin Walker */ + { "Olympus E-PL1s", 0, 0, /* RT - Colin Walker */
+ { 9010,-2271,-838,-4792,12753,2263,-1059,2058,7589 } }, + { 9010,-2271,-838,-4792,12753,2263,-1059,2058,7589 } },
+ { "OLYMPUS E-PL1", 0, 0, /* RT - Colin Walker */ + { "Olympus E-PL1", 0, 0, /* RT - Colin Walker */
+ { 9010,-2271,-838,-4792,12753,2263,-1059,2058,7589 } }, + { 9010,-2271,-838,-4792,12753,2263,-1059,2058,7589 } },
+ { "OLYMPUS E-PL2", 0, 0, /* RT - Colin Walker */ + { "Olympus E-PL2", 0, 0, /* RT - Colin Walker */
+ { 11975,-3351,-1184,-4500,12639,2061,-1230,2353,7009 } }, + { 11975,-3351,-1184,-4500,12639,2061,-1230,2353,7009 } },
+ { "OLYMPUS E-PL3", 0, 0, /* RT - Colin Walker */ + { "Olympus E-PL3", 0, 0, /* RT - Colin Walker */
+ { 7041,-1794,-336,-3790,11192,2984,-1364,2625,6217 } }, + { 7041,-1794,-336,-3790,11192,2984,-1364,2625,6217 } },
{ "OLYMPUS E-PL5", 0, 0xfcb, { "Olympus E-PL5", 0, 0xfcb,
{ 8380,-2630,-639,-2887,10725,2496,-627,1427,5438 } }, { 8380,-2630,-639,-2887,10725,2496,-627,1427,5438 } },
{ "OLYMPUS E-PM1", 0, 0, { "Olympus E-PM1", 0, 0,
@@ -6781,8 +6394,8 @@ @@ -7120,8 +6755,8 @@
{ 10915,-3677,-982,-5587,12986,2911,-1168,1968,6223 } },
{ "OLYMPUS SP570UZ", 0, 0,
{ 11522,-4044,-1146,-4736,12172,2904,-988,1829,6039 } }, { 11522,-4044,-1146,-4736,12172,2904,-988,1829,6039 } },
- { "OLYMPUS XZ-1", 0, 0, { "Olympus XZ-10", 0, 0,
- { 10901,-4095,-1074,-1141,9208,2293,-62,1417,5158 } },
+ { "OLYMPUS XZ-1", 0, 0, /* RT - Colin Walker */
+ { 8665,-2247,-762,-2424,10372,2382,-1011,2286,5189 } },
{ "OLYMPUS XZ-2", 0, 0,
{ 9777,-3483,-925,-2886,11297,1800,-602,1663,5134 } }, { 9777,-3483,-925,-2886,11297,1800,-602,1663,5134 } },
{ "PENTAX *ist DL2", 0, 0, - { "Olympus XZ-1", 0, 0,
@@ -6801,8 +6414,8 @@ - { 10901,-4095,-1074,-1141,9208,2293,-62,1417,5158 } },
+ { "Olympus XZ-1", 0, 0, /* RT - Colin Walker */
+ { 8665,-2247,-762,-2424,10372,2382,-1011,2286,5189 } },
{ "Olympus XZ-2", 0, 0,
{ 9777,-3483,-925,-2886,11297,1800,-602,1663,5134 } },
{ "OmniVision ov5647", 0, 0, /* DJC */
@@ -7142,8 +6777,8 @@
{ 11095,-3157,-1324,-8377,15834,2720,-1108,947,11688 } }, { 11095,-3157,-1324,-8377,15834,2720,-1108,947,11688 } },
{ "PENTAX K20D", 0, 0, { "Pentax K20D", 0, 0,
{ 9427,-2714,-868,-7493,16092,1373,-2199,3264,7180 } }, { 9427,-2714,-868,-7493,16092,1373,-2199,3264,7180 } },
- { "PENTAX K200D", 0, 0, - { "Pentax K200D", 0, 0,
- { 9186,-2678,-907,-8693,16517,2260,-1129,1094,8524 } }, - { 9186,-2678,-907,-8693,16517,2260,-1129,1094,8524 } },
+ { "PENTAX K200D", 0, 0, /* RT */ + { "Pentax K200D", 0, 0, /* RT */
+ { 10962,-4428,-542,-5486,13023,2748,-569,842,8390 } }, + { 10962,-4428,-542,-5486,13023,2748,-569,842,8390 } },
{ "PENTAX K2000", 0, 0, { "Pentax K2000", 0, 0,
{ 11057,-3604,-1155,-5152,13046,2329,-282,375,8104 } }, { 11057,-3604,-1155,-5152,13046,2329,-282,375,8104 } },
{ "PENTAX K-m", 0, 0, { "Pentax K-m", 0, 0,
@@ -6861,6 +6474,8 @@ @@ -7202,6 +6837,8 @@
{ 10909,-4295,-948,-1333,9306,2399,22,1738,4582 } }, { 10909,-4295,-948,-1333,9306,2399,22,1738,4582 } },
{ "LEICA D-LUX 5", 143, 0, { "Leica D-LUX 5", 143, 0,
{ 10909,-4295,-948,-1333,9306,2399,22,1738,4582 } }, { 10909,-4295,-948,-1333,9306,2399,22,1738,4582 } },
+ { "Leica Camera AG M9 Digital Camera", 0, 0, /* RT */ + { "Leica Camera AG M9 Digital Camera", 0, 0, /* RT */
+ { 7181,-1706,-55,-3557,11409,2450,-621,2072,7533 } }, + { 7181,-1706,-55,-3557,11409,2450,-621,2072,7533 } },
{ "Panasonic DMC-LX7", 143, 0, { "Panasonic DMC-LX7", 143, 0,
{ 10148,-3743,-991,-2837,11366,1659,-701,1893,4899 } }, { 10148,-3743,-991,-2837,11366,1659,-701,1893,4899 } },
{ "LEICA D-LUX 6", 143, 0, { "Leica D-LUX 6", 143, 0,
@@ -6869,8 +6484,8 @@ @@ -7210,8 +6847,8 @@
{ 16197,-6146,-1761,-2393,10765,1869,366,2238,5248 } }, { 16197,-6146,-1761,-2393,10765,1869,366,2238,5248 } },
{ "LEICA V-LUX 2", 143, 0xfff, { "Leica V-LUX 2", 143, 0xfff,
{ 16197,-6146,-1761,-2393,10765,1869,366,2238,5248 } }, { 16197,-6146,-1761,-2393,10765,1869,366,2238,5248 } },
- { "Panasonic DMC-FZ150", 143, 0xfff, - { "Panasonic DMC-FZ150", 143, 0xfff,
- { 11904,-4541,-1189,-2355,10899,1662,-296,1586,4289 } }, - { 11904,-4541,-1189,-2355,10899,1662,-296,1586,4289 } },
+ { "Panasonic DMC-FZ150", 143, 0xfff, /* RT */ + { "Panasonic DMC-FZ150", 143, 0xfff, /* RT */
+ { 10435,-3208,-72,-2293,10506,2067,-486,1725,4682 } }, + { 10435,-3208,-72,-2293,10506,2067,-486,1725,4682 } },
{ "LEICA V-LUX 3", 143, 0xfff, { "Leica V-LUX 3", 143, 0xfff,
{ 11904,-4541,-1189,-2355,10899,1662,-296,1586,4289 } }, { 11904,-4541,-1189,-2355,10899,1662,-296,1586,4289 } },
{ "Panasonic DMC-FZ200", 143, 0xfff, { "Panasonic DMC-FZ200", 143, 0xfff,
@@ -6879,28 +6494,28 @@ @@ -7220,32 +6857,30 @@
{ 8112,-2563,-740,-3730,11784,2197,-941,2075,4933 } }, { 8112,-2563,-740,-3730,11784,2197,-941,2075,4933 } },
{ "Panasonic DMC-FX150", 15, 0xfff, { "Panasonic DMC-FX150", 15, 0xfff,
{ 9082,-2907,-925,-6119,13377,3058,-1797,2641,5609 } }, { 9082,-2907,-925,-6119,13377,3058,-1797,2641,5609 } },
@ -1039,6 +1032,8 @@
- { 6763,-1919,-863,-3868,11515,2684,-1216,2387,5879 } }, - { 6763,-1919,-863,-3868,11515,2684,-1216,2387,5879 } },
- { "Panasonic DMC-G5", 143, 0xfff, - { "Panasonic DMC-G5", 143, 0xfff,
- { 7798,-2562,-740,-3879,11584,2613,-1055,2248,5434 } }, - { 7798,-2562,-740,-3879,11584,2613,-1055,2248,5434 } },
- { "Panasonic DMC-G6", 143, 0xfff, /* DJC */
- { 6395,-2583,-40,-3677,9109,4569,-1502,2806,6431 } },
- { "Panasonic DMC-GF1", 15, 0xf92, - { "Panasonic DMC-GF1", 15, 0xf92,
- { 7888,-1902,-1011,-8106,16085,2099,-2353,2866,7330 } }, - { 7888,-1902,-1011,-8106,16085,2099,-2353,2866,7330 } },
- { "Panasonic DMC-GF2", 143, 0xfff, - { "Panasonic DMC-GF2", 143, 0xfff,
@ -1063,6 +1058,8 @@
+ { 8074,-1846,-861,-5026,12999,2239,-1320,2375,7422 } }, + { 8074,-1846,-861,-5026,12999,2239,-1320,2375,7422 } },
{ "Panasonic DMC-GF5", 143, 0xfff, { "Panasonic DMC-GF5", 143, 0xfff,
{ 8228,-2945,-660,-3938,11792,2430,-1094,2278,5793 } }, { 8228,-2945,-660,-3938,11792,2430,-1094,2278,5793 } },
{ "Panasonic DMC-GF6", 143, 0,
{ 8130,-2801,-946,-3520,11289,2552,-1314,2511,5791 } },
- { "Panasonic DMC-GH1", 15, 0xf92, - { "Panasonic DMC-GH1", 15, 0xf92,
- { 6299,-1466,-532,-6535,13852,2969,-2331,3112,5984 } }, - { 6299,-1466,-532,-6535,13852,2969,-2331,3112,5984 } },
- { "Panasonic DMC-GH2", 15, 0xf95, - { "Panasonic DMC-GH2", 15, 0xf95,
@ -1074,62 +1071,66 @@
{ "Panasonic DMC-GH3", 144, 0, { "Panasonic DMC-GH3", 144, 0,
{ 6559,-1752,-491,-3672,11407,2586,-962,1875,5130 } }, { 6559,-1752,-491,-3672,11407,2586,-962,1875,5130 } },
{ "Panasonic DMC-GX1", 143, 0, { "Panasonic DMC-GX1", 143, 0,
@@ -6971,24 +6586,22 @@ @@ -7322,30 +6957,28 @@
{ 5932,-1492,-411,-4813,12285,2856,-741,1524,6739 } }, { 5932,-1492,-411,-4813,12285,2856,-741,1524,6739 } },
{ "SONY DSLR-A5", 128, 0xfeb, { "Sony DSLR-A5", 128, 0xfeb,
{ 4950,-580,-103,-5228,12542,3029,-709,1435,7371 } }, { 4950,-580,-103,-5228,12542,3029,-709,1435,7371 } },
- { "SONY DSLR-A700", 126, 0, - { "Sony DSLR-A700", 126, 0,
- { 5775,-805,-359,-8574,16295,2391,-1943,2341,7249 } }, - { 5775,-805,-359,-8574,16295,2391,-1943,2341,7249 } },
+ { "SONY DSLR-A700", 126, 0, /* RT */ + { "Sony DSLR-A700", 126, 0, /* RT */
+ { 6509,-1333,-137,-6171,13621,2824,-1490,2226,6952 } }, + { 6509,-1333,-137,-6171,13621,2824,-1490,2226,6952 } },
{ "SONY DSLR-A850", 128, 0, { "Sony DSLR-A850", 128, 0,
{ 5413,-1162,-365,-5665,13098,2866,-608,1179,8440 } }, { 5413,-1162,-365,-5665,13098,2866,-608,1179,8440 } },
- { "SONY DSLR-A900", 128, 0, - { "Sony DSLR-A900", 128, 0,
- { 5209,-1072,-397,-8845,16120,2919,-1618,1803,8654 } }, - { 5209,-1072,-397,-8845,16120,2919,-1618,1803,8654 } },
- { "SONY NEX-5N", 128, 0, - { "Sony NEX-5N", 128, 0,
- { 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 } }, - { 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 } },
+ { "SONY DSLR-A900", 128, 0, /* RT */ - { "Sony NEX-5R", 128, 0,
- { 6129,-1545,-418,-4930,12490,2743,-977,1693,6615 } },
+ { "Sony DSLR-A900", 128, 0, /* RT */
+ { 5715,-1433,-410,-5603,12937,2989,-644,1247,8372 } }, + { 5715,-1433,-410,-5603,12937,2989,-644,1247,8372 } },
+ { "SONY NEX-5N", 128, 0, /* RT - Colin Walker */ + { "SONY NEX-3", 128, 0, /* RT - Colin Walker */
+ { 5130,-1055,-269,-4473,11797,3050,-701,1310,7121 } },
{ "SONY NEX-5R", 128, 0,
{ 6129,-1545,-418,-4930,12490,2743,-977,1693,6615 } },
- { "SONY NEX-3", 138, 0, /* DJC */
- { 6907,-1256,-645,-4940,12621,2320,-1710,2581,6230 } },
- { "SONY NEX-5", 116, 0, /* DJC */
- { 6807,-1350,-342,-4216,11649,2567,-1089,2001,6420 } },
- { "SONY NEX-3", 128, 0, /* Adobe */
- { 6549,-1550,-436,-4880,12435,2753,-854,1868,6976 } },
- { "SONY NEX-5", 128, 0, /* Adobe */
- { 6549,-1550,-436,-4880,12435,2753,-854,1868,6976 } },
+ { "SONY NEX-C3", 128, 0, /* RT - Colin Walker */
+ { 5130,-1055,-269,-4473,11797,3050,-701,1310,7121 } },
+ { "SONY NEX-3", 128, 0, /* RT - Colin Walker */
+ { 5145,-741,-123,-4915,12310,2945,-794,1489,6906 } }, + { 5145,-741,-123,-4915,12310,2945,-794,1489,6906 } },
{ "Sony NEX-3N", 128, 0,
{ 6129,-1545,-418,-4930,12490,2743,-977,1693,6615 } },
- { "Sony NEX-3", 138, 0, /* DJC */
- { 6907,-1256,-645,-4940,12621,2320,-1710,2581,6230 } },
- { "Sony NEX-5", 116, 0, /* DJC */
- { 6807,-1350,-342,-4216,11649,2567,-1089,2001,6420 } },
- { "Sony NEX-3", 128, 0, /* Adobe */
- { 6549,-1550,-436,-4880,12435,2753,-854,1868,6976 } },
- { "Sony NEX-5", 128, 0, /* Adobe */
- { 6549,-1550,-436,-4880,12435,2753,-854,1868,6976 } },
+ { "SONY NEX-5", 128, 0, /* RT - Colin Walker */ + { "SONY NEX-5", 128, 0, /* RT - Colin Walker */
+ { 5154,-716,-115,-5065,12506,2882,-988,1715,6800 } }, + { 5154,-716,-115,-5065,12506,2882,-988,1715,6800 } },
{ "SONY NEX-6", 128, 0, + { "Sony NEX-5N", 128, 0, /* RT - Colin Walker */
+ { 5130,-1055,-269,-4473,11797,3050,-701,1310,7121 } },
+ { "Sony NEX-5R", 128, 0,
+ { 6129,-1545,-418,-4930,12490,2743,-977,1693,6615 } },
{ "Sony NEX-6", 128, 0,
{ 6129,-1545,-418,-4930,12490,2743,-977,1693,6615 } }, { 6129,-1545,-418,-4930,12490,2743,-977,1693,6615 } },
{ "SONY NEX-7", 128, 0, { "Sony NEX-7", 128, 0,
@@ -7004,13 +6617,13 @@
{ "SONY SLT-A55", 128, 0,
{ 5932,-1492,-411,-4813,12285,2856,-741,1524,6739 } },
{ "SONY SLT-A57", 128, 0,
- { 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 } },
+ { 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 } },
{ "SONY SLT-A65", 128, 0,
{ 5491,-1192,-363,-4951,12342,2948,-911,1722,7192 } }, { 5491,-1192,-363,-4951,12342,2948,-911,1722,7192 } },
- { "SONY SLT-A77", 128, 0, + { "SONY NEX-C3", 128, 0, /* RT - Colin Walker */
+ { 5130,-1055,-269,-4473,11797,3050,-701,1310,7121 } },
{ "Sony NEX", 128, 0, /* NEX-C3, NEX-F3 */
{ 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 } },
{ "Sony SLT-A33", 128, 0,
@@ -7362,10 +6995,10 @@
{ 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 } },
{ "Sony SLT-A65", 128, 0,
{ 5491,-1192,-363,-4951,12342,2948,-911,1722,7192 } },
- { "Sony SLT-A77", 128, 0,
- { 5491,-1192,-363,-4951,12342,2948,-911,1722,7192 } }, - { 5491,-1192,-363,-4951,12342,2948,-911,1722,7192 } },
+ { "SONY SLT-A77", 128, 0, /* RT - Colin Walker */ + { "Sony SLT-A77", 128, 0, /* RT - Colin Walker */
+ { 5126,-830,-261,-4788,12196,2934,-948,1602,7068 } }, + { 5126,-830,-261,-4788,12196,2934,-948,1602,7068 } },
{ "SONY SLT-A99", 128, 0, { "Sony SLT-A99", 128, 0,
- { 6344,-1612,-462,-4863,12477,2681,-865,1786,6899 } }, - { 6344,-1612,-462,-4863,12477,2681,-865,1786,6899 } },
+ { 6344,-1612,-462,-4863,12477,2681,-865,1786,6899 } } + { 6344,-1612,-462,-4863,12477,2681,-865,1786,6899 } }
}; };
double cam_xyz[4][3]; double cam_xyz[4][3];
char name[130]; char name[130];
@@ -7259,13 +6872,20 @@ @@ -7682,13 +7315,20 @@
fread (head, 1, 32, ifp); fread (head, 1, 32, ifp);
fseek (ifp, 0, SEEK_END); fseek (ifp, 0, SEEK_END);
flen = fsize = ftell(ifp); flen = fsize = ftell(ifp);
@ -1149,10 +1150,10 @@
data_offset = hlen; data_offset = hlen;
+/*RT*/ ciff_base = hlen; +/*RT*/ ciff_base = hlen;
+/*RT*/ ciff_len = fsize - hlen; +/*RT*/ ciff_len = fsize - hlen;
parse_ciff (hlen, flen - hlen); parse_ciff (hlen, flen-hlen, 0);
load_raw = &CLASS canon_load_raw;
} else if (parse_tiff(0)) apply_tiff(); } else if (parse_tiff(0)) apply_tiff();
} else if (!memcmp (head,"\xff\xd8\xff\xe1",4) && @@ -7734,6 +7374,7 @@
@@ -7310,6 +6930,7 @@
fseek (ifp, 100+28*(shot_select > 0), SEEK_SET); fseek (ifp, 100+28*(shot_select > 0), SEEK_SET);
parse_tiff (data_offset = get4()); parse_tiff (data_offset = get4());
parse_tiff (thumb_offset+12); parse_tiff (thumb_offset+12);
@ -1160,7 +1161,35 @@
apply_tiff(); apply_tiff();
} else if (!memcmp (head,"RIFF",4)) { } else if (!memcmp (head,"RIFF",4)) {
fseek (ifp, 0, SEEK_SET); fseek (ifp, 0, SEEK_SET);
@@ -7407,7 +7028,7 @@ @@ -7839,15 +7480,18 @@
if (make[0] == 0) parse_smal (0, flen);
if (make[0] == 0) {
parse_jpeg(0);
- if (!strncmp(model,"ov",2) && !fseek (ifp, -6404096, SEEK_END) &&
- fread (head, 1, 32, ifp) && !strcmp(head,"BRCMn")) {
- strcpy (make, "OmniVision");
- data_offset = ftell(ifp) + 0x8000-32;
- width = raw_width;
- raw_width = 2611;
- load_raw = &CLASS nokia_load_raw;
- filters = 0x16161616;
- } else is_raw = 0;
+ //RT fix for the use of fseek below
+ if (!strncmp(model,"ov",2)) {
+ fseek (ifp, -6404096, SEEK_END);
+ if (fread (head, 1, 32, ifp) && !strcmp(head,"BRCMn")) {
+ strcpy (make, "OmniVision");
+ data_offset = ftell(ifp) + 0x8000-32;
+ width = raw_width;
+ raw_width = 2611;
+ load_raw = &CLASS nokia_load_raw;
+ filters = 0x16161616;
+ } else is_raw = 0;
+ }
}
for (i=0; i < sizeof corp / sizeof *corp; i++)
@@ -7878,7 +7522,7 @@
if (height == 3136 && width == 4864) /* Pentax K20D and Samsung GX20 */ if (height == 3136 && width == 4864) /* Pentax K20D and Samsung GX20 */
{ height = 3124; width = 4688; filters = 0x16161616; } { height = 3124; width = 4688; filters = 0x16161616; }
if (width == 4352 && (!strcmp(model,"K-r") || !strcmp(model,"K-x"))) if (width == 4352 && (!strcmp(model,"K-r") || !strcmp(model,"K-x")))
@ -1169,25 +1198,20 @@
if (width >= 4960 && !strncmp(model,"K-5",3)) if (width >= 4960 && !strncmp(model,"K-5",3))
{ left_margin = 10; width = 4950; filters = 0x16161616; } { left_margin = 10; width = 4950; filters = 0x16161616; }
if (width == 4736 && !strcmp(model,"K-7")) if (width == 4736 && !strcmp(model,"K-7"))
@@ -7850,11 +7471,12 @@ @@ -8026,7 +7670,7 @@
!strcmp(model,"D90")) {
width -= 42;
} else if (!strcmp(model,"D5100") ||
- !strcmp(model,"D7000")) {
+ !strcmp(model,"D7000") ||
+ !strcmp(model,"COOLPIX A")) {
width -= 44; width -= 44;
} else if (!strcmp(model,"D3200") || } else if (!strcmp(model,"D3200") ||
!strcmp(model,"D600") || !strcmp(model,"D600") ||
- !strcmp(model,"D800")) { - !strncmp(model,"D800",4)) {
+ !strcmp(model,"D800") || !strcmp(model,"D800E") ) { + !strcmp(model,"D800") || !strcmp(model,"D800E") ) {
width -= 46; width -= 46;
} else if (!strcmp(model,"D4")) { } else if (!strcmp(model,"D4")) {
width -= 52; width -= 52;
@@ -8766,194 +8388,7 @@ @@ -8630,195 +8274,8 @@
cmsCloseProfile (hInProfile);
} }
#endif #endif
-
-void CLASS convert_to_rgb() -void CLASS convert_to_rgb()
-{ -{
- int row, col, c, i, j, k; - int row, col, c, i, j, k;
@ -1309,7 +1333,7 @@
- step = sqrt(0.5); - step = sqrt(0.5);
- wide = fuji_width / step; - wide = fuji_width / step;
- high = (height - fuji_width) / step; - high = (height - fuji_width) / step;
- img = (ushort (*)[4]) calloc (wide*high, sizeof *img); - img = (ushort (*)[4]) calloc (high, wide*sizeof *img);
- merror (img, "fuji_rotate()"); - merror (img, "fuji_rotate()");
- -
- for (row=0; row < high; row++) - for (row=0; row < high; row++)
@ -1342,7 +1366,7 @@
- if (verbose) fprintf (stderr,_("Stretching the image...\n")); - if (verbose) fprintf (stderr,_("Stretching the image...\n"));
- if (pixel_aspect < 1) { - if (pixel_aspect < 1) {
- newdim = height / pixel_aspect + 0.5; - newdim = height / pixel_aspect + 0.5;
- img = (ushort (*)[4]) calloc (width*newdim, sizeof *img); - img = (ushort (*)[4]) calloc (width, newdim*sizeof *img);
- merror (img, "stretch()"); - merror (img, "stretch()");
- for (rc=row=0; row < newdim; row++, rc+=pixel_aspect) { - for (rc=row=0; row < newdim; row++, rc+=pixel_aspect) {
- frac = rc - (c = rc); - frac = rc - (c = rc);
@ -1354,7 +1378,7 @@
- height = newdim; - height = newdim;
- } else { - } else {
- newdim = width * pixel_aspect + 0.5; - newdim = width * pixel_aspect + 0.5;
- img = (ushort (*)[4]) calloc (height*newdim, sizeof *img); - img = (ushort (*)[4]) calloc (height, newdim*sizeof *img);
- merror (img, "stretch()"); - merror (img, "stretch()");
- for (rc=col=0; col < newdim; col++, rc+=1/pixel_aspect) { - for (rc=col=0; col < newdim; col++, rc+=1/pixel_aspect) {
- frac = rc - (c = rc); - frac = rc - (c = rc);
@ -1376,11 +1400,12 @@
- if (flip & 1) col = iwidth - 1 - col; - if (flip & 1) col = iwidth - 1 - col;
- return row * iwidth + col; - return row * iwidth + col;
-} -}
+
+/* RT: removed unused functions */ +/* RT: removed unused functions */
struct tiff_tag { struct tiff_tag {
ushort tag, type; ushort tag, type;
@@ -8976,585 +8411,12 @@ @@ -8841,584 +8298,12 @@
unsigned gps[26]; unsigned gps[26];
char desc[512], make[64], model[64], soft[32], date[20], artist[64]; char desc[512], make[64], model[64], soft[32], date[20], artist[64];
}; };
@ -1671,7 +1696,7 @@
- case 'i': identify_only = 1; break; - case 'i': identify_only = 1; break;
- case 'c': write_to_stdout = 1; break; - case 'c': write_to_stdout = 1; break;
- case 'v': verbose = 1; break; - case 'v': verbose = 1; break;
- case 'h': half_size = 1; /* "-h" implies "-f" */ - case 'h': half_size = 1; break;
- case 'f': four_color_rgb = 1; break; - case 'f': four_color_rgb = 1; break;
- case 'A': FORC4 greybox[c] = atoi(argv[arg++]); - case 'A': FORC4 greybox[c] = atoi(argv[arg++]);
- case 'a': use_auto_wb = 1; break; - case 'a': use_auto_wb = 1; break;
@ -1807,9 +1832,7 @@
- if (document_mode == 3) { - if (document_mode == 3) {
- top_margin = left_margin = fuji_width = 0; - top_margin = left_margin = fuji_width = 0;
- height = raw_height; - height = raw_height;
- if (width <= raw_width * 8 / tiff_bps) - width = raw_width;
- width = raw_width * 8 / tiff_bps;
- else width = raw_width;
- } - }
- iheight = (height + shrink) >> shrink; - iheight = (height + shrink) >> shrink;
- iwidth = (width + shrink) >> shrink; - iwidth = (width + shrink) >> shrink;
@ -1855,10 +1878,10 @@
- merror (meta_data, "main()"); - merror (meta_data, "main()");
- } - }
- if (filters || colors == 1) { - if (filters || colors == 1) {
- raw_image = (ushort *) calloc ((raw_height+7)*raw_width, 2); - raw_image = (ushort *) calloc ((raw_height+7), raw_width*2);
- merror (raw_image, "main()"); - merror (raw_image, "main()");
- } else { - } else {
- image = (ushort (*)[4]) calloc (iheight*iwidth, sizeof *image); - image = (ushort (*)[4]) calloc (iheight, iwidth*sizeof *image);
- merror (image, "main()"); - merror (image, "main()");
- } - }
- if (verbose) - if (verbose)
@ -1874,14 +1897,12 @@
- if (document_mode == 3) { - if (document_mode == 3) {
- top_margin = left_margin = fuji_width = 0; - top_margin = left_margin = fuji_width = 0;
- height = raw_height; - height = raw_height;
- if (width <= raw_width * 8 / tiff_bps) - width = raw_width;
- width = raw_width * 8 / tiff_bps;
- else width = raw_width;
- } - }
- iheight = (height + shrink) >> shrink; - iheight = (height + shrink) >> shrink;
- iwidth = (width + shrink) >> shrink; - iwidth = (width + shrink) >> shrink;
- if (raw_image) { - if (raw_image) {
- image = (ushort (*)[4]) calloc (iheight*iwidth, sizeof *image); - image = (ushort (*)[4]) calloc (iheight, iwidth*sizeof *image);
- merror (image, "main()"); - merror (image, "main()");
- crop_masked_pixels(); - crop_masked_pixels();
- free (raw_image); - free (raw_image);
@ -1912,11 +1933,14 @@
- if (filters && !document_mode) { - if (filters && !document_mode) {
- if (quality == 0) - if (quality == 0)
- lin_interpolate(); - lin_interpolate();
- else if (quality == 1 || colors > 3 || filters < 1000) - else if (quality == 1 || colors > 3)
- vng_interpolate(); - vng_interpolate();
- else if (quality == 2) - else if (quality == 2 && filters > 1000)
- ppg_interpolate(); - ppg_interpolate();
- else ahd_interpolate(); - else if (filters == 9)
- xtrans_interpolate (quality*2-3);
- else
- ahd_interpolate();
- } - }
- if (mix_green) - if (mix_green)
- for (colors=3, i=0; i < height*width; i++) - for (colors=3, i=0; i < height*width; i++)