7490 Commits (cc89dca5a216eced7ebed84eba432896b074443c)
 

Author SHA1 Message Date
Christoph Hasse cc89dca5a2 feat: rework lens test to account for ambiguous lenses
For each lens, its test target is now defined as the list of all lenses
which are possible given that lenses exif values.
4 years ago
Christoph Hasse a70896c1ac refactor: use function to calculate raw exif value given aperture 4 years ago
Christoph Hasse 4ee8962d42 refactor!: use lensfun style nameing for lenses 4 years ago
Christoph Hasse 47d518bc65 refactor: move canon lens tests into new test directory
This commit does some restructuring to make common utils available
for future similar test for other brands
4 years ago
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.
4 years ago
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.
4 years ago
Alexander Steffen 477150f067 Fix rounding error in fnumber calculation
The mathematical calculation of fnumbers does not always match the expected
values: For example for f/3.5 the precise mathematical value is 3.564...,
which gets rounded to 3.6. Fix this special case by returning a value
closer to the expected value.
4 years ago
Alexander Steffen d7f613c48e Clean up Canon lens list
Fixes some small inconsistencies, so that all lenses use the same format,
that is also shared with other lens databases such as lensfun:
* Always prefix aperture with f/
* Never add .0 to aperture
* Always add mm to focal length
* Always use | A for Sigma Art lenses
4 years ago
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"
4 years ago
Alexander Steffen fa4ce38d77 Execute test commands always with shell
There is no need to handle tests on Windows and Unix differently here.
Always using a shell allows for more flexibility when writing tests.

(rebased by hassec)
4 years ago
Alexander Steffen 73efa4515c Add test for all known Canon lenses
Generates a test case for every known lens from canonCsLensType, that first
sets the corresponding lens metadata and then verifies that exiv2 maps it
to the expected lens description. Only metadata fields that are relevant
for lens identification are modified.
4 years ago
Luis Díaz Más f30022d73d
Fix issues detected with PVS-Studio + other little improvements (#1689)
* avoid re-declaration of constant variables

* Replace pthreads critical section with std::mutex

* ci - better naming

* cmake - increase minimum version to 3.11. Use project DESCRIPTION

* fix - do not treat string::find() return type as bool

* remove conditions that were always true

* remove condition that were always false

* Remove EXV_HAVE_GMTIME_R which is not used anymore

* pixelWidth_ was inherited from Exiv2::Image

The width & height variables in the TiffImage class need to be mutable
to be able to change their values on the getters pixelHeight() and
pixelWidth() ... Do not ask me why ...

* Remove superfluous if

* pvs:V766 item with identical key added already

* pvs:V730 not all members were initialized (time)

* pvs:V730 not all members are initialized

* pvs:v668 no point in testing pointer against null after new

* pvs:V1048 variable assigned the same value

* replace c-style dynamic vector with std one

* pvs:547 fakeData is always true

* Remove useless constructor in derived class

* pvs:V690 modern way to disable copy-ctor

* Replace malloc/free with new/delete. No need to check for null

* pvs:V1028 cast operands and not result

* Remove custom MIN/MAX functions

* pvs:V595 pointer used before verified against null

* pvs: index used before being checked

* pvs:V1028 possible overflow. Cast operands

* pvs:v575 potential null pointer passed to other functions

* pvs:V547 deal with always true/false expressions

* pvs:V560 part of conditional expressions always false or true

* pvs:V701 possible break in realloc -> move to std::vector

* Make some classes 'final'

* Replace sprintf with std::to_string()

* fix compilation on windows
4 years ago
Christoph Hasse 024830a72c
feat: Setup github actions workflow to build tagged release and nightly pre-release (#1676) 4 years ago
Christoph Hasse 758dd6bbc6 refactor!: remove free() function from DataBuf to avoid potential problems, see #1542 4 years ago
Rosen Penev 2c57f214c5 clang-tidy: use nullptr
Found with modernize-use-nullptr

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Christoph Hasse 8c61962a09
docs: fix example command in man pages. closes #1685 (#1686) 4 years ago
Rosen Penev 86c71ae6c3 clang-tidy: avoid global non const variables
Found with cppcoreguidelines-avoid-non-const-global-variables

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev d1e116a8ef remove some pointless std::set
Partially found by gcc's -fanalyzer

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev 4c4f8da338 remove initializers
these were moved outside the constructor body.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev c7a41230f0 clang-tidy: remove pointless member init
Found with readability-redundant-member-init

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev e5894d71e1 default con/destructors in headers
Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev 7179300b7f clang-tidy: use dynamic cast
Found with cppcoreguidelines-pro-type-static-cast-downcast

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev 8d501fcf24 clang-tidy: no else after return
Found with readability-else-after-return

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev ce47de67b5 use auto in template
Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev c44c289d76 clang-tidy: fix ending namespace comnments
Found with llvm-namespace-comment

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev a74bceacb0 clang-tidy: remove pointless return
Found with readability-redundant-control-flow

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev ceed79c95e Jzon: algorithm conversions
Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev 4d2bc3c752 some range loop conversions
Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev 743da1a564 clang-tidy: use C++ casting
Found with google-readability-casting

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev 8dbc699858 clang-tidy: add missing explicit
Found with google-explicit-constructor

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev ff39473c18 clang-tidy: convert to static
Found with readability-convert-member-functions-to-static

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev 6da49fd29b more constexpr
Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev cdbee3c26c clang-tidy: init in member initializer
Found with cppcoreguidelines-prefer-member-initializer

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev 036af68a71 remove pointless constructors
Replaced with Uniform initialization. Allows constexpr usage.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Luis Díaz Más b83b2197c1 ci - Linux distros jobs being more explicit about options used 4 years ago
Luis Díaz Más 0d45de7519 ci - Replace debian:9 with debian:10 4 years ago
Luis Díaz Más b54ade76ab Python3 dependency is not obligatory
Some of the CI-Linux-Distros jobs failed because of this. Python3 is not
available by default on Debian:9 nor in Centos:8.

Since we are not currently running the tests in those platforms, and
python3 is just used for testing, we do not want to enforce this project
dependency.
4 years ago
Rosen Penev 8564d0b394 clang-tidy: pass by value
Found with modernize-pass-by-value

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev f9d394adf0 clang-tidy: run through performance checks
Found with performance*

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev b8712188bb clang-tidy: use auto
Found with modernize-use-auto

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev 20dfab8036 manual for range loop conversions
Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev 8e52032ee0 clang-tidy: range loop conversions
Found with: modernize-loop-convert

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Luis Díaz Más 44256e8c5d ci - Win matrix jobs will also run on:push for main
The idea is to generate a conan cache on main that could be reused in
future PRs to main.
4 years ago
Luis Díaz Más 9241f60880 win - Only run tests on x64
On CI, pythonTests fail more or less consistently in the configuration
Arch:x86, BuildType:Relase, Shared:ON. I tried to reproduce this locally,
but I could not.

Since Win-x86 is marginal for Exiv2, we disable it from CI until
somebody raise concerns about it.
4 years ago
Luis Díaz Más 59a80eba2e mac - cmake_paths does not work directly on mac 4 years ago
Luis Díaz Más 4c5c8538f5 Ignore missing PDBs 4 years ago
Luis Díaz Más 08672dbea3 make win debug builds a bit faster 4 years ago
Luis Díaz Más 6c2141959a conan - change generator to be able to use latest expat version 4 years ago
Luis Díaz Más 668001a72d BMFF python test - Output strings in different lines 4 years ago
Luis Díaz Más 6b6ffd02a7 fix python tests on powershell 4 years ago