aboutsummaryrefslogtreecommitdiff
path: root/Plugins
diff options
context:
space:
mode:
authorJuha Vehviläinen <jusu@users.sourceforge.net>2002-07-09 12:16:46 +0000
committerJuha Vehviläinen <jusu@users.sourceforge.net>2002-07-09 12:16:46 +0000
commit85d5e43cd4856dd3d14fefd450a0606666b6dc80 (patch)
treee8e6e2a09b0a1a2cc2177eeb258bbe70e9406a97 /Plugins
parent126a4a6c255e2ab9836899717e9c21ee319d4c13 (diff)
added PixelPack002
svn path=/trunk/Framestein/; revision=29
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