39 Commits

Author SHA1 Message Date
Daniel Gao
711f274403 Get rid of relative include paths
* Use target_include_directories to specify include paths
* Specify project root (parent of rtgui and rtengine) as include path
* Replace relative includes with normal includes
2024-11-16 17:20:02 -05:00
Lawrence37
ac48cc55d8
Better use of cache with inpaint opposed highight reconstruction (#6822)
* Speed up preview when inpaint opposed enabled

Only reprocess from raw if the white balance is changed. Otherwise, a
cache from later in the pipeline can be used.

* Remove unused code

* Fix refresh map bit positions

* Make WB & inpaint opposed refresh less brittle

Co-authored-by: Hombre57 <natureh.510@gmail.com>

---------

Co-authored-by: Hombre57 <natureh.510@gmail.com>
2023-08-15 07:52:38 -07:00
Desmis
e5d46032ff
Add "Inpaint opposed" to Highlight reconstruction and improved Itcwb (#6635)
* Essai HL

* Try Inpaint opposed

* Code improvment

* Add file

* Improvment to process inpaint opposed  and color propagation

* Clean code

* Change Blend to Coloropp in Profile pp3

* Enable BENCHFUN hilite_recon

* Clean rtengine cmakelist

* Comment unused code

* Neutralise unused code

* Change bad Exposure in Pop2Lab.pp3

* Try to fix bug when Inpaint Opposed is used and White balance disabled

* Changes to refreshmap

* Change to improccoordinator M_RETINEX

* Clean unused commented code

* Force Inpaint-opposed in rawimagesouce if wb change

* Suppressed message in console

* Change events and limits to 1 the number of calls to inpaint-opposed

* Comment code

* Add gain theshold to inpaint opposed

* fixed typo in procparams.cc

* Change in option.cc itcwb_sort to true

* Change itcw sorted in options and rawimagesource.cc

* Change sampling read datas Itcwb

* Allow or not purple in WB itcwb

* Added option icwb.nopurple to bypass settings

* Added code comment Itcwb

* optimize Itcwb between green and student

* Formated code used by Itcwb with Astylert.bat

* Change color_match - thanks to Lawrence37

* Remove wrong text
2023-02-09 07:14:20 +01:00
Flössie
d7ec033829 Reduce dcp.h dependencies 2019-10-30 09:30:21 +01:00
Ingo Weyrich
3aa84c48da Forward declare ColorTemp 2019-10-29 12:33:14 +01:00
heckflosse
141e9f632f Scan clut folder: Don't check for unused profile 2019-05-13 23:12:40 +02:00
Flössie
0cbc4923bc Relax dependency from procparams.h 2019-02-28 20:44:50 +01:00
heckflosse
0983817434 SSE: Review usage of vminf, vmaxf functions, #4942 2018-11-05 15:59:41 +01:00
Hombre
fbc81028eb First batch of variable name normalisation in ICM tool, see #4478 2018-05-14 00:57:55 +02:00
Alberto Griggio
b09bf381b4 added possibility to specify extra working spaces via a json file
The JSON file is called workingspaces.json, it can be either in the global iccprofiles directory, or in the user's ICC profiles dir (set in preferences).

The format is the following:

{"working_spaces": [
    {
        "name" : "ACES",
        "file" : "/path/to/ACES.icc"
    },
    {
        "name" : "ACEScg",
        "matrix" : [0.7184354, 0.16578523, 0.09882643, 0.29728935, 0.66958117, 0.03571544, -0.00647622, 0.01469771, 0.66732561]
    }
]}

if "matrix" is present, "file" is ignored. If only "file" is present, the matrix is extracted from the ICC profile. For this, we look only at the R, G, and B matrix columns and the white point set in the profile. Bradford adaptation is used to convert the matrix to D50. Anything else (LUT, TRC, ...) in the profile is ignored.

It is the user's responsibility to ensure that the profile is suitable to be used as a working space.
2018-03-20 15:06:09 +01:00
heckflosse
d5ceb850f3 Make compilation unit rtengine/rawimagesource.cc -Wextra clean, #4155 2017-10-22 13:43:28 +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
heckflosse
7b489a1d99 Fix all warnings in clutstore.cc 2017-03-31 20:51:06 +02:00
Flössie
97caf21b5c PIMPLed and streamlined ICCStore (#3691) 2017-03-18 11:59:14 +01:00
Flössie
9b5ffaf4aa Some minor cleanups 2017-02-14 20:49:10 +01:00
Flössie
6bcac40306 Allow relative CLUT paths (#3639) by @agriggio
Kudos to Alberto Griggio for this contribution! 👍
2017-02-14 20:19:00 +01:00
Flössie
68a77f26f6 Fix std::out_of_range exception with empty HaldCLUT basename
User jgschaefer [reported an error on pixls.us](https://discuss.pixls.us/t/rt-build-from-git-crash-on-launch-debian-testing-64-bit/1425)
which could be traced down to an empty basename for a HaldCLUT. The
original implementation did not throw an exception due to the use of
`std::string::substr()` instead of `std::string::erase()`, but silently
assigned the first working profile to `profile_name`.
2016-05-17 20:51:14 +02:00
heckflosse
e8d90698cf Fix copy/paste bugs 2016-05-14 14:26:56 +02:00
Flössie
aa29125316 Read-ahead of getClutValues() is only one pixel now 2016-05-12 21:44:20 +02:00
Flössie
e8595890c5 Final cleanups 2016-05-12 20:21:17 +02:00
Flössie
f4d5c645de Add Ingo's clutstore_no_mmx.patch
Ingo has provided a solution for the strange Windows crash with
`_mm_cvtpu16_ps()`: It was not an alignment problem, but the use of
MMX instructions which led to the SEGV.

Now Ingo's solutions omits MMX instructions altogether and is
nevertheless faster than the `_mm_set_ps()` workaround.

Many thanks to @heckflosse!
2016-05-11 20:01:17 +02:00
Flössie
1edfb0c6f7 Switch getClutValue to vfloat2 and load/store source[RGB] unaligned
Ingo had some cleanup suggestions in #3154 which I tried to realize with
this commit. Although switching to `vfloat2` is a clever idea, I can see
no further speedup.
2016-05-10 20:39:20 +02:00
heckflosse
31b2589b9b Fix crashes caused by aligned access to unaligned memory in CLUT code, fixes #3154, fixes #3278, fixes #3277 2016-05-06 17:16:45 +02:00
heckflosse
9622bbc2ba Fix buffer overrun in clutstore.cc 2016-05-03 20:50:45 +02:00
Beep6581
add88cc62c astyle'd rtengine/clutstore.cc 2016-05-01 22:49:10 +02:00
Flössie
2b9f6e3355 Add Ingo's clutspeed.patch 2016-05-01 21:36:13 +02:00
Flössie
d530617ae1 Include last remarks from Ingo
- Changed `_mm_store_ps` to `STVF`
- Increased number of cached CLUTs by factor 1.5
2016-05-01 20:49:17 +02:00
Flössie
39f4db609a Final code cleanup
- Corrected whitespace and comments
- Replaced `VECTLENSP` with `__SSE2__` and `4`
- Removed redundant `inline`
  (see: http://programmers.stackexchange.com/a/35436 and
  http://stackoverflow.com/a/5971755)
2016-05-01 11:10:11 +02:00
Flössie
29fe23e517 Move film_simulation_strength calculation into HaldCLUT::getRGB()
- Moved `film_simulation_strength` calculation into `HaldCLUT::getRGB()`
- Removed unneeded base class `CLUT`
- Used `_MM_SHUFFLE`
2016-04-29 17:26:56 +02:00
Flössie
bf499055e1 Apply HaldCLUT::getRGB() per tile line
`getRGB()` now takes a whole tile line instead of a single pixel.
2016-04-26 21:57:58 +02:00
Flössie
78c08e9e5c Add Ingo's optimizations
Add Ingo's SSE optimizations and clean up the non-SSE part of `getRGB()`
with `intp()`.
2016-04-26 20:48:11 +02:00
Flössie
56f8ea086c Correct whitespace
Last commit messed up some whitespace, this one fixes it.
2016-04-23 23:02:02 +02:00
Flössie
b1a9e96836 Store HaldCLUT as flat RGBx array
Instead of using an `Image16`, which is organized in planes, store the
HaldCLUT in an `AlignedBuffer<std::uint16_t>` with sequential RGBx
values. This gives a speedup of roughly 23% here.
2016-04-23 22:55:28 +02:00
Flössie
f639cd6b82 Use Image16 instead of Imagefloat for CLUT
Gain speed and reduce memory by using Image16 instead of Imagefloat for
the CLUT.
2016-04-23 22:55:28 +02:00
Flössie
e495093b18 Clean up clutstore.* and add LRU cache
This commit adds a true LRU cache to `rtengine` which is used in the new
`CLUTStore` class. The code in `clutstore.*` was cleaned up with C++11
features and small optimizations taken from my `clutbench` project.
The `CLUTStore` class was converted to a true singleton.
2016-04-23 22:55:28 +02:00
Adam Reichold
a2eea7c265 Finally fully remove the safegtk module. 2016-02-21 10:26:11 +01:00
DrSlony
0e0cfb9b25 Formatted all .cc and .h code in rtengine, rtexif and rtgui using astyle 2015-08-11 11:55:03 +02:00
DrSlony
effb46c3e1 Line endings 2015-08-11 11:53:44 +02:00
torger
d5ca351c20 Issue 2134: removed obsolete raw highlight preservation setting from GUI (still left in procparams for backwards compatilibility) 2015-07-10 12:00:36 +02:00