Skip to content

Commit

Permalink
Revert "Cr2Decoder: read black/white levels from ColorData4 ver.3"
Browse files Browse the repository at this point in the history
After further analysis, it does not look like either one of these
is `SpecularWhiteLevel` for that camera. Probably it simply isn't there.

https://discuss.pixls.us/t/any-canon-eos-40d-users-around-a-bit-of-testing-wanted/40843
exiftool/exiftool#233

This reverts commit bd9074a.
This reverts commit ccb06f6.
  • Loading branch information
LebedevRI committed Dec 10, 2023
1 parent feab273 commit 4c9a9bc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 3 additions & 0 deletions data/cameras.xml
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@
<Color x="1" y="1">BLUE</Color>
</CFA>
<Crop x="30" y="18" width="3908" height="2602"/>
<Sensor black="1021" white="13600"/>
<BlackAreas>
<Vertical x="0" width="28"/>
<Horizontal y="4" height="12"/>
Expand All @@ -333,6 +334,7 @@
<Camera make="Canon" model="Canon EOS 40D" mode="sRaw1">
<ID make="Canon" model="EOS 40D">Canon EOS 40D</ID>
<Crop x="0" y="0" width="0" height="0"/>
<Sensor black="0" white="16383"/>
<Hints>
<Hint name="sraw_40d" value=""/>
</Hints>
Expand All @@ -347,6 +349,7 @@
<Camera make="Canon" model="Canon EOS 40D" mode="sRaw2">
<ID make="Canon" model="EOS 40D">Canon EOS 40D</ID>
<Crop x="0" y="0" width="1944" height="1296"/>
<Sensor black="0" white="16383"/>
<Hints>
<Hint name="sraw_40d" value=""/>
</Hints>
Expand Down
3 changes: 1 addition & 2 deletions src/librawspeed/decoders/Cr2Decoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,8 @@ getBlackAndWhiteLevelOffsetsInColorData(ColorDataFormat f,
case ColorData4:
switch (colorDataVersion) {
case 2:
return std::nullopt; // Still no `SpecularWhiteLevel`.
case 3:
return {{231, 629}};
return std::nullopt; // Still no `SpecularWhiteLevel`.
case 4:
case 5:
return {{692, 697}};
Expand Down

0 comments on commit 4c9a9bc

Please sign in to comment.