Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into stable
Browse files Browse the repository at this point in the history
* Add Canon EOS Kiss X50 and X90 aliases
* Add Canon EOS Kiss F alias
* Relax DNG black level parsing
* Add Panasonic DMC-GM1S alias
* Basic support for `Imback ImB35mm` camera

* upstream/develop:
  Add Canon EOS Kiss X50 and X90 aliases
  Add Canon EOS Kiss F alias
  Relax DNG black level parsing
  Add Panasonic DMC-GM1S alias
  Add missing schema ImBack camera maker
  Basic support for `Imback ImB35mm` camera
  • Loading branch information
LebedevRI committed Oct 4, 2023
2 parents 27109bb + 567af3e commit 1188f1b
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 2 deletions.
35 changes: 35 additions & 0 deletions data/cameras.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1407,6 +1407,7 @@
<Aliases>
<Alias id="EOS Digital Rebel XS">Canon EOS DIGITAL REBEL XS</Alias>
<Alias id="EOS Kiss Digital F">Canon EOS Kiss Digital F</Alias>
<Alias id="EOS Kiss F">Canon EOS Kiss F</Alias>
</Aliases>
<ColorMatrices>
<ColorMatrix planes="3">
Expand All @@ -1432,6 +1433,7 @@
</BlackAreas>
<Aliases>
<Alias id="EOS Rebel T3">Canon EOS REBEL T3</Alias>
<Alias id="EOS Kiss X50">Canon EOS Kiss X50</Alias>
</Aliases>
<ColorMatrices>
<ColorMatrix planes="3">
Expand Down Expand Up @@ -1515,6 +1517,7 @@
<Aliases>
<Alias id="EOS Rebel T7">Canon EOS Rebel T7</Alias>
<Alias id="EOS 1500D">Canon EOS 1500D</Alias>
<Alias id="EOS Kiss X90">Canon EOS Kiss X90</Alias>
</Aliases>
<ColorMatrices>
<ColorMatrix planes="3">
Expand Down Expand Up @@ -8164,6 +8167,9 @@
<ID make="Panasonic" model="DMC-GM1">Panasonic DMC-GM1</ID>
<Crop x="0" y="0" width="-206" height="0"/>
<Sensor black="143" white="3971"/>
<Aliases>
<Alias>DMC-GM1S</Alias>
</Aliases>
<ColorMatrices>
<ColorMatrix planes="3">
<ColorMatrixRow plane="0">6770 -1895 -744</ColorMatrixRow>
Expand All @@ -8176,6 +8182,9 @@
<ID make="Panasonic" model="DMC-GM1">Panasonic DMC-GM1</ID>
<Crop x="0" y="0" width="-206" height="0"/>
<Sensor black="143" white="3971"/>
<Aliases>
<Alias>DMC-GM1S</Alias>
</Aliases>
<ColorMatrices>
<ColorMatrix planes="3">
<ColorMatrixRow plane="0">6770 -1895 -744</ColorMatrixRow>
Expand All @@ -8188,6 +8197,9 @@
<ID make="Panasonic" model="DMC-GM1">Panasonic DMC-GM1</ID>
<Crop x="0" y="0" width="-206" height="0"/>
<Sensor black="143" white="3971"/>
<Aliases>
<Alias>DMC-GM1S</Alias>
</Aliases>
<ColorMatrices>
<ColorMatrix planes="3">
<ColorMatrixRow plane="0">6770 -1895 -744</ColorMatrixRow>
Expand All @@ -8200,6 +8212,9 @@
<ID make="Panasonic" model="DMC-GM1">Panasonic DMC-GM1</ID>
<Crop x="0" y="0" width="0" height="0"/>
<Sensor black="143" white="3971"/>
<Aliases>
<Alias>DMC-GM1S</Alias>
</Aliases>
<ColorMatrices>
<ColorMatrix planes="3">
<ColorMatrixRow plane="0">6770 -1895 -744</ColorMatrixRow>
Expand All @@ -8212,6 +8227,9 @@
<ID make="Panasonic" model="DMC-GM1">Panasonic DMC-GM1</ID>
<Crop x="0" y="0" width="-206" height="0"/>
<Sensor black="143" white="3971"/>
<Aliases>
<Alias>DMC-GM1S</Alias>
</Aliases>
<ColorMatrices>
<ColorMatrix planes="3">
<ColorMatrixRow plane="0">6770 -1895 -744</ColorMatrixRow>
Expand Down Expand Up @@ -16269,6 +16287,23 @@
</ColorMatrix>
</ColorMatrices>
</Camera>
<Camera make="ImBack" model="ImB35mm" mode="chdk">
<ID make="ImBack" model="ImB35mm">ImBack</ID>
<CFA width="2" height="2">
<Color x="0" y="0">GREEN</Color>
<Color x="1" y="0">RED</Color>
<Color x="0" y="1">BLUE</Color>
<Color x="1" y="1">GREEN</Color>
</CFA>
<Crop x="0" y="0" width="0" height="0"/>
<Sensor black="0" white="255"/>
<Hints>
<Hint name="filesize" value="15335424"/>
<Hint name="full_width" value="4608"/>
<Hint name="full_height" value="3328"/>
<Hint name="order" value="jpeg"/>
</Hints>
</Camera>
<Camera make="KONICA MINOLTA" model="DYNAX 5D">
<ID make="Minolta" model="Dynax 5D">Konica Minolta Maxxum 5D</ID>
<CFA width="2" height="2">
Expand Down
2 changes: 2 additions & 0 deletions data/cameras.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<xs:enumeration value="GITUP"/>
<xs:enumeration value="GoPro"/>
<xs:enumeration value="Hasselblad"/>
<xs:enumeration value="ImBack"/>
<xs:enumeration value="Kodak"/>
<xs:enumeration value="LG"/>
<xs:enumeration value="Leaf"/>
Expand Down Expand Up @@ -426,6 +427,7 @@
<xs:enumeration value="Generic"/>
<xs:enumeration value="GoPro"/>
<xs:enumeration value="Hasselblad"/>
<xs:enumeration value="ImBack"/>
<xs:enumeration value="KODAK"/>
<xs:enumeration value="KONICA MINOLTA"/>
<xs:enumeration value="Kodak"/>
Expand Down
11 changes: 9 additions & 2 deletions src/librawspeed/decoders/DngDecoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -767,9 +767,16 @@ bool DngDecoder::decodeBlackLevels(const TiffIFD* raw) const {
iPoint2D blackdim(1, 1);
if (raw->hasEntry(TiffTag::BLACKLEVELREPEATDIM)) {
const TiffEntry* bleveldim = raw->getEntry(TiffTag::BLACKLEVELREPEATDIM);
if (bleveldim->count != 2)
if (bleveldim->count == 2)
blackdim = iPoint2D(bleveldim->getU32(0), bleveldim->getU32(1));
else if (bleveldim->count == 1) {
// Non-spec-compliant quirk. Assuming NxN repeat dimensions.
blackdim = iPoint2D(bleveldim->getU32(0), bleveldim->getU32(0));
// Let's only allow somewhat unambiguous case of 1x1 repeat dimensions.
if (blackdim != iPoint2D(1, 1))
return false;
} else
return false;
blackdim = iPoint2D(bleveldim->getU32(0), bleveldim->getU32(1));
}

if (!blackdim.hasPositiveArea())
Expand Down

0 comments on commit 1188f1b

Please sign in to comment.