55 Commits

Author SHA1 Message Date
Stephen Shkardoon
23f2a2fc9f Use _WIN32 instead of WIN32 to detect Windows
`WIN32` is not defined when building a 64-bit executable on Windows with Clang. `_WIN32` is the more appropriate option here.
http://web.archive.org/web/20191012035921/http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_system contains a handy table/matrix of the options and why this is best.
2023-08-13 17:09:49 +12:00
Adam Reichold
fae40a137a
A few more minor fixes geared towards lgtm.com alerts (#6127)
* Remove unfilled formatting placeholders in KLT parser.
* Fix presumably unintentionally missing reference on PlanatPtr and ChunkyPtr call operators.
* Fix catching pointer and make use-after-free of workimg easier to spot.
Make sure all of our thrown exceptions derive from std::exception and then catch
by reference instead of by pointer.
* Fix mismatch between array form new and non-array form delete.
* Simplify memory management of embedded color profiles by unifying allocation to use operator new.
2021-03-17 08:37:19 +01:00
Lawrence Lee
8a970f95bc Merge from branch 'dev' 2020-05-04 11:49:34 -07:00
Ingo Weyrich
b4c0bb3acb More double promote fixes 2020-02-10 20:06:43 +01:00
Lawrence
b266cb7ca3 Remove scale parameter from distortion correction
Scale is no longer useful in LensCorrection::correctDistortion. Remove
the scale parameter from the functions.
2020-01-02 18:33:35 -08:00
Ingo Weyrich
f95acfe74e Multithread lensfun vignetting correction 2019-12-02 17:32:13 +01:00
Ingo Weyrich
04b08741ee Further cleanups 2019-11-27 18:55:20 +01:00
Ingo Weyrich
d731e172c2 Further reduction of include dependencies 2019-11-01 16:15:59 +01:00
Flössie
c44e9dfa44 Add missing includes for latest GCC 9 2019-10-31 12:55:12 +01:00
Ingo Weyrich
6935faa258 Further cleanup of include dependencies 2019-10-30 22:12:06 +01:00
Ingo Weyrich
068847eb5a Further cleanup of include dependencies 2019-10-29 21:06:27 +01:00
Ingo Weyrich
20726d5bfe Forward declare Imagefloat 2019-10-28 20:01:16 +01:00
Morgan Hardwood
60b2196bce Updated gnu.org links to use HTTPS 2019-09-10 12:34:57 +02:00
Ingo Weyrich
4bf4b818c0 cppcheck fixes 2019-08-08 13:41:14 +02:00
Flössie
0cbc4923bc Relax dependency from procparams.h 2019-02-28 20:44:50 +01:00
heckflosse
1cdd814e1b Fix coverity issues 2018-11-20 14:42:39 +01:00
heckflosse
c9044485a6 Fix some coverity issues 2018-11-19 21:49:51 +01:00
heckflosse
96bf06a950 Removed most of the __x86_64__ dependencies. Also removed _RT_NESTED_OPENMP 2018-01-23 16:05:31 +01:00
Flössie
caa68ff49b (Try to) fix warnings that popped up in #4223
The only place I don't know how to fix is the
`-fvar-tracking-assignments` warning in `ProcParams::save()` as
there is nothing to constify.
2017-12-14 20:42:45 +01:00
Alberto Griggio
4d81812d13 LCP: applied fix by @kznsq for LCP files with attributes in a "PerspectiveModel" tag (issue #4137) 2017-11-17 23:38:27 +01:00
Alberto Griggio
339c794359 Fixed bug (typo) in LCP-based CA correction (now reenabled) 2017-11-16 21:22:17 +01:00
Alberto Griggio
99f41baf4f disable LCP-based CA correction, as it is currently broken 2017-11-14 22:52:57 +01:00
Alberto Griggio
5a05b04e09 profile-based CA correction applied during 1:1 preview 2017-10-29 21:41:19 +01:00
Flössie
05b97f5c50 Fix some new Coverity warnings 2017-09-13 19:58:48 +02:00
Alberto Griggio
4dc0e20ae0 merge with lcp-vignetting-issue4062 2017-09-11 17:22:01 +02:00
Flössie
d442f7a85b LCP cleanup (#4062)
- Removed `using namespace`
- Use real `Cache`
- Use `std::shared_ptr<LCPProfile>`
- Moved `LCPPersModel` to .cc

More could be done...
2017-09-09 20:19:11 +02:00
Alberto Griggio
dde94bc6d3 added basic integration of lensfun
so far only distortion correction, and no GUI yet
2017-09-07 00:53:03 +02:00
Alberto Griggio
5656d16e64 LCP: filter out bad vignetting correction entries
Candidate fix for regression #4062
2017-09-06 15:27:54 +02:00
heckflosse
01ffd294b2 Use rtengine::min/max instead of std::min/max(std::min/max(, patch by Flössie 2017-07-13 13:30:29 +02:00
Alberto Griggio
0ecb02afdd Merge pull request #3916 from Beep6581/lcp-distortion-alt-match
Lcp distortion alt match
2017-06-26 23:37:14 +02:00
heckflosse
97e558a040 Fixed some coverity issues 2017-06-12 17:54:34 +02:00
heckflosse
e8bbefef7a Merge branch 'coverity-fixes' into dev 2017-06-11 13:02:18 +02:00
Alberto Griggio
dd14de75f6 Backed out changeset ec2a74c86e53 2017-06-09 08:45:57 +02:00
Alberto Griggio
84ff861934 further tweaks to the LCP matching logic for distortion correction
Now based on the one used by the lensfun-convert-lcp tool of Lensfun
2017-06-08 17:40:05 +02:00
Alberto Griggio
2edd677d1a Fixed various memory leaks as reported by AddressSanitizer 2017-06-07 10:36:28 +02:00
Alberto Griggio
b39529f7c0 LCP: new experimental logic for finding the correct distortion coefficients 2017-06-05 14:21:52 +02:00
Flössie
051670160b Some fixes as hinted by Coverity (#3558) 2017-06-05 10:58:14 +02:00
Alberto Griggio
594b78118b LCP: print diagnostic output if settings->verbose 2017-04-13 17:11:08 +02:00
Alberto Griggio
e215ad4c6c print LCP error messages about missing vignette/CA correction only when settings->verbose 2017-04-11 11:44:39 +02:00
Alberto Griggio
871c75e494 Correctly apply LCP "distortion" correction for Fisheye lenses
Note: as discussed e.g. at http://lensfun.sourceforge.net/manual/corrections.html, this is really a combination of distortion correction and change of projection (from fisheye to rectilinear), but "distortion correction" is how the Adobe camera model calls it, and this is how it appears in the RT gui
2017-04-08 10:13:53 +02:00
Alberto Griggio
633af0bb6c fix buffering issue in the LCP profile parser (issue #3788) 2017-04-06 17:57:00 +02:00
heckflosse
2c686acc48 Fix all warnings in lcp.cc 2017-03-31 20:45:15 +02:00
heckflosse
7d9e5765ba Removed unused function and stopwatch 2017-02-22 14:50:10 +01:00
heckflosse
8e205afeed Revert "Further cleanup and astyled lcp.*"
This reverts commit 1348ea06e4975d26b50f9e723ae61f87916dcf17.
2017-02-22 14:43:41 +01:00
heckflosse
1348ea06e4 Further cleanup and astyled lcp.* 2017-02-22 01:53:22 +01:00
Flössie
99309aa4ac Preliminary cleanup for LCPModelCommon 2017-02-21 21:10:33 +01:00
heckflosse
87a280f8ca Additional speedup for lcp vignette correction 2017-02-21 19:11:54 +01:00
heckflosse
94129861f5 Speedup for lcp vignetting correction 2017-02-19 20:36:45 +01:00
Flössie
0731975ff0 Apply modernize-use-nullptr
Setup:
- `mkdir tidy; cd tidy`
- `cmake .. -DCMAKE_BUILD_TYPE=debug -DPROC_TARGET_NUMBER=1 -DCACHE_NAME_SUFFIX=4 -DBINDIR=. -DDATADIR=. -DBUILD_BUNDLE=ON -DWITH_LTO=OFF -DOPTION_OMP=OFF -DCMAKE_EXPORT_COMPILE_COMMANDS=ON`
- `cd ..`
- `find -name '*.cc' -exec clang-tidy-3.8 -header-filter=.* -p=tidy -fix-errors -checks=modernize-use-nullptr {} \;`
2016-10-12 17:48:40 +02:00
heckflosse
e82b60cd03 Cppcheck: Fixed some issues found by Flössie during review of my changes 2016-10-04 23:50:44 +02:00