fix many compile warnings

This commit is contained in:
niels
2014-12-21 17:05:25 +01:00
parent 9b4391bc79
commit c31f40fcdf
60 changed files with 110 additions and 474 deletions

View File

@@ -114,7 +114,6 @@ void bathroom_hori_apply(VJFrame *frame, int width, int height, int val)
unsigned int i;
unsigned int len = (width * height);
unsigned int y_val = val;
unsigned int tmp = 0;
uint8_t *Y = frame->data[0];
uint8_t *Cb = frame->data[1];
uint8_t *Cr = frame->data[2];

View File

@@ -58,7 +58,7 @@ int bgsubtract_malloc(int width, int height)
return 1;
}
void bgsubtract_free(void *d)
void bgsubtract_free()
{
if( static_bg )
free(static_bg );

View File

@@ -25,7 +25,7 @@
#include <stdint.h>
vj_effect *bgsubtract_init(int width, int height);
void bgsubtract_free(void *d);
void bgsubtract_free();
int bgsubtract_malloc(int w, int h);
int bgsubtract_prepare(uint8_t *map[3], int w, int h);
void bgsubtract_apply(VJFrame *frame,int width,int height,int mode, int threshold);

View File

@@ -112,7 +112,6 @@ static void blob_init_( blob_t *b , int w , int h)
int blob_malloc(int w, int h)
{
int j,i;
double frac;
int dist_sqrt;
if(blob_radius_ <= 0)
@@ -141,7 +140,6 @@ int blob_malloc(int w, int h)
dist_sqrt = i * i + j * j;
if( dist_sqrt < blob_sradius_ )
{
frac = (double) (sqrt(dist_sqrt)) / (double) blob_sradius_;
blob_[i + blob_radius_][j + blob_radius_] = 0xff;
}
else

View File

@@ -143,7 +143,6 @@ void cali_apply(void *ed, VJFrame *frame, int w, int h,int mode, int full)
uint8_t *Y = frame->data[0];
uint8_t *U = frame->data[1];
uint8_t *V = frame->data[2];
const int min_Y = get_pixel_range_min_Y();
const int chroma = 127;
const int uv_len = frame->uv_len;
int p,i;
@@ -213,7 +212,7 @@ void cali_apply(void *ed, VJFrame *frame, int w, int h,int mode, int full)
for( i = 0; i <(w*h); i ++ ) {
p = ( Y[i] - by[i] );
if( p < 0 )
Y[i] = 0;
Y[i] = pixel_Y_lo_;
else
Y[i] = p;
}

View File

@@ -238,7 +238,6 @@ static void drawDisappearing(VJFrame *src, VJFrame *dest)
void chameleon_apply( VJFrame *frame, int width, int height, int mode)
{
unsigned int i;
const int len = (width * height);
VJFrame source;
int strides[4] = { len, len, len, 0 };
@@ -248,7 +247,6 @@ void chameleon_apply( VJFrame *frame, int width, int height, int mode)
source.data[1] = tmpimage[1];
source.data[2] = tmpimage[2];
int interpolate = 0;
uint32_t activity = 0;
int auto_switch = 0;
int tmp1,tmp2;

View File

@@ -232,9 +232,6 @@ static void drawDisappearing(VJFrame *src, VJFrame *dest)
void chameleonblend_apply( VJFrame *frame, VJFrame *source, int width, int height, int mode )
{
unsigned int i;
const int len = (width * height);
int interpolate = 0;
uint32_t activity = 0;
int auto_switch = 0;
int tmp1,tmp2;

View File

@@ -216,7 +216,7 @@ void chromamagic_selectdiffneg(VJFrame *frame, VJFrame *frame2,
uint8_t *Cb2 = frame2->data[1];
uint8_t *Cr2 = frame2->data[2];
int a, b,c;
int a, b;
const int op_b = 255 - op_a;
for (i = 0; i < len; i++) {
a = (Y[i] * op_a) >> 8;
@@ -241,7 +241,7 @@ void chromamagic_selectunfreeze(VJFrame *frame, VJFrame *frame2,
uint8_t *Cb2 = frame2->data[1];
uint8_t *Cr2 = frame2->data[2];
int c, a, b;
int a, b;
const int op_b = 255 - op_a;
for (i = 0; i < len; i++) {
a = (Y[i] * op_a) >> 8;
@@ -267,7 +267,7 @@ void chromamagic_addlum(VJFrame *frame, VJFrame *frame2, int width,
uint8_t *Cb2 = frame2->data[1];
uint8_t *Cr2 = frame2->data[2];
int c, a, b;
int a, b;
const int op_b = 255 - op_a;
for (i = 0; i < len; i++) {
@@ -290,8 +290,6 @@ void chromamagic_exclusive(VJFrame *frame, VJFrame *frame2, int width, int heigh
uint8_t *Cr2 = frame2->data[2];
int a=0, b=0, c=0;
const unsigned int o1 = op_a;
const unsigned int o2 = 255 - a;
for (i = 0; i < len; i++) {
a = Y[i];
@@ -325,7 +323,7 @@ void chromamagic_diffnegate(VJFrame *frame, VJFrame *frame2, int width, int heig
uint8_t *Cb2 = frame2->data[1];
uint8_t *Cr2 = frame2->data[2];
int a,b,c,d;
int a,b,d;
const unsigned int o1 = op_a;
const unsigned int o2 = 255 - o1;
#define MAGIC_THRESHOLD 40
@@ -364,7 +362,7 @@ void chromamagic_additive(VJFrame *frame, VJFrame *frame2, int width,
uint8_t *Cb2 = frame2->data[1];
uint8_t *Cr2 = frame2->data[2];
int a,b,c;
int a,b;
const unsigned int o1 = op_a;
const unsigned int o2 = 255 - op_a;
for(i=0; i < len; i++) {
@@ -481,7 +479,7 @@ void chromamagic_unfreeze( VJFrame *frame, VJFrame *frame2, int w, int h, int op
uint8_t *Cb2 = frame2->data[1];
uint8_t *Cr2 = frame2->data[2];
int a,b,c;
int a,b;
for(i=0; i < len; i++) {
a = Y[i];
@@ -589,7 +587,7 @@ void chromamagic_divide(VJFrame *frame, VJFrame *frame2, int w, int h, int op_a
uint8_t *Cb2 = frame2->data[1];
uint8_t *Cr2 = frame2->data[2];
int a,b,c;
int a,b;
const unsigned int o1 = op_a;
for(i=0; i < len; i++) {

View File

@@ -63,7 +63,6 @@ static int color_delay_ = 0;
static int delay_ = 0;
void colflash_apply( VJFrame *frame, int width, int height, int f,int r, int g, int b, int d)
{
unsigned int i, op0, op1;
unsigned int len = frame->len;
unsigned int uv_len = frame->uv_len;

View File

@@ -103,8 +103,7 @@ void colmorphology_apply( VJFrame *frame, int width, int height, int threshold,
{
unsigned int i,x,y;
int len = (width * height);
int c = 0,t=0,k=0;
uint8_t pixel;
int t=0;
uint8_t *Y = frame->data[0];
uint8_t *Cb = frame->data[1];
uint8_t *Cr = frame->data[2];

View File

@@ -61,7 +61,7 @@ void colormap_apply( VJFrame *frame, int width, int height, int r, int g, int b)
uint8_t *Y = frame->data[0];
uint8_t *Cb = frame->data[1];
uint8_t *Cr = frame->data[2];
uint8_t dummy = 0;
int dummy = 0;
for(i = 1; i < 256; i ++ )
{
COLOR_rgb2yuv( (r % i),(g % i),(b % i), dummy, u_[i-1],v_[i-1]);

View File

@@ -35,7 +35,6 @@ extern void veejay_msg(int type, const char format[], ...);
char **vje_build_param_list( int num, ... )
{
va_list args;
char buf[1024];
char **list;
char *tmp = NULL;
list = (char**) vj_malloc(sizeof(char*) * (num+1) );
@@ -796,7 +795,7 @@ uint8_t bl_pix_difference_Y(uint8_t y1, uint8_t y2)
uint8_t bl_pix_diffnegate_Y(uint8_t y1, uint8_t y2)
{
uint8_t a, b, new_Y;
uint8_t a, b;
a = 0xff - y1;
b = y2;
return ( 0xff - abs(a - b) );
@@ -1093,9 +1092,7 @@ uint8_t bl_pix_add_distorted_C(uint8_t y1, uint8_t y2)
uint8_t bl_pix_sub_distorted_Y(uint8_t y1, uint8_t y2)
{
uint8_t new_Y, a, b;
a = y1;
b = y2;
uint8_t new_Y;
new_Y = y1 - y2;
new_Y -= y2;
return new_Y;
@@ -1436,9 +1433,8 @@ static uint32_t veejay_histogram_median( uint32_t *h )
static void build_histogram_rgb( uint8_t *rgb, histogram_t *h, VJFrame *f)
{
unsigned int i,j, len;
unsigned int i,j;
uint32_t *Hr,*Hb,*Hg;
uint8_t *p;
Hr = h->hR;
Hg = h->hG;
@@ -1649,7 +1645,7 @@ void veejay_histogram_equalize( void *his, VJFrame *f , int intensity, int stren
histogram_t *h = (histogram_t*) his;
uint32_t LUT[256];
unsigned int i;
uint8_t *u,*v,*y;
uint8_t *y;
unsigned int len;
len = f->len;

View File

@@ -53,7 +53,6 @@ vj_effect *complexsync_init(int width, int height)
int complexsync_malloc(int width, int height)
{
int i;
c_outofsync_buffer[0] = (uint8_t*) vj_malloc( sizeof(uint8_t) * RUP8(width*height*3) );
c_outofsync_buffer[1] = c_outofsync_buffer[0] + RUP8(width*height);
c_outofsync_buffer[2] = c_outofsync_buffer[1] + RUP8(width*height);
@@ -77,9 +76,6 @@ void complexsync_apply(VJFrame *frame, VJFrame *frame2, int width, int height, i
uint8_t *Y = frame->data[0];
uint8_t *Cb = frame->data[1];
uint8_t *Cr = frame->data[2];
uint8_t *Y2 = frame2->data[0];
uint8_t *Cb2 = frame2->data[1];
uint8_t *Cr2 = frame2->data[2];
const unsigned int region = width * val;
int strides[4] = { region, region, region, 0 };

View File

@@ -30,7 +30,7 @@
#include <libvjmem/vjmem.h>
#include "softblur.h"
static uint8_t *static_bg = NULL;
static int *dt_map = NULL;
static uint32_t *dt_map = NULL;
typedef struct
{
@@ -214,7 +214,7 @@ void diff_apply(void *ed, VJFrame *frame,
} else if ( dt_map[i] == 1 ) {
Y[i] = 0xff;
} else {
Y[i] = 0; //@ black (background)
Y[i] = pixel_Y_lo_; //@ black (background)
}
Cb[i] = 128;
Cr[i] = 128;
@@ -223,7 +223,6 @@ void diff_apply(void *ed, VJFrame *frame,
}
//@ process dt map
uint8_t *bin = ud->data;
for( i = 0; i < len ;i ++ )
{
if( dt_map[ i ] >= feather )
@@ -234,7 +233,7 @@ void diff_apply(void *ed, VJFrame *frame,
}
else
{
Y[i] = 0;
Y[i] = pixel_Y_lo_;
Cb[i] = 128;
Cr[i] = 128;
}

View File

@@ -233,7 +233,6 @@ void differencemap_apply( VJFrame *frame, VJFrame *frame2,int width, int height,
uint8_t *Cr2=frame2->data[2];
const uint8_t kernel[9] = { 1,1,1, 1,1,1, 1,1,1 };
uint8_t *bmap = binary_img;
// morph_func p = _dilate_kernel3x3;
uint8_t *previous_img = binary_img + len;
@@ -246,31 +245,6 @@ void differencemap_apply( VJFrame *frame, VJFrame *frame2,int width, int height,
softblur_apply( &tmp, width,height,0 );
binarify( binary_img,previous_img,threshold,reverse, width,height);
/*
#ifdef HAVE_ASM_MMX
int work = (width*height)>>3;
load_chroma( 128 );
for( y = 0 ; y < work; y ++ )
{
load_binary_map( bmap );
map_luma(Y , Y2 );
map_chroma( Cb, Cb2 );
map_chroma( Cr, Cr2 );
//@ we could mmx-ify dilation
Y += 8;
Y2 += 8;
Cb += 8;
Cb2 += 8;
Cr += 8;
Cr2 +=8;
bmap += 8;
}
__asm__ __volatile__ ( _EMMS:::"memory");
#else
*/
//@ clear image
if(show)

View File

@@ -46,7 +46,7 @@ vj_effect *emboss_init(int w, int h)
void simpleedge_framedata(VJFrame *frame, int width, int height)
{
unsigned int x, y;
uint8_t a1, a2, a3, b1, b2, b3, c1, c2, c3;
uint8_t a1, a2, a3, b1, b2, b3, c1, c2;
uint8_t *Y = frame->data[0];
for (y = 1; y < (height-1); y++) {
for (x = 1; x < (width-1); x++) {
@@ -58,7 +58,6 @@ void simpleedge_framedata(VJFrame *frame, int width, int height)
b3 = Y[y * width + (x + 1)];
c1 = Y[(y + 1) * width + (x - 1)];
c2 = Y[(y + 1) * width + x];
c3 = Y[(y + 1) * width + (x + 1)];
if (b2 > a1 && b2 > a2 && b2 > a3 &&
b2 > b1 && b2 > b3 && b3 > c1 && b2 > c2 && b2 > c2)
Y[y * width + x] = pixel_Y_hi_;

View File

@@ -50,7 +50,7 @@ vj_effect *ghost_init(int w, int h)
int ghost_malloc(int w, int h)
{
const int len = (w * h );
int i;
ghost_buf[0] = vj_malloc( sizeof(uint8_t) * RUP8(len*3));
ghost_buf[1] = ghost_buf[0] + RUP8(len);
@@ -82,7 +82,7 @@ void ghost_apply(VJFrame *frame,
int width, int height, int opacity)
{
register int q,z=0;
int x,y,i,tmp;
int x,y,i;
const int len = frame->len;
const unsigned int op_a = opacity;
const unsigned int op_b = 255 - op_a;

View File

@@ -63,8 +63,7 @@ void greyselect_apply( VJFrame *frame, int width,
int b)
{
uint8_t *fg_y, *fg_cb, *fg_cr;
uint8_t *bg_y, *bg_cb, *bg_cr;
uint8_t *fg_cb, *fg_cr;
int accept_angle_tg, accept_angle_ctg, one_over_kc;
int kfgy_scale, kg;
int cb, cr;
@@ -95,14 +94,9 @@ void greyselect_apply( VJFrame *frame, int width,
kg = kg1;
/* intialize pointers */
fg_y = Y;
fg_cb = Cb;
fg_cr = Cr;
bg_y = Y;
bg_cb = Cb;
bg_cr = Cr;
for (pos = (width * height); pos != 0; pos--) {
short xx, yy;
xx = (((fg_cb[pos]) * cb) + ((fg_cr[pos]) * cr)) >> 7;

View File

@@ -57,7 +57,6 @@ void iris_apply( VJFrame *frame, VJFrame *frame2, int width, int height, int val
{
int i,j,k=0;
int len = (width * height);
int uv_len = frame->uv_len;
uint8_t *Y0 = frame->data[0];
uint8_t *Cb0 = frame->data[1];

View File

@@ -139,7 +139,7 @@ void keyselect_apply( VJFrame *frame, VJFrame *frame2, int width,
{
uint8_t *fg_y, *fg_cb, *fg_cr;
uint8_t *bg_y, *bg_cb, *bg_cr;
uint8_t *bg_y;
int accept_angle_tg, accept_angle_ctg, one_over_kc;
int kfgy_scale, kg;
int cb, cr;
@@ -182,8 +182,6 @@ void keyselect_apply( VJFrame *frame, VJFrame *frame2, int width,
fg_cr = Cr;
/* 2005: swap these !! */
bg_y = Y2;
bg_cb = Cb2;
bg_cr = Cr2;
for (pos = (width * height); pos != 0; pos--) {
short xx, yy;

View File

@@ -235,7 +235,7 @@ void _lumamagick_divide(VJFrame *frame, VJFrame *frame2, int width,
{
unsigned int i;
const unsigned int len = width * height;
int a, b, c;
int b, c;
const double opacity_a = op_a * 0.01;
const double opacity_b = op_b * 0.01;
uint8_t *Y = frame->data[0];

View File

@@ -55,8 +55,8 @@ void _overlaymagic_adddistorted(VJFrame *frame, VJFrame *frame2,
{
unsigned int i;
unsigned int len = width * height;
int uv_len = frame->uv_len;
uint8_t *Y = frame->data[0];
uint8_t *Y = frame->data[0];
uint8_t *Y2 = frame2->data[0];
int a, b, c;
@@ -74,7 +74,7 @@ void _overlaymagic_add_distorted(VJFrame *frame, VJFrame *frame2,
{
unsigned int i;
uint8_t y1, y2, cb, cr;
uint8_t y1, y2;
unsigned int len = width * height;
int uv_len = frame->uv_len;
uint8_t *Y = frame->data[0];
@@ -93,11 +93,10 @@ void _overlaymagic_subdistorted(VJFrame *frame, VJFrame *frame2,
{
unsigned int i;
unsigned int len = width * height;
int uv_len = frame->uv_len;
uint8_t *Y = frame->data[0];
uint8_t *Y2 = frame2->data[0];
uint8_t y1, y2, cb, cr;
uint8_t y1, y2;
for (i = 0; i < len; i++) {
y1 = Y[i];
y2 = Y2[i];
@@ -112,11 +111,10 @@ void _overlaymagic_sub_distorted(VJFrame *frame, VJFrame *frame2,
unsigned int i ;
unsigned int len = width * height;
int uv_len = frame->uv_len;
uint8_t *Y = frame->data[0];
uint8_t *Y2 = frame2->data[0];
uint8_t y1, y2, cb, cr;
uint8_t y1, y2;
for (i = 0; i < len; i++) {
y1 = Y[i];
y2 = Y2[i];
@@ -187,7 +185,6 @@ void _overlaymagic_substractive(VJFrame *frame, VJFrame *frame2,
{
unsigned int i;
int a;
unsigned int len = width * height;
uint8_t *Y = frame->data[0];
uint8_t *Y2 = frame2->data[0];
@@ -277,7 +274,7 @@ void _overlaymagic_mulsub(VJFrame *frame, VJFrame *frame2, int width,
uint8_t *Y = frame->data[0];
uint8_t *Y2 = frame2->data[0];
int a, b, c;
int a, b;
for (i = 0; i < len; i++) {
a = Y[i];
b = 255 - Y2[i];
@@ -343,11 +340,10 @@ void _overlaymagic_exclusive(VJFrame *frame, VJFrame *frame2,
{
unsigned int i;
unsigned int len = width * height;
int uv_len = frame->uv_len;
uint8_t *Y = frame->data[0];
uint8_t *Y2 = frame2->data[0];
int a,b,c;
int c;
for (i = 0; i < len; i++) {
c = Y[i] + (2 * Y2[i]) - 255;
Y[i] = CLAMP_Y(c - (( Y[i] * Y2[i] ) >> 8 ));
@@ -380,7 +376,7 @@ void _overlaymagic_freeze(VJFrame *frame, VJFrame *frame2, int width,
uint8_t *Y = frame->data[0];
uint8_t *Y2 = frame2->data[0];
int a, b, c;
int a, b;
for (i = 0; i < len; i++) {
a = Y[i];
b = Y2[i];
@@ -397,7 +393,7 @@ void _overlaymagic_unfreeze(VJFrame *frame, VJFrame *frame2,
uint8_t *Y = frame->data[0];
uint8_t *Y2 = frame2->data[0];
int a, b, c;
int a, b;
for (i = 0; i < len; i++) {
a = Y[i];
b = Y2[i];
@@ -465,7 +461,6 @@ void _overlaymagic_relativeadd(VJFrame *frame, VJFrame *frame2,
{
unsigned int i;
unsigned int len = width * height;
int uv_len = frame->uv_len;
uint8_t *Y = frame->data[0];
uint8_t *Y2 = frame2->data[0];
@@ -484,7 +479,6 @@ void _overlaymagic_relativesub(VJFrame *frame, VJFrame *frame2,
{
unsigned int i;
unsigned int len = width * height;
int uv_len = frame->uv_len;
uint8_t *Y = frame->data[0];
uint8_t *Y2 = frame2->data[0];
@@ -611,7 +605,6 @@ void _overlaymagic_addtest2(VJFrame *frame, VJFrame *frame2,
{
unsigned int i;
unsigned int len = width * height;
int uv_len = frame->uv_len;
uint8_t *Y = frame->data[0];
uint8_t *Y2 = frame2->data[0];
@@ -632,7 +625,7 @@ void _overlaymagic_addtest4(VJFrame *frame, VJFrame *frame2,
unsigned int len = width * height;
uint8_t *Y = frame->data[0];
uint8_t *Y2 = frame2->data[0];
int c, a, b;
int a, b;
for (i = 0; i < len; i++) {
a = Y[i];
b = Y2[i];

View File

@@ -104,8 +104,6 @@ void magicscratcher_apply(VJFrame *frame,
uint8_t *Y = frame->data[0];
uint8_t *Cb= frame->data[1];
uint8_t *Cr= frame->data[2];
int uv_width = frame->uv_width;
int uv_height = frame->uv_height;
/* param 6 is cool ,8,7,10,13,15, ,9,11,12,14,
16 voor default ?, 17 (!),18,19, 20(!), 21, 24,,25,30 */

View File

@@ -45,10 +45,6 @@ vj_effect *medianfilter_init(int w, int h)
void medianfilter_apply( VJFrame *frame, int width, int height, int val)
{
int i;
int len = (width * height);
int uv_len = frame->uv_len;
uint8_t *Y = frame->data[0];
uint8_t *Cb = frame->data[1];
uint8_t *Cr = frame->data[2];

View File

@@ -101,9 +101,8 @@ void morphology_apply( VJFrame *frame, int width, int height, int threshold, int
{
unsigned int i,x,y;
int len = (width * height);
int c = 0,t=0,k=0;
int t=0;
int uv_len = frame->uv_len;
uint8_t pixel;
uint8_t *Y = frame->data[0];
uint8_t *Cb = frame->data[1];
uint8_t *Cr = frame->data[2];

View File

@@ -88,7 +88,6 @@ static uint8_t *previous_img = NULL;
static uint32_t histogram_[HIS_LEN];
static uint8_t *large_buf = NULL;
static uint32_t nframe_ =0;
static uint32_t activity_total_ = 0;
static uint32_t max_d = ACT_TOP;
static int current_his_len = HIS_DEFAULT;
static uint32_t key1_ = 0, key2_ = 0, keyv_ = 0, keyp_ = 0;
@@ -150,13 +149,11 @@ void motionmap_free(void)
static void update_bgmask( uint8_t *dst,uint8_t *in, uint8_t *src, int len, int threshold )
{
int i;
unsigned int op0,op1;
for( i =0; i < len ; i ++ )
{
if( abs(in[i] - src[i]) > threshold )
{
dst[i] = 0xff;
//in[i] = (in[i] + src[i])>>1;
}
else
{
@@ -281,9 +278,8 @@ static int stop_capture_ = 0;
static int reaction_ready_ = 0;
void motionmap_apply( VJFrame *frame, int width, int height, int threshold, int reverse, int draw, int history, int capbuf )
{
unsigned int i,x,y;
unsigned int i,y;
int len = (width * height);
uint8_t *Y = frame->data[0];
uint8_t *Cb = frame->data[1];
uint8_t *Cr = frame->data[2];
if(!have_bg) {

View File

@@ -76,25 +76,22 @@ void mtracer_apply( VJFrame *frame, VJFrame *frame2,
VJFrame m;
unsigned int len = frame->len;
unsigned int uv_len = frame->uv_len;
uint8_t *Y = frame->data[0];
uint8_t *Cb= frame->data[1];
uint8_t *Cr= frame->data[2];
int strides[4] = { len, uv_len, uv_len, 0 };
memcpy( &m, frame, sizeof(VJFrame ));
if (mtrace_counter == 0) {
overlaymagic_apply(frame, frame2, width, height, mode,0);
vj_frame_copy1( mtrace_buffer[0], frame->data[0], len );
vj_frame_copy1( mtrace_buffer[1], frame->data[1], uv_len );
vj_frame_copy1( mtrace_buffer[2], frame->data[2], uv_len );
overlaymagic_apply(frame, frame2, width, height, mode,0);
vj_frame_copy1( mtrace_buffer[0], frame->data[0], len );
vj_frame_copy1( mtrace_buffer[1], frame->data[1], uv_len );
vj_frame_copy1( mtrace_buffer[2], frame->data[2], uv_len );
} else {
overlaymagic_apply(frame, frame2, width, height, mode,0);
m.data[0] = mtrace_buffer[0];
m.data[1] = mtrace_buffer[1];
m.data[2] = mtrace_buffer[2];
overlaymagic_apply( &m, frame2, width,height, mode, 0 );
vj_frame_copy( mtrace_buffer,frame->data, strides );
overlaymagic_apply(frame, frame2, width, height, mode,0);
m.data[0] = mtrace_buffer[0];
m.data[1] = mtrace_buffer[1];
m.data[2] = mtrace_buffer[2];
overlaymagic_apply( &m, frame2, width,height, mode, 0 );
vj_frame_copy( mtrace_buffer,frame->data, strides );
}
mtrace_counter++;

View File

@@ -174,7 +174,7 @@ void opacity_applyN( VJFrame *frame, VJFrame *frame2, int width,
if( vj_task_available() ) {
vj_task_set_from_frame( frame );
vj_task_set_int( opacity );
vj_task_run( frame->data, frame2->data, NULL, NULL, 3, &opacity_apply_job );
vj_task_run( frame->data, frame2->data, NULL, NULL, 3, (performer_job_routine) &opacity_apply_job );
} else {
opacity_apply1( frame,frame2,width,height,opacity );
}
@@ -203,7 +203,7 @@ void opacity_blend_apply( uint8_t *src1[3], uint8_t *src2[3], int len, int uv_le
if( vj_task_available() ) {
vj_task_set_from_args( len,uv_len );
vj_task_set_int( opacity );
vj_task_run( src1, src2, NULL, NULL, 3, &opacity_apply_job );
vj_task_run( src1, src2, NULL, NULL, 3, (performer_job_routine) &opacity_apply_job );
} else {
opacity_blend_apply1( src1,src2,len,uv_len,opacity );
}

View File

@@ -89,7 +89,7 @@ void radcor_apply( VJFrame *frame, int width, int height, int alpaX, int alpaY,
{
int i,j;
int len = (width * height);
int i2,j2,ii,jj,aacount;
int i2,j2;
double x,y,x2,x3,y2,y3,r;
uint8_t *Y = frame->data[0];
uint8_t *Cb = frame->data[1];

View File

@@ -76,7 +76,6 @@ static int buf_height = 0;
static int buf_area = 0;
static int buf_margin_left = 0;
static int buf_margin_right = 0;
static void *convert_rgb = NULL;
static int first_frame=0;
static int last_mode=0;
static float ratio_ = 0.95;
@@ -231,7 +230,7 @@ void radioactivetv_apply( VJFrame *frame, VJFrame *blue, int width, int height,
uint8_t *dstY = lum;
uint8_t *dstU = frame->data[1];
uint8_t *dstV = frame->data[2];
uint8_t *p, *src = lum;
uint8_t *p;
uint8_t *blueY = blue->data[0];
uint8_t *blueU = blue->data[1];
uint8_t *blueV = blue->data[2];

View File

@@ -131,20 +131,16 @@ void scratcher_apply(VJFrame *src,
int no_reverse)
{
unsigned int x,len = src->len;
unsigned int len = src->len;
unsigned int op1 = (opacity > 255) ? 255 : opacity;
unsigned int op0 = 255 - op1;
int offset = len * nframe;
int uv_len = src->uv_len;
int uv_offset = uv_len * nframe;
uint8_t *Y = src->data[0];
uint8_t *Cb = src->data[1];
uint8_t *Cr = src->data[2];
VJFrame copy;
if (nframe== 0) {
int strides[4] = { len, uv_len, uv_len, 0 };
vj_frame_copy( src->data, frame, strides );
int strides[4] = { len, uv_len, uv_len, 0 };
vj_frame_copy( src->data, frame, strides );
return;
}
@@ -154,19 +150,6 @@ void scratcher_apply(VJFrame *src,
srcB.data[1] = frame[1] + uv_offset;
srcB.data[2] = frame[2] + uv_offset;
opacity_applyN( src, &srcB, src->width,src->height, opacity );
/* for (x = 0; x < len; x++) {
Y[x] =
((op0 * Y[x]) + (op1 * frame[0][offset + x])) >> 8;
}
for(x=0; x < uv_len; x++) {
Cr[x] =
((op0 * Cr[x]) + (op1 * frame[2][uv_offset + x])) >> 8;
Cb[x] =
((op0 * Cb[x]) + (op1 * frame[1][uv_offset + x])) >> 8;
}
*/
copy.uv_len = src->uv_len;
copy.data[0] = frame[0];
copy.data[1] = frame[1];

View File

@@ -33,8 +33,6 @@ static recalc(int w, int h , uint8_t *Yin, int v1, int v2 )
unsigned int l = w * h;
unsigned int valx = (w / 100.0) * v1;
unsigned int valy = (h / 100.0) * v1;
unsigned int modx = (w / 100.0) * v2;
unsigned int mody = (h / 100.0) * v2;
for(x = dx = 0; x < w; x++)
{
p = 0 + (int)( l * (rand()/RAND_MAX + 0.0) );

View File

@@ -68,7 +68,7 @@ static void _smear_apply_x(VJFrame *frame, int width, int height, int val)
}
static void _smear_apply_x_avg(VJFrame *frame, int width, int height, int val)
{
unsigned int i,j;
unsigned int j;
unsigned int x,y;
uint8_t *Y = frame->data[0];
uint8_t *Cb = frame->data[1];

View File

@@ -200,12 +200,7 @@ void dosquarefib(VJFrame *frame, int width, int height)
void split_push_downscale_uh(VJFrame *frame, int width, int height)
{
unsigned int len = frame->len/2;
uint8_t *Y = frame->data[0];
uint8_t *Cb= frame->data[1];
uint8_t *Cr= frame->data[2];
unsigned int len = frame->len/2;
int strides[4] = { len,len,len ,0};
vj_frame_copy( frame->data, split_fixme,strides );

View File

@@ -215,8 +215,7 @@ static void binarify( uint8_t *dst, uint8_t *src, int threshold,int reverse, int
void threshold_apply( VJFrame *frame, VJFrame *frame2,int width, int height, int threshold, int reverse )
{
unsigned int i,x,y;
int len = (width * height);
unsigned int y;
uint8_t *Y = frame->data[0];
uint8_t *Cb = frame->data[1];
uint8_t *Cr = frame->data[2];
@@ -224,11 +223,8 @@ void threshold_apply( VJFrame *frame, VJFrame *frame2,int width, int height, int
uint8_t *Cb2=frame2->data[1];
uint8_t *Cr2=frame2->data[2];
const uint8_t kernel[9] = { 1,1,1, 1,1,1, 1,1,1 };
uint8_t *bmap = binary_img;
// morph_func p = _dilate_kernel3x3;
softblur_apply( frame, width,height,0 );
binarify( binary_img,Y,threshold,reverse, width,height);

View File

@@ -144,7 +144,6 @@ void timedistort_apply( VJFrame *frame, int width, int height, int val)
int interpolate = 1;
int motion = 0;
int tmp1,tmp2;
int stor_local = 0;
if(motionmap_active()) //@ use motion mapping frame
{
motionmap_scale_to( 255,255,1,1,&tmp1,&tmp2, &n__,&N__ );

View File

@@ -498,7 +498,6 @@ void water_apply(void *user_data, VJFrame *frame, VJFrame *frame2, int width, in
signed char *vp;
uint8_t *src,*dest;
const int len = frame->len;
int dummy = 0;
water_t *w = (water_t*) user_data;
if(w->last_fresh_rate != fresh_rate)

View File

@@ -44,7 +44,6 @@ static const int point = 16;
static const int impact = 2;
//static const int decay = 8;
//static const int loopnum = 2;
static int bgIsSet = 0;
static int tick = 0;
/* from EffecTV:

View File

@@ -68,7 +68,6 @@ static int bar_bot_vert = 0;
void vbar_apply(VJFrame *frame, VJFrame *frame2, int width, int height,int divider, int top_y, int bot_y, int top_x, int bot_x ) {
//int top_width = width; /* frame in frame destination area */
int top_height = height/(divider);
int top_width = width/divider;
int bottom_width = width - top_width;

View File

@@ -169,6 +169,7 @@
#include "effects/diffmap.h"
#include "effects/picinpic.h"
#include "effects/cali.h"
#include "effects/bgsubtract.h"
#include <libplugger/plugload.h>
#include <veejay/vims.h>
@@ -192,8 +193,6 @@ void set_pixel_range(uint8_t Yhi,uint8_t Uhi, uint8_t Ylo, uint8_t Ulo)
pixel_Y_lo_ = Ulo;
}
static void *__plugin_ref = NULL;
static struct
{
int (*mem_init)(int width, int height);
@@ -772,7 +771,6 @@ int vj_effect_real_to_sequence(int effect_id)
{
if( effect_id >= VJ_EXT_EFFECT )
{
int n = effect_id;
effect_id -= VJ_EXT_EFFECT;
effect_id += MAX_EFFECTS;
return effect_id;

View File

@@ -759,7 +759,7 @@ int vj_effect_apply( VJFrame **frames, VJFrameInfo *frameinfo, vjp_kf *kf, int s
if( isP > 1 )
vj_task_set_overlap( frames[0]->width );
vj_task_run( frames[0]->data,frames[1]->data, NULL, NULL, 3, &vj_effman_apply_job );
vj_task_run( frames[0]->data,frames[1]->data, NULL, NULL, 3, (performer_job_routine) &vj_effman_apply_job );
}
else {