aboutsummaryrefslogtreecommitdiff
path: root/Plugins
diff options
context:
space:
mode:
Diffstat (limited to 'Plugins')
-rw-r--r--Plugins/makefile51
-rw-r--r--Plugins/plugin.h17
2 files changed, 67 insertions, 1 deletions
diff --git a/Plugins/makefile b/Plugins/makefile
index e899fe2..198a611 100644
--- a/Plugins/makefile
+++ b/Plugins/makefile
@@ -1,4 +1,9 @@
-all: noize colortv subtract xbend bend gol shuffle green tile rgbcopy copyvert black rgb hist setbits xshred sonogram vf2fs fs2vf swap 2colors plot makesliders
+all: noize colortv subtract xbend bend gol shuffle green \
+ tile rgbcopy copyvert black rgb hist setbits xshred \
+ sonogram vf2fs fs2vf swap 2colors plot makesliders \
+ convolution compare darken deinterlace difference interlace lighten \
+ multiply overlay screen shadowcaster softlight
+
dir *.dll
# FLAGS:
@@ -80,3 +85,47 @@ plot:
makesliders:
cl makesliders.c $(FLAGS) /link $(EFFECT)
copy makesliders.dll ms.dll
+
+#
+# PixelPack by Olaf Matthes
+#
+
+convolution:
+ cl convolution.c $(FLAGS) /link $(EFFECT)
+
+compare:
+ cl compare.c $(FLAGS) /link $(COPY)
+
+darken:
+ cl darken.c $(FLAGS) /link $(COPY)
+
+deinterlace:
+ cl deinterlace.c $(FLAGS) /link $(EFFECT)
+
+difference:
+ cl difference.c $(FLAGS) /link $(COPY)
+
+interlace:
+ cl interlace.c $(FLAGS) /link $(COPY)
+
+lighten:
+ cl lighten.c $(FLAGS) /link $(COPY)
+
+multiply:
+ cl multiply.c $(FLAGS) /link $(COPY)
+
+overlay:
+ cl overlay.c $(FLAGS) /link $(COPY)
+
+screen:
+ cl screen.c $(FLAGS) /link $(COPY)
+
+shadowcaster:
+ cl shadowcaster.c $(FLAGS) /link $(BOTH)
+
+softlight:
+ cl softlight.c $(FLAGS) /link $(COPY)
+
+#
+# </PixelPack>
+#
diff --git a/Plugins/plugin.h b/Plugins/plugin.h
index 00d3514..00281e5 100644
--- a/Plugins/plugin.h
+++ b/Plugins/plugin.h
@@ -116,4 +116,21 @@ __inline pixel32 rgbtocolor32(byte r, byte g, byte b)
return (b << 16) | (g << 8) | r;
}
+// restrict input to be 0..255 <olaf.matthes@gmx.de>
+__inline byte klamp255(long in)
+{
+ byte out = in<0 ? 0 : in;
+ out = 255<out ? 255 : out;
+ return(out);
+}
+
+// restrict input to be 16..235 as it is usual with signals
+// conforming to ITU-R 601 <olaf.matthes@gmx.de>
+__inline byte klamp601(long in)
+{
+ byte out = in<16 ? 16 : in;
+ out = 235<out ? 235 : out;
+ return(out);
+}
+
#endif // #ifndef _PLUGINH