From: Till Theato Date: Fri, 9 Sep 2011 22:10:33 +0000 (+0000) Subject: Add support for upcoming version 2.1 of filter cartoon. X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=68757b77f7310d6b49c6561fc491b5b041e8c7e6;p=kdenlive Add support for upcoming version 2.1 of filter cartoon. svn path=/trunk/kdenlive/; revision=5875 --- diff --git a/effects/frei0r_cartoon.xml b/effects/frei0r_cartoon.xml index 09846f44..42197a6e 100644 --- a/effects/frei0r_cartoon.xml +++ b/effects/frei0r_cartoon.xml @@ -1,12 +1,25 @@ - + + Cartoon Cartoonify video, do a form of edge detect Dries Pruimboom, Jaromil - + Level of trip Difference space - + + + Cartoon + Cartoonify video, do a form of edge detect + Dries Pruimboom, Jaromil + + Level of trip + + + Difference space + + + diff --git a/effects/update/CMakeLists.txt b/effects/update/CMakeLists.txt index f582223f..e1c421b4 100644 --- a/effects/update/CMakeLists.txt +++ b/effects/update/CMakeLists.txt @@ -1,5 +1,6 @@ INSTALL(FILES -frei0r.levels.js +frei0r.cartoon.js frei0r.curves.js +frei0r.levels.js DESTINATION ${DATA_INSTALL_DIR}/kdenlive/effects/update) diff --git a/effects/update/frei0r.cartoon.js b/effects/update/frei0r.cartoon.js new file mode 100644 index 00000000..7faacc94 --- /dev/null +++ b/effects/update/frei0r.cartoon.js @@ -0,0 +1,19 @@ + +var update = new Object(); + +update["diffspace"] = new Array(new Array(2.1, function(v, d) { return this.updDiff(v, d); })); +update["triplevel"] = new Array(new Array(2.1, function(v, d) { return this.updTrip(v, d); })); + +function updDiff(value, isDowngrade) { + if (isDowngrade) + return value * 256; + else + return value / 256.; +} + +function updTrip(value, isDowngrade) { + if (isDowngrade) + return 1 / (1 - value) - 1; + else + return 1 - 1 / (value + 1); +}