From 2b031cdfd18c16cd0b7bd7f0e4cc6c8985890a5b Mon Sep 17 00:00:00 2001 From: heckflosse Date: Sun, 26 Nov 2017 00:11:08 +0100 Subject: [PATCH] Changed Copyright notice --- rtengine/rt_algo.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rtengine/rt_algo.cc b/rtengine/rt_algo.cc index 872699120..79508cfb3 100644 --- a/rtengine/rt_algo.cc +++ b/rtengine/rt_algo.cc @@ -1,8 +1,6 @@ /* * This file is part of RawTherapee. * - * Copyright (c) 2017 Ingo Weyrich - * * RawTherapee is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -34,11 +32,15 @@ namespace rtengine void findMinMaxPercentile(const float* data, size_t size, float minPrct, float& minOut, float maxPrct, float& maxOut, bool multithread) { + // Copyright (c) 2017 Ingo Weyrich // We need to find the (minPrct*size) smallest value and the (maxPrct*size) smallest value in data. // We use a histogram based search for speed and to reduce memory usage. // Memory usage of this method is histoSize * sizeof(uint32_t) * (t + 1) byte, // where t is the number of threads and histoSize is in [1;65536]. + // Processing time is O(n) where n is size of the input array. + // It scales well with multiple threads if the size of the input array is large. // The current implementation is not guaranteed to work correctly if size > 2^32 (4294967296). + assert(minPrct <= maxPrct); if (size == 0) {