Commit 9ade3134 authored by Ivica Bukvic's avatar Ivica Bukvic
Browse files

1st step in syncing latest pdp and pidip with fixes/changes to make it work...

1st step in syncing latest pdp and pidip with fixes/changes to make it work with latest version of libs
parent 78a129de
Diff status between pd-l2ork externals source tree and main community pd svn
AS OF 11/22/2012
AS OF Feb. 06, 2012
DONE:
creb
gem2pdp
mrpeach
pdp
pidip
sigpack
MERGE:
miXed
......
......@@ -26,11 +26,11 @@ darwin: pdp_all
linux: pdp_all
rm -f pdp.pd_linux
$(CC) -Wl,--export-dynamic -shared -o pdp.pd_linux modules/*/*.o system/pdp.o system/*/*.o puredata/*.o $(PDP_LIBS)
$(CC) -rdynamic -shared -o pdp.pd_linux modules/*/*.o system/pdp.o system/*/*.o puredata/*.o $(PDP_LIBS)
linux_mmx: pdp_all
rm -f pdp.pd_linux
$(CC) -Wl,--export-dynamic -shared -o pdp.pd_linux modules/*/*.o system/pdp.o system/*/*.o puredata/*.o $(PDP_LIBS)
$(CC) -rdynamic -shared -o pdp.pd_linux modules/*/*.o system/pdp.o system/*/*.o puredata/*.o $(PDP_LIBS)
buildclean:
make -C include clean
......
PDP - Pure Data Packet v0.12.6
PDP - Pure Data Packet v0.12.7
a packet processing library for pure data
Copyright (c) by Tom Schouten <tom@zwizwa.be>
......
#!/bin/sh
prefix=/usr/local
version=0.12.7-svn
prefix=/usr
version=0.12.7
usage="\
Usage: pdp-config [--version] [--cflags] [--libdir]"
......
......@@ -7,7 +7,7 @@ AC_HEADER_STDC
dnl TAG REPO WHEN RELEASE VERSION CHANGES !!!
dnl After changing version, do "make mrproper ; sh bootstrap"
PDP_VERSION=0.12.7-svn
PDP_VERSION=0.12.7
......@@ -96,6 +96,12 @@ then
elif test -f $PWD/../src/m_pd.h;
then
PD_CPPFLAGS="-I$PWD/../src"
elif test -f /usr/local/include/pd/m_pd.h;
then
PD_CPPFLAGS="-I/usr/local/include/pd"
elif test -f /usr/include/pd/m_pd.h;
then
PD_CPPFLAGS="-I/usr/include/pd"
fi
......@@ -139,28 +145,64 @@ then
dnl if not darwin, assume target is linux
else
AC_CHECK_HEADER(linux/videodev.h,
have_v4l="no"
have_libv4l="no"
AC_CHECK_HEADERS([libv4l1-videodev.h], have_v4l="yes")
AC_CHECK_HEADERS([linux/videodev.h], have_libv4l="yes")
if test "x$have_libv4l" = "xyes"
then
have_v4l="yes"
fi
if test "x$enable_v4l" = "xno"
then
have_v4l="no"
fi
if test "x$have_v4l" = "xyes"
then
PDP_OPTMOD="$PDP_OPTMOD pdp_v4l.o"
AC_DEFINE(HAVE_PDP_V4L, 1, build pdp_v4l),
echo " linux/videodev.h not found: not building pdp_v4l")
AC_DEFINE(HAVE_PDP_V4L, 1, [build pdp_v4l])
if test "x$have_libv4l" = "xyes"
then
AC_DEFINE(HAVE_PDP_LIBV4L, 1, [build pdp_v4l with libv4l])
PDP_V4L_CFLAGS="`pkg-config --cflags libv4l 2>/dev/null || pkg-config --cflags libv4l2`"
PDP_V4L_LIBS="`pkg-config --libs libv4l 2>/dev/null || pkg-config --libs libv4l2`"
else
PDP_V4L_CFLAGS=""
PDP_V4L_LIBS=""
fi
PDP_CFLAGS="$PDP_CFLAGS $PDP_V4L_CFLAGS"
LIBS="$LIBS $PDP_V4L_LIBS"
else
AC_MSG_RESULT([not building pdp_v4l])
fi
fi
dnl optional gsl support
if test $enable_gsl == yes;
then
AC_CHECK_LIB(gsl,main,
PDP_OPTTYPES="$PDP_OPTTYPES pdp_matrix.o"
PDP_MATRIX_BASIC="$PDP_MATRIX_BASIC pdp_mat_mul.o pdp_mat_lu.o pdp_mat_vec.o"
PDP_IMAGE_BASIC="$PDP_IMAGE_BASIC pdp_cheby.o"
PDP_IMAGE_SPECIAL="$PDP_IMAGE_SPECIAL pdp_histo.o"
AC_DEFINE(HAVE_PDP_GSL, 1, gsl support)
LIBS="$LIBS -lgsl",
echo " libgsl not found: not building matrix type support")
AC_CHECK_LIB(gslcblas,main,
LIBS="$LIBS -lgslcblas", echo " libgslcblas not found")
AC_CHECK_LIB(gslcblas,main)
AC_CHECK_LIB(gsl,main,
PDP_OPTTYPES="$PDP_OPTTYPES pdp_matrix.o"
PDP_MATRIX_BASIC="$PDP_MATRIX_BASIC pdp_mat_mul.o pdp_mat_lu.o pdp_mat_vec.o"
PDP_IMAGE_BASIC="$PDP_IMAGE_BASIC pdp_cheby.o"
PDP_IMAGE_SPECIAL="$PDP_IMAGE_SPECIAL pdp_histo.o"
AC_DEFINE(HAVE_PDP_GSL, 1, gsl support)
PDP_GSL_FOUND=1,
echo " libgsl not found: not building matrix type support")
if test -n "$PDP_GSL_FOUND"; then
if test $ARCH == Darwin
then
LIBS="$LIBS -lgslcblas -lgsl"
else
dnl if not darwin, assume target is linux
LIBS="$LIBS `pkg-config --libs gsl`"
fi
fi
fi
......
......@@ -5,11 +5,17 @@
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the `gslcblas' library (-lgslcblas). */
/* #undef HAVE_LIBGSLCBLAS */
#define HAVE_LIBGSLCBLAS 1
/* Define to 1 if you have the `m' library (-lm). */
#define HAVE_LIBM 1
/* Define to 1 if you have the <libv4l1-videodev.h> header file. */
#define HAVE_LIBV4L1_VIDEODEV_H 1
/* Define to 1 if you have the <linux/videodev.h> header file. */
/* #undef HAVE_LINUX_VIDEODEV_H */
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
......@@ -19,29 +25,26 @@
/* gsl support */
#define HAVE_PDP_GSL 1
/* build pdp_v4l with libv4l */
/* #undef HAVE_PDP_LIBV4L */
/* build png support */
#define HAVE_PDP_PNG 1
/* build pdp_qt */
#define HAVE_PDP_QT 1
/* readline needed for console support */
/* #undef HAVE_PDP_READLINE */
/* build pdp_sdl */
#define HAVE_PDP_SDL 1
/* build pdp_v4l */
/* #undef HAVE_PDP_V4L */
/* experimental vforth dsp engine */
/* #undef HAVE_PDP_VFORTH */
#define HAVE_PDP_V4L 1
/* build X11 support */
#define HAVE_PDP_X 1
/* build pdp_xv */
/* #undef HAVE_PDP_XV */
#define HAVE_PDP_XV 1
/* enable forced pwc v4l support */
/* #undef HAVE_PWCV4L */
......@@ -79,6 +82,9 @@
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME ""
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION ""
......
......@@ -9,6 +9,12 @@
/* Define to 1 if you have the `m' library (-lm). */
#undef HAVE_LIBM
/* Define to 1 if you have the <libv4l1-videodev.h> header file. */
#undef HAVE_LIBV4L1_VIDEODEV_H
/* Define to 1 if you have the <linux/videodev.h> header file. */
#undef HAVE_LINUX_VIDEODEV_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
......@@ -18,24 +24,21 @@
/* gsl support */
#undef HAVE_PDP_GSL
/* build pdp_v4l with libv4l */
#undef HAVE_PDP_LIBV4L
/* build png support */
#undef HAVE_PDP_PNG
/* build pdp_qt */
#undef HAVE_PDP_QT
/* readline needed for console support */
#undef HAVE_PDP_READLINE
/* build pdp_sdl */
#undef HAVE_PDP_SDL
/* build pdp_v4l */
#undef HAVE_PDP_V4L
/* experimental vforth dsp engine */
#undef HAVE_PDP_VFORTH
/* build X11 support */
#undef HAVE_PDP_X
......@@ -78,6 +81,9 @@
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
......
......@@ -48,6 +48,9 @@ typedef unsigned short u16;
typedef unsigned int u32;
typedef unsigned long long u64;
typedef unsigned long uptr; /* An unsigned int the size of a pointer. */
typedef signed long sptr;
typedef struct _pdp t_pdp;
typedef void (*t_pdp_packet_method1)(t_pdp *); /* dst */
typedef void (*t_pdp_packet_method2)(t_pdp *, t_pdp *); /* dst, src */
......
......@@ -242,8 +242,8 @@ static t_int *rawout_perform(t_int *w);
static void rawout_dsp(t_rawout *x, t_signal **sp){
int nargs = 2 + x->x_chans;
t_int args[nargs];
args[0] = (int)x;
args[1] = (int)sp[0]->s_n;
args[0] = (t_int)x;
args[1] = (t_int)sp[0]->s_n;
float **in = (float **)(args+2);
int i;
for (i=0; i<x->x_chans; i++) in[i] = sp[i]->s_vec;
......
......@@ -54,7 +54,7 @@ void pdp_constant_value(t_pdp_constant *x, t_floatarg f)
if (f>1.0f) f = 1.0f;
if (f<-1.0f) f = -1.0f;
x->x_constant = (void *)((s32)(0x7fff * f));
x->x_constant = (void *)((sptr)(0x7fff * f));
}
......
......@@ -89,7 +89,7 @@ static void pdp_logic_process_hardthresh(t_pdp_logic *x)
static void pdp_logic_set_mask(t_pdp_logic *x, t_floatarg f)
{
/* using a pointer as a variable hmm? */
u32 mask = ((u32)f) & 0xffff;
sptr mask = ((sptr)f) & 0xffff;
x->x_mask = ((void * )mask);
}
......@@ -98,12 +98,12 @@ static void pdp_logic_set_threshold(t_pdp_logic *x, t_floatarg f)
/* using a pointer as a variable hmm? */
if (f<0.0f) f = 0.0f;
if (f>1.0f) f = 1.0f;
x->x_mask = (void *)((u32)(((float)0x7fff) * f));
x->x_mask = (void *)((sptr)(((float)0x7fff) * f));
}
static void pdp_logic_set_depth(t_pdp_logic *x, t_floatarg f)
{
u32 mask;
sptr mask;
int shift = (16 - ((int)f));
if (shift < 0) shift = 0;
if (shift > 16) shift = 16;
......
......@@ -26,9 +26,12 @@
#include "pdp.h"
#include "pdp_llconv.h"
#include "s_stuff.h" // need to get sys_libdir for libquicktime plugins
#if PD_MAJOR_VERSION==0 && PD_MINOR_VERSION>=43
#include "s_stuff.h" // need to get sys_libdir for libquicktime plugins
#endif
#define min(x,y) ((x<y)?(x):(y))
......
......@@ -35,7 +35,14 @@
#include <sys/types.h>
#include <sys/time.h>
#include <linux/types.h>
#include <linux/videodev.h>
#ifdef HAVE_LIBV4L1_VIDEODEV_H
# include <libv4l1-videodev.h>
#else
# warning trying to use deprecated V4L-1 API
# include <linux/videodev.h>
#endif
#include <sys/mman.h>
#include <sched.h>
#include <pthread.h>
......
......@@ -20,7 +20,7 @@ clean:
pdp_opengl.pd_linux: subdirs
rm -f pdp_opengl.pd_linux
$(CC) --export-dynamic -shared -o pdp_opengl.pd_linux modules/*.o system/*.o $(LDFLAGS) -g
$(CC) -rdynamic -shared -o pdp_opengl.pd_linux modules/*.o system/*.o $(LDFLAGS) -g
pdp_opengl.pd_darwin: subdirs
rm -f pdp_opengl.pd_linux
......
prefix = /usr/local
PDP_VERSION=0.12.6
PDP_VERSION=0.12.7
PDP_DIR = ../../include
PDP_OGL_DIR = ../include
......@@ -23,7 +23,7 @@ endif
ifeq ($(UNAME),Darwin)
TARGET = darwin
CPPFLAGS += -I/sw/include
PD_EXECUTABLE=../../../pd/bin/pd
PD_EXECUTABLE=../../../pd/src/pd
LDFLAGS = -lgsl -lGL -lGLU -lglut -lX11 -L/sw/lib -L/usr/X11R6/lib
endif
......
......@@ -26,7 +26,7 @@ mrproper: clean
pdp_scaf.pd_linux: pdp_scaf_all
rm -f pdp_scaf.pd_linux
gcc --export-dynamic -shared -o pdp_scaf.pd_linux pdp/*.o $(PDP_CA_LIBS)
gcc -rdynamic -shared -o pdp_scaf.pd_linux pdp/*.o $(PDP_CA_LIBS)
install: all
install -d $(prefix)/lib/scaf
......
......@@ -136,7 +136,7 @@ void pdp_imageproc_not_process(void *x, u32 width, u32 height, s16 *image)
void pdp_imageproc_mask_process(void *x, u32 width, u32 height, s16 *image)
{
u32 mask = (u32)x;
uptr mask = (uptr)x;
u32 *plane = (u32 *)image;
int count = (width * height) >> 1;
int i;
......@@ -279,7 +279,7 @@ void pdp_imageproc_zero_process(void *x, u32 width, u32 height, s16 *image)
void pdp_imageproc_constant_process(void *x, u32 width, u32 height, s16 *image)
{
int i;
u32 value = (u32)x;
uptr value = (uptr)x;
u32 *plane = (u32 *)image;
int wordsize = (width * height) >> 1;
value = (value & 0xffff) | (value << 16);
......@@ -346,7 +346,7 @@ void pdp_imageproc_zthresh_process(void *x, u32 width, u32 height, s16 *image)
void pdp_imageproc_hardthresh_process(void *x, u32 width, u32 height, s16 *image)
{
int i;
s32 thresh = (s32)x;
uptr thresh = (uptr)x;
s32 sign1, isign2, a;
s32 *wimage = (s32 *)image;
int wsize = (width * height) >> 1;
......@@ -370,7 +370,7 @@ void pdp_imageproc_hardthresh_process(void *x, u32 width, u32 height, s16 *image
void pdp_imageproc_softthresh_process(void *x, u32 width, u32 height, s16 *image)
{
int i;
s32 thresh = (s32)x;
sptr thresh = (sptr)x;
s32 sign1, sign2, a;
s32 *wimage = (s32 *)image;
int wsize = (width * height) >> 1;
......
......@@ -69,7 +69,7 @@ static inline int rgb2u(int r, int g, int b)
/* swap top to bottom */
static inline void _exchange_row(char *row1, char *row2, int size)
{
int mask = ~(sizeof(int)-1);
int mask = ~((unsigned int)sizeof(int)-1);
int *irow1 = (int *)row1;
int *irow2 = (int *)row2;
......
......@@ -110,8 +110,12 @@ void pdp_setup(void){
if (initialized) return;
/* babble */
#ifdef PDP_VERSION
#ifdef PDP_VERSION
# if PD_MAJOR_VERSION==0 && PD_MINOR_VERSION<43
pdp_post("PDP: pure data packet version " PDP_VERSION );
# else
logpost(NULL, 3, "PDP: pure data packet version " PDP_VERSION );
# endif
#else
pdp_post ("PDP: pure data packet");
#endif
......
......@@ -17,14 +17,6 @@ functionality, have a look at Yves
Degoyon's <a href="http://ydegoyon.free.fr/pidip.html">PiDiP</a>
library.
<p> PDP is currently in maintenance only mode. After version 0.12 I
got ambitious and started writing
<a href="http://zwizwa.be/packetforth">Packet Forth (PF)</a>
and <a href="http://zwizwa.be/staapl">Staapl</a>. These projects
address problems in the design of PDP, but are not in a state to be
included back into PDP. However, Packet Forth can be used as a
Pure Data external.
<p> For documentation, have a look at the 'pdp' subdirectory in pd's 'Pure
Documentation'. Most objects are documented with pd style help
patches accessible by right clicking on an object. The place to send
......@@ -33,29 +25,31 @@ questions is the Pure Data mailing list.
<a name="darcs">
<h2>Download</h2></a>
The latest stable PDP tarball release
is <a href="http://zwizwa.be/pd/pdp/pdp-0.12.5.tar.gz">0.12.5</a>.
For older releases see <a href="http://zwizwa.be/pd/pdp">here</a>.
During this maintenance only phase, the main distribution and code
contribution channel is the Pure Data SVN. I do try to keep
my <a href="http://zwizwa.be/darcs/pdp-12">darcs</a> archive up to
date.
PDP is written by Tom Schouten and released under the GPL v2.
The latest stable PDP tarball release can be found in the
<a href="http://sourceforge.net/projects/pure-data/files/libraries/pdp/">PDP</a>
section of the Pure
Data <a href="http://sourceforge.net/projects/pure-data"> SourceForge
project</a>. The <code>pd-pdp</code> package is currently maintained
by Paul Brossier. PDP is written by <a href="http://zwizwa.be">Tom
Schouten</a> and released under the GPL v2.
<a name="links">
<h2>Links</h2></a>
<li><a href="http://pure-data.iem.at/about/">Pure Data at IEM</a>
<li><a href="http://pure-data.info/">Pure Data portal</a>
<li><a href="http://ydegoyon.free.fr/pidip.html">PiDiP Is Definitely In Pieces</a>
<li><a href="http://www.hackitectura.net/aljwarizmi/">al-Jwarizmi</a>
<li><a href="http://www.artefacte.org/modules.php?op=modload&name=PD&file=index">PidipVJ</a>
<li><a href="http://rama.xicnet.com/appz.php">Videoflow / Cruzados BGN</a>
<li><a href="http://attacksyour.net/pi/pd/index.html">Eth0</a>
<li><a href="http://footils.org/cms">RRADical</a>
<li><a href="http://veejay.sourceforge.net/">Veejay</a> / <a href="http://zwizwa.fartit.com/pd/sendVIMS/">SendVIMS</a>
<li><a href="http://veejay.sourceforge.net/">Veejay</a> / <a href="http://zwizwa.be/pd/sendVIMS/">SendVIMS</a>
<li><a href="http://freej.dyne.org/">FreeJ</a>
<li><a href="http://effectv.sourceforge.net/">EffecTV</a>
<li><a href="http://zwizwa.be/packetforth/">Packet Forth</a>, the
direct descendant of PDP.
<li><a href="http://zwizwa.be/-/libprim/">libprim</a>, a descendant of Packet Forth.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment