Commit Graph

36 Commits

Author SHA1 Message Date
Daniel Vogelbacher
fa78ab3593 Use official Canon RF lens model names
The new RF line is named F2.8L instead of f/2.8L (for example).

This patch makes the model names identically to the official
Canon lens names and the same names exiftool uses.
2021-06-22 09:47:02 +02:00
Christoph Hasse
efb0af8506 fix: make casts explicit to please msvc 2021-06-08 23:33:03 +02:00
Christoph Hasse
7867343611 fix: prefer symbolic boolean operators so windows is happy 2021-06-08 23:03:28 +02:00
Christoph Hasse
bdd8a386b5 feat: improve lens recognition of canon makernote
If multiple choices are possible they are now all reported. This
behaviour is now the same as it is in exiftool.

All lenses are tested in the new test_canon_lenses.py test
2021-06-08 21:56:04 +02:00
Christoph Hasse
907fe2369e fix: readd some previously removed lenses now that we plan to trea ambiguous lenses 2021-06-03 21:40:05 +02:00
Christoph Hasse
4ee8962d42 refactor!: use lensfun style nameing for lenses 2021-06-02 21:21:35 +02:00
Alexander Steffen
56f9979a4b Improve detection of Canon lenses with TC
Lenses with and without a TC may share the same lens ID. Prefer entries
that explicitly mention the TC.
2021-06-02 21:21:35 +02:00
Alexander Steffen
9962b88db3 Fix misdetection of Tamron SP AF 300mm as Canon EF 75-300mm
When searching for the Tamron lens, only the string "300mm" is searched in
the lens description, which also happens to be present for the Canon lens.
Since the Canon lens comes first in the list, it wins. Fix this issue by
prefixing the search string with a single space so it always has to match
the full focal length specification.
2021-06-02 21:21:35 +02:00
Alexander Steffen
0d030eefdf Remove undetectable lenses
Lenses that have the exact same ID, focal length and aperture as some other
lens that comes earlier in the list (and thus always wins):
* 137, "Tamron SP 17-50mm f/2.8 XR Di II VC"
* 137, "Tamron SP 24-70mm f/2.8 Di VC USD"
* 161, "Sigma 28-70mm f/2.8 EX"
* 173, "Sigma 180mm EX HSM Macro f/3.5"
* 180, "Zeiss Milvus 50mm f/1.4"
* 183, "Sigma 150-600mm f/5-6.3 DG OS HSM | S"
* 254, "Tamron SP 90mm f/2.8 Di VC USD Macro 1:1 F004"
* 254, "Tamron SP 90mm f/2.8 Di VC USD Macro 1:1 F017"

Lenses that share their IDs with other lenses, but have no or an
unsupported focal length:
* 33, "Voigtlander or Carl Zeiss Lens"
* 131, "Sigma 4.5mm f/2.8 EX DC HSM Circular Fisheye"
2021-06-02 21:21:35 +02:00
Rosen Penev
743da1a564 clang-tidy: use C++ casting
Found with google-readability-casting

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-20 07:29:02 +02:00
Rosen Penev
6da49fd29b more constexpr
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-19 14:11:42 +02:00
Rosen Penev
b8712188bb clang-tidy: use auto
Found with modernize-use-auto

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-17 21:52:03 +02:00
Rosen Penev
c73dfa0106 clang-tidy: use uppercase numeric literals
Found with readability-uppercase-literal-suffix

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-16 11:27:49 +02:00
Rosen Penev
1b9b77c51f clang-tidy: add ending namespace comments
Found with google-readability-namespace-comments

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-14 17:34:09 +02:00
Luis Díaz Más
f85f7f717a Replace many of the iterators types with auto 2021-04-19 10:43:46 +02:00
Luis Díaz Más
de4d43d4d1 Fix warnings EXIV2_TEAM_EXTRA_WARNINGS
Most of the warnings fixed were:
- Hiding of local variables
- Hiding of globals
- Useless casts
- Conversions between float/double
2021-04-18 18:49:58 +02:00
Robin Mills
d632988bbd Massive code prolog cleanup. 2021-03-17 13:34:21 +00:00
czgnp
ddd326fc18
Update canonmn_int.cpp
Added Sigma 35mm/1.4 to lens id 368 and changed resolver to look at both focal length and aperture. Fixed canonEv so lenses with f/6.3 report as f/6.3 (they actually report f/6.2 to camera)
2021-01-18 16:18:19 +00:00
Alex Esseling
cf9be2cc3b fixing exceptions and reordering tags 2021-01-12 23:06:55 +01:00
Alex Esseling
ff2ffb1909 add_cr3_tags 2021-01-12 20:55:29 +01:00
Leonardo Brondani Schenkel
0f6fef7507 Make lens name consistent with models 150 and 368 2020-10-19 13:49:58 +02:00
Leonardo Brondani Schenkel
c4d18d02e7 Detect Sigma 18-35mm f/1.8 DC HSM (firmware 2.x)
On Canon bodies and lens firmware 1.x, this lens identifies itself using
model number 150. Starting with firmware 2.x, this lens now identifies
itself using model number 368.

Exiv2 was correctly identifying the former but not the latter.

This commit also fixes a pre-existing bug in which exiv2 was not
correctly disambiguating lenses using model number 368.
2020-10-19 13:49:58 +02:00
clanmills
3226573376 fix_1004_0.27 2020-04-13 23:53:47 +01:00
dbeichl
188ddab7cc
Merge branch '0.27-maintenance' into 0.27-maintenance-makernote-update 2020-03-26 19:35:55 +01:00
Daniel Beichl
3fe4460a23 Add various attributes for canon maker note
- Decode Attributes CameraType, AEB, SlowShutter, AutoISO,
  CameraTemperature, FlashGuideNumber, BulbDuration and AutoRotate
- Small signedness fix to decode printFiFocusDistance to return Infinite
2020-03-25 17:05:44 +01:00
derselbst
ccf4b59c91 Merge remote-tracking branch 'origin/0.27-maintenance' into fix1001_rename_AFPrimaryPoint 2019-11-02 17:36:47 +01:00
clanmills
8859209b95 fix_1004_lens_exiftool_compatibility 2019-10-09 09:00:14 +02:00
Robin Mills
05538ebea2 fix1001_rename_AFPrimaryPoint 2019-10-06 21:44:04 +02:00
clanmills
90f9f0bc19
Add support for Exif.Canon.AF tags to be read from images
This PR (and fix981_canonAutoFocus2) use a decoder listed in TiffMappingInfo to
decode Exif.Canon.AFInfo. The decoding function "manufactures" Exif tags such as
Exif.Canon.AFNumPoints from the data in Exif.Canon.AFInfo. These tags must never
be written to file and are removed from the metadata in
exif.cpp/ExifParser::encode().

Three of the tags created (AFPointsInFocus,AFPointsSelected, AFPrimaryPoint) are
bitmasks. As the camera can have up to 64 focus points, the tags are a 64 bit
mask to say which points are active. The function printBitmask() reports data
such as 1,2,3 or (none).

This decoding function decodeCanonAFInfo() added to TiffMappingInfo manufactures
the new tags. Normally, tags are processed by the binary tag decoder and that
approach was taken in branch fix981_canonAf. However, the binary tag decoder
cannot deal with AFInfo because the size of some metadata arrays cannot be
determined at compile time.
2019-09-14 11:28:18 +02:00
Alexander Steffen
8453ef0466 Add Tamron SP 24-70mm f/2.8 Di VC USD G2 for Canon
Fixes #330.
2019-01-04 09:41:14 +01:00
Alexander Steffen
f586d57bb1 Add various Sigma and Canon lenses 2019-01-04 09:41:06 +01:00
Alexander Steffen
cf4f14c67b Add new IDs for Sigma lenses with firmware 2.00
The firmware update changed the IDs, so that the same lens may now be known
under different IDs.
2019-01-04 09:40:58 +01:00
Luis Díaz Más
603692a1d8 Copyright to Exiv2 authors 2018-09-12 19:22:31 +02:00
Daniel Zucchetto
4e55af8691
Support Canon M100 2018-05-19 20:44:31 +01:00
Luis Diaz Mas
07d75cd0e8 Check if ExifData::findKey return valid iterators 2018-04-02 17:46:29 +02:00
Luis Díaz Más
d3748152a7 add _int suffix to all the internal files 2017-11-28 17:36:08 +01:00