aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES.LOG1
-rw-r--r--modules/pdp_ripple.c9
2 files changed, 5 insertions, 5 deletions
diff --git a/CHANGES.LOG b/CHANGES.LOG
index b940d44..5634143 100644
--- a/CHANGES.LOG
+++ b/CHANGES.LOG
@@ -1,4 +1,5 @@
0.12.9
+ fixed pdp_ripple
added pdp_shape : a shape recognition object (based on color, similar to color tracker )
added "fill" in pdp_pen
( on request from ben )
diff --git a/modules/pdp_ripple.c b/modules/pdp_ripple.c
index e0ceca7..07b3bfe 100644
--- a/modules/pdp_ripple.c
+++ b/modules/pdp_ripple.c
@@ -28,7 +28,7 @@
#include "pdp.h"
#include <math.h>
-#define MAGIC_THRESHOLD 5
+#define MAGIC_THRESHOLD 30
static unsigned int fastrand_val;
#define inline_fastrand() (fastrand_val=fastrand_val*1103515245+12345)
@@ -114,18 +114,17 @@ static void pdp_ripple_allocate(t_pdp_ripple *x)
int i;
x->x_diff = (short int*) getbytes((x->x_vsize + (x->x_vsize>>1))<<1);
- x->x_bdata = (short int *)getbytes((( x->x_vsize + (x->x_vsize>>1))<<1));
+ x->x_bdata = (short int *) getbytes((( x->x_vsize + (x->x_vsize>>1))<<1));
x->x_maph = x->x_vheight / 2 + 1;
x->x_mapw = x->x_vwidth / 2 + 1;
x->x_map = (int *)getbytes(x->x_maph*x->x_mapw*3*sizeof(t_int));
x->x_vtable = (signed char *)getbytes(x->x_maph*x->x_mapw*2*sizeof(signed char));
- if( !x->x_map || x->x_vtable || !x->x_bdata || ! x->x_diff ) {
+ if( !x->x_map || !x->x_vtable || !x->x_bdata || !x->x_diff ) {
post( "pdp_ripple : severe error : cannot allocate buffers" );
}
x->x_map1 = x->x_map;
x->x_map2 = x->x_map + x->x_maph * x->x_mapw;
x->x_map3 = x->x_map + x->x_mapw * x->x_maph * 2;
-
}
/* check if there is a real difference with background image */
@@ -308,7 +307,7 @@ static void pdp_ripple_process_yv12(t_pdp_ripple *x)
if ( x->x_bdata && x->x_snapshot )
{
x->x_snapshot = 0;
- memcpy( x->x_bdata, data, (x->x_vsize + (x->x_vsize<<1))<<1 );
+ memcpy( x->x_bdata, data, (x->x_vsize + (x->x_vsize>>1))<<1 );
}
totalnbpixels = x->x_vsize;