This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch support-system-libunibreak
in repository efl.

View the commit online.

commit 5823aa256924295af941439f309c25c506598093
Author: Carsten Haitzler <ras...@rasterman.com>
AuthorDate: Tue Jan 9 12:18:44 2024 +0000

    evas filter - curve func was off-by-1 ... fix!
    
    @fix
---
 src/lib/evas/filters/evas_filter_utils.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/lib/evas/filters/evas_filter_utils.c b/src/lib/evas/filters/evas_filter_utils.c
index 48d813a05e..d048759c74 100644
--- a/src/lib/evas/filters/evas_filter_utils.c
+++ b/src/lib/evas/filters/evas_filter_utils.c
@@ -92,9 +92,18 @@ _interpolate_linear(DATA8 *output, int *points)
      {
         if (points[j] != -1)
           {
+             int val1, val2, vald, pos, len;
+
              output[j] = (DATA8) points[j];
+             val1 = points[last_idx];
+             val2 = points[j];
+             vald = val2 - val1;
+             len = j - last_idx;
              for (k = last_idx + 1; k < j; k++)
-               output[k] = (DATA8) (points[j] + ((k - last_idx) * (points[j] - points[last_idx]) / (j - last_idx)));
+               {
+                  pos = k - last_idx;
+                  output[k] = (DATA8) (val1 + ((pos * vald) / len));
+               }
              last_idx = j;
           }
      }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to