Support black level of Sony ILME-FX3 with dcraw

Read the black level from the second SR2SubIFD BlackLevel tag.
This commit is contained in:
Lawrence Lee 2024-08-16 21:57:37 -07:00
parent f99132b489
commit 137dbf3eb1
No known key found for this signature in database
GPG Key ID: 048FF2B76A63895F

View File

@ -6733,6 +6733,13 @@ int CLASS parse_tiff_ifd (int base)
case 29443:
FORC4 cam_mul[c ^ (c < 2)] = get2();
break;
case 29456: // Adapted from LibRaw: Sony SR2SubIFD BlackLevel
FORC4 cblack[c ^ (c >> 1) /*RGGB_2_RGBG(c)*/] = get2();
i = cblack[3];
FORC3 if (i > (int)cblack[c]) i = cblack[c];
FORC4 cblack[c] -= i;
black = i;
break;
case 29459:
FORC4 cam_mul[c] = get2();
i = (cam_mul[1] == 1024 && cam_mul[2] == 1024) << 1;