23 Commits

Author SHA1 Message Date
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