mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-19 02:10:25 -05:00
Part of #535 (items 2 and 3). - SR2SubIFD black level: decrypt the directory's first entry (always the black level, 0x7310) to find where its value sits, and decrypt it with the keystream known for that position (1638, 2166, 2418, 2510). The fixed read at 2510 gave 354-365 on the DSLR-A450/A500/A550 and 975 on the DSLR-A700, where ExifTool and the data floor say 512 (A700 render: dE 20.1 -> 8.8, dL* -9.8 -> 0.0). Keystreams recovered black-box (plain 0x7310 and exiftool -v3 as known plaintext), consistent over 115 ARWs from 97 bodies, 15 layouts. - Downsized lossless M/S ARWs (linear YCbCr): black 1024 and white 16895, i.e. the recorded 512 plus 512, measured against same-scene full-size codings on 12 files from 4 bodies (offset 1015-1052, scale 0.98-1.02). The 512 pedestal lifted shadows by ~3 % of white; M/S renders now match their full-size twins (7RM5 M dE 6.7 -> 3.1). - Only these 16 of 140 Sony files change; render cache version 24. - Tests: synthetic SR2 blocks for every known layout (incl. the A700 trap), YCbCr black/white; corpus test of black levels against the data floor; A500 and A700 samples added to the corpus list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>