Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package frei0r-plugins for openSUSE:Factory 
checked in at 2024-08-01 22:04:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/frei0r-plugins (Old)
 and      /work/SRC/openSUSE:Factory/.frei0r-plugins.new.7232 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "frei0r-plugins"

Thu Aug  1 22:04:30 2024 rev:20 rq:1190766 version:2.3.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/frei0r-plugins/frei0r-plugins.changes    
2023-10-10 21:01:18.304268644 +0200
+++ /work/SRC/openSUSE:Factory/.frei0r-plugins.new.7232/frei0r-plugins.changes  
2024-08-01 22:04:57.737785360 +0200
@@ -1,0 +2,10 @@
+Wed Jul 24 12:28:02 UTC 2024 - Frantisek Simorda <[email protected]>
+
+- Update to 2.3.3
+   * Add new Kaleid0sc0pe example video 
+   * New effect - gate weave 
+   * Gateweave, Filmgrain - change inline functions to static inline
+   * Filmgrain - fix memory leak when blur = 0 
+ 
+
+-------------------------------------------------------------------

Old:
----
  frei0r-plugins-2.3.1.tar.gz

New:
----
  frei0r-plugins-2.3.3.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ frei0r-plugins.spec ++++++
--- /var/tmp/diff_new_pack.Onpshb/_old  2024-08-01 22:04:58.137801858 +0200
+++ /var/tmp/diff_new_pack.Onpshb/_new  2024-08-01 22:04:58.141802023 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package frei0r-plugins
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2024 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           frei0r-plugins
-Version:        2.3.1
+Version:        2.3.3
 Release:        0
 Summary:        Collection of video sources and filters plugins
 # Upstream says 2.0+ but quite few of their plugins are GPL-3.0+

++++++ frei0r-plugins-2.3.1.tar.gz -> frei0r-plugins-2.3.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/frei0r-2.3.1/.github/workflows/release.yml 
new/frei0r-2.3.3/.github/workflows/release.yml
--- old/frei0r-2.3.1/.github/workflows/release.yml      2023-08-04 
16:50:11.000000000 +0200
+++ new/frei0r-2.3.3/.github/workflows/release.yml      2024-06-07 
11:00:56.000000000 +0200
@@ -27,7 +27,7 @@
       - name: Setup Node.js
         uses: actions/setup-node@v3
         with:
-          node-version: 18.x
+          node-version: latest
       - name: Install semantic-release
         run: |
           npm i npx
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/frei0r-2.3.1/AUTHORS new/frei0r-2.3.3/AUTHORS
--- old/frei0r-2.3.1/AUTHORS    2023-08-04 16:50:11.000000000 +0200
+++ new/frei0r-2.3.3/AUTHORS    2024-06-07 11:00:56.000000000 +0200
@@ -1,18 +1,19 @@
+# Frei0r developers union
 
