Skip to content

Commit

Permalink
add Canon EF 100-400 2x, and make size of aperture lens matching delt…
Browse files Browse the repository at this point in the history
…a dependent on teleconverter factor
  • Loading branch information
hassec committed Jul 28, 2021
1 parent f4a85d9 commit e086c7c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/canonmn_int.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2001,6 +2001,7 @@ namespace Exiv2 {
{ 748, "Tamron 100-400mm f/4.5-6.3 Di VC USD + 1.4x" }, // 1
{ 748, "Tamron 70-210mm f/4 Di VC USD + 2x" }, // 2
{ 749, "Tamron 100-400mm f/4.5-6.3 Di VC USD + 2x" },
{ 749, "Canon EF 100-400mm f/4.5-5.6L IS II USM + 2x" }, // 1
{ 750, "Canon EF 35mm f/1.4L II USM" },
{ 750, "Tamron SP 85mm f/1.8 Di VC USD" }, // 1
{ 750, "Tamron SP 45mm f/1.8 Di VC USD" }, // 2
Expand Down Expand Up @@ -2806,8 +2807,8 @@ namespace Exiv2 {
auto aperMaxTele = std::stof(base_match[4].str()) * tc;
auto aperMaxShort = base_match[3].length() > 0 ? std::stof(base_match[3].str()) * tc : aperMaxTele;

if (flMin != exifFlMin || flMax != exifFlMax || exifAperMax < (aperMaxShort - .1) ||
exifAperMax > (aperMaxTele + .1)) {
if (flMin != exifFlMin || flMax != exifFlMax || exifAperMax < (aperMaxShort - .1 * tc) ||
exifAperMax > (aperMaxTele + .1 * tc)) {
continue;
}

Expand Down
4 changes: 2 additions & 2 deletions tests/lens_tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ def lens_is_match(l1, l2):
[
l1["focal_length_min"] * l1["tc"] == l2["focal_length_min"] * l2["tc"],
l1["focal_length_max"] * l1["tc"] == l2["focal_length_max"] * l2["tc"],
(l2["aperture_max_short"] * l2["tc"]) - 0.1
(l2["aperture_max_short"] - 0.1) * l2["tc"]
<= reconstructed_aperture
<= (l2["aperture_max_tele"] * l2["tc"]) + 0.1,
<= (l2["aperture_max_tele"] + 0.1) * l2["tc"],
]
)

Expand Down

0 comments on commit e086c7c

Please sign in to comment.