diff --git a/rtengine/camconst.json b/rtengine/camconst.json index 9bdd8e1e3..c0d833db7 100644 --- a/rtengine/camconst.json +++ b/rtengine/camconst.json @@ -2516,7 +2516,7 @@ Camera constants: { // Quality C, "make_model": "Sony ILCE-7RM4", - "raw_crop": [ 0, 0, 9568, 0 ] // full raw frame 9600x6376 - 32 rightmost columns are garbage + "raw_crop": [ 0, 0, -32, 0 ] // full raw frame 9600x6376 - 32 rightmost columns are garbage. Using -32 instead of 9568 to support also 16-shot pixelshift files }, { // Quality B, color matrix copied from a7rm2 diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc index b8da498b2..d5348286c 100644 --- a/rtengine/dcraw.cc +++ b/rtengine/dcraw.cc @@ -7015,7 +7015,8 @@ int CLASS parse_tiff (int base) void CLASS apply_tiff() { - int max_samp=0, ties=0, os, ns, raw=-1, thm=-1, i; + int max_samp=0, ties=0, /*os, ns,*/ raw=-1, thm=-1, i; + uint64_t os, ns; // RT struct jhead jh; thumb_misc = 16; @@ -7045,6 +7046,7 @@ void CLASS apply_tiff() } if ((tiff_ifd[i].comp != 6 || tiff_ifd[i].samples != 3) && (tiff_ifd[i].width | tiff_ifd[i].height) < 0x10000 && + (unsigned)tiff_ifd[i].bps < 33 && (unsigned)tiff_ifd[i].samples < 13 && // RT ns && ((ns > os && (ties = 1)) || (ns == os && shot_select == ties++))) { raw_width = tiff_ifd[i].width; @@ -7112,7 +7114,7 @@ void CLASS apply_tiff() load_raw = &CLASS olympus_load_raw; // ------- RT ------- if (!strncmp(make,"SONY",4) && - !strncmp(model,"ILCE-7RM3",9) && + (!strncmp(model,"ILCE-7RM3",9) || !strncmp(model,"ILCE-7RM4",9)) && tiff_samples == 4 && tiff_ifd[raw].bytes == raw_width*raw_height*tiff_samples*2) { load_raw = &CLASS sony_arq_load_raw;