diff --git a/src/magicflute.c b/src/magicflute.c index d02478d..1866116 100644 --- a/src/magicflute.c +++ b/src/magicflute.c @@ -7,7 +7,7 @@ http://www.pantarheon.org This is a frei0r-compatible plug-in, demonstrating - the use of multiple LUTs in Koliba. It needs + the use of a sequence of two LUTs in Koliba. It needs to be linked dynamically using the -lkoliba switch in Unix and its derivatives, or koliba.lib in Windows. */ @@ -102,7 +102,7 @@ void f0r_get_plugin_info(f0r_plugin_info_t* info) { info->color_model = F0R_COLOR_MODEL_RGBA8888; info->frei0r_version = FREI0R_MAJOR_VERSION; info->major_version = 1; - info->minor_version = 0; + info->minor_version = 1; info->num_params = 11; info->explanation = "Crimsonite and Color Roller."; } @@ -115,12 +115,16 @@ f0r_instance_t f0r_construct(unsigned int width, unsigned int height) { f0r_instance_t instance; if ((instance = malloc(sizeof(magicflute_instance))) != NULL) { + // We set these values once and keep them that way for the + // life of this instance. KOLIBA_SlutToVertices(instance->vertices, instance->sLut); KOLIBA_SlutToVertices(instance->vertices+1, instance->sLut+1); instance->ffLut[0].fLut = instance->fLut; instance->ffLut[1].fLut = instance->fLut+1; instance->count = (size_t)width * (size_t)height; + // We set the initial values for these parameters, + // but allow the user to change them. instance->lut = 0.5; instance->magenta = 1.0; @@ -342,7 +346,7 @@ void f0r_update(f0r_instance_t instance, double time, const KOLIBA_RGBA8PIXEL *i // Changed or not, if both efficacies are 0, just do a quick copy // of all input pixels to corresponding output pixels. - if ((instance->efficacy[0] == 0.0) && (instance->efficacy[0] == 0.0)) + if ((instance->efficacy[0] == 0.0) && (instance->efficacy[1] == 0.0)) memcpy(outframe, inframe, i*sizeof(KOLIBA_RGBA8PIXEL)); else { if (instance->changed[0]) { diff --git a/src/makefile b/src/makefile index 7d54e6b..2e5dabe 100644 --- a/src/makefile +++ b/src/makefile @@ -68,6 +68,7 @@ objects=601-2020.o \ lifts.o \ lut.o \ lutty.o \ + magicflute.o \ monofarba.o \ natcon.o \ objective.o \ @@ -120,6 +121,7 @@ libs=$(K)601-2020.so \ $(K)lifts.so \ $(K)lut.so \ $(K)lutty.so \ + $(K)magicflute.so \ $(K)monofarba.so \ $(K)natcon.so \ $(K)objective.so \ @@ -172,6 +174,7 @@ installs=install-601-2020 \ install-lifts \ install-lut \ install-lutty \ + install-magicflute \ install-monofarba \ install-natcon \ install-objective \ @@ -281,6 +284,9 @@ $(K)lut.so: lut.o $(K)lutty.so: lutty.o $(CC) $(LDFLAGS) $< -o $@ -lkoliba +$(K)magicflute.so: magicflute.o + $(CC) $(LDFLAGS) $< -o $@ -lkoliba + $(K)monofarba.so: monofarba.o $(CC) $(LDFLAGS) $< -o $@ -lkoliba @@ -466,6 +472,10 @@ install-lutty: $(K)lutty.so install -p -s $? $(PREFIX) touch install-lutty +install-magicflute: $(K)magicflute.so + install -p -s $? $(PREFIX) + touch install-monofarba + install-monofarba: $(K)monofarba.so install -p -s $? $(PREFIX) touch install-monofarba