Skip to content

Commit

Permalink
Cr2Decoder: read black/white levels from ColorData4 ver.3
Browse files Browse the repository at this point in the history
  • Loading branch information
LebedevRI committed Dec 4, 2023
1 parent 348c14d commit 6dd9444
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 0 additions & 3 deletions data/cameras.xml
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,6 @@
<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 @@ -334,7 +333,6 @@
<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 @@ -349,7 +347,6 @@
<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: 2 additions & 1 deletion src/librawspeed/decoders/Cr2Decoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,9 @@ getBlackAndWhiteLevelOffsetsInColorData(ColorDataFormat f,
case ColorData4:
switch (colorDataVersion) {
case 2:
case 3:
return std::nullopt; // Still no `SpecularWhiteLevel`.
case 3:
return {{231, 617}};
case 4:
case 5:
return {{692, 697}};
Expand Down

0 comments on commit 6dd9444

Please sign in to comment.