Commit 68757b77 authored by Till Theato's avatar Till Theato
Browse files

Add support for upcoming version 2.1 of filter cartoon.

svn path=/trunk/kdenlive/; revision=5875
parent d9646552
<!DOCTYPE kpartgui>
<effect tag="frei0r.cartoon" id="frei0r.cartoon" type="video" unique="1">
<group>
<effect tag="frei0r.cartoon" id="frei0r.cartoon" type="video">
<name>Cartoon</name>
<description>Cartoonify video, do a form of edge detect</description>
<author>Dries Pruimboom, Jaromil</author>
<parameter type="constant" name="triplevel" max="1000" min="0" default="500">
<parameter type="constant" name="triplevel" max="100000" min="0" default="500">
<name>Level of trip</name>
</parameter>
<parameter type="constant" name="diffspace" max="256" min="0" default="1">
<name>Difference space</name>
</parameter>
</effect>
</effect>
<effect LC_NUMERIC="C" tag="frei0r.cartoon" id="frei0r.cartoon" type="video" version="2.1">
<name>Cartoon</name>
<description>Cartoonify video, do a form of edge detect</description>
<author>Dries Pruimboom, Jaromil</author>
<parameter type="constant" name="triplevel" max="100000" min="0" default="99900" factor="100000">
<name>Level of trip</name>
</parameter>
<parameter type="constant" name="diffspace" max="256" min="0" default="1" factor="256">
<name>Difference space</name>
</parameter>
</effect>
</group>
INSTALL(FILES
frei0r.levels.js
frei0r.cartoon.js
frei0r.curves.js
frei0r.levels.js
DESTINATION ${DATA_INSTALL_DIR}/kdenlive/effects/update)
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);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment