From: Till Theato Date: Sat, 10 Sep 2011 23:43:49 +0000 (+0000) Subject: Add support of SOP/Sat effect version 0.2. X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=a1f0129828f5881f7f7b41bd272784227d2cad23;p=kdenlive Add support of SOP/Sat effect version 0.2. svn path=/trunk/kdenlive/; revision=5911 --- diff --git a/effects/frei0r_sopsat.xml b/effects/frei0r_sopsat.xml index c43cff2e..f4a9c1e3 100644 --- a/effects/frei0r_sopsat.xml +++ b/effects/frei0r_sopsat.xml @@ -1,5 +1,6 @@ - + + SOP/Sat Changes Slope, Offset, and Power of the color components, and the overall Saturation, according to the ASC CDL (Color Decision List). Simon A. Eugster (Granjow) @@ -52,4 +53,60 @@ The overall saturation will be changed in the last step of this filter. - + + + + SOP/Sat + Changes Slope, Offset, and Power of the color components, and the overall Saturation, according to the ASC CDL (Color Decision List). + Simon A. Eugster (Granjow) + + Slope Red + + All effects can be observed well when applied on a greyscale gradient and looking at the RGB Parade monitor.]]> + + + Slope Green + + + Slope Blue + + + Slope Alpha + + + + Offset Red + Changing the offset lifts (or lowers) the brightness of each pixel by the given value. + + + Offset Green + + + Offset Blue + + + Offset Alpha + + + + Power Red + + Mathematically, what happens is an exponentiation of the pixel brightness on [0,1] by the gamma value.]]> + + + Power Green + + + Power Blue + + + Power Alpha + + + + Overall Saturation + The overall saturation will be changed in the last step of this filter. + + + + diff --git a/effects/update/CMakeLists.txt b/effects/update/CMakeLists.txt index 0112dd0f..6422b405 100644 --- a/effects/update/CMakeLists.txt +++ b/effects/update/CMakeLists.txt @@ -5,5 +5,6 @@ frei0r.cartoon.js frei0r.curves.js frei0r.levels.js frei0r.lightgraffiti.js +frei0r.sopsat.js frei0r.vertigo.js DESTINATION ${DATA_INSTALL_DIR}/kdenlive/effects/update) diff --git a/effects/update/frei0r.sopsat.js b/effects/update/frei0r.sopsat.js new file mode 100644 index 00000000..5ad7c049 --- /dev/null +++ b/effects/update/frei0r.sopsat.js @@ -0,0 +1,26 @@ + +var update = new Object(); + +update["rSlope"] = new Array(new Array(0.2, function(v, d) { return this.upd1(v, d, 20., 0); })); +update["gSlope"] = update["rSlope"]; +update["bSlope"] = update["rSlope"]; +update["aSlope"] = update["rSlope"]; +update["rOffset"] = new Array(new Array(0.2, function(v, d) { return this.upd1(v, d, 8., -4); })); +update["gOffset"] = update["rOffset"]; +update["bOffset"] = update["rOffset"]; +update["aOffset"] = update["rOffset"]; +update["rPower"] = update["rSlope"]; +update["gPower"] = update["rSlope"]; +update["bPower"] = update["rSlope"]; +update["aPower"] = update["rSlope"]; +update["saturation"] = new Array(new Array(0.2, function(v, d) { return this.upd1(v, d, 10., 0); })); + +function upd1(value, isDowngrade, factor, offset) { + var valueList = value.split(';'); + var locale = new QLocale(); + for (var i = 0; i < valueList.length; ++i) { + var current = valueList[i].split('='); + valueList[i] = current[0] + '=' + locale.toString(isDowngrade ? offset + current[1] * factor : (current[1] - offset) / factor); + } + return valueList.join(';'); +}