mirror of
https://github.com/game-stop/veejay.git
synced 2025-12-17 13:20:01 +01:00
adds
git-svn-id: svn://code.dyne.org/veejay/trunk@1008 eb8d1916-c9e9-0310-b8de-cf0c9472ead5
This commit is contained in:
@@ -232,7 +232,7 @@ static void contourextract_centroid()
|
||||
|
||||
static int bg_frame_ = 0;
|
||||
|
||||
extern void vj_composite_transform( int *in_x, int *in_y, int points, int blob_id);
|
||||
extern void vj_composite_transform( int *in_x, int *in_y, int points, int blob_id, int cx , int cy);
|
||||
extern int vj_composite_active();
|
||||
|
||||
void contourextract_apply(void *ed, VJFrame *frame,int width, int height,
|
||||
@@ -367,7 +367,7 @@ void contourextract_apply(void *ed, VJFrame *frame,int width, int height,
|
||||
}
|
||||
}
|
||||
if( vj_composite_active() )
|
||||
vj_composite_transform( coord_x, coord_y, points, i);
|
||||
vj_composite_transform( coord_x, coord_y, points, i, nx,ny);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -527,9 +527,9 @@ int veejay_composite_active( veejay_t *info )
|
||||
return info->settings->composite;
|
||||
}
|
||||
|
||||
void veejay_composite_transform_points( veejay_t *info, int *in_x, int *in_y, int points, int blob_id )
|
||||
void veejay_composite_transform_points( veejay_t *info, int *in_x, int *in_y, int points, int blob_id, int cx, int cy )
|
||||
{
|
||||
composite_transform_points( info->composite, in_x, in_y, points, blob_id);
|
||||
composite_transform_points( info->composite, in_x, in_y, points, blob_id,cx,cy);
|
||||
}
|
||||
|
||||
void veejay_auto_loop(veejay_t *info)
|
||||
|
||||
@@ -64,7 +64,7 @@ void veejay_busy(veejay_t *info);
|
||||
|
||||
int veejay_increase_frame(veejay_t * info, long numframes);
|
||||
|
||||
void veejay_composite_transform_points( veejay_t *info, int *in_x, int *in_y, int points, int blob_id );
|
||||
void veejay_composite_transform_points( veejay_t *info, int *in_x, int *in_y, int points, int blob_id, int cx, int cy );
|
||||
|
||||
int veejay_composite_active( veejay_t *info );
|
||||
|
||||
|
||||
@@ -701,9 +701,9 @@ int vj_composite_active()
|
||||
return veejay_composite_active( info );
|
||||
}
|
||||
|
||||
void vj_composite_transform( int *in_x, int *in_y, int points, int blob_id)
|
||||
void vj_composite_transform( int *in_x, int *in_y, int points, int blob_id, int cx, int cy)
|
||||
{
|
||||
veejay_composite_transform_points( info, in_x, in_y, points, blob_id );
|
||||
veejay_composite_transform_points( info, in_x, in_y, points, blob_id, cx, cy );
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
|
||||
@@ -271,10 +271,10 @@ void composite_process( void *compiz, uint8_t *img_dat[3], VJFrame *input, int
|
||||
}
|
||||
}
|
||||
}
|
||||
void composite_transform_points( void *compiz, int *in_x, int *in_y, int n, int blob_id )
|
||||
void composite_transform_points( void *compiz, int *in_x, int *in_y, int n, int blob_id, int cx, int cy )
|
||||
{
|
||||
composite_t *c = (composite_t*) compiz;
|
||||
viewport_transform_coords( c->vp1, in_x, in_y, n , blob_id);
|
||||
viewport_transform_coords( c->vp1, in_x, in_y, n , blob_id,cx,cy);
|
||||
}
|
||||
void composite_blit( void *compiz, uint8_t *yuyv )
|
||||
{
|
||||
|
||||
@@ -27,5 +27,5 @@ void composite_process( void *compiz, uint8_t *in[3], VJFrame *input, int vp_
|
||||
void composite_blit( void *compiz,uint8_t *yuyv );
|
||||
void composite_get_blit_buffer( void *compiz, uint8_t *buf[3] );
|
||||
void *composite_get_vp( void *data );
|
||||
void composite_transform_points( void *compiz, int *in_x, int *in_y, int n, int blob_id );
|
||||
void composite_transform_points( void *compiz, int *in_x, int *in_y, int n, int blob_id, int cx, int cy );
|
||||
#endif
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#include <veejay/vj-viewport.h>
|
||||
#include <libvje/effects/opacity.h>
|
||||
#include <libvjmem/vjmem.h>
|
||||
|
||||
#include <math.h>
|
||||
#define X0 0
|
||||
#define Y0 1
|
||||
#define X1 2
|
||||
@@ -1333,7 +1333,7 @@ void *viewport_init(int x0, int y0, int w0, int h0, int w, int h, const char *ho
|
||||
// calculate initial view
|
||||
viewport_process( v );
|
||||
|
||||
v->buf = vj_calloc( sizeof(int32_t) * 12000 );
|
||||
v->buf = vj_calloc( sizeof(int32_t) * 24000 );
|
||||
|
||||
return (void*)v;
|
||||
}
|
||||
@@ -1609,7 +1609,7 @@ static void *sender_ = NULL;
|
||||
#define PORT 1234
|
||||
#endif
|
||||
|
||||
void viewport_transform_coords( void *data, int *in_x, int *in_y, int n, int blob_id )
|
||||
void viewport_transform_coords( void *data, int *in_x, int *in_y, int n, int blob_id, int cx, int cy )
|
||||
{
|
||||
viewport_t *v = (viewport_t*) data;
|
||||
matrix_t *tmp = viewport_matrix();
|
||||
@@ -1623,11 +1623,16 @@ void viewport_transform_coords( void *data, int *in_x, int *in_y, int n, int blo
|
||||
{
|
||||
float dx1 ,dy1;
|
||||
point_map( im, in_x[i], in_y[i], &dx1, &dy1);
|
||||
double angle = atan2( (in_x[i] - cx), (in_y[i] - cy) ) * (180.0/M_PI);
|
||||
v->buf[j+0] = dx1 / (v->w / 1000.0f);
|
||||
v->buf[j+1] = dy1 / (v->h / 1000.0f);
|
||||
//@ fixme: incomplete
|
||||
j+=2;
|
||||
}
|
||||
|
||||
//@ sort coordinates by angle: (angle : x,y )
|
||||
// qsort()
|
||||
|
||||
//@ send out coordinates
|
||||
|
||||
/*
|
||||
|
||||
@@ -42,5 +42,5 @@ void viewport_produce_full_img_yuyv( void *vdata, uint8_t *img[3], uint8_t *out_
|
||||
void viewport_draw_interface_color( void *vdata, uint8_t *img[3] );
|
||||
void viewport_set_marker( void *vdata, int status );
|
||||
void viewport_projection_inc( void *data, int incr , int w, int h );
|
||||
void viewport_transform_coords( void *data, int *in_x, int *in_y, int n, int blob_id );
|
||||
void viewport_transform_coords( void *data, int *in_x, int *in_y, int n, int blob_id, int cx, int cy );
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user