summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Dennedy <dan@dennedy.org>2015-07-20 04:30:53 (GMT)
committer Dan Dennedy <dan@dennedy.org>2015-07-20 04:30:53 (GMT)
commit455c441a5d978109e00c5d05b9f0ec73617c51c3 (patch)
tree089bad2db0f23af7e1077d695a078bd9cbb6fe78
parentd206609b52fbdbb23cb086b04ae1698f9021b73f (diff)
Fix frame-parallelism in C++ plugins.
-rw-r--r--include/frei0r.hpp84
-rw-r--r--src/filter/baltan/baltan.cpp14
-rw-r--r--src/filter/bluescreen0r/bluescreen0r.cpp8
-rw-r--r--src/filter/cartoon/cartoon.cpp8
-rw-r--r--src/filter/d90stairsteppingfix/d90stairsteppingfix.cpp8
-rw-r--r--src/filter/delay0r/delay0r.cpp8
-rw-r--r--src/filter/delaygrab/delaygrab.cpp14
-rw-r--r--src/filter/edgeglow/edgeglow.cpp8
-rw-r--r--src/filter/equaliz0r/equaliz0r.cpp12
-rw-r--r--src/filter/lightgraffiti/lightgraffiti.cpp8
-rw-r--r--src/filter/ndvi/ndvi.cpp32
-rw-r--r--src/filter/nervous/nervous.cpp14
-rw-r--r--src/filter/nosync0r/nosync0r.cpp8
-rw-r--r--src/filter/primaries/primaries.cpp8
-rw-r--r--src/filter/scanline0r/scanline0r.cpp8
-rw-r--r--src/filter/sobel/sobel.cpp8
-rw-r--r--src/filter/sopsat/sopsat.cpp8
-rw-r--r--src/filter/threelay0r/threelay0r.cpp8
-rw-r--r--src/filter/timeout/timeout.cpp8
-rw-r--r--src/filter/tutorial/tutorial.cpp8
-rw-r--r--src/filter/twolay0r/twolay0r.cpp8
-rw-r--r--src/filter/vignette/vignette.cpp8
-rw-r--r--src/generator/dem0scene/plasma.cpp14
-rw-r--r--src/generator/lissajous0r/lissajous0r.cpp8
-rw-r--r--src/generator/nois0r/nois0r.cpp8
-rw-r--r--src/generator/onecol0r/onecol0r.cpp8
-rw-r--r--src/generator/partik0l/partik0l.cpp26
-rw-r--r--src/mixer2/addition/addition.cpp8
-rw-r--r--src/mixer2/addition_alpha/addition_alpha.cpp8
-rw-r--r--src/mixer2/alphaatop/alphaatop.cpp8
-rw-r--r--src/mixer2/alphain/alphain.cpp8
-rw-r--r--src/mixer2/alphaout/alphaout.cpp8
-rw-r--r--src/mixer2/alphaover/alphaover.cpp8
-rw-r--r--src/mixer2/alphaxor/alphaxor.cpp8
-rw-r--r--src/mixer2/blend/blend.cpp8
-rw-r--r--src/mixer2/burn/burn.cpp10
-rw-r--r--src/mixer2/color_only/color_only.cpp8
-rw-r--r--src/mixer2/darken/darken.cpp8
-rw-r--r--src/mixer2/difference/difference.cpp8
-rw-r--r--src/mixer2/divide/divide.cpp8
-rw-r--r--src/mixer2/dodge/dodge.cpp8
-rw-r--r--src/mixer2/grain_extract/grain_extract.cpp8
-rw-r--r--src/mixer2/grain_merge/grain_merge.cpp8
-rw-r--r--src/mixer2/hardlight/hardlight.cpp8
-rw-r--r--src/mixer2/hue/hue.cpp8
-rw-r--r--src/mixer2/lighten/lighten.cpp8
-rw-r--r--src/mixer2/multiply/multiply.cpp8
-rw-r--r--src/mixer2/overlay/overlay.cpp8
-rw-r--r--src/mixer2/saturation/saturation.cpp8
-rw-r--r--src/mixer2/screen/screen.cpp8
-rw-r--r--src/mixer2/softlight/softlight.cpp8
-rw-r--r--src/mixer2/subtract/subtract.cpp8
-rw-r--r--src/mixer2/value/value.cpp8
-rw-r--r--src/mixer2/xfade0r/xfade0r.cpp8
54 files changed, 376 insertions, 204 deletions
diff --git a/include/frei0r.hpp b/include/frei0r.hpp
index 8e86be7..375f16c 100644
--- a/include/frei0r.hpp
+++ b/include/frei0r.hpp
@@ -40,11 +40,9 @@ namespace frei0r
{
public:
- double time;
unsigned int width;
unsigned int height;
unsigned int size; // = width * height
- uint32_t* out;
std::vector<void*> param_ptrs;
fx()
@@ -154,13 +152,11 @@ namespace frei0r
}
- virtual void update_l(double time,
- const uint32_t* inframe1,
- const uint32_t* inframe2,
- const uint32_t* inframe3,
- uint32_t* outframe) = 0;
-
- virtual void update() = 0;
+ virtual void update(double time,
+ uint32_t* out,
+ const uint32_t* in1,
+ const uint32_t* in2,
+ const uint32_t* in3) = 0;
virtual ~fx()
{
@@ -174,94 +170,34 @@ namespace frei0r
public:
virtual unsigned int effect_type(){ return F0R_PLUGIN_TYPE_SOURCE; }
-
- virtual void update_l(double time_,
- const uint32_t* inframe1,
- const uint32_t* inframe2,
- const uint32_t* inframe3,
- uint32_t* outframe_)
- {
- time = time_;
- out = outframe_;
- update();
- }
};
class filter : public fx
{
protected:
- const uint32_t* in;
filter() {}
public:
virtual unsigned int effect_type(){ return F0R_PLUGIN_TYPE_FILTER; }
-
- virtual void update_l(double time_,
- const uint32_t* inframe1,
- const uint32_t* inframe2,
- const uint32_t* inframe3,
- uint32_t* outframe)
- {
- time = time_;
- out = outframe;
- in = inframe1;
- update();
- }
-
};
class mixer2 : public fx
{
protected:
- const uint32_t* in1;
- const uint32_t* in2;
-
mixer2() {}
public:
virtual unsigned int effect_type(){ return F0R_PLUGIN_TYPE_MIXER2; }
-
- virtual void update_l(double time_,
- const uint32_t* inframe1,
- const uint32_t* inframe2,
- const uint32_t* inframe3,
- uint32_t* outframe)
- {
- time = time_;
- out = outframe;
- in1 = inframe1;
- in2 = inframe2;
- update();
- }
};
class mixer3 : public fx
{
protected:
- const uint32_t* in1;
- const uint32_t* in2;
- const uint32_t* in3;
-
mixer3() {}
public:
virtual unsigned int effect_type(){ return F0R_PLUGIN_TYPE_MIXER3; }
-
- virtual void update_l(double time_,
- const uint32_t* inframe1,
- const uint32_t* inframe2,
- const uint32_t* inframe3,
- uint32_t* outframe)
- {
- time = time_;
- out = outframe;
- in1 = inframe1;
- in2 = inframe1;
- in3 = inframe1;
- update();
- }
-
};
@@ -361,11 +297,11 @@ void f0r_update2(f0r_instance_t instance, double time,
const uint32_t* inframe3,
uint32_t* outframe)
{
- static_cast<frei0r::fx*>(instance)->update_l(time,
- inframe1,
- inframe2,
- inframe3,
- outframe);
+ static_cast<frei0r::fx*>(instance)->update(time,
+ outframe,
+ inframe1,
+ inframe2,
+ inframe3);
}
// compability for frei0r 1.0
diff --git a/src/filter/baltan/baltan.cpp b/src/filter/baltan/baltan.cpp
index 0ac44c4..5f6e658 100644
--- a/src/filter/baltan/baltan.cpp
+++ b/src/filter/baltan/baltan.cpp
@@ -49,7 +49,11 @@ public:
Baltan(int wdt, int hgt);
~Baltan();
- virtual void update();
+ virtual void update(double time,
+ uint32_t* out,
+ const uint32_t* in,
+ const uint32_t* in2,
+ const uint32_t* in3);
private:
ScreenGeometry geo;
@@ -84,7 +88,11 @@ Baltan::~Baltan() {
free(procbuf);
}
-void Baltan::update() {
+void Baltan::update(double time,
+ uint32_t* out,
+ const uint32_t* in,
+ const uint32_t* in2,
+ const uint32_t* in3) {
int i, cf;
uint32_t *src = (uint32_t*)in;
@@ -122,4 +130,4 @@ void Baltan::_init(int wdt, int hgt) {
frei0r::construct<Baltan> plugin("Baltan",
"delayed alpha smoothed blit of time",
"Kentaro, Jaromil",
- 3,0);
+ 3,1);
diff --git a/src/filter/bluescreen0r/bluescreen0r.cpp b/src/filter/bluescreen0r/bluescreen0r.cpp
index 4b28272..5a022d4 100644
--- a/src/filter/bluescreen0r/bluescreen0r.cpp
+++ b/src/filter/bluescreen0r/bluescreen0r.cpp
@@ -62,7 +62,11 @@ public:
register_param(dist, "Distance", "Distance to Color (127 is good)");
}
- virtual void update() {
+ virtual void update(double time,
+ uint32_t* out,
+ const uint32_t* in,
+ const uint32_t* in2,
+ const uint32_t* in3) {
const uint32_t* pixel =in;
uint32_t* outpixel= out;
@@ -93,5 +97,5 @@ public:
};
-frei0r::construct<bluescreen0r> plugin("bluescreen0r", "Color to alpha (blit SRCALPHA)", "Hedde Bosman",0,2,F0R_COLOR_MODEL_RGBA8888);
+frei0r::construct<bluescreen0r> plugin("bluescreen0r", "Color to alpha (blit SRCALPHA)", "Hedde Bosman",0,3,F0R_COLOR_MODEL_RGBA8888);
diff --git a/src/filter/cartoon/cartoon.cpp b/src/filter/cartoon/cartoon.cpp
index be9b20f..56fde55 100644
--- a/src/filter/cartoon/cartoon.cpp
+++ b/src/filter/cartoon/cartoon.cpp
@@ -93,7 +93,11 @@ public:
delete geo;
}
- virtual void update() {
+ virtual void update(double time,
+ uint32_t* out,
+ const uint32_t* in,
+ const uint32_t* in2,
+ const uint32_t* in3) {
// Cartoonify picture, do a form of edge detect
int x, y, t;
@@ -191,4 +195,4 @@ long Cartoon::GetMaxContrast(int32_t *src,int x,int y) {
frei0r::construct<Cartoon> plugin("Cartoon",
"Cartoonify video, do a form of edge detect",
"Dries Pruimboom, Jaromil",
- 2,1);
+ 2,2);
diff --git a/src/filter/d90stairsteppingfix/d90stairsteppingfix.cpp b/src/filter/d90stairsteppingfix/d90stairsteppingfix.cpp
index 45ed2ae..ce8f716 100644
--- a/src/filter/d90stairsteppingfix/d90stairsteppingfix.cpp
+++ b/src/filter/d90stairsteppingfix/d90stairsteppingfix.cpp
@@ -195,7 +195,11 @@ public:
delete[] m_mesh;
}
- virtual void update()
+ virtual void update(double time,
+ uint32_t* out,
+ const uint32_t* in,
+ const uint32_t* in2,
+ const uint32_t* in3)
{
if (height == 720) {
@@ -245,5 +249,5 @@ private:
frei0r::construct<D90StairsteppingFix> plugin("Nikon D90 Stairstepping fix",
"Removes the Stairstepping from Nikon D90 videos (720p only) by interpolation",
"Simon A. Eugster (Granjow)",
- 0,1,
+ 0,2,
F0R_COLOR_MODEL_RGBA8888);
diff --git a/src/filter/delay0r/delay0r.cpp b/src/filter/delay0r/delay0r.cpp
index 40a1dd1..21a0124 100644
--- a/src/filter/delay0r/delay0r.cpp
+++ b/src/filter/delay0r/delay0r.cpp
@@ -23,7 +23,11 @@ public:
}
}
- virtual void update()
+ virtual void update(double time,
+ uint32_t* out,
+ const uint32_t* in,
+ const uint32_t* in2,
+ const uint32_t* in3)
{
unsigned int* reusable = 0;
// remove old frames
@@ -75,5 +79,5 @@ private:
frei0r::construct<delay0r> plugin("delay0r",
"video delay",
"Martin Bayer",
- 0,1);
+ 0,2);
diff --git a/src/filter/delaygrab/delaygrab.cpp b/src/filter/delaygrab/delaygrab.cpp
index 8a32a04..0ab0e94 100644
--- a/src/filter/delaygrab/delaygrab.cpp
+++ b/src/filter/delaygrab/delaygrab.cpp
@@ -59,7 +59,11 @@ public:
DelayGrab(int wdt, int hgt);
~DelayGrab();
- virtual void update();
+ virtual void update(double time,
+ uint32_t* out,
+ const uint32_t* in,
+ const uint32_t* in2,
+ const uint32_t* in3);
private:
@@ -135,7 +139,11 @@ DelayGrab::~DelayGrab() {
-void DelayGrab::update() {
+void DelayGrab::update(double time,
+ uint32_t* out,
+ const uint32_t* in,
+ const uint32_t* in2,
+ const uint32_t* in3) {
/* Update queue pointer */
if (curqueuenum==0) {
@@ -286,4 +294,4 @@ int DelayGrab::isqrt(unsigned int x) {
frei0r::construct<DelayGrab> plugin("Delaygrab",
"delayed frame blitting mapped on a time bitmap",
"Bill Spinhover, Andreas Schiffler, Jaromil",
- 3,0);
+ 3,1);
diff --git a/src/filter/edgeglow/edgeglow.cpp b/src/filter/edgeglow/edgeglow.cpp
index f0c0eb6..0375925 100644
--- a/src/filter/edgeglow/edgeglow.cpp
+++ b/src/filter/edgeglow/edgeglow.cpp
@@ -40,7 +40,11 @@ public:
register_param(lredscale, "lredscale", "multiplier for downscaling non-edge brightness");
}
- virtual void update()
+ virtual void update(double time,
+ uint32_t* out,
+ const uint32_t* in,
+ const uint32_t* in2,
+ const uint32_t* in3)
{
std::copy(in, in + width*height, out);
for (unsigned int y=1; y<height-1; ++y)
@@ -182,6 +186,6 @@ public:
frei0r::construct<edgeglow> plugin("Edgeglow",
"Edgeglow filter",
"Salsaman",
- 0,1,
+ 0,2,
F0R_COLOR_MODEL_RGBA8888);
diff --git a/src/filter/equaliz0r/equaliz0r.cpp b/src/filter/equaliz0r/equaliz0r.cpp
index b4eae1e..d651e9e 100644
--- a/src/filter/equaliz0r/equaliz0r.cpp
+++ b/src/filter/equaliz0r/equaliz0r.cpp
@@ -35,7 +35,7 @@ class equaliz0r : public frei0r::filter
unsigned int ghist[256];
unsigned int bhist[256];
- void updateLookUpTables()
+ void updateLookUpTables(const uint32_t* in)
{
unsigned int size = width*height;
@@ -88,10 +88,14 @@ public:
{
}
- virtual void update()
+ virtual void update(double time,
+ uint32_t* out,
+ const uint32_t* in,
+ const uint32_t* in2,
+ const uint32_t* in3)
{
std::copy(in, in + width*height, out);
- updateLookUpTables();
+ updateLookUpTables(in);
unsigned int size = width*height;
const unsigned char *in_ptr = (const unsigned char*) in;
unsigned char *out_ptr = (unsigned char*) out;
@@ -109,6 +113,6 @@ public:
frei0r::construct<equaliz0r> plugin("Equaliz0r",
"Equalizes the intensity histograms",
"Jean-Sebastien Senecal (Drone)",
- 0,1,
+ 0,2,
F0R_COLOR_MODEL_RGBA8888);
diff --git a/src/filter/lightgraffiti/lightgraffiti.cpp b/src/filter/lightgraffiti/lightgraffiti.cpp
index a84932d..865dbd3 100644
--- a/src/filter/lightgraffiti/lightgraffiti.cpp
+++ b/src/filter/lightgraffiti/lightgraffiti.cpp
@@ -201,7 +201,11 @@ public:
- virtual void update()
+ virtual void update(double time,
+ uint32_t* out,
+ const uint32_t* in,
+ const uint32_t* in2,
+ const uint32_t* in3)
{
double sensitivity = m_pSensitivity * 5;
double thresholdBrightness = m_pThresholdBrightness * 765;
@@ -1061,5 +1065,5 @@ private:
frei0r::construct<LightGraffiti> plugin("Light Graffiti",
"Creates light graffitis from a video by keeping the brightest spots.",
"Simon A. Eugster (Granjow)",
- 0,2,
+ 0,3,
F0R_COLOR_MODEL_RGBA8888);
diff --git a/src/filter/ndvi/ndvi.cpp b/src/filter/ndvi/ndvi.cpp
index d58c40d..17e75c7 100644
--- a/src/filter/ndvi/ndvi.cpp
+++ b/src/filter/ndvi/ndvi.cpp
@@ -49,15 +49,19 @@ class Ndvi : public frei0r::filter
{
public:
Ndvi(unsigned int width, unsigned int height);
- virtual void update();
+ virtual void update(double time,
+ uint32_t* out,
+ const uint32_t* in,
+ const uint32_t* in2,
+ const uint32_t* in3);
private:
void initLut();
double getComponent(uint8_t *sample, unsigned int chan, double offset, double scale);
void setColor(uint8_t *sample, double index);
- void drawLegend();
- void drawRect( uint8_t r, uint8_t g, uint8_t b, unsigned int x, unsigned int y, unsigned int w, unsigned int h );
- void drawGradient( unsigned int x, unsigned int y, unsigned int w, unsigned int h );
+ void drawLegend(uint32_t *out);
+ void drawRect( uint32_t* out, uint8_t r, uint8_t g, uint8_t b, unsigned int x, unsigned int y, unsigned int w, unsigned int h );
+ void drawGradient( uint32_t* out, unsigned int x, unsigned int y, unsigned int w, unsigned int h );
void drawText( std::string text, unsigned int x, unsigned int y, unsigned int textHeight );
double paramLutLevels;
@@ -112,7 +116,11 @@ Ndvi::Ndvi(unsigned int width, unsigned int height)
"Control legend display. One of 'off' or 'bottom'.");
}
-void Ndvi::update() {
+void Ndvi::update(double time,
+ uint32_t* out,
+ const uint32_t* in,
+ const uint32_t* in2,
+ const uint32_t* in3) {
uint8_t *inP = (uint8_t*)in;
uint8_t *outP = (uint8_t*)out;
double visScale = paramVisScale * 10.0;
@@ -145,7 +153,7 @@ void Ndvi::update() {
}
if( paramLegend == "bottom" ) {
- drawLegend();
+ drawLegend(out);
}
}
@@ -231,19 +239,19 @@ inline void Ndvi::setColor(uint8_t *sample, double index)
sample[3] = 0xff;
}
-void Ndvi::drawLegend()
+void Ndvi::drawLegend(uint32_t* out)
{
unsigned int legendHeight = height / 20;
// Black border above legend
unsigned int borderHeight = legendHeight / 15;
unsigned int borderY = height - legendHeight;
- drawRect( 0, 0, 0, 0, borderY, width, borderHeight );
+ drawRect( out, 0, 0, 0, 0, borderY, width, borderHeight );
// Gradient
unsigned int gradientHeight = legendHeight - borderHeight;
unsigned int gradientY = height - gradientHeight;
- drawGradient( 0, gradientY, width, gradientHeight );
+ drawGradient( out, 0, gradientY, width, gradientHeight );
// Text
unsigned int textHeight = gradientHeight * 8 / 10;
@@ -260,7 +268,7 @@ void Ndvi::drawLegend()
}
}
-void Ndvi::drawRect( uint8_t r, uint8_t g, uint8_t b, unsigned int x, unsigned int y, unsigned int w, unsigned int h )
+void Ndvi::drawRect( uint32_t* out, uint8_t r, uint8_t g, uint8_t b, unsigned int x, unsigned int y, unsigned int w, unsigned int h )
{
for (unsigned int i = 0; i < h; i++) {
uint8_t *sample = (uint8_t*)(out + ((i + y) * width) + x);
@@ -273,7 +281,7 @@ void Ndvi::drawRect( uint8_t r, uint8_t g, uint8_t b, unsigned int x, unsigned i
}
}
-void Ndvi::drawGradient( unsigned int x, unsigned int y, unsigned int w, unsigned int h )
+void Ndvi::drawGradient( uint32_t* out, unsigned int x, unsigned int y, unsigned int w, unsigned int h )
{
for (unsigned int i = 0; i < w; i++) {
double pos = (double)i / (double)w;
@@ -326,5 +334,5 @@ void Ndvi::drawText( std::string text, unsigned int x, unsigned int y, unsigned
frei0r::construct<Ndvi> plugin("NDVI filter",
"This filter creates a false image from a visible + infrared source.",
"Brian Matherly",
- 0,1,
+ 0,2,
F0R_COLOR_MODEL_RGBA8888);
diff --git a/src/filter/nervous/nervous.cpp b/src/filter/nervous/nervous.cpp
index 9d436b9..293450f 100644
--- a/src/filter/nervous/nervous.cpp
+++ b/src/filter/nervous/nervous.cpp
@@ -57,7 +57,11 @@ public:
~Nervous();
- virtual void update();
+ virtual void update(double time,
+ uint32_t* out,
+ const uint32_t* in,
+ const uint32_t* in2,
+ const uint32_t* in3);
private:
@@ -111,7 +115,11 @@ void Nervous::_init(int wdt, int hgt) {
-void Nervous::update() {
+void Nervous::update(double time,
+ uint32_t* out,
+ const uint32_t* in,
+ const uint32_t* in2,
+ const uint32_t* in3) {
memcpy(planetable[plane],in,geo.size);
if(stock<PLANES) stock++;
@@ -144,4 +152,4 @@ void Nervous::update() {
frei0r::construct<Nervous> plugin("Nervous",
"flushes frames in time in a nervous way",
"Tannenbaum, Kentaro, Jaromil",
- 3,0);
+ 3,1);
diff --git a/src/filter/nosync0r/nosync0r.cpp b/src/filter/nosync0r/nosync0r.cpp
index a2df846..bf0fdc7 100644
--- a/src/filter/nosync0r/nosync0r.cpp
+++ b/src/filter/nosync0r/nosync0r.cpp
@@ -12,7 +12,11 @@ public:
register_param(hsync,"HSync","the hsync offset");
}
- virtual void update()
+ virtual void update(double time,
+ uint32_t* out,
+ const uint32_t* in,
+ const uint32_t* in2,
+ const uint32_t* in3)
{
unsigned int
first_line=static_cast<unsigned int>(height*std::fmod(hsync,1.0));
@@ -29,5 +33,5 @@ private:
frei0r::construct<nosync0r> plugin("nosync0r",
"broken tv",
"Martin Bayer",
- 0,1);
+ 0,2);
diff --git a/src/filter/primaries/primaries.cpp b/src/filter/primaries/primaries.cpp
index 469844f..93a2e28 100644
--- a/src/filter/primaries/primaries.cpp
+++ b/src/filter/primaries/primaries.cpp
@@ -43,7 +43,11 @@ public:
~primaries() {
}
- virtual void update() {
+ virtual void update(double time,
+ uint32_t* out,
+ const uint32_t* in,
+ const uint32_t* in2,
+ const uint32_t* in3) {
unsigned char mean = 0;
int f = factor+1; // f = [2,inf)
@@ -75,5 +79,5 @@ public:
frei0r::construct<primaries> plugin("primaries",
"Reduce image to primary colors",
"Hedde Bosman",
- 0,1);
+ 0,2);
diff --git a/src/filter/scanline0r/scanline0r.cpp b/src/filter/scanline0r/scanline0r.cpp
index 8bd5a08..fee8d64 100644
--- a/src/filter/scanline0r/scanline0r.cpp
+++ b/src/filter/scanline0r/scanline0r.cpp
@@ -10,7 +10,11 @@ public:
//register_param(hsync,"HSync","the hsync offset");
}
- virtual void update()
+ virtual void update(double time,
+ uint32_t* out,
+ const uint32_t* in,
+ const uint32_t* in2,
+ const uint32_t* in3)
{
for (unsigned int line=0; line < height; line+=4)
{
@@ -27,5 +31,5 @@ private:
frei0r::construct<scanline0r> plugin("scanline0r",
"interlaced blak lines",
"Martin Bayer",
- 0,1);
+ 0,2);
diff --git a/src/filter/sobel/sobel.cpp b/src/filter/sobel/sobel.cpp
index 60c5020..b13a7e0 100644
--- a/src/filter/sobel/sobel.cpp
+++ b/src/filter/sobel/sobel.cpp
@@ -28,7 +28,11 @@ public:
{
}
- virtual void update()
+ virtual void update(double time,
+ uint32_t* out,
+ const uint32_t* in,
+ const uint32_t* in2,
+ const uint32_t* in3)
{
std::copy(in, in + width*height, out);
for (unsigned int y=1; y<height-1; ++y)
@@ -62,6 +66,6 @@ public:
frei0r::construct<sobel> plugin("Sobel",
"Sobel filter",
"Jean-Sebastien Senecal (Drone)",
- 0,1,
+ 0,2,
F0R_COLOR_MODEL_RGBA8888);
diff --git a/src/filter/sopsat/sopsat.cpp b/src/filter/sopsat/sopsat.cpp
index dc02b38..8ba0940 100644
--- a/src/filter/sopsat/sopsat.cpp
+++ b/src/filter/sopsat/sopsat.cpp
@@ -128,7 +128,11 @@ public:
free(m_lutA);
}
- virtual void update()
+ virtual void update(double time,
+ uint32_t* out,
+ const uint32_t* in,
+ const uint32_t* in2,
+ const uint32_t* in3)
{
// Rebuild the lookup table in case the prarameters have changed.
updateLUT();
@@ -212,5 +216,5 @@ private:
frei0r::construct<SOPSat> plugin("SOP/Sat",
"Slope/Offset/Power and Saturation color corrections according to the ASC CDL (Color Decision List)",
"Simon A. Eugster (Granjow)",
- 0,2,
+ 0,3,
F0R_COLOR_MODEL_RGBA8888);
diff --git a/src/filter/threelay0r/threelay0r.cpp b/src/filter/threelay0r/threelay0r.cpp
index e5ef520..49a99e0 100644
--- a/src/filter/threelay0r/threelay0r.cpp
+++ b/src/filter/threelay0r/threelay0r.cpp
@@ -51,7 +51,11 @@ private:
public:
threelay0r(unsigned int width, unsigned int height) {}
- virtual void update() {
+ virtual void update(double time,
+ uint32_t* out,
+ const uint32_t* in,
+ const uint32_t* in2,
+ const uint32_t* in3) {
histogram h;
// create histogramm
@@ -92,5 +96,5 @@ public:
frei0r::construct<threelay0r> plugin("threelay0r",
"dynamic 3 level thresholding",
"Hedde Bosman",
- 0,1);
+ 0,2);
diff --git a/src/filter/timeout/timeout.cpp b/src/filter/timeout/timeout.cpp
index a91225b..4810f6c 100644
--- a/src/filter/timeout/timeout.cpp
+++ b/src/filter/timeout/timeout.cpp
@@ -75,7 +75,11 @@ public:
// Delete member variables if necessary.
}
- virtual void update()
+ virtual void update(double time,
+ uint32_t* out,
+ const uint32_t* in,
+ const uint32_t* in2,
+ const uint32_t* in3)
{
std::copy(in, in + width*height, out);
@@ -133,5 +137,5 @@ private:
frei0r::construct<Timeout> plugin("Timeout indicator",
"Timeout indicators e.g. for slides.",
"Simon A. Eugster",
- 0,1,
+ 0,2,
F0R_COLOR_MODEL_RGBA8888);
diff --git a/src/filter/tutorial/tutorial.cpp b/src/filter/tutorial/tutorial.cpp
index af1d9d1..8c292dd 100644
--- a/src/filter/tutorial/tutorial.cpp
+++ b/src/filter/tutorial/tutorial.cpp
@@ -103,7 +103,11 @@ public:
// Delete member variables if necessary.
}
- virtual void update()
+ virtual void update(double time,
+ uint32_t* out,
+ const uint32_t* in,
+ const uint32_t* in2,
+ const uint32_t* in3)
{
// Just copy input to output.
// This is useful if ony few changes are made to the output.
@@ -173,5 +177,5 @@ private:
frei0r::construct<Tutorial> plugin("Tutorial filter",
"This is an example filter, kind of a quick howto showing how to add a frei0r filter.",
"Your Name",
- 0,1,
+ 0,2,
F0R_COLOR_MODEL_RGBA8888);
diff --git a/src/filter/twolay0r/twolay0r.cpp b/src/filter/twolay0r/twolay0r.cpp
index 195f2f7..3ad713e 100644
--- a/src/filter/twolay0r/twolay0r.cpp
+++ b/src/filter/twolay0r/twolay0r.cpp
@@ -37,7 +37,11 @@ public:
{
}
- virtual void update()
+ virtual void update(double time,
+ uint32_t* out,
+ const uint32_t* in,
+ const uint32_t* in2,
+ const uint32_t* in3)
{
histogram h;
@@ -98,5 +102,5 @@ public:
frei0r::construct<twolay0r> plugin("Twolay0r",
"dynamic thresholding",
"Martin Bayer",
- 0,1);
+ 0,2);
diff --git a/src/filter/vignette/vignette.cpp b/src/filter/vignette/vignette.cpp
index 3b176da..28f97f8 100644
--- a/src/filter/vignette/vignette.cpp
+++ b/src/filter/vignette/vignette.cpp
@@ -69,7 +69,11 @@ public:
}
}
- virtual void update()
+ virtual void update(double time,
+ uint32_t* out,
+ const uint32_t* in,
+ const uint32_t* in2,
+ const uint32_t* in3)
{
std::copy(in, in + m_width*m_height, out);
@@ -168,5 +172,5 @@ private:
frei0r::construct<Vignette> plugin("Vignette",
"Lens vignetting effect, applies natural vignetting",
"Simon A. Eugster (Granjow)",
- 0,1,
+ 0,2,
F0R_COLOR_MODEL_RGBA8888);
diff --git a/src/generator/dem0scene/plasma.cpp b/src/generator/dem0scene/plasma.cpp
index 279fe5f..6ce8f46 100644
--- a/src/generator/dem0scene/plasma.cpp
+++ b/src/generator/dem0scene/plasma.cpp
@@ -52,7 +52,11 @@ public:
Plasma(int wdt, int hgt);
~Plasma();
- virtual void update();
+ virtual void update(double time,
+ uint32_t* out,
+ const uint32_t* in,
+ const uint32_t* in2,
+ const uint32_t* in3);
private:
@@ -159,7 +163,11 @@ Plasma::~Plasma() {
}
-void Plasma::update() {
+void Plasma::update(double time,
+ uint32_t* out,
+ const uint32_t* in,
+ const uint32_t* in2,
+ const uint32_t* in3) {
uint16_t i, j;
uint8_t index;
int x;
@@ -235,4 +243,4 @@ uint32_t Plasma::palette2rgb(uint8_t idx) {
frei0r::construct<Plasma> plugin("Plasma",
"Demo scene 8bit plasma",
"Jaromil",
- 0,2);
+ 0,3);
diff --git a/src/generator/lissajous0r/lissajous0r.cpp b/src/generator/lissajous0r/lissajous0r.cpp
index 0234b62..3354bd9 100644
--- a/src/generator/lissajous0r/lissajous0r.cpp
+++ b/src/generator/lissajous0r/lissajous0r.cpp
@@ -40,7 +40,11 @@ public:
}
- virtual void update()
+ virtual void update(double time,
+ uint32_t* out,
+ const uint32_t* in,
+ const uint32_t* in2,
+ const uint32_t* in3)
{
std::fill(out, out+width*height, 0x00000000);
@@ -73,5 +77,5 @@ private:
frei0r::construct<lissajous0r> plugin("Lissajous0r",
"Generates Lissajous0r images",
"Martin Bayer",
- 0,2);
+ 0,3);
diff --git a/src/generator/nois0r/nois0r.cpp b/src/generator/nois0r/nois0r.cpp
index 6582eeb..2740de6 100644
--- a/src/generator/nois0r/nois0r.cpp
+++ b/src/generator/nois0r/nois0r.cpp
@@ -47,7 +47,11 @@ public:
}
- virtual void update()
+ virtual void update(double time,
+ uint32_t* out,
+ const uint32_t* in,
+ const uint32_t* in2,
+ const uint32_t* in3)
{
wnoise wn(0x0f0f0f0f ^ (unsigned int)(time*100000.0));
@@ -59,5 +63,5 @@ public:
frei0r::construct<nois0r> plugin("Nois0r",
"Generates white noise images",
"Martin Bayer",
- 0,2);
+ 0,3);
diff --git a/src/generator/onecol0r/onecol0r.cpp b/src/generator/onecol0r/onecol0r.cpp
index dfa51b6..fd86846 100644
--- a/src/generator/onecol0r/onecol0r.cpp
+++ b/src/generator/onecol0r/onecol0r.cpp
@@ -31,7 +31,11 @@ public:
color.r = color.g = color.b = 0;
}
- virtual void update()
+ virtual void update(double time,
+ uint32_t* out,
+ const uint32_t* in,
+ const uint32_t* in2,
+ const uint32_t* in3)
{
unsigned int col;
unsigned char* c = reinterpret_cast<unsigned char*>(&col);
@@ -52,5 +56,5 @@ private:
frei0r::construct<onecol0r> plugin("onecol0r",
"image with just one color",
"Martin Bayer",
- 0,2);
+ 0,3);
diff --git a/src/generator/partik0l/partik0l.cpp b/src/generator/partik0l/partik0l.cpp
index 87728c7..4a44591 100644
--- a/src/generator/partik0l/partik0l.cpp
+++ b/src/generator/partik0l/partik0l.cpp
@@ -52,7 +52,11 @@ public:
Partik0l(unsigned int width, unsigned int height);
~Partik0l();
- void update();
+ void update(double time,
+ uint32_t* out,
+ const uint32_t* in1,
+ const uint32_t* in2,
+ const uint32_t* in3);
int w, h;
@@ -81,8 +85,8 @@ private:
double wd, hd;
- void blob(int x, int y);
- void blossom();
+ void blob(uint32_t* out, int x, int y);
+ void blossom(uint32_t* out);
void blob_init(int ray);
void blossom_recal(bool r);
@@ -156,7 +160,11 @@ Partik0l::~Partik0l() {
-void Partik0l::update() {
+void Partik0l::update(double time,
+ uint32_t* out,
+ const uint32_t* in1,
+ const uint32_t* in2,
+ const uint32_t* in3) {
/* automatic random recalculation:
if( !blossom_count ) {
recalculate();
@@ -180,7 +188,7 @@ void Partik0l::update() {
memset(out,0,size);
- blossom();
+ blossom(out);
}
@@ -201,7 +209,7 @@ void Partik0l::blossom_recal(bool r) {
blossom_r = (blossom_r<=0.1)?0.1:blossom_r-0.1;
}
-void Partik0l::blossom() {
+void Partik0l::blossom(uint32_t* out) {
float a;
int x, y;
@@ -218,7 +226,7 @@ void Partik0l::blossom() {
y = (int)(hd*(0.47+ (blossom_r*cos(blossom_j*zx+blossom_a)+
(1.0-blossom_r)*cos(blossom_l*zy+blossom_a)) /2.2 ));
- blob(x,y);
+ blob(out, x,y);
}
@@ -263,7 +271,7 @@ void Partik0l::blob_init(int ray) {
}
-void Partik0l::blob(int x, int y) {
+void Partik0l::blob(uint32_t* out, int x, int y) {
// if(y>h-blob_size) return;
// if(x>w-blob_size) return;
@@ -368,4 +376,4 @@ bool Partik0l::keypress(int key) {
frei0r::construct<Partik0l> plugin("Partik0l",
"Particles generated on prime number sinusoidal blossoming",
"Jaromil",
- 0,2);
+ 0,3);
diff --git a/src/mixer2/addition/addition.cpp b/src/mixer2/addition/addition.cpp
index 836654c..62a24b1 100644
--- a/src/mixer2/addition/addition.cpp
+++ b/src/mixer2/addition/addition.cpp
@@ -42,7 +42,11 @@ public:
* and in2.
*
**/
- void update()
+ void update(double time,
+ uint32_t* out,
+ const uint32_t* in1,
+ const uint32_t* in2,
+ const uint32_t* in3)
{
const uint8_t *A = reinterpret_cast<const uint8_t*>(in1);
const uint8_t *B = reinterpret_cast<const uint8_t*>(in2);
@@ -72,6 +76,6 @@ uint8_t addition::add_lut[511];
frei0r::construct<addition> plugin("addition",
"Perform an RGB[A] addition operation of the pixel sources.",
"Jean-Sebastien Senecal",
- 0,1,
+ 0,2,
F0R_COLOR_MODEL_RGBA8888);
diff --git a/src/mixer2/addition_alpha/addition_alpha.cpp b/src/mixer2/addition_alpha/addition_alpha.cpp
index 227f39d..20e1fe2 100644
--- a/src/mixer2/addition_alpha/addition_alpha.cpp
+++ b/src/mixer2/addition_alpha/addition_alpha.cpp
@@ -46,7 +46,11 @@ public:
* second channel only if its alpha channel is not 0.
*
**/
- void update()
+ void update(double time,
+ uint32_t* out,
+ const uint32_t* in1,
+ const uint32_t* in2,
+ const uint32_t* in3)
{
const uint8_t *A = reinterpret_cast<const uint8_t*>(in1);
const uint8_t *B = reinterpret_cast<const uint8_t*>(in2);
@@ -76,6 +80,6 @@ uint8_t addition_alpha::add_lut[511];
frei0r::construct<addition_alpha> plugin("addition_alpha",
"Perform an RGB[A] addition_alpha operation of the pixel sources.",
"Jean-Sebastien Senecal",
- 0,1,
+ 0,2,
F0R_COLOR_MODEL_RGBA8888);
diff --git a/src/mixer2/alphaatop/alphaatop.cpp b/src/mixer2/alphaatop/alphaatop.cpp
index b1df195..81e5958 100644
--- a/src/mixer2/alphaatop/alphaatop.cpp
+++ b/src/mixer2/alphaatop/alphaatop.cpp
@@ -29,7 +29,11 @@ public:
{
}
- void update()
+ void update(double time,
+ uint32_t* out,
+ const uint32_t* in1,
+ const uint32_t* in2,
+ const uint32_t* in3)
{
uint8_t *dst = reinterpret_cast<uint8_t*>(out);
const uint8_t *src1 = reinterpret_cast<const uint8_t*>(in1);
@@ -67,6 +71,6 @@ public:
frei0r::construct<alphaatop> plugin("alphaatop",
"the alpha ATOP operation",
"Jean-Sebastien Senecal",
- 0,1,
+ 0,2,
F0R_COLOR_MODEL_RGBA8888);
diff --git a/src/mixer2/alphain/alphain.cpp b/src/mixer2/alphain/alphain.cpp
index a6f8d46..55f6a08 100644
--- a/src/mixer2/alphain/alphain.cpp
+++ b/src/mixer2/alphain/alphain.cpp
@@ -29,7 +29,11 @@ public:
{
}
- void update()
+ void update(double time,
+ uint32_t* out,
+ const uint32_t* in1,
+ const uint32_t* in2,
+ const uint32_t* in3)
{
uint8_t *dst = reinterpret_cast<uint8_t*>(out);
const uint8_t *src1 = reinterpret_cast<const uint8_t*>(in1);
@@ -65,6 +69,6 @@ public:
frei0r::construct<alphain> plugin("alphain",
"the alpha IN operation",
"Jean-Sebastien Senecal",
- 0,1,
+ 0,2,
F0R_COLOR_MODEL_RGBA8888);
diff --git a/src/mixer2/alphaout/alphaout.cpp b/src/mixer2/alphaout/alphaout.cpp
index f11c2ac..a95cfbf 100644
--- a/src/mixer2/alphaout/alphaout.cpp
+++ b/src/mixer2/alphaout/alphaout.cpp
@@ -29,7 +29,11 @@ public:
{
}
- void update()
+ void update(double time,
+ uint32_t* out,
+ const uint32_t* in1,
+ const uint32_t* in2,
+ const uint32_t* in3)
{
uint8_t *dst = reinterpret_cast<uint8_t*>(out);
const uint8_t *src1 = reinterpret_cast<const uint8_t*>(in1);
@@ -65,6 +69,6 @@ public:
frei0r::construct<alphaout> plugin("alphaout",
"the alpha OUT operation",
"Jean-Sebastien Senecal",
- 0,1,
+ 0,2,
F0R_COLOR_MODEL_RGBA8888);
diff --git a/src/mixer2/alphaover/alphaover.cpp b/src/mixer2/alphaover/alphaover.cpp
index c4149b4..885cff7 100644
--- a/src/mixer2/alphaover/alphaover.cpp
+++ b/src/mixer2/alphaover/alphaover.cpp
@@ -29,7 +29,11 @@ public:
{
}
- void update()
+ void update(double time,
+ uint32_t* out,
+ const uint32_t* in1,
+ const uint32_t* in2,
+ const uint32_t* in3)
{
uint8_t *dst = reinterpret_cast<uint8_t*>(out);
const uint8_t *src1 = reinterpret_cast<const uint8_t*>(in1);
@@ -66,6 +70,6 @@ public:
frei0r::construct<alphaover> plugin("alphaover",
"the alpha OVER operation",
"Jean-Sebastien Senecal",
- 0,1,
+ 0,2,
F0R_COLOR_MODEL_RGBA8888);
diff --git a/src/mixer2/alphaxor/alphaxor.cpp b/src/mixer2/alphaxor/alphaxor.cpp
index 426322e..7f2073c 100644
--- a/src/mixer2/alphaxor/alphaxor.cpp
+++ b/src/mixer2/alphaxor/alphaxor.cpp
@@ -29,7 +29,11 @@ public:
{
}
- void update()
+ void update(double time,
+ uint32_t* out,
+ const uint32_t* in1,
+ const uint32_t* in2,
+ const uint32_t* in3)
{
uint8_t *dst = reinterpret_cast<uint8_t*>(out);
const uint8_t *src1 = reinterpret_cast<const uint8_t*>(in1);
@@ -67,6 +71,6 @@ public:
frei0r::construct<alphaxor> plugin("alphaxor",
"the alpha XOR operation",
"Jean-Sebastien Senecal",
- 0,1,
+ 0,2,
F0R_COLOR_MODEL_RGBA8888);
diff --git a/src/mixer2/blend/blend.cpp b/src/mixer2/blend/blend.cpp
index beab577..f82c89e 100644
--- a/src/mixer2/blend/blend.cpp
+++ b/src/mixer2/blend/blend.cpp
@@ -39,7 +39,11 @@ public:
*
* The result is left in out
**/
- void update()
+ void update(double time,
+ uint32_t* out,
+ const uint32_t* in1,
+ const uint32_t* in2,
+ const uint32_t* in3)
{
const uint8_t *src1 = reinterpret_cast<const uint8_t*>(in1);
const uint8_t *src2 = reinterpret_cast<const uint8_t*>(in2);
@@ -69,6 +73,6 @@ private:
frei0r::construct<blend> plugin("blend",
"Perform a blend operation between two sources",
"Jean-Sebastien Senecal",
- 0,1,
+ 0,2,
F0R_COLOR_MODEL_RGBA8888);
diff --git a/src/mixer2/burn/burn.cpp b/src/mixer2/burn/burn.cpp
index 6230c14..10577bb 100644
--- a/src/mixer2/burn/burn.cpp
+++ b/src/mixer2/burn/burn.cpp
@@ -39,7 +39,11 @@ public:
* D = saturation of 255 or depletion of 0, of ((255 - A) * 256) / (B + 1)
*
**/
- void update()
+ void update(double time,
+ uint32_t* out,
+ const uint32_t* in1,
+ const uint32_t* in2,
+ const uint32_t* in3)
{
const uint8_t *src1 = reinterpret_cast<const uint8_t*>(in1);
const uint8_t *src2 = reinterpret_cast<const uint8_t*>(in2);
@@ -77,6 +81,6 @@ frei0r::construct<burn> plugin("burn",
"Perform an RGB[A] dodge operation between the pixel sources, using the generalised algorithm:\n"
"D = saturation of 255 or depletion of 0, of ((255 - A) * 256) / (B + 1)",
"Jean-Sebastien Senecal",
- 0,1,
+ 0,2,
F0R_COLOR_MODEL_RGBA8888);
- \ No newline at end of file
+
diff --git a/src/mixer2/color_only/color_only.cpp b/src/mixer2/color_only/color_only.cpp
index 2e8f944..d256819 100644
--- a/src/mixer2/color_only/color_only.cpp
+++ b/src/mixer2/color_only/color_only.cpp
@@ -37,7 +37,11 @@ public:
* the hue and saturation values of in2.
*
**/
- void update()
+ void update(double time,
+ uint32_t* out,
+ const uint32_t* in1,
+ const uint32_t* in2,
+ const uint32_t* in3)
{
const uint8_t *src1 = reinterpret_cast<const uint8_t*>(in1);
const uint8_t *src2 = reinterpret_cast<const uint8_t*>(in2);
@@ -83,6 +87,6 @@ public:
frei0r::construct<color_only> plugin("color_only",
"Perform a conversion to color only of the source input1 using the hue and saturation values of input2.",
"Jean-Sebastien Senecal",
- 0,1,
+ 0,2,
F0R_COLOR_MODEL_RGBA8888);
diff --git a/src/mixer2/darken/darken.cpp b/src/mixer2/darken/darken.cpp
index d6e1dce..b189f5c 100644
--- a/src/mixer2/darken/darken.cpp
+++ b/src/mixer2/darken/darken.cpp
@@ -41,7 +41,11 @@ public:
* D_a = min(A_a, B_a);
*
**/
- void update()
+ void update(double time,
+ uint32_t* out,
+ const uint32_t* in1,
+ const uint32_t* in2,
+ const uint32_t* in3)
{
const uint8_t *src1 = reinterpret_cast<const uint8_t*>(in1);
const uint8_t *src2 = reinterpret_cast<const uint8_t*>(in2);
@@ -75,6 +79,6 @@ public:
frei0r::construct<darken> plugin("darken",
"Perform a darken operation between two sources (minimum value of both sources).",
"Jean-Sebastien Senecal",
- 0,1,
+ 0,2,
F0R_COLOR_MODEL_RGBA8888);
diff --git a/src/mixer2/difference/difference.cpp b/src/mixer2/difference/difference.cpp
index 1f2fcb5..98d1e0e 100644
--- a/src/mixer2/difference/difference.cpp
+++ b/src/mixer2/difference/difference.cpp
@@ -37,7 +37,11 @@ public:
* in1 and in2.
*
**/
- void update()
+ void update(double time,
+ uint32_t* out,
+ const uint32_t* in1,
+ const uint32_t* in2,
+ const uint32_t* in3)
{
const uint8_t *src1 = reinterpret_cast<const uint8_t*>(in1);
const uint8_t *src2 = reinterpret_cast<const uint8_t*>(in2);
@@ -69,6 +73,6 @@ public:
frei0r::construct<difference> plugin("difference",
"Perform an RGB[A] difference operation between the pixel sources.",
"Jean-Sebastien Senecal",
- 0,1,
+ 0,2,
F0R_COLOR_MODEL_RGBA8888);
diff --git a/src/mixer2/divide/divide.cpp b/src/mixer2/divide/divide.cpp
index c66a7f3..6719168 100644
--- a/src/mixer2/divide/divide.cpp
+++ b/src/mixer2/divide/divide.cpp
@@ -37,7 +37,11 @@ public:
* and in2. in1 is the numerator, in2 the denominator.
*
**/
- void update()
+ void update(double time,
+ uint32_t* out,
+ const uint32_t* in1,
+ const uint32_t* in2,
+ const uint32_t* in3)
{
const uint8_t *src1 = reinterpret_cast<const uint8_t*>(in1);
const uint8_t *src2 = reinterpret_cast<const uint8_t*>(in2);
@@ -70,6 +74,6 @@ public:
frei0r::construct<divide> plugin("divide",
"Perform an RGB[A] divide operation between the pixel sources: input1 is the numerator, input2 the denominator",
"Jean-Sebastien Senecal",
- 0,1,
+ 0,2,
F0R_COLOR_MODEL_RGBA8888);
diff --git a/src/mixer2/dodge/dodge.cpp b/src/mixer2/dodge/dodge.cpp
index a6400b7..46a450c 100644
--- a/src/mixer2/dodge/dodge.cpp
+++ b/src/mixer2/dodge/dodge.cpp
@@ -39,7 +39,11 @@ public:
* D = saturation of 255 or (A * 256) / (256 - B)
*
**/
- void update()
+ void update(double time,
+ uint32_t* out,
+ const uint32_t* in1,
+ const uint32_t* in2,
+ const uint32_t* in3)
{
const uint8_t *src1 = reinterpret_cast<const uint8_t*>(in1);
const uint8_t *src2 = reinterpret_cast<const uint8_t*>(in2);
@@ -71,6 +75,6 @@ frei0r::construct<dodge> plugin("dodge",
"Perform an RGB[A] dodge operation between the pixel sources, using the generalised algorithm:\n"
"D = saturation of 255 or (A * 256) / (256 - B)",
"Jean-Sebastien Senecal",
- 0,1,
+ 0,2,
F0R_COLOR_MODEL_RGBA8888);
diff --git a/src/mixer2/grain_extract/grain_extract.cpp b/src/mixer2/grain_extract/grain_extract.cpp
index b6798e0..f7be1e8 100644
--- a/src/mixer2/grain_extract/grain_extract.cpp
+++ b/src/mixer2/grain_extract/grain_extract.cpp
@@ -37,7 +37,11 @@ public:
* in1 and in2.
*
**/
- void update()
+ void update(double time,
+ uint32_t* out,
+ const uint32_t* in1,
+ const uint32_t* in2,
+ const uint32_t* in3)
{
const uint8_t *src1 = reinterpret_cast<const uint8_t*>(in1);
const uint8_t *src2 = reinterpret_cast<const uint8_t*>(in2);
@@ -71,6 +75,6 @@ public:
frei0r::construct<grain_extract> plugin("grain_extract",
"Perform an RGB[A] grain-extract operation between the pixel sources.",
"Jean-Sebastien Senecal",
- 0,1,
+ 0,2,
F0R_COLOR_MODEL_RGBA8888);
diff --git a/src/mixer2/grain_merge/grain_merge.cpp b/src/mixer2/grain_merge/grain_merge.cpp
index eaf84fc..e463729 100644
--- a/src/mixer2/grain_merge/grain_merge.cpp
+++ b/src/mixer2/grain_merge/grain_merge.cpp
@@ -37,7 +37,11 @@ public:
* in1 and in2.
*
**/
- void update()
+ void update(double time,
+ uint32_t* out,
+ const uint32_t* in1,
+ const uint32_t* in2,
+ const uint32_t* in3)
{
const uint8_t *src1 = reinterpret_cast<const uint8_t*>(in1);
const uint8_t *src2 = reinterpret_cast<const uint8_t*>(in2);
@@ -71,6 +75,6 @@ public:
frei0r::construct<grain_merge> plugin("grain_merge",
"Perform an RGB[A] grain-merge operation between the pixel sources.",
"Jean-Sebastien Senecal",
- 0,1,
+ 0,2,
F0R_COLOR_MODEL_RGBA8888);
diff --git a/src/mixer2/hardlight/hardlight.cpp b/src/mixer2/hardlight/hardlight.cpp
index f064a2b..0c9410b 100644
--- a/src/mixer2/hardlight/hardlight.cpp
+++ b/src/mixer2/hardlight/hardlight.cpp
@@ -37,7 +37,11 @@ public:
* in1 and in2.
*
**/
- void update()
+ void update(double time,
+ uint32_t* out,
+ const uint32_t* in1,
+ const uint32_t* in2,
+ const uint32_t* in3)
{
const uint8_t *src1 = reinterpret_cast<const uint8_t*>(in1);
const uint8_t *src2 = reinterpret_cast<const uint8_t*>(in2);
@@ -78,6 +82,6 @@ public:
frei0r::construct<hardlight> plugin("hardlight",
"Perform an RGB[A] hardlight operation between the pixel sources",
"Jean-Sebastien Senecal",
- 0,1,
+ 0,2,
F0R_COLOR_MODEL_RGBA8888);
diff --git a/src/mixer2/hue/hue.cpp b/src/mixer2/hue/hue.cpp
index a5e7a81..9317b6e 100644
--- a/src/mixer2/hue/hue.cpp
+++ b/src/mixer2/hue/hue.cpp
@@ -36,7 +36,11 @@ public:
* Perform a conversion to hue only of the source in1 using
* the hue of in2.
**/
- void update()
+ void update(double time,
+ uint32_t* out,
+ const uint32_t* in1,
+ const uint32_t* in2,
+ const uint32_t* in3)
{
const uint8_t *src1 = reinterpret_cast<const uint8_t*>(in1);
const uint8_t *src2 = reinterpret_cast<const uint8_t*>(in2);
@@ -86,6 +90,6 @@ public:
frei0r::construct<hue> plugin("hue",
"Perform a conversion to hue only of the source input1 using the hue of input2.",
"Jean-Sebastien Senecal",
- 0,1,
+ 0,2,
F0R_COLOR_MODEL_RGBA8888);
diff --git a/src/mixer2/lighten/lighten.cpp b/src/mixer2/lighten/lighten.cpp
index 319f3d6..57cdc0c 100644
--- a/src/mixer2/lighten/lighten.cpp
+++ b/src/mixer2/lighten/lighten.cpp
@@ -41,7 +41,11 @@ public:
* D_a = min(A_a, B_a);
*
**/
- void update()
+ void update(double time,
+ uint32_t* out,
+ const uint32_t* in1,
+ const uint32_t* in2,
+ const uint32_t* in3)
{
const uint8_t *src1 = reinterpret_cast<const uint8_t*>(in1);
const uint8_t *src2 = reinterpret_cast<const uint8_t*>(in2);
@@ -76,6 +80,6 @@ public:
frei0r::construct<lighten> plugin("lighten",
"Perform a lighten operation between two sources (maximum value of both sources).",
"Jean-Sebastien Senecal",
- 0,1,
+ 0,2,
F0R_COLOR_MODEL_RGBA8888);
diff --git a/src/mixer2/multiply/multiply.cpp b/src/mixer2/multiply/multiply.cpp
index 618140b..bd73363 100644
--- a/src/mixer2/multiply/multiply.cpp
+++ b/src/mixer2/multiply/multiply.cpp
@@ -37,7 +37,11 @@ public:
* in1 and in2.
*
**/
- void update()
+ void update(double time,
+ uint32_t* out,
+ const uint32_t* in1,
+ const uint32_t* in2,
+ const uint32_t* in3)
{
const uint8_t *src1 = reinterpret_cast<const uint8_t*>(in1);
const uint8_t *src2 = reinterpret_cast<const uint8_t*>(in2);
@@ -67,6 +71,6 @@ public:
frei0r::construct<multiply> plugin("multiply",
"Perform an RGB[A] multiply operation between the pixel sources.",
"Jean-Sebastien Senecal",
- 0,1,
+ 0,2,
F0R_COLOR_MODEL_RGBA8888);
diff --git a/src/mixer2/overlay/overlay.cpp b/src/mixer2/overlay/overlay.cpp
index 44a32a9..2f81247 100644
--- a/src/mixer2/overlay/overlay.cpp
+++ b/src/mixer2/overlay/overlay.cpp
@@ -39,7 +39,11 @@ public:
* D = A * (B + (2 * B) * (255 - A))
*
**/
- void update()
+ void update(double time,
+ uint32_t* out,
+ const uint32_t* in1,
+ const uint32_t* in2,
+ const uint32_t* in3)
{
const uint8_t *src1 = reinterpret_cast<const uint8_t*>(in1);
const uint8_t *src2 = reinterpret_cast<const uint8_t*>(in2);
@@ -72,6 +76,6 @@ frei0r::construct<overlay> plugin("overlay",
"Perform an RGB[A] overlay operation between the pixel sources, using the generalised algorithm:\n"
"D = A * (B + (2 * B) * (255 - A))",
"Jean-Sebastien Senecal",
- 0,1,
+ 0,2,
F0R_COLOR_MODEL_RGBA8888);
diff --git a/src/mixer2/saturation/saturation.cpp b/src/mixer2/saturation/saturation.cpp
index ca50a2b..041917a 100644
--- a/src/mixer2/saturation/saturation.cpp
+++ b/src/mixer2/saturation/saturation.cpp
@@ -37,7 +37,11 @@ public:
* the saturation level of in2.
*
**/
- void update()
+ void update(double time,
+ uint32_t* out,
+ const uint32_t* in1,
+ const uint32_t* in2,
+ const uint32_t* in3)
{
const uint8_t *src1 = reinterpret_cast<const uint8_t*>(in1);
const uint8_t *src2 = reinterpret_cast<const uint8_t*>(in2);
@@ -81,6 +85,6 @@ public:
frei0r::construct<saturation> plugin("saturation",
"Perform a conversion to saturation only of the source input1 using the saturation level of input2.",
"Jean-Sebastien Senecal",
- 0,1,
+ 0,2,
F0R_COLOR_MODEL_RGBA8888);
diff --git a/src/mixer2/screen/screen.cpp b/src/mixer2/screen/screen.cpp
index 8621918..c8980cf 100644
--- a/src/mixer2/screen/screen.cpp
+++ b/src/mixer2/screen/screen.cpp
@@ -39,7 +39,11 @@ public:
* D = 255 - (255 - A) * (255 - B)
*
**/
- void update()
+ void update(double time,
+ uint32_t* out,
+ const uint32_t* in1,
+ const uint32_t* in2,
+ const uint32_t* in3)
{
const uint8_t *src1 = reinterpret_cast<const uint8_t*>(in1);
const uint8_t *src2 = reinterpret_cast<const uint8_t*>(in2);
@@ -70,6 +74,6 @@ frei0r::construct<screen> plugin("screen",
"Perform an RGB[A] screen operation between the pixel sources, using the generalised algorithm:\n"
"D = 255 - (255 - A) * (255 - B)",
"Jean-Sebastien Senecal",
- 0,1,
+ 0,2,
F0R_COLOR_MODEL_RGBA8888);
diff --git a/src/mixer2/softlight/softlight.cpp b/src/mixer2/softlight/softlight.cpp
index b968f7f..764e795 100644
--- a/src/mixer2/softlight/softlight.cpp
+++ b/src/mixer2/softlight/softlight.cpp
@@ -37,7 +37,11 @@ public:
* in1 and in2.
*
**/
- void update()
+ void update(double time,
+ uint32_t* out,
+ const uint32_t* in1,
+ const uint32_t* in2,
+ const uint32_t* in3)
{
const uint8_t *src1 = reinterpret_cast<const uint8_t*>(in1);
const uint8_t *src2 = reinterpret_cast<const uint8_t*>(in2);
@@ -71,6 +75,6 @@ public:
frei0r::construct<softlight> plugin("softlight",
"Perform an RGB[A] softlight operation between the pixel sources.",
"Jean-Sebastien Senecal",
- 0,1,
+ 0,2,
F0R_COLOR_MODEL_RGBA8888);
diff --git a/src/mixer2/subtract/subtract.cpp b/src/mixer2/subtract/subtract.cpp
index ab68c5d..9d7cd1a 100644
--- a/src/mixer2/subtract/subtract.cpp
+++ b/src/mixer2/subtract/subtract.cpp
@@ -37,7 +37,11 @@ public:
* ctx-B from in1.
*
**/
- void update()
+ void update(double time,
+ uint32_t* out,
+ const uint32_t* in1,
+ const uint32_t* in2,
+ const uint32_t* in3)
{
const uint8_t *src1 = reinterpret_cast<const uint8_t*>(in1);
const uint8_t *src2 = reinterpret_cast<const uint8_t*>(in2);
@@ -71,6 +75,6 @@ public:
frei0r::construct<subtract> plugin("subtract",
"Perform an RGB[A] subtract operation of the pixel source input2 from input1.",
"Jean-Sebastien Senecal",
- 0,1,
+ 0,2,
F0R_COLOR_MODEL_RGBA8888);
diff --git a/src/mixer2/value/value.cpp b/src/mixer2/value/value.cpp
index e76c72c..0f85cbf 100644
--- a/src/mixer2/value/value.cpp
+++ b/src/mixer2/value/value.cpp
@@ -37,7 +37,11 @@ public:
* the value of in2.
*
**/
- void update()
+ void update(double time,
+ uint32_t* out,
+ const uint32_t* in1,
+ const uint32_t* in2,
+ const uint32_t* in3)
{
const uint8_t *src1 = reinterpret_cast<const uint8_t*>(in1);
const uint8_t *src2 = reinterpret_cast<const uint8_t*>(in2);
@@ -83,6 +87,6 @@ public:
frei0r::construct<value> plugin("value",
"Perform a conversion to value only of the source input1 using the value of input2.",
"Jean-Sebastien Senecal",
- 0,1,
+ 0,2,
F0R_COLOR_MODEL_RGBA8888);
diff --git a/src/mixer2/xfade0r/xfade0r.cpp b/src/mixer2/xfade0r/xfade0r.cpp
index 4d99c6b..d3379c3 100644
--- a/src/mixer2/xfade0r/xfade0r.cpp
+++ b/src/mixer2/xfade0r/xfade0r.cpp
@@ -26,7 +26,11 @@ public:
uint8_t fader_pos;
};
- void update()
+ void update(double time,
+ uint32_t* out,
+ const uint32_t* in1,
+ const uint32_t* in2,
+ const uint32_t* in3)
{
std::transform(reinterpret_cast<const uint8_t*>(in1),
reinterpret_cast<const uint8_t*>(in1)+(width*height*4),
@@ -43,5 +47,5 @@ private:
frei0r::construct<xfade0r> plugin("xfade0r",
"a simple xfader",
"Martin Bayer",
- 0,1);
+ 0,2);