-Project initiated at the Piksel Festival in 2004
-hosted by BEK - Bergen Senter for Elektronisk Kunst
-Maintained at the Dyne.org Foundation
+Read here an account of [Frei0r's project 
history](https://medium.com/think-do-tank/frei0r-the-free-and-open-source-video-effect-preservation-project-604134dde8b3).
 
-Developers who contributed, in alphabetic order:
+Frei0r is maintained by [Jaromil](https://jaromil.dyne.org) for the Dyne.org 
Foundation.
+
+## Developers who contributed, in alphabetic order:
 
 Akito Iwakura
 Albert Frisch
+Brendan Hack
 Brian Matherly
 Burkhard Plaum
 Carlo E. Prelz
 Christoph Willing
 Dan Dennedy
-Denis Roio (Jaromil)
 Filippo Giunchedi
 Gabriel Finch (Salsaman)
 Georg Seidel
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/frei0r-2.3.1/AUTHORS.md new/frei0r-2.3.3/AUTHORS.md
--- old/frei0r-2.3.1/AUTHORS.md 1970-01-01 01:00:00.000000000 +0100
+++ new/frei0r-2.3.3/AUTHORS.md 2024-06-07 11:00:56.000000000 +0200
@@ -0,0 +1,50 @@
+
+Project initiated at the Piksel Festival in 2004
+hosted by BEK - Bergen Senter for Elektronisk Kunst
+Maintained at the Dyne.org Foundation
+
+Developers who contributed, in alphabetic order:
+
+Akito Iwakura
+Albert Frisch
+Brian Matherly
+Burkhard Plaum
+Carlo E. Prelz
+Christoph Willing
+Dan Dennedy
+Denis Roio (Jaromil)
+Filippo Giunchedi
+Gabriel Finch (Salsaman)
+Georg Seidel
+Henner Zeller
+Hedde Bosman
+IOhannes M. Zmölnig
+Janne Liljeblad
+Jean-Baptiste Mardelle
+Jean-François Fortin Tam 
+Jean-Sebastien Senecal
+Jerome Blanchi (d.j.a.y)
+Joshua M. Doe
+Luca Bigliardi
+Maksim Golovkin (Максим Головкин)
+Marko Cebokli
+Martin Bayer
+Mathieu Guindon
+Matthias Schnoell
+Nicolas Carion
+Niels Elburg
+Phillip Promesberger
+Raphael Graf
+Richard Spindler
+Richard Ling (Chungzuwalla)
+Robert Schweikert
+Ross Lagerwall
+Samuel Mimram
+Simon A. Eugster
+Sofian Audry
+Stefano Sabatini
+Steinar H. Gunderson
+Thomas Coldrick
+Thomas Perl
+Till Theato
+Vincent Pinon
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/frei0r-2.3.1/CMakeLists.txt 
new/frei0r-2.3.3/CMakeLists.txt
--- old/frei0r-2.3.1/CMakeLists.txt     2023-08-04 16:50:11.000000000 +0200
+++ new/frei0r-2.3.3/CMakeLists.txt     2024-06-07 11:00:56.000000000 +0200
@@ -38,7 +38,9 @@
 # See this thread for a ridiculous discussion about the simple question how to 
install a header file with CMake: 
http://www.cmake.org/pipermail/cmake/2009-October/032874.html
 install (DIRECTORY include DESTINATION . FILES_MATCHING PATTERN "frei0r.h" 
PATTERN "msvc" EXCLUDE)
 
-add_subdirectory (doc)
+# For code documentation run: doxygen doc/Doxyfile
+# add_subdirectory (doc)
+
 add_subdirectory (src)
 
 # Generate frei0r.pc and install it.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/frei0r-2.3.1/doc/CMakeLists.txt 
new/frei0r-2.3.3/doc/CMakeLists.txt
--- old/frei0r-2.3.1/doc/CMakeLists.txt 2023-08-04 16:50:11.000000000 +0200
+++ new/frei0r-2.3.3/doc/CMakeLists.txt 1970-01-01 01:00:00.000000000 +0100
@@ -1,10 +0,0 @@
-find_package(Doxygen)
-if(DOXYGEN_FOUND)
-# configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in 
${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
-add_custom_target(doc
-${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
-WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-COMMENT "Generating API documentation with Doxygen" VERBATIM
-)
-endif(DOXYGEN_FOUND)
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/frei0r-2.3.1/doc/Doxyfile 
new/frei0r-2.3.3/doc/Doxyfile
--- old/frei0r-2.3.1/doc/Doxyfile       2023-08-04 16:50:11.000000000 +0200
+++ new/frei0r-2.3.3/doc/Doxyfile       2024-06-07 11:00:56.000000000 +0200
@@ -568,7 +568,7 @@
 # directories like "/usr/src/myproject". Separate the files or directories
 # with spaces.
 
-INPUT                  = "../include/frei0r.h"
+INPUT                  = "include/frei0r.h"
 
 # This tag can be used to specify the character encoding of the source files
 # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/frei0r-2.3.1/include/frei0r.h 
new/frei0r-2.3.3/include/frei0r.h
--- old/frei0r-2.3.1/include/frei0r.h   2023-08-04 16:50:11.000000000 +0200
+++ new/frei0r-2.3.3/include/frei0r.h   2024-06-07 11:00:56.000000000 +0200
@@ -23,7 +23,7 @@
  * @section sec_overview Overview
  *
  * If you are new to frei0r, the best thing is probably to have
- * a look at the <a href="frei0r_8h-source.html">frei0r header</a>,
+ * a look at the <a href="frei0r_8h_source.html">frei0r header</a>,
  * which is quite simple.
  *
  * After that, you might want to look at the 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/frei0r-2.3.1/src/filter/CMakeLists.txt 
new/frei0r-2.3.3/src/filter/CMakeLists.txt
--- old/frei0r-2.3.1/src/filter/CMakeLists.txt  2023-08-04 16:50:11.000000000 
+0200
+++ new/frei0r-2.3.3/src/filter/CMakeLists.txt  2024-06-07 11:00:56.000000000 
+0200
@@ -46,8 +46,10 @@
 add_subdirectory (elastic_scale)
 add_subdirectory (emboss)
 add_subdirectory (equaliz0r)
+add_subdirectory (filmgrain)
 add_subdirectory (flippo)
 add_subdirectory (gamma)
+add_subdirectory (gateweave)
 add_subdirectory (glow)
 add_subdirectory (glitch0r)
 #add_subdirectory (host_param_test)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/frei0r-2.3.1/src/filter/alpha0ps/alpha0ps_alphaspot.c 
new/frei0r-2.3.3/src/filter/alpha0ps/alpha0ps_alphaspot.c
--- old/frei0r-2.3.1/src/filter/alpha0ps/alpha0ps_alphaspot.c   2023-08-04 
16:50:11.000000000 +0200
+++ new/frei0r-2.3.3/src/filter/alpha0ps/alpha0ps_alphaspot.c   2024-06-07 
11:00:56.000000000 +0200
@@ -82,7 +82,7 @@
                     g = min + (1.0f - wb-db)/wb*(max-min);
                 }
             }
-            sl[i*w+j] = g * 255.0f;
+            sl[i*w+j] = lrintf(g * 255.0f);
         }
     }
 }
@@ -117,7 +117,7 @@
                     g = min + (1.0f - wb-db)/wb*(max-min);
                 }
             }
-            sl[i*w+j] = g * 255.0f;
+            sl[i*w+j] = lrintf(g * 255.0f);
         }
     }
 }
@@ -162,7 +162,7 @@
                     g = min + (lim-wb-db)/wb*(max-min);
                 }
             }
-            sl[i*w+j] = g * 255.0f;
+            sl[i*w+j] = lrintf(g * 255.0f);
         }
     }
 }
@@ -195,7 +195,7 @@
                     g = min + (1.0f - wb-db)/wb*(max-min);
                 }
             }
-            sl[i*w+j] = g * 255.0f;
+            sl[i*w+j] = lrintf(g * 255.0f);
         }
     }
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/frei0r-2.3.1/src/filter/filmgrain/CMakeLists.txt 
new/frei0r-2.3.3/src/filter/filmgrain/CMakeLists.txt
--- old/frei0r-2.3.1/src/filter/filmgrain/CMakeLists.txt        1970-01-01 
01:00:00.000000000 +0100
+++ new/frei0r-2.3.3/src/filter/filmgrain/CMakeLists.txt        2024-06-07 
11:00:56.000000000 +0200
@@ -0,0 +1,11 @@
+set (SOURCES filmgrain.c)
+set (TARGET filmgrain)
+
+if (MSVC)
+  set (SOURCES ${SOURCES} ${FREI0R_DEF})
+endif (MSVC)
+
+add_library (${TARGET}  MODULE ${SOURCES})
+set_target_properties (${TARGET} PROPERTIES PREFIX "")
+
+install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR})
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/frei0r-2.3.1/src/filter/filmgrain/filmgrain.c 
new/frei0r-2.3.3/src/filter/filmgrain/filmgrain.c
--- old/frei0r-2.3.1/src/filter/filmgrain/filmgrain.c   1970-01-01 
01:00:00.000000000 +0100
+++ new/frei0r-2.3.3/src/filter/filmgrain/filmgrain.c   2024-06-07 
11:00:56.000000000 +0200
@@ -0,0 +1,306 @@
+#include <stdlib.h>
+#include "frei0r.h"
+#include "frei0r_math.h"
+
+
+typedef struct flimgrain_instance
+{
+    // image dimensions
+    int width;
+    int height;
+
+    // parameters
+    double grain_amt;
+    double grain_r;
+    double grain_g;
+    double grain_b;
+    double blur_amt;
+    double dust_amt;
+    double flicker_amt;
+
+} filmgrain_instance_t;
+
+
+// these functions are for the effect
+static inline uint8_t random_range_uint8(uint8_t x)
+{
+    // never divide by zero
+    if(x < 1)
+    {
+        return 0;
+    }
+    return rand() % x;
+}
+
+static inline uint32_t reduce_color_range(uint32_t color, uint8_t threshold, 
int flicker)
+{
+    return CLAMP0255(CLAMP(color, threshold >> 1, 255 - threshold) + flicker);
+}
+
+#define DUST_RAND_LIMIT 1000000000
+static inline int big_rand()
+{
+    #if RAND_MAX > DUST_RAND_LIMIT
+    return rand() % DUST_RAND_LIMIT;
+    #else
+    return (rand() * (RAND_MAX + 1) + rand()) % DUST_RAND_LIMIT;
+    #endif
+}
+
+
+// these functions are for frei0r
+// mostly copy/paste/slightly modified from the other frei0r effects
+int f0r_init()
+{
+    return 1;
+}
+
+void f0r_deinit()
+{}
+
+void f0r_get_plugin_info(f0r_plugin_info_t* info)
+{
+    info->name = "Film Grain";
+    info->author = "esmane";
+    info->explanation = "Adds film-like grain and softens the picture.";
+    info->plugin_type = F0R_PLUGIN_TYPE_FILTER;
+    info->color_model = F0R_COLOR_MODEL_RGBA8888;
+    info->frei0r_version = FREI0R_MAJOR_VERSION;
+    info->major_version = 0;
+    info->minor_version = 1;
+    info->num_params = 7;
+}
+
+void f0r_get_param_info(f0r_param_info_t* info, int param_index)
+{
+    switch(param_index)
+    {
+    case 0:
+        info->name = "Grain Amount";
+        info->explanation = "The intensity of the grain.";
+        info->type = F0R_PARAM_DOUBLE;
+        break;
+
+    case 1:
+        info->name = "Red Grain";
+        info->explanation = "The percentage of grain applied to the red 
channel.";
+        info->type = F0R_PARAM_DOUBLE;
+        break;
+
+    case 2:
+        info->name = "Green Grain";
+        info->explanation = "The percentage of grain applied to the green 
channel.";
+        info->type = F0R_PARAM_DOUBLE;
+        break;
+
+    case 3:
+        info->name = "Blue Grain";
+        info->explanation = "The percentage of grain applied to the blue 
channel.";
+        info->type = F0R_PARAM_DOUBLE;
+        break;
+
+    case 4:
+        info->name = "Blur Amount";
+        info->explanation = "The intensity of the blur.";
+        info->type = F0R_PARAM_DOUBLE;
+        break;
+
+    case 5:
+        info->name = "Dust Amount";
+        info->explanation = "The amount of dust particles on the image.";
+        info->type = F0R_PARAM_DOUBLE;
+        break;
+
+    case 6:
+        info->name = "Flicker";
+        info->explanation = "The amount of variation in brightness between 
frames.";
+        info->type = F0R_PARAM_DOUBLE;
+        break;
+    }
+}
+
+f0r_instance_t f0r_construct(unsigned int width, unsigned int height)
+{
+    filmgrain_instance_t* inst = (filmgrain_instance_t*)calloc(1, 
sizeof(*inst));
+
+    inst->width = width;
+    inst->height = height;
+    inst->grain_amt = 0.5;
+    inst->grain_r = 0.75;
+    inst->grain_g = 1.0;
+    inst->grain_b = 0.5;
+    inst->blur_amt = 0.5;
+    inst->dust_amt = 0.2;
+    inst->flicker_amt = 0.5;
+
+    return (f0r_instance_t)inst;
+}
+
+void f0r_destruct(f0r_instance_t instance)
+{
+    filmgrain_instance_t* inst = (filmgrain_instance_t*)instance;
+    free(instance);
+}
+
+
+void f0r_set_param_value(f0r_instance_t instance, f0r_param_t param, int 
param_index)
+{
+    filmgrain_instance_t* inst = (filmgrain_instance_t*)instance;
+    switch(param_index)
+    {
+    case 0:
+        inst->grain_amt = *((double*)param);
+        break;
+    case 1:
+        inst->grain_r = *((double*)param);
+        break;
+    case 2:
+        inst->grain_g = *((double*)param);
+        break;
+    case 3:
+        inst->grain_b = *((double*)param);
+        break;
+    case 4:
+        inst->blur_amt = *((double*)param);
+        break;
+    case 5:
+        inst->dust_amt = *((double*)param);
+        break;
+    case 6:
+        inst->flicker_amt = *((double*)param);
+        break;
+    }
+}
+
+void f0r_get_param_value(f0r_instance_t instance, f0r_param_t param, int 
param_index)
+{
+    filmgrain_instance_t* inst = (filmgrain_instance_t*)instance;
+    switch(param_index)
+    {
+    case 0:
+        *((double*)param) = inst->grain_amt;
+        break;
+    case 1:
+        *((double*)param) = inst->grain_r;
+        break;
+    case 2:
+        *((double*)param) = inst->grain_g;
+        break;
+    case 3:
+        *((double*)param) = inst->grain_b;
+        break;
+    case 4:
+        *((double*)param) = inst->blur_amt;
+        break;
+    case 5:
+        *((double*)param) = inst->dust_amt;
+        break;
+    case 6:
+        *((double*)param) = inst->flicker_amt;
+        break;
+    }
+}
+
+
+void f0r_update(f0r_instance_t instance, double time, const uint32_t* inframe, 
uint32_t* outframe)
+{
+    filmgrain_instance_t* inst = (filmgrain_instance_t*)instance;
+    uint32_t* buf = outframe;
+
+    uint32_t r;
+    uint32_t g;
+    uint32_t b;
+    uint8_t grain;
+    uint8_t reduce_t = random_range_uint8(inst->flicker_amt * 5) + 
inst->grain_amt * 40;
+    int flicker = random_range_uint8(inst->flicker_amt * 8);
+
+    if(rand() % 2)
+    {
+        flicker *= -1;
+    }
+
+    // first grain
+    if(inst->blur_amt != 0.0)
+    {
+        // only need a buf if blur is > 0
+        buf = (uint32_t*)calloc(inst->width * inst->height, sizeof(uint32_t));
+    }
+
+    for(unsigned int i = 0; i < inst->height * inst->width; i++)
+    {
+        // dust
+        if(big_rand() < inst->dust_amt * 1000)
+        {
+            if(rand() % 2 == 0)
+            {
+                r = 0;
+                g = 0;
+                b = 0;
+            }
+            else
+            {
+                r = 255;
+                g = 255;
+                b = 255;
+            }
+        }
+        else
+        {
+            // reducing the range of each color helps look more "filmish"
+            b = reduce_color_range((*(inframe + i) & 0x00FF0000) >> 16, 
reduce_t, flicker);
+            g = reduce_color_range((*(inframe + i) & 0x0000FF00) >>  8, 
reduce_t, flicker);
+            r = reduce_color_range( *(inframe + i) & 0x000000FF       , 
reduce_t, flicker);
+
+            grain = random_range_uint8(inst->grain_amt * (40 + ((r + g + b) >> 
5)));
+
+            b = CLAMP0255(b - (grain * inst->grain_b));
+            g = CLAMP0255(g - (grain * inst->grain_g));
+            r = CLAMP0255(r - (grain * inst->grain_r));
+        }
+
+        *(buf + i) = (*(buf + i) & 0xFFFFFF00) |  r;
+        *(buf + i) = (*(buf + i) & 0xFFFF00FF) | (g <<  8);
+        *(buf + i) = (*(buf + i) & 0xFF00FFFF) | (b << 16);
+
+        // alpha channel is preserved and no grain is applied to it
+        *(outframe + i) = (*(outframe + i) & 0x00FFFFFF) | (*(inframe + i) & 
0xFF000000);
+    }
+
+    // then blur
+    if(inst->blur_amt != 0.0)
+    {
+        unsigned int pixel_count;
+        int blur_range;
+        for(int i = 0; i < inst->height * inst->width; i++)
+        {
+            pixel_count = 1;
+            b = ((*(buf + i) & 0x00FF0000) >> 16);
+            g = ((*(buf + i) & 0x0000FF00) >>  8);
+            r = ((*(buf + i) & 0x000000FF)      );
+
+            blur_range = random_range_uint8(inst->blur_amt * 4);
+            for(int xx = -blur_range - 1; xx < blur_range; xx++)
+            {
+                for(int yy = -blur_range - 1; yy < blur_range; yy++)
+                {
+                    if((i + xx + (yy * inst->width)) > 0 && (i + xx + (yy * 
inst->width)) < (inst->width * inst->height) - 1)
+                    {
+                        b += (*(buf + i + xx + (yy * inst->width)) & 
0x00FF0000) >> 16;
+                        g += (*(buf + i + xx + (yy * inst->width)) & 
0x0000FF00) >>  8;
+                        r += (*(buf + i + xx + (yy * inst->width)) & 
0x000000FF);
+                        pixel_count++;
+                    }
+                }
+            }
+
+            b = b / pixel_count;
+            g = g / pixel_count;
+            r = r / pixel_count;
+
+            *(outframe + i) = (*(outframe + i) & 0xFFFFFF00) |  r;
+            *(outframe + i) = (*(outframe + i) & 0xFFFF00FF) | (g <<  8);
+            *(outframe + i) = (*(outframe + i) & 0xFF00FFFF) | (b << 16);
+        }
+        free(buf);
+    }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/frei0r-2.3.1/src/filter/gateweave/CMakeLists.txt 
new/frei0r-2.3.3/src/filter/gateweave/CMakeLists.txt
--- old/frei0r-2.3.1/src/filter/gateweave/CMakeLists.txt        1970-01-01 
01:00:00.000000000 +0100
+++ new/frei0r-2.3.3/src/filter/gateweave/CMakeLists.txt        2024-06-07 
11:00:56.000000000 +0200
@@ -0,0 +1,11 @@
+set (SOURCES gateweave.c)
+set (TARGET gateweave)
+
+if (MSVC)
+  set (SOURCES ${SOURCES} ${FREI0R_DEF})
+endif (MSVC)
+
+add_library (${TARGET}  MODULE ${SOURCES})
+set_target_properties (${TARGET} PROPERTIES PREFIX "")
+
+install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR})
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/frei0r-2.3.1/src/filter/gateweave/gateweave.c 
new/frei0r-2.3.3/src/filter/gateweave/gateweave.c
--- old/frei0r-2.3.1/src/filter/gateweave/gateweave.c   1970-01-01 
01:00:00.000000000 +0100
+++ new/frei0r-2.3.3/src/filter/gateweave/gateweave.c   2024-06-07 
11:00:56.000000000 +0200
@@ -0,0 +1,286 @@
+#include <stdlib.h>
+#include <math.h>
+#include "frei0r.h"
+#include "frei0r_math.h"
+
+
+// let's try to walk through everything because i'm a moron
+// this is the struct for the effect instance
+typedef struct gateweave_instance
+{
+    // image dimensions
+    unsigned int width;
+    unsigned int height;
+
+    // parameters
+    double interval;
+    double max_move_x;
+    double max_move_y;
+
+    // other variables that the effect uses to keep track of things
+    double next_key_x;
+    double next_key_y;
+    double prev_key_x;
+    double prev_key_y;
+
+} gateweave_instance_t;
+
+
+// these functions are for the effect
+static double gateweave_random_range(double range, double last)
+{
+    if(range <= 0)
+    {
+        return 0;
+    }
+
+    // the maximum shift is 10 pixels
+    // since range includes fractional values, we want to multiply it by 100
+    // this will generate an integer between -100 and 100 for the shift
+    // and then we divide by 100 to receive a decimal answer between -10.00 
and 10.00
+    range *= 10;
+    int int_range = range * 100;
+    int_range = (rand() % (int_range * 2)) - int_range;
+    double ret = int_range / 100.0;
+
+    // we don't want to generate a value similar to one we already generated 
twice in a row
+    ret = CLAMP(ret, -range, range);
+    if((ret > 0 && ret >= last - 0.12) || (ret < 0 && ret <= last + 0.12))
+    {
+        ret *= -1;
+    }
+    return ret;
+}
+
+static inline double gateweave_lerp(double v0, double v1, double t)
+{
+    return v0 + t * (v1 - v0);
+}
+
+
+// this function mixes the colors of two pixels
+// a is the original pixel that will be changed
+// b is the second pixel that will not be changed
+// the amount is how much of the second pixel will be mixed
+// an amount of 1 means pixel a will be equal to pixel b
+// an amount of 0 means pixel a will be equal to pixel a (no change)
+// an amount of 0.5 means pixel a will be equal to 0.5 * pixel a + 0.5 * pixel 
b
+static uint32_t gateweave_blend_color(uint32_t a, uint32_t b, double amount)
+{
+    uint8_t c_a;
+    uint8_t c_b;
+    uint8_t c_g;
+    uint8_t c_r;
+    uint32_t output;
+
+    //   RRGGBBAA
+    // 0xFFFFFFFF
+    c_a = CLAMP0255(((a & 0xFF000000) >> 24) * (1 - amount) + ((b & 
0xFF000000) >> 24) * (amount));
+    c_b = CLAMP0255(((a & 0x00FF0000) >> 16) * (1 - amount) + ((b & 
0x00FF0000) >> 16) * (amount));
+    c_g = CLAMP0255(((a & 0x0000FF00) >>  8) * (1 - amount) + ((b & 
0x0000FF00) >>  8) * (amount));
+    c_r = CLAMP0255(((a & 0x000000FF))       * (1 - amount) + ((b & 
0x000000FF))       * (amount));
+
+    output = (output & 0xFFFFFF00) |  (uint32_t)c_r;
+    output = (output & 0xFFFF00FF) | ((uint32_t)c_g <<  8);
+    output = (output & 0xFF00FFFF) | ((uint32_t)c_b << 16);
+    output = (output & 0x00FFFFFF) | ((uint32_t)c_a << 24);
+
+    return output;
+}
+
+// this function is the one that ultimately manipulates the image
+// it shifts the image and can do so to a value less than one pixel
+static inline void gateweave_shift_picture(const uint32_t* in, uint32_t* out, 
double shift_x, double shift_y, int w, int h)
+{
+    uint32_t* buf = (uint32_t*)calloc(w * h, sizeof(uint32_t));
+
+    // first we shift to the nearest whole pixel
+    int int_shift_x = shift_x;
+    int int_shift_y = shift_y;
+    int pixel_shift = int_shift_x + (int_shift_y * w);
+    for(unsigned int i = 0; i < w * h; i++)
+    {
+        if(i + pixel_shift < 0 || i + pixel_shift >= w * h)
+        {
+            *(buf + i) = 0;
+        }
+        else
+        {
+            *(buf + i) = *(in + i + pixel_shift);
+        }
+    }
+
+    // then we shift the fractional component
+    // let's think about how this works
+    // let's suppose we shift left 1.5 pixels and shift down 1.25 pixels
+    // after shifting 1 pixel left and 1 pixel down, we still have the 0.5 and 
0.25 shifts left to do
+    // to do this we want each pixel to equal 50% the current pixel and 50% 
the pixel to its left
+    // we also want each pixel to equal 75% the current pixel and 25% the 
pixel below it
+    // but this isn't actually possible to do
+    shift_x -= int_shift_x;
+    shift_y -= int_shift_y;
+
+    int shift_component_x;
+    int shift_component_y;
+
+    char larger_x_comp = 0;
+    if(fabs(shift_x) > fabs(shift_y))
+    {
+        larger_x_comp = 1;
+    }
+
+    if(shift_x < 0)
+    {
+        shift_component_x = -1;
+    }
+    else
+    {
+        shift_component_x = 1;
+    }
+    if(shift_y < 0)
+    {
+        shift_component_y = -w;
+    }
+    else
+    {
+        shift_component_y = w;
+    }
+
+    uint32_t v = 0;
+    for(unsigned int i = 0; i < w * h; i++)
+    {
+        if(!(i + shift_component_x < 0 || i + shift_component_x >= w * h || i 
+ shift_component_x + shift_component_y < 0 || i + shift_component_x + 
shift_component_y >= w * h))
+        {
+            if(larger_x_comp)
+            {
+                v = gateweave_blend_color(*(buf + i + shift_component_x), 
*(buf + i + shift_component_x + shift_component_y), shift_y);
+                *(out + i) = gateweave_blend_color(*(buf + i), v, shift_x);
+            }
+            else
+            {
+                v = gateweave_blend_color(*(buf + i + shift_component_y), 
*(buf + i + shift_component_x + shift_component_y), shift_x);
+                *(out + i) = gateweave_blend_color(*(buf + i), v, shift_y);
+            }
+        }
+    }
+    free(buf);
+}
+
+
+// these functions are for frei0r
+// mostly copy/paste/slightly modified from the other frei0r effects
+int f0r_init()
+{
+    return 1;
+}
+
+void f0r_deinit()
+{}
+
+void f0r_get_plugin_info(f0r_plugin_info_t* info)
+{
+    info->name = "Gate Weave";
+    info->author = "esmane";
+    info->explanation = "Randomly moves frame around to simulate film gate 
weave.";
+    info->plugin_type = F0R_PLUGIN_TYPE_FILTER;
+    info->color_model = F0R_COLOR_MODEL_RGBA8888;
+    info->frei0r_version = FREI0R_MAJOR_VERSION;
+    info->major_version = 0;
+    info->minor_version = 2;
+    info->num_params = 3;
+}
+
+void f0r_get_param_info(f0r_param_info_t* info, int param_index)
+{
+    switch(param_index)
+    {
+    case 0:
+        info->name = "Interval";
+        info->explanation = "The amount of time before the position is 
randomized again. The larger the number the slower the picture will move.";
+        info->type = F0R_PARAM_DOUBLE;
+        break;
+
+    case 1:
+        info->name = "Maximum Horizontal Movement";
+        info->explanation = "The maximum distance the picture could move left 
or right. The larger the number the more the picture moves and the less subtle 
the effect.";
+        info->type = F0R_PARAM_DOUBLE;
+        break;
+
+    case 2:
+        info->name = "Maximum Vertical Movement";
+        info->explanation = "The maximum distance the picture could move up or 
down. The larger the number the more the picture moves and the less subtle the 
effect.";
+        info->type = F0R_PARAM_DOUBLE;
+        break;
+    }
+}
+
+f0r_instance_t f0r_construct(unsigned int width, unsigned int height)
+{
+    gateweave_instance_t* inst = (gateweave_instance_t*)calloc(1, 
sizeof(*inst));
+
+    inst->width = width;
+    inst->height = height;
+    inst->interval = 0.6;
+    inst->max_move_x = 0.2;
+    inst->max_move_y = 0.2;
+
+    // other variables that the effect uses to keep track of things
+    inst->next_key_x = gateweave_random_range(inst->max_move_x, 0);
+    inst->next_key_y = gateweave_random_range(inst->max_move_y, 0);
+    inst->prev_key_x = 0;
+    inst->prev_key_y = 0;
+
+    return (f0r_instance_t)inst;
+}
+
+void f0r_destruct(f0r_instance_t instance)
+{
+    gateweave_instance_t* inst = (gateweave_instance_t*)instance;
+    free(instance);
+}
+
+void f0r_set_param_value(f0r_instance_t instance, f0r_param_t param, int 
param_index)
+{
+    gateweave_instance_t* inst = (gateweave_instance_t*)instance;
+    switch(param_index)
+    {
+    case 0:
+        inst->interval = *((double*)param);
+        break;
+    case 1:
+        inst->max_move_x = *((double*)param);
+        break;
+    case 2:
+        inst->max_move_y = *((double*)param);
+        break;
+    }
+}
+
+void f0r_get_param_value(f0r_instance_t instance, f0r_param_t param, int 
param_index)
+{
+    gateweave_instance_t* inst = (gateweave_instance_t*)instance;
+    switch(param_index)
+    {
+    case 0:
+        *((double*)param) = inst->interval;
+        break;
+    case 1:
+        *((double*)param) = inst->max_move_x;
+        break;
+    case 2:
+        *((double*)param) = inst->max_move_y;
+        break;
+    }
+}
+
+void f0r_update(f0r_instance_t instance, double time, const uint32_t* inframe, 
uint32_t* outframe)
+{
+    gateweave_instance_t* inst = (gateweave_instance_t*)instance;
+    inst->next_key_x = gateweave_random_range(inst->max_move_x, 
inst->next_key_x);
+    inst->next_key_y = gateweave_random_range(inst->max_move_y, 
inst->next_key_y);
+
+    inst->prev_key_x = gateweave_lerp(inst->next_key_x, inst->prev_key_x, 
inst->interval);
+    inst->prev_key_y = gateweave_lerp(inst->next_key_y, inst->prev_key_y, 
inst->interval);
+
+    gateweave_shift_picture(inframe, outframe, inst->prev_key_x, 
inst->prev_key_y, inst->width, inst->height);
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/frei0r-2.3.1/src/filter/kaleid0sc0pe/CMakeLists.txt 
new/frei0r-2.3.3/src/filter/kaleid0sc0pe/CMakeLists.txt
--- old/frei0r-2.3.1/src/filter/kaleid0sc0pe/CMakeLists.txt     2023-08-04 
16:50:11.000000000 +0200
+++ new/frei0r-2.3.3/src/filter/kaleid0sc0pe/CMakeLists.txt     2024-06-07 
11:00:56.000000000 +0200
@@ -1,5 +1,6 @@
 include(CheckIncludeFileCXX)
 include(CheckCSourceCompiles)
+include(CheckCXXSourceCompiles)
 
 cmake_policy(SET CMP0056 NEW)
 cmake_policy(SET CMP0066 NEW)
@@ -59,4 +60,10 @@
     endif()
 endif()
 
+check_cxx_source_compiles("
+                           #include <future>
+                           int main(){ std::future<void> f; return 0;}" 
HAS_WORKING_FUTURE)
+if (NOT HAS_WORKING_FUTURE)
+       add_definitions(-DNO_FUTURE)
+endif()
 install (TARGETS ${TARGET} LIBRARY DESTINATION ${LIBDIR})
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/frei0r-2.3.1/src/filter/kaleid0sc0pe/README.md 
new/frei0r-2.3.3/src/filter/kaleid0sc0pe/README.md
--- old/frei0r-2.3.1/src/filter/kaleid0sc0pe/README.md  2023-08-04 
16:50:11.000000000 +0200
+++ new/frei0r-2.3.3/src/filter/kaleid0sc0pe/README.md  2024-06-07 
11:00:56.000000000 +0200
@@ -9,6 +9,11 @@
 | [![Colorful Stones](colorful_stones-400.jpg)](colorful_stones.jpg)  | 
[![Kaleidoscoped Colorful 
Stones](colorful_stones-tr16-400.jpg)](colorful_stones-tr16.jpg)  |
 |Licensed under [CC BY 
2.0](https://creativecommons.org/licenses/by/2.0/?ref=ccsearch&atype=html "CC 
BY 2.0") | Segmentation 16, source segment centred to top right|
 
+| Source Image | ["New Years Day 
2024"](https://www.youtube.com/watch?v=9tZwRUTyD08 "New Years Day 2024)") 
(YouTube)|
+| - | - |
+| [![New Years Day 2024 
Source](new-years-day-2024-source-480.jpg)](new-years-day-2024-source-480.jpg)  
| [![New Years Day 2024 
YouTube](https://img.youtube.com/vi/9tZwRUTyD08/0.jpg)](https://www.youtube.com/watch?v=9tZwRUTyD08)
  |
+| Video created from single source image via zoom/rotate/pan and kaleidoscope 
animation | Animated Music Video created in [KdenLive](https://kdenlive.org) by 
[Paul Haesler](https://www.youtube.com/@PaulHaesler) |
+
 | [Created Many and Strange (Official Music 
Video)](https://www.youtube.com/watch?v=2r9ggSie1wI) (YouTube) by [Spaceman 
Paul](https://github.com/SpacemanPaul "Spaceman Paul") |
 | --- | 
 | [![Created Many and Strange (Official Music Video) by 
@SpacemanPaul](https://img.youtube.com/vi/2r9ggSie1wI/0.jpg)](https://www.youtube.com/watch?v=2r9ggSie1wI)
 |
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/frei0r-2.3.1/src/filter/kaleid0sc0pe/kaleid0sc0pe.cpp 
new/frei0r-2.3.3/src/filter/kaleid0sc0pe/kaleid0sc0pe.cpp
--- old/frei0r-2.3.1/src/filter/kaleid0sc0pe/kaleid0sc0pe.cpp   2023-08-04 
16:50:11.000000000 +0200
+++ new/frei0r-2.3.3/src/filter/kaleid0sc0pe/kaleid0sc0pe.cpp   2024-06-07 
11:00:56.000000000 +0200
@@ -25,7 +25,9 @@
 #include "kaleid0sc0pe.h"
 #include <memory>
 #include <cstring>
+#ifndef NO_FUTURE
 #include <future>
+#endif
 
 #ifdef __SSE2__
 #define USE_SSE2
@@ -612,6 +614,21 @@
     if (m_n_segments == 0) {
         init();
     }
+#ifdef NO_FUTURE
+    Block block(reinterpret_cast<const std::uint8_t*>(in_frame),
+        reinterpret_cast<std::uint8_t*>(out_frame),
+        0, 0,
+        m_width - 1, m_height - 1);
+#ifdef __SSE2__
+    if (m_edge_reflect) {
+        process_block(&block);
+    } else {
+        process_block_bg(&block);
+    }
+#else
+    process_block(&block);
+#endif
+#else
     if (m_n_threads == 1) {
         Block block(reinterpret_cast<const std::uint8_t*>(in_frame),
             reinterpret_cast<std::uint8_t*>(out_frame),
@@ -655,6 +672,7 @@
             f.wait();
         }
     }
+#endif
 
     return 0;
 }
Binary files 
old/frei0r-2.3.1/src/filter/kaleid0sc0pe/new-years-day-2024-source-480.jpg and 
new/frei0r-2.3.3/src/filter/kaleid0sc0pe/new-years-day-2024-source-480.jpg 
differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/frei0r-2.3.1/src/filter/nosync0r/nosync0r.cpp 
new/frei0r-2.3.3/src/filter/nosync0r/nosync0r.cpp
--- old/frei0r-2.3.1/src/filter/nosync0r/nosync0r.cpp   2023-08-04 
16:50:11.000000000 +0200
+++ new/frei0r-2.3.3/src/filter/nosync0r/nosync0r.cpp   2024-06-07 
11:00:56.000000000 +0200
@@ -17,7 +17,7 @@
                       const uint32_t* in)
   {
     unsigned int
-      first_line=static_cast<unsigned int>(height*std::fmod(hsync,1.0));
+      first_line=static_cast<unsigned 
int>(height*std::fmod(std::fabs(hsync),1.0));
     
     std::copy(in+width*first_line, in+width*height, out);
     std::copy(in, in+width*first_line, out+width*(height-first_line));

Reply via email to