klauspost / rawspeed

Raw Image Decoder Library
GNU Lesser General Public License v2.1
72 stars 20 forks source link

Sync in changes from darktable. Fixes #158. Fixes #161. Fixes #162. #164

Closed LebedevRI closed 7 years ago

LebedevRI commented 7 years ago

All right, i guess it is time for a sync again.

Gist:

Now what this does not fix: These 3 cameras got disabled:

Camera ["NIKON CORPORATION", "NIKON D3X", "12bit-compressed"] has too high white level: 4096 (>= ((2^12)-1), which is 4095)
Camera ["NIKON CORPORATION", "NIKON D3X", "12bit-uncompressed"] has too high white level: 4096 (>= ((2^12)-1), which is 4095)
Camera ["NIKON", "E8400", "12bit-compressed"] has too high white level: 4095 (>= ((2^12)-1), which is 4095)
Camera ["NIKON", "E8400", "12bit-uncompressed"] has too high white level: 4095 (>= ((2^12)-1), which is 4095)
Camera ["NIKON", "E8800", "12bit-compressed"] has too high white level: 4095 (>= ((2^12)-1), which is 4095)
Camera ["NIKON", "E8800", "12bit-uncompressed"] has too high white level: 4095 (>= ((2^12)-1), which is 4095)

They can be trivially re-enabled after a raw sample for each is found, to check white levels. Not sure, should i enable them in this pr, for upstreaming? May complicate upstreaming later on.

And, it was found that NIKON D5100 is lying (duh), in this case it marks compressed raws as uncompressed, https://redmine.darktable.org/issues/11268, or at least it seems so.

Special thanks to @schenlap.

LebedevRI commented 7 years ago

@klauspost friendly ping :)

LebedevRI commented 7 years ago

And some more fixes:

LebedevRI commented 7 years ago

@axxel i guess now you know how to contribute :) I have simply fixed it the way it did fix it. I did not benchmark and did not know about https://github.com/klauspost/rawspeed/commit/8e0ad84d91bce504a22ef6933de885f687bcf7c4

Benchmark it, and based on the results, possibly change code and PR it. As you can see, upstreaming changes into rawspeed is .. time-y process, so you may want to PR to https://github.com/darktable-org/darktable :)

LebedevRI commented 7 years ago

@klauspost thank you!