From 8558a8fd9eca489425d0e2b974a4ea3cd3298cb2 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Fri, 29 Jul 2016 17:03:28 +0200 Subject: [PATCH 001/170] Libvje / refactor : fisheye * w , h * clean headers --- .../veejay-server/libvje/effects/fisheye.c | 38 +++++++++---------- .../veejay-server/libvje/effects/fisheye.h | 7 +--- .../veejay-server/libvje/internal.h | 3 +- .../veejay-server/libvje/vj-effman.c | 2 +- 4 files changed, 22 insertions(+), 28 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/fisheye.c b/veejay-current/veejay-server/libvje/effects/fisheye.c index 48d9babb..8ef7608b 100644 --- a/veejay-current/veejay-server/libvje/effects/fisheye.c +++ b/veejay-current/veejay-server/libvje/effects/fisheye.c @@ -17,13 +17,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include "fisheye.h" -#include + #include "common.h" -#include +#include +#include "fisheye.h" + #define RUP8(num)(((num)+8)&~8) vj_effect *fisheye_init(int w, int h) @@ -117,12 +115,14 @@ static double __fisheye_i(double r, double v, double e) -void fisheye_apply(VJFrame *frame, int w, int h, int v, int alpha ) +void fisheye_apply(VJFrame *frame, int v, int alpha ) { int i; double (*pf)(double a, double b, double c); - const int len = frame->len; - uint8_t *Y = frame->data[0]; + const unsigned int width = frame->width; + const unsigned int height = frame->height; + const unsigned int len = frame->len; + uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -139,13 +139,13 @@ void fisheye_apply(VJFrame *frame, int w, int h, int v, int alpha ) if( v != _v ) { const double curve = 0.001 * v; - const unsigned int R = h/2; + const unsigned int R = height/2; const double coeef = R / log(curve * R + 1); /* pre calculate */ int px,py; double r,a,co,si; - const int w2 = w/2; - const int h2 = h/2; + const int w2 = width/2; + const int h2 = height/2; for(i=0; i < len; i++) { @@ -162,11 +162,11 @@ void fisheye_apply(VJFrame *frame, int w, int h, int v, int alpha ) py += h2; if(px < 0) px =0; - if(px > w) px = w; + if(px > width) px = width; if(py < 0) py = 0; - if(py >= (h-1)) py = h-1; + if(py >= (height-1)) py = height-1; - cached_coords[i] = (py * w)+px; + cached_coords[i] = (py * width)+px; } else { @@ -177,16 +177,16 @@ void fisheye_apply(VJFrame *frame, int w, int h, int v, int alpha ) _v = v; } - veejay_memcpy(buf[0], Y,(w*h)); - veejay_memcpy(buf[1], Cb,(w*h)); - veejay_memcpy(buf[2], Cr,(w*h)); + veejay_memcpy(buf[0], Y,(len)); + veejay_memcpy(buf[1], Cb,(len)); + veejay_memcpy(buf[2], Cr,(len)); if( alpha == 0 ) { for(i=0; i < len; i++) { if(cached_coords[i] == -1) { - Y[i] = pixel_Y_lo_; + Y[i] = pixel_Y_lo_; Cb[i] = 128; Cr[i] = 128; } diff --git a/veejay-current/veejay-server/libvje/effects/fisheye.h b/veejay-current/veejay-server/libvje/effects/fisheye.h index b4a4aa60..f7171502 100644 --- a/veejay-current/veejay-server/libvje/effects/fisheye.h +++ b/veejay-current/veejay-server/libvje/effects/fisheye.h @@ -20,13 +20,8 @@ #ifndef FISHEYE_H #define FISHEYE_H -#include -#include -#include -#include - vj_effect *fisheye_init(int w, int h); int fisheye_malloc(int w, int h); void fisheye_free(); -void fisheye_apply(VJFrame *frame, int width, int height, int val, int alpha ); +void fisheye_apply(VJFrame *frame, int val, int alpha ); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index 8f41e250..78dbf128 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -432,8 +432,7 @@ extern void magicmirror_apply(VJFrame *frame, int x, int y, int d, int n, int al extern void lumamask_apply(VJFrame *frame,VJFrame *frame2, int n, int m, int border, int alpha); extern void smear_apply(VJFrame *frame, int n, int m); extern void raster_apply(VJFrame *frame, int v, int mode); - -extern void fisheye_apply(VJFrame *frame, int w, int h, int v, int alpha ); +extern void fisheye_apply(VJFrame *frame, int v, int alpha ); extern void swirl_apply(VJFrame *frame, int w, int h , int v ); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index 4de49b62..752d10b7 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -209,7 +209,7 @@ static void vj_effman_apply_image_effect( radialblur_apply(frames[0], frames[0]->width, frames[0]->height,arg[0],arg[1],arg[2]); break; case VJ_IMAGE_EFFECT_FISHEYE: - fisheye_apply(frames[0],frames[0]->width,frames[0]->height,arg[0],arg[1]); + fisheye_apply(frames[0], arg[0], arg[1]); break; case VJ_IMAGE_EFFECT_PIXELSMEAR: smear_apply(frames[0], arg[0], arg[1]); From 1273a660b0e5ed68b94bee8b21a30eda1b2175de Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Fri, 29 Jul 2016 17:11:29 +0200 Subject: [PATCH 002/170] Libvje / refactor : swirl * h, w * clean header --- .../veejay-server/libvje/effects/swirl.c | 92 +++++++++---------- .../veejay-server/libvje/effects/swirl.h | 6 +- .../veejay-server/libvje/internal.h | 3 +- .../veejay-server/libvje/vj-effman.c | 2 +- 4 files changed, 46 insertions(+), 57 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/swirl.c b/veejay-current/veejay-server/libvje/effects/swirl.c index a99a160a..38d08b97 100644 --- a/veejay-current/veejay-server/libvje/effects/swirl.c +++ b/veejay-current/veejay-server/libvje/effects/swirl.c @@ -17,14 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include -#include "swirl.h" -#include + #include "common.h" -#include +#include +#include "swirl.h" vj_effect *swirl_init(int w, int h) { @@ -108,65 +104,64 @@ void swirl_free() static int _v = 0; -void swirl_apply(VJFrame *frame, int w, int h, int v) +void swirl_apply(VJFrame *frame, int v) { int i; - const int len = frame->len; + const unsigned int width = frame->width; + const unsigned int height = frame->height; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb= frame->data[1]; uint8_t *Cr= frame->data[2]; if( v != _v ) { - //const double curve = (double) v; - const unsigned int R = w; - const double coeef = v; - //const double coeef = R / log(curve * R + 1); - //const double coeef = R / log( curve * R + 2); - /* pre calculate */ - int px,py; - double r,a; - double si,co; - const int w2 = w/2; - const int h2 = h/2; - - for(i=0; i < len; i++) - { - r = polar_map[i]; - a = fish_angle[i]; - if(r <= R) - { + //const double curve = (double) v; + const unsigned int R = width; + const double coeef = v; + //const double coeef = R / log(curve * R + 1); + //const double coeef = R / log( curve * R + 2); + /* pre calculate */ + int px,py; + double r,a; + double si,co; + const int w2 = width/2; + const int h2 = height/2; + + for(i=0; i < len; i++) + { + r = polar_map[i]; + a = fish_angle[i]; + if(r <= R) + { //uncomment for simple fisheye //p_y = a; //p_r = (r*r)/R; //sin_cos( co, si, p_y ); - sin_cos( co,si, (a+r/coeef)); - px = (int) ( r * co ); - py = (int) ( r * si ); + sin_cos( co,si, (a+r/coeef)); + px = (int) ( r * co ); + py = (int) ( r * si ); //sin_cos( co, si, (double)v ); //px = (int) (r * co); //py = (int) (r * si); //px = (int) ( p_r * co); //py = (int) ( p_r * si); - px += w2; - py += h2; + px += w2; + py += h2; - if(px < 0) px =0; - if(px > w) px = w; - if(py < 0) py = 0; - if(py >= (h-1)) py = h-1; - - cached_coords[i] = (py * w)+px; - - } - else - { - cached_coords[i] = -1; - - } - } - _v = v; + if(px < 0) px =0; + if(px > width) px = width; + if(py < 0) py = 0; + if(py >= (height-1)) py = height-1; + cached_coords[i] = (py * width)+px; + } + else + { + cached_coords[i] = -1; + } + } + _v = v; } int strides[4] = { len, len, len , 0 }; @@ -176,13 +171,12 @@ void swirl_apply(VJFrame *frame, int w, int h, int v) { if(cached_coords[i] == -1) { - Y[i] = pixel_Y_lo_; + Y[i] = pixel_Y_lo_; Cb[i] = 128; Cr[i] = 128; } else { - Y[i] = Y[ cached_coords[i] ]; Cb[i] = Cb[ cached_coords[i] ]; Cr[i] = Cr[ cached_coords[i] ]; diff --git a/veejay-current/veejay-server/libvje/effects/swirl.h b/veejay-current/veejay-server/libvje/effects/swirl.h index ad286c81..2bcb07e9 100644 --- a/veejay-current/veejay-server/libvje/effects/swirl.h +++ b/veejay-current/veejay-server/libvje/effects/swirl.h @@ -20,12 +20,8 @@ #ifndef SWIRL_H #define SWIRL_H -#include -#include -#include - vj_effect *swirl_init(int w, int h); int swirl_malloc(int w, int h); void swirl_free(); -void swirl_apply(VJFrame *frame, int width, int height, int val); +void swirl_apply(VJFrame *frame, int val); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index 78dbf128..0f60260c 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -433,8 +433,7 @@ extern void lumamask_apply(VJFrame *frame,VJFrame *frame2, int n, int m, int bor extern void smear_apply(VJFrame *frame, int n, int m); extern void raster_apply(VJFrame *frame, int v, int mode); extern void fisheye_apply(VJFrame *frame, int v, int alpha ); - -extern void swirl_apply(VJFrame *frame, int w, int h , int v ); +extern void swirl_apply(VJFrame *frame, int v ); extern void radialblur_apply(VJFrame *frame, int w, int h, int r, int p, int n); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index 752d10b7..392523c4 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -203,7 +203,7 @@ static void vj_effman_apply_image_effect( raster_apply(frames[0], arg[0], arg[1]); break; case VJ_IMAGE_EFFECT_SWIRL: - swirl_apply(frames[0],frames[0]->width,frames[0]->height,arg[0]); + swirl_apply(frames[0], arg[0]); break; case VJ_IMAGE_EFFECT_RADIALBLUR: radialblur_apply(frames[0], frames[0]->width, frames[0]->height,arg[0],arg[1],arg[2]); From 38967019ce220ee2a0f0f5dc6c0cfda63081438e Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Fri, 29 Jul 2016 17:15:13 +0200 Subject: [PATCH 003/170] Libvje / refactor : radialblur * h, w * clean headers --- .../veejay-server/libvje/effects/radialblur.c | 13 +++++++------ .../veejay-server/libvje/effects/radialblur.h | 7 +------ veejay-current/veejay-server/libvje/internal.h | 3 +-- veejay-current/veejay-server/libvje/vj-effman.c | 2 +- 4 files changed, 10 insertions(+), 15 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/radialblur.c b/veejay-current/veejay-server/libvje/effects/radialblur.c index 7d845f33..51a1a7d4 100644 --- a/veejay-current/veejay-server/libvje/effects/radialblur.c +++ b/veejay-current/veejay-server/libvje/effects/radialblur.c @@ -41,11 +41,10 @@ * mplayer's boxblur * Copyright (C) 2002 Michael Niedermayer */ -#include -#include + +#include "common.h" #include #include "radialblur.h" -#include "common.h" static uint8_t *radial_src[4] = { NULL,NULL,NULL,NULL}; @@ -104,10 +103,12 @@ static void rvblur_apply( uint8_t *dst, uint8_t *src, int w, int h, int r , int } -void radialblur_apply(VJFrame *frame, int width, int height, int radius, int power, int direction) +void radialblur_apply(VJFrame *frame, int radius, int power, int direction) { - const int len = frame->len; - const int uv_len = frame->uv_len; + const unsigned int width = frame->width; + const unsigned int height = frame->height; + const unsigned int len = frame->len; + const unsigned int uv_len = frame->uv_len; uint8_t *Y = frame->data[0]; uint8_t *Cb= frame->data[1]; diff --git a/veejay-current/veejay-server/libvje/effects/radialblur.h b/veejay-current/veejay-server/libvje/effects/radialblur.h index 60b37ea1..154e3f59 100644 --- a/veejay-current/veejay-server/libvje/effects/radialblur.h +++ b/veejay-current/veejay-server/libvje/effects/radialblur.h @@ -20,13 +20,8 @@ #ifndef RADIALBLUR_H #define RADIALBLUR_H -#include -#include -#include - vj_effect *radialblur_init(int w, int h); int radialblur_malloc(int w, int h); -void radialblur_apply(VJFrame *frame, int width, int height, int r, - int p, int n); +void radialblur_apply(VJFrame *frame, int r, int p, int n); void radialblur_free(); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index 0f60260c..6a70f640 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -434,8 +434,7 @@ extern void smear_apply(VJFrame *frame, int n, int m); extern void raster_apply(VJFrame *frame, int v, int mode); extern void fisheye_apply(VJFrame *frame, int v, int alpha ); extern void swirl_apply(VJFrame *frame, int v ); - -extern void radialblur_apply(VJFrame *frame, int w, int h, int r, int p, int n); +extern void radialblur_apply(VJFrame *frame, int r, int p, int n); extern void binaryoverlay_apply(VJFrame *frame, VJFrame *frame2,int w, int h, int n); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index 392523c4..03df0e14 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -206,7 +206,7 @@ static void vj_effman_apply_image_effect( swirl_apply(frames[0], arg[0]); break; case VJ_IMAGE_EFFECT_RADIALBLUR: - radialblur_apply(frames[0], frames[0]->width, frames[0]->height,arg[0],arg[1],arg[2]); + radialblur_apply(frames[0], arg[0], arg[1], arg[2]); break; case VJ_IMAGE_EFFECT_FISHEYE: fisheye_apply(frames[0], arg[0], arg[1]); From 351efb2b2e73b4ae5c0bd8b94a34359cb8d28fda Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Fri, 29 Jul 2016 17:19:46 +0200 Subject: [PATCH 004/170] Libvje /refactor : binayoverlay * w, h * clean headers --- .../libvje/effects/binaryoverlays.c | 32 +++++++++---------- .../libvje/effects/binaryoverlays.h | 9 +----- .../veejay-server/libvje/internal.h | 3 +- .../veejay-server/libvje/vj-effman.c | 3 +- 4 files changed, 20 insertions(+), 27 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/binaryoverlays.c b/veejay-current/veejay-server/libvje/effects/binaryoverlays.c index 8997c7c3..d48d51eb 100644 --- a/veejay-current/veejay-server/libvje/effects/binaryoverlays.c +++ b/veejay-current/veejay-server/libvje/effects/binaryoverlays.c @@ -17,12 +17,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include +#include "common.h" #include -#include #include "binaryoverlays.h" -#include vj_effect *binaryoverlay_init(int w, int h) { @@ -305,21 +302,24 @@ static void _binary_and( VJFrame *frame, VJFrame *frame2, int w, int h ) -void binaryoverlay_apply( VJFrame *frame, VJFrame *frame2, int w, int h, int mode ) +void binaryoverlay_apply( VJFrame *frame, VJFrame *frame2, int mode ) { + const unsigned int width = frame->width; + const unsigned int height = frame->height; + switch(mode) { - case 0: _binary_not_and( frame,frame2,w,h ); break;// not a and not b - case 1: _binary_not_or( frame,frame2,w,h); break; // not a or not b - case 2: _binary_not_xor( frame,frame2,w,h); break; // not a xor not b - case 3: _binary_not_and_lh( frame,frame2,w,h ); break; // a and not b - case 4: _binary_not_or_lh( frame,frame2,w,h); break; // a or not b - case 5: _binary_not_xor_lh( frame,frame2,w,h); break; // a xor not b - case 6: _binary_not_and_rh (frame,frame2,w,h); break; // a and not b - case 7: _binary_not_or_rh( frame,frame2,w,h); break; // a or not b - case 8: _binary_or( frame,frame2,w,h); break; // a or b - case 9: _binary_and( frame,frame2,w,h); break; // a and b - case 10: _binary_not_xor_rh(frame,frame2,w,h); break; + case 0: _binary_not_and( frame,frame2,width, height ); break;// not a and not b + case 1: _binary_not_or( frame,frame2,width, height); break; // not a or not b + case 2: _binary_not_xor( frame,frame2,width, height); break; // not a xor not b + case 3: _binary_not_and_lh( frame,frame2,width, height ); break; // a and not b + case 4: _binary_not_or_lh( frame,frame2,width, height); break; // a or not b + case 5: _binary_not_xor_lh( frame,frame2,width, height); break; // a xor not b + case 6: _binary_not_and_rh (frame,frame2,width, height); break; // a and not b + case 7: _binary_not_or_rh( frame,frame2,width, height); break; // a or not b + case 8: _binary_or( frame,frame2,width, height); break; // a or b + case 9: _binary_and( frame,frame2,width, height); break; // a and b + case 10: _binary_not_xor_rh(frame,frame2,width, height); break; } } diff --git a/veejay-current/veejay-server/libvje/effects/binaryoverlays.h b/veejay-current/veejay-server/libvje/effects/binaryoverlays.h index a6e9d5ff..9f5bbae2 100644 --- a/veejay-current/veejay-server/libvje/effects/binaryoverlays.h +++ b/veejay-current/veejay-server/libvje/effects/binaryoverlays.h @@ -20,14 +20,7 @@ #ifndef BINARYOVERLAYS_H #define BINARYOVERLAYS_H -#include -#include -#include - vj_effect *binaryoverlay_init(int w, int h); - -void binaryoverlay_apply(VJFrame *frame, VJFrame *frame2, int width, - int height, int n); - +void binaryoverlay_apply(VJFrame *frame, VJFrame *frame2, int n); void magicoverlays_free(); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index 6a70f640..9361dce6 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -435,8 +435,7 @@ extern void raster_apply(VJFrame *frame, int v, int mode); extern void fisheye_apply(VJFrame *frame, int v, int alpha ); extern void swirl_apply(VJFrame *frame, int v ); extern void radialblur_apply(VJFrame *frame, int r, int p, int n); - -extern void binaryoverlay_apply(VJFrame *frame, VJFrame *frame2,int w, int h, int n); +extern void binaryoverlay_apply(VJFrame *frame, VJFrame *frame2, int n); extern void chromium_apply( VJFrame *frame, int w, int h, int n); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index 03df0e14..13925b4f 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -476,7 +476,8 @@ static void vj_effman_apply_video_effect( VJFrame **frames, vjp_kf *todo_info,in lumamagic_apply(frames[0], frames[1], arg[0], arg[1],arg[2]); break; case VJ_VIDEO_EFFECT_BINARYOVERLAY: - binaryoverlay_apply(frames[0], frames[1],frames[0]->width,frames[0]->height,arg[0] ); break; + binaryoverlay_apply(frames[0], frames[1],arg[0] ); + break; case VJ_VIDEO_EFFECT_OVERLAYMAGIC: overlaymagic_apply(frames[0], frames[1], arg[0],arg[1]); break; From 098c896eae7346e488987bdc161f0eb35a823a13 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Fri, 29 Jul 2016 17:22:12 +0200 Subject: [PATCH 005/170] Libvje / refactor : chromium * w, h * clean headers --- veejay-current/veejay-server/libvje/effects/chromium.c | 9 +++------ veejay-current/veejay-server/libvje/effects/chromium.h | 6 +----- veejay-current/veejay-server/libvje/internal.h | 3 +-- veejay-current/veejay-server/libvje/vj-effman.c | 2 +- 4 files changed, 6 insertions(+), 14 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/chromium.c b/veejay-current/veejay-server/libvje/effects/chromium.c index a0831b17..7a5559af 100644 --- a/veejay-current/veejay-server/libvje/effects/chromium.c +++ b/veejay-current/veejay-server/libvje/effects/chromium.c @@ -17,13 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include + +#include "common.h" #include #include "chromium.h" -#include "common.h" - vj_effect *chromium_init(int w, int h) { @@ -52,7 +49,7 @@ vj_effect *chromium_init(int w, int h) return ve; } -void chromium_apply(VJFrame *frame, int width, int height, int m ) +void chromium_apply(VJFrame *frame, int m ) { const int len = (frame->ssm ? frame->len : frame->uv_len); uint8_t *Cb = frame->data[1]; diff --git a/veejay-current/veejay-server/libvje/effects/chromium.h b/veejay-current/veejay-server/libvje/effects/chromium.h index b997d986..d3fb9024 100644 --- a/veejay-current/veejay-server/libvje/effects/chromium.h +++ b/veejay-current/veejay-server/libvje/effects/chromium.h @@ -20,10 +20,6 @@ #ifndef CHROMIUM_H #define CHROMIUM_H -#include -#include -#include - vj_effect *chromium_init(int w, int h); -void chromium_apply(VJFrame *frame, int width, int height, int n); +void chromium_apply(VJFrame *frame, int n); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index 9361dce6..1a332fac 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -436,8 +436,7 @@ extern void fisheye_apply(VJFrame *frame, int v, int alpha ); extern void swirl_apply(VJFrame *frame, int v ); extern void radialblur_apply(VJFrame *frame, int r, int p, int n); extern void binaryoverlay_apply(VJFrame *frame, VJFrame *frame2, int n); - -extern void chromium_apply( VJFrame *frame, int w, int h, int n); +extern void chromium_apply( VJFrame *frame, int n); extern void chromapalette_apply( VJFrame *frame, int w, int h, int a, int r, int g, int b, int c1, int c2); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index 13925b4f..7d5cb984 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -221,7 +221,7 @@ static void vj_effman_apply_image_effect( chromapalette_apply(frames[0],frames[0]->width,frames[0]->height,arg[0],arg[1],arg[2],arg[3],arg[4],arg[5]); break; case VJ_IMAGE_EFFECT_CHROMIUM: - chromium_apply( frames[0], frames[0]->width, frames[0]->height, arg[0]); + chromium_apply( frames[0], arg[0]); break; case VJ_IMAGE_EFFECT_CARTONIZE: cartonize_apply( frames[0], frames[0]->width,frames[0]->height, From e6b709c9c4a2b940984ebd6ca8c3e453fd6c0f90 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Fri, 29 Jul 2016 17:25:16 +0200 Subject: [PATCH 006/170] Libvje / refactor : chromapalette * h, w * clean headers --- .../veejay-server/libvje/effects/chromapalette.c | 12 ++++-------- .../veejay-server/libvje/effects/chromapalette.h | 7 +------ veejay-current/veejay-server/libvje/internal.h | 3 +-- veejay-current/veejay-server/libvje/vj-effman.c | 2 +- 4 files changed, 7 insertions(+), 17 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/chromapalette.c b/veejay-current/veejay-server/libvje/effects/chromapalette.c index 42f3feb7..98ac9103 100644 --- a/veejay-current/veejay-server/libvje/effects/chromapalette.c +++ b/veejay-current/veejay-server/libvje/effects/chromapalette.c @@ -17,13 +17,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include -#include "chromapalette.h" #include "common.h" -#include +#include +#include "chromapalette.h" vj_effect *chromapalette_init(int w, int h) { @@ -83,10 +79,10 @@ static inline int _chroma_key( uint8_t fg_cb, uint8_t fg_cr, uint8_t cb, uint8_t -void chromapalette_apply(VJFrame *frame, int width, int height, int angle, int r, int g, int b, int color_cb, int color_cr ) +void chromapalette_apply(VJFrame *frame, int angle, int r, int g, int b, int color_cb, int color_cr ) { unsigned int i; - const int len = frame->len; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; diff --git a/veejay-current/veejay-server/libvje/effects/chromapalette.h b/veejay-current/veejay-server/libvje/effects/chromapalette.h index 48ec411b..0a5bbd5b 100644 --- a/veejay-current/veejay-server/libvje/effects/chromapalette.h +++ b/veejay-current/veejay-server/libvje/effects/chromapalette.h @@ -20,11 +20,6 @@ #ifndef CHROMAPAL_H #define CHROMAPAL_H -#include -#include -#include -#include - vj_effect *chromapalette_init(int w, int h); -void chromapalette_apply(VJFrame *frame, int width, int height, int a,int r,int g, int b,int c1,int c2); +void chromapalette_apply(VJFrame *frame, int a,int r,int g, int b,int c1,int c2); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index 1a332fac..bc666fea 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -437,8 +437,7 @@ extern void swirl_apply(VJFrame *frame, int v ); extern void radialblur_apply(VJFrame *frame, int r, int p, int n); extern void binaryoverlay_apply(VJFrame *frame, VJFrame *frame2, int n); extern void chromium_apply( VJFrame *frame, int n); - -extern void chromapalette_apply( VJFrame *frame, int w, int h, int a, int r, int g, int b, int c1, int c2); +extern void chromapalette_apply( VJFrame *frame, int a, int r, int g, int b, int c1, int c2); extern void uvcorrect_apply(VJFrame *frame, int width, int height, int angle, int urot_center, int vrot_center, int iuFactor, int ivFactor, int uvmin, int uvmax ); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index 7d5cb984..d1b172df 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -218,7 +218,7 @@ static void vj_effman_apply_image_effect( uvcorrect_apply(frames[0], frames[0]->width, frames[0]->height,arg[0],arg[1],arg[2],arg[3],arg[4],arg[5],arg[6]); break; case VJ_IMAGE_EFFECT_CHROMAPALETTE: - chromapalette_apply(frames[0],frames[0]->width,frames[0]->height,arg[0],arg[1],arg[2],arg[3],arg[4],arg[5]); + chromapalette_apply(frames[0],arg[0],arg[1],arg[2],arg[3],arg[4],arg[5]); break; case VJ_IMAGE_EFFECT_CHROMIUM: chromium_apply( frames[0], arg[0]); From bee7a6ac136727792ef71e6286ae398944518ba0 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Fri, 29 Jul 2016 17:28:01 +0200 Subject: [PATCH 007/170] Libvje / refactor : uvcorrect * w,h * clean headers --- veejay-current/veejay-server/libvje/effects/uvcorrect.c | 9 +++------ veejay-current/veejay-server/libvje/effects/uvcorrect.h | 9 ++------- veejay-current/veejay-server/libvje/internal.h | 5 ++--- veejay-current/veejay-server/libvje/vj-effman.c | 2 +- 4 files changed, 8 insertions(+), 17 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/uvcorrect.c b/veejay-current/veejay-server/libvje/effects/uvcorrect.c index ef5f68e2..209b7b42 100644 --- a/veejay-current/veejay-server/libvje/effects/uvcorrect.c +++ b/veejay-current/veejay-server/libvje/effects/uvcorrect.c @@ -36,13 +36,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include -#include -#include +#include "common.h" #include #include "uvcorrect.h" -#include "common.h" -#include static uint8_t *chrominance = NULL; @@ -121,7 +117,8 @@ static inline void _chrominance_treatment(uint8_t *u,uint8_t *v, const int len) } -void uvcorrect_apply(VJFrame *frame, int width, int height, int angle, int urot_center, int vrot_center, int iuFactor, int ivFactor, int uv_min, int uv_max ) +void uvcorrect_apply(VJFrame *frame, int angle, int urot_center, int vrot_center, + int iuFactor, int ivFactor, int uv_min, int uv_max ) { float fU,fV,si,co; uint16_t iU,iV; diff --git a/veejay-current/veejay-server/libvje/effects/uvcorrect.h b/veejay-current/veejay-server/libvje/effects/uvcorrect.h index 715474d9..87f2aa1a 100644 --- a/veejay-current/veejay-server/libvje/effects/uvcorrect.h +++ b/veejay-current/veejay-server/libvje/effects/uvcorrect.h @@ -20,14 +20,9 @@ #ifndef UVCORRECT_H #define UVCORRECT_H -#include -#include -#include - vj_effect *uvcorrect_init(int w, int h); int uvcorrect_malloc(int w, int h); void uvcorrect_free(void); -void uvcorrect_apply(VJFrame *frame, int width, int height, - int alpha, int ualpha, int valpha, int uf, - int vf, int min, int max ); +void uvcorrect_apply(VJFrame *frame, int alpha, int ualpha, int valpha, int uf, + int vf, int min, int max ); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index bc666fea..3c3115a6 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -438,9 +438,8 @@ extern void radialblur_apply(VJFrame *frame, int r, int p, int n); extern void binaryoverlay_apply(VJFrame *frame, VJFrame *frame2, int n); extern void chromium_apply( VJFrame *frame, int n); extern void chromapalette_apply( VJFrame *frame, int a, int r, int g, int b, int c1, int c2); - - -extern void uvcorrect_apply(VJFrame *frame, int width, int height, int angle, int urot_center, int vrot_center, int iuFactor, int ivFactor, int uvmin, int uvmax ); +extern void uvcorrect_apply(VJFrame *frame, int angle, int urot_center, + int vrot_center, int iuFactor, int ivFactor, int uvmin, int uvmax ); extern void dissolve_apply(VJFrame *frame,VJFrame *frame2, int w, int h, int opacity); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index d1b172df..9afa53c0 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -215,7 +215,7 @@ static void vj_effman_apply_image_effect( smear_apply(frames[0], arg[0], arg[1]); break; case VJ_IMAGE_EFFECT_UVCORRECT: - uvcorrect_apply(frames[0], frames[0]->width, frames[0]->height,arg[0],arg[1],arg[2],arg[3],arg[4],arg[5],arg[6]); + uvcorrect_apply(frames[0],arg[0],arg[1],arg[2],arg[3],arg[4],arg[5],arg[6]); break; case VJ_IMAGE_EFFECT_CHROMAPALETTE: chromapalette_apply(frames[0],arg[0],arg[1],arg[2],arg[3],arg[4],arg[5]); From 838edc137a98dd2740ff4233e8785abf6e55957b Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Fri, 29 Jul 2016 17:30:33 +0200 Subject: [PATCH 008/170] Libvje / refactor : dissolve * w,h * clean headers --- .../veejay-server/libvje/effects/dissolve.c | 11 ++++------- .../veejay-server/libvje/effects/dissolve.h | 7 +------ veejay-current/veejay-server/libvje/internal.h | 3 +-- veejay-current/veejay-server/libvje/vj-effman.c | 3 ++- 4 files changed, 8 insertions(+), 16 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/dissolve.c b/veejay-current/veejay-server/libvje/effects/dissolve.c index 6bc9d067..1bd00505 100644 --- a/veejay-current/veejay-server/libvje/effects/dissolve.c +++ b/veejay-current/veejay-server/libvje/effects/dissolve.c @@ -17,12 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include + +#include "common.h" #include #include "dissolve.h" -#include vj_effect *dissolve_init(int w, int h) { @@ -45,11 +43,10 @@ vj_effect *dissolve_init(int w, int h) -void dissolve_apply(VJFrame *frame, VJFrame *frame2, int width, - int height, int opacity) +void dissolve_apply(VJFrame *frame, VJFrame *frame2, int opacity) { unsigned int i; - unsigned int len = frame->len; + const unsigned int len = frame->len; const int op1 = (opacity > 255) ? 255 : opacity; const int op0 = 255 - op1; diff --git a/veejay-current/veejay-server/libvje/effects/dissolve.h b/veejay-current/veejay-server/libvje/effects/dissolve.h index 0d3571a4..e21e17ed 100644 --- a/veejay-current/veejay-server/libvje/effects/dissolve.h +++ b/veejay-current/veejay-server/libvje/effects/dissolve.h @@ -20,11 +20,6 @@ #ifndef DISSOLVE_H #define DISSOLVE_H -#include -#include -#include - vj_effect *dissolve_init(int w, int h); -void dissolve_apply( VJFrame *frame, VJFrame *frame2, int width, - int height, int dissolve); +void dissolve_apply( VJFrame *frame, VJFrame *frame2, int dissolve); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index 3c3115a6..fef9d6ec 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -440,8 +440,7 @@ extern void chromium_apply( VJFrame *frame, int n); extern void chromapalette_apply( VJFrame *frame, int a, int r, int g, int b, int c1, int c2); extern void uvcorrect_apply(VJFrame *frame, int angle, int urot_center, int vrot_center, int iuFactor, int ivFactor, int uvmin, int uvmax ); - -extern void dissolve_apply(VJFrame *frame,VJFrame *frame2, int w, int h, int opacity); +extern void dissolve_apply(VJFrame *frame,VJFrame *frame2, int opacity); extern void overclock_apply(VJFrame *frame, int w, int h, int val, int r); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index 9afa53c0..4a89688b 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -491,7 +491,8 @@ static void vj_effman_apply_video_effect( VJFrame **frames, vjp_kf *todo_info,in lumamask_apply(frames[0], frames[1], arg[0],arg[1],arg[2],arg[3]); break; case VJ_VIDEO_EFFECT_DISSOLVE: - dissolve_apply(frames[0],frames[1],frames[0]->width,frames[0]->height,arg[0]);break; + dissolve_apply(frames[0],frames[1],arg[0]); + break; case VJ_VIDEO_EFFECT_OPACITY: opacity_apply(frames[0], frames[1], arg[0]); break; From 0657d1656036a246322a16988aa7f799f40da01e Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Fri, 29 Jul 2016 17:37:05 +0200 Subject: [PATCH 009/170] Libvje / refactor : overclock * w, h * clean headers * remove inline blur and blur2 : duplicated with common.c --- .../veejay-server/libvje/effects/overclock.c | 66 ++----------------- .../veejay-server/libvje/effects/overclock.h | 5 +- .../veejay-server/libvje/internal.h | 3 +- .../veejay-server/libvje/vj-effman.c | 2 +- 4 files changed, 8 insertions(+), 68 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/overclock.c b/veejay-current/veejay-server/libvje/effects/overclock.c index 9643d443..321d9041 100644 --- a/veejay-current/veejay-server/libvje/effects/overclock.c +++ b/veejay-current/veejay-server/libvje/effects/overclock.c @@ -17,11 +17,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include -#include +#include "common.h" + #include #include "overclock.h" vj_effect *overclock_init(int w, int h) @@ -48,61 +45,6 @@ vj_effect *overclock_init(int w, int h) static uint8_t *oc_buf[3] = { NULL,NULL,NULL }; -//copied from xine -static inline void blur(uint8_t *dst, uint8_t *src, int w, int radius, int dstStep, int srcStep){ - int x; - const int length= radius*2 + 1; - const int inv= ((1<<16) + length/2)/length; - - int sum= 0; - - for(x=0; x>16; - } - - for(; x>16; - } - - for(; x>16; - } -} - -//copied from xine -static void blur2(uint8_t *dst, uint8_t *src, int w, int radius, int power, int dstStep, int srcStep){ - uint8_t temp[2][4096]; - uint8_t *a= temp[0], *b=temp[1]; - - if(radius){ - blur(a, src, w, radius, 1, srcStep); - for(; power>2; power--){ - uint8_t *c; - blur(b, a, w, radius, 1, 1); - c=a; a=b; b=c; - } - if(power>1) - blur(dst, a, w, radius, dstStep, 1); - else{ - int i; - for(i=0; iwidth; + const unsigned int height = frame->height; int x,y,dx,dy; uint8_t t = 0; int s = 0; diff --git a/veejay-current/veejay-server/libvje/effects/overclock.h b/veejay-current/veejay-server/libvje/effects/overclock.h index f826f739..ae9965ee 100644 --- a/veejay-current/veejay-server/libvje/effects/overclock.h +++ b/veejay-current/veejay-server/libvje/effects/overclock.h @@ -20,11 +20,8 @@ #ifndef OVERCLOCK_H #define OVERCLOCK_H -#include -#include -#include vj_effect *overclock_init(int w, int h); int overclock_malloc(int w, int h ); void overclock_free(); -void overclock_apply(VJFrame *frame, int width, int height, int val, int r); +void overclock_apply(VJFrame *frame, int val, int r); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index fef9d6ec..f57e15ed 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -441,8 +441,7 @@ extern void chromapalette_apply( VJFrame *frame, int a, int r, int g, int b, int extern void uvcorrect_apply(VJFrame *frame, int angle, int urot_center, int vrot_center, int iuFactor, int ivFactor, int uvmin, int uvmax ); extern void dissolve_apply(VJFrame *frame,VJFrame *frame2, int opacity); - -extern void overclock_apply(VJFrame *frame, int w, int h, int val, int r); +extern void overclock_apply(VJFrame *frame, int val, int r); uint8_t *bgpush_get_bg_frame(unsigned int plane); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index 4a89688b..1d2d9ff5 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -248,7 +248,7 @@ static void vj_effman_apply_image_effect( nervous_apply( frames[0], frames[0]->width, frames[0]->height, arg[0]); break; case VJ_IMAGE_EFFECT_OVERCLOCK: - overclock_apply(frames[0], frames[0]->width, frames[0]->height,arg[0],arg[1]); + overclock_apply(frames[0],arg[0],arg[1]); break; case VJ_IMAGE_EFFECT_COLORHIS: colorhis_apply( frames[0], frames[0]->width,frames[0]->height,arg[0],arg[1],arg[2],arg[3] ); From 78d22f56dbcbb8d0da82f34436c4cf82607f8b60 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Fri, 29 Jul 2016 17:44:24 +0200 Subject: [PATCH 010/170] Libvje / refactor : bgsubstract * w, h * clean headers --- .../veejay-server/libvje/effects/bgsubtract.c | 15 ++++++--------- .../veejay-server/libvje/effects/bgsubtract.h | 6 +----- veejay-current/veejay-server/libvje/internal.h | 5 +---- veejay-current/veejay-server/libvje/vj-effman.c | 2 +- 4 files changed, 9 insertions(+), 19 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/bgsubtract.c b/veejay-current/veejay-server/libvje/effects/bgsubtract.c index 96547113..68e414f7 100644 --- a/veejay-current/veejay-server/libvje/effects/bgsubtract.c +++ b/veejay-current/veejay-server/libvje/effects/bgsubtract.c @@ -17,16 +17,13 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include "bgsubtract.h" + #include "common.h" -#include -#include +#include #include -#include "softblur.h" #include +#include "softblur.h" +#include "bgsubtract.h" static uint8_t *static_bg__ = NULL; static uint8_t *bg_frame__[4] = { NULL,NULL,NULL,NULL }; @@ -193,9 +190,9 @@ static void bgsubtract_show_bg( VJFrame *frame ) } } -void bgsubtract_apply(VJFrame *frame,int width, int height, int threshold, int method, int enabled, int alpha ) +void bgsubtract_apply(VJFrame *frame,int threshold, int method, int enabled, int alpha ) { - const int uv_len = (frame->ssm ? frame->len : frame->uv_len ); + const unsigned int uv_len = (frame->ssm ? frame->len : frame->uv_len ); if( auto_hist ) vje_histogram_auto_eq( frame ); diff --git a/veejay-current/veejay-server/libvje/effects/bgsubtract.h b/veejay-current/veejay-server/libvje/effects/bgsubtract.h index f1486e31..8a84eb8e 100644 --- a/veejay-current/veejay-server/libvje/effects/bgsubtract.h +++ b/veejay-current/veejay-server/libvje/effects/bgsubtract.h @@ -20,15 +20,11 @@ #ifndef BGSUBTRACT_H #define BGSUBTRACT_H -#include -#include -#include - vj_effect *bgsubtract_init(int width, int height); int bgsubtract_instances(); void bgsubtract_free(); int bgsubtract_malloc(int w, int h); int bgsubtract_prepare(VJFrame *frame); -void bgsubtract_apply(VJFrame *frame,int width,int height,int threshold, int method, int enabled, int to_alpha); +void bgsubtract_apply(VJFrame *frame,int threshold, int method, int enabled, int to_alpha); uint8_t *bgsubtract_get_bg_frame(unsigned int plane); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index f57e15ed..6bf012c5 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -444,12 +444,9 @@ extern void dissolve_apply(VJFrame *frame,VJFrame *frame2, int opacity); extern void overclock_apply(VJFrame *frame, int val, int r); uint8_t *bgpush_get_bg_frame(unsigned int plane); - uint8_t *bgsubtract_get_bg_frame(unsigned int plane); - extern int bgsubtract_prepare(VJFrame *frame); - -extern void bgsubtract_apply(VJFrame *frame,int width, int height, int threshold, int method, int enabled, int alpha ); +extern void bgsubtract_apply(VJFrame *frame, int threshold, int method, int enabled, int alpha ); extern uint8_t* bgsubtractgauss_get_bg_frame(unsigned int plane); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index 1d2d9ff5..4fd77e33 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -352,7 +352,7 @@ static void vj_effman_apply_image_effect( ripple_apply(frames[0], arg[0], arg[1], arg[2]); break; case VJ_IMAGE_EFFECT_BGSUBTRACT: - bgsubtract_apply( frames[0],frames[0]->width,frames[0]->height,arg[0],arg[1],arg[2],arg[3]); + bgsubtract_apply( frames[0],arg[0],arg[1],arg[2],arg[3]); break; case VJ_IMAGE_EFFECT_BGSUBTRACTGAUSS: bgsubtractgauss_apply( frames[0],arg[0],arg[1],arg[2],arg[3],arg[4],arg[5]); From 51b5c5d2fa9a1887e94d924d120845e9a389efd6 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Fri, 29 Jul 2016 17:48:59 +0200 Subject: [PATCH 011/170] Libvje / cartonize * w, h * clean headers --- .../veejay-server/libvje/effects/cartonize.c | 17 ++++++++--------- .../veejay-server/libvje/effects/cartonize.h | 6 +----- veejay-current/veejay-server/libvje/internal.h | 4 +--- veejay-current/veejay-server/libvje/vj-effman.c | 3 +-- 4 files changed, 11 insertions(+), 19 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/cartonize.c b/veejay-current/veejay-server/libvje/effects/cartonize.c index 9e690e34..c7483420 100644 --- a/veejay-current/veejay-server/libvje/effects/cartonize.c +++ b/veejay-current/veejay-server/libvje/effects/cartonize.c @@ -17,9 +17,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include + +#include "common.h" #include #include "cartonize.h" @@ -51,13 +50,13 @@ vj_effect *cartonize_init(int w, int h) return ve; } -void cartonize_apply( VJFrame *frame, int width, int height, int b1, int b2, int b3) +void cartonize_apply( VJFrame *frame, int b1, int b2, int b3) { unsigned int i; - int len = (width * height); - int uv_len = (frame->ssm ? frame->len : frame->uv_len); - uint8_t tmp; - int p; + const unsigned int len = frame->len; + int uv_len = (frame->ssm ? len : frame->uv_len); + uint8_t tmp; + int p; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -68,7 +67,7 @@ void cartonize_apply( VJFrame *frame, int width, int height, int b1, int b2, int // ubase/vbase cannot be 0 if(ubase==0) ubase=1; if(vbase==0) vbase=1; - for( i = 0 ; i < len ; i ++ ) + for( i = 0 ; i < len ; i ++ ) { tmp = Y[i]; Y[i] = (tmp / base) * base; // loose fractional part diff --git a/veejay-current/veejay-server/libvje/effects/cartonize.h b/veejay-current/veejay-server/libvje/effects/cartonize.h index b93ced41..825495e5 100644 --- a/veejay-current/veejay-server/libvje/effects/cartonize.h +++ b/veejay-current/veejay-server/libvje/effects/cartonize.h @@ -20,10 +20,6 @@ #ifndef CARTONIZE_H #define CARTONIZE_H -#include -#include -#include - vj_effect *cartonize_init(int w, int h); -void cartonize_apply( VJFrame *frame, int width, int height, int b1, int b2, int b3); +void cartonize_apply( VJFrame *frame, int b1, int b2, int b3); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index 6bf012c5..69acc7d4 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -449,16 +449,14 @@ extern int bgsubtract_prepare(VJFrame *frame); extern void bgsubtract_apply(VJFrame *frame, int threshold, int method, int enabled, int alpha ); extern uint8_t* bgsubtractgauss_get_bg_frame(unsigned int plane); - extern int bgsubtractgauss_prepare(VJFrame *frame); - extern void bgsubtractgauss_apply(VJFrame *frame,int alpha, int threshold,int noise, int mode, int period, int morph ); extern int diff_prepare(void *data, uint8_t *map[4], int w, int h); extern int bgpush_prepare( VJFrame *frame ); -extern void cartonize_apply( VJFrame *frame, int w, int h, int b1, int b2, int b3 ); +extern void cartonize_apply( VJFrame *frame, int b1, int b2, int b3 ); extern void morphology_apply( VJFrame *frame, int threshold, int kernel, int mode, int channel); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index 4fd77e33..ae646ae3 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -224,8 +224,7 @@ static void vj_effman_apply_image_effect( chromium_apply( frames[0], arg[0]); break; case VJ_IMAGE_EFFECT_CARTONIZE: - cartonize_apply( frames[0], frames[0]->width,frames[0]->height, - arg[0],arg[1],arg[2] ); + cartonize_apply( frames[0], arg[0], arg[1], arg[2] ); break; case VJ_IMAGE_EFFECT_VIDBLOB: blob_apply( frames[0],frames[0]->width,frames[0]->height, From 0407a8372fccfce20877b0f15071c3b4e78e439e Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Fri, 29 Jul 2016 17:51:31 +0200 Subject: [PATCH 012/170] Libvje / refactor : morphology * clean headers --- .../veejay-server/libvje/effects/morphology.c | 11 ++++------- .../veejay-server/libvje/effects/morphology.h | 4 ---- veejay-current/veejay-server/libvje/internal.h | 3 +-- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/morphology.c b/veejay-current/veejay-server/libvje/effects/morphology.c index 19265c63..25b5d158 100644 --- a/veejay-current/veejay-server/libvje/effects/morphology.c +++ b/veejay-current/veejay-server/libvje/effects/morphology.c @@ -17,13 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include +#include "common.h" #include #include "morphology.h" -#include "common.h" + typedef uint8_t (*morph_func)(uint8_t *kernel, uint8_t *mt ); static uint8_t kernels[8][9] ={ @@ -31,8 +28,8 @@ static uint8_t kernels[8][9] ={ { 0,1,0, 1,1,1, 0,1,0 },//1 { 0,0,0, 1,1,1, 0,0,0 },//2 { 0,1,0, 0,1,0, 0,1,0 },//3 - { 0,0,1, 0,1,0, 1,0,0 },//4 - { 1,0,0, 0,1,0, 0,0,1 }, + { 0,0,1, 0,1,0, 1,0,0 },//4 + { 1,0,0, 0,1,0, 0,0,1 }, { 1,1,1, 0,0,0, 0,0,0 }, { 0,0,0, 0,0,0, 1,1,1 } }; diff --git a/veejay-current/veejay-server/libvje/effects/morphology.h b/veejay-current/veejay-server/libvje/effects/morphology.h index d0dac230..2371fc50 100644 --- a/veejay-current/veejay-server/libvje/effects/morphology.h +++ b/veejay-current/veejay-server/libvje/effects/morphology.h @@ -20,10 +20,6 @@ #ifndef MORPHOLOGY_H #define MORPHOLOGY_H -#include -#include -#include - vj_effect *morphology_init(int w, int h); void morphology_apply( VJFrame *frame, int threshold, int kernel, int mode, int channel); int morphology_malloc(int w, int h); diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index 69acc7d4..6a8aa651 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -457,8 +457,7 @@ extern int diff_prepare(void *data, uint8_t *map[4], int w, int h); extern int bgpush_prepare( VJFrame *frame ); extern void cartonize_apply( VJFrame *frame, int b1, int b2, int b3 ); - -extern void morphology_apply( VJFrame *frame, int threshold, int kernel, int mode, int channel); +extern void morphology_apply( VJFrame *frame, int threshold, int kernel, int mode, int channel); extern void colmorphology_apply( VJFrame *frame, int w, int h, int t, int v, int p); From 38e82d310d5e7ec1f781f2275ceb194bbdbc1b40 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Fri, 29 Jul 2016 17:55:00 +0200 Subject: [PATCH 013/170] Libvje / refactor : colormorphology * w, h * clean headers --- .../veejay-server/libvje/effects/colmorphology.c | 14 +++++++------- .../veejay-server/libvje/effects/colmorphology.h | 10 +++------- veejay-current/veejay-server/libvje/internal.h | 3 +-- veejay-current/veejay-server/libvje/vj-effman.c | 2 +- 4 files changed, 12 insertions(+), 17 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/colmorphology.c b/veejay-current/veejay-server/libvje/effects/colmorphology.c index 3050b641..baf1a91e 100644 --- a/veejay-current/veejay-server/libvje/effects/colmorphology.c +++ b/veejay-current/veejay-server/libvje/effects/colmorphology.c @@ -17,12 +17,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include + +#include "common.h" #include #include "colmorphology.h" -#include "common.h" + typedef uint8_t (*morph_func)(uint8_t *kernel, uint8_t mt[9] ); vj_effect *colmorphology_init(int w, int h) @@ -92,9 +91,10 @@ static inline uint8_t _erode_kernel3x3( uint8_t *kernel, uint8_t img[9]) return pixel_Y_hi_; } -void colmorphology_apply( VJFrame *frame, int width, int height, int threshold, int type, int passes ) +void colmorphology_apply( VJFrame *frame, int threshold, int type, int passes ) { unsigned int i,x,y; + const unsigned int width = frame->width; unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t kernels[8][9] ={ @@ -102,8 +102,8 @@ void colmorphology_apply( VJFrame *frame, int width, int height, int threshold, { 0,1,0, 1,1,1, 0,1,0 },//1 { 0,0,0, 1,1,1, 0,0,0 },//2 { 0,1,0, 0,1,0, 0,1,0 },//3 - { 0,0,1, 0,1,0, 1,0,0 },//4 - { 1,0,0, 0,1,0, 0,0,1 }, + { 0,0,1, 0,1,0, 1,0,0 },//4 + { 1,0,0, 0,1,0, 0,0,1 }, { 1,1,1, 0,0,0, 0,0,0 }, { 0,0,0, 0,0,0, 1,1,1 } }; diff --git a/veejay-current/veejay-server/libvje/effects/colmorphology.h b/veejay-current/veejay-server/libvje/effects/colmorphology.h index a87afa01..2c8031a1 100644 --- a/veejay-current/veejay-server/libvje/effects/colmorphology.h +++ b/veejay-current/veejay-server/libvje/effects/colmorphology.h @@ -20,12 +20,8 @@ #ifndef COLMORPHOLOGY_H #define COLMORPHOLOGY_H -#include -#include -#include - vj_effect *colmorphology_init(int w, int h); -void colmorphology_apply( VJFrame *frame, int width, int height, int t, int val, int n); -int colmorphology_malloc(int w, int h); -void colmorphology_free(void); +void colmorphology_apply( VJFrame *frame, int t, int val, int n); +int colmorphology_malloc(int w, int h); +void colmorphology_free(void); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index 6a8aa651..735a7e29 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -458,8 +458,7 @@ extern int bgpush_prepare( VJFrame *frame ); extern void cartonize_apply( VJFrame *frame, int b1, int b2, int b3 ); extern void morphology_apply( VJFrame *frame, int threshold, int kernel, int mode, int channel); - -extern void colmorphology_apply( VJFrame *frame, int w, int h, int t, int v, int p); +extern void colmorphology_apply( VJFrame *frame, int t, int v, int p); extern void blob_apply( VJFrame *frame, int w, int h, int p0,int p1, int p2, int p3); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index ae646ae3..e77fac57 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -241,7 +241,7 @@ static void vj_effman_apply_image_effect( morphology_apply( frames[0], arg[0],arg[1],arg[2],arg[3] ); break; case VJ_IMAGE_EFFECT_COLMORPH: - colmorphology_apply( frames[0], frames[0]->width, frames[0]->height,arg[0],arg[1],arg[2]); + colmorphology_apply( frames[0], arg[0], arg[1], arg[2]); break; case VJ_IMAGE_EFFECT_NERVOUS: nervous_apply( frames[0], frames[0]->width, frames[0]->height, From c632b95970ca2354682643c6972123a0fed0b6ef Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Fri, 29 Jul 2016 17:57:13 +0200 Subject: [PATCH 014/170] Libvje / refactor : blob * w ,h * clean headers --- veejay-current/veejay-server/libvje/effects/blob.c | 12 +++++------- veejay-current/veejay-server/libvje/effects/blob.h | 7 +------ veejay-current/veejay-server/libvje/internal.h | 3 +-- veejay-current/veejay-server/libvje/vj-effman.c | 3 +-- 4 files changed, 8 insertions(+), 17 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/blob.c b/veejay-current/veejay-server/libvje/effects/blob.c index 84079633..ad59903b 100644 --- a/veejay-current/veejay-server/libvje/effects/blob.c +++ b/veejay-current/veejay-server/libvje/effects/blob.c @@ -48,11 +48,8 @@ */ -#include -#include -#include -#include #include "common.h" +#include #include "blob.h" typedef struct @@ -213,10 +210,11 @@ static blob_func blob_render(void) return &blob_render_circle; } -void blob_apply(VJFrame *frame, - int width, int height, int radius, int num, int speed, int shape) +void blob_apply(VJFrame *frame, int radius, int num, int speed, int shape) { - const int len = frame->len; + const unsigned int width = frame->width; + const unsigned int height = frame->height; + const unsigned int len = frame->len; uint8_t *srcY = frame->data[0]; uint8_t *srcCb= frame->data[1]; uint8_t *srcCr= frame->data[2]; diff --git a/veejay-current/veejay-server/libvje/effects/blob.h b/veejay-current/veejay-server/libvje/effects/blob.h index 881029f3..f1f9606e 100644 --- a/veejay-current/veejay-server/libvje/effects/blob.h +++ b/veejay-current/veejay-server/libvje/effects/blob.h @@ -20,13 +20,8 @@ #ifndef BLOB_H #define BLOB_H -#include -#include -#include - vj_effect *blob_init(int w, int h); -void blob_apply( VJFrame *frame, int width, int height, int p0,int p1, int p2, int p3); +void blob_apply( VJFrame *frame, int p0,int p1, int p2, int p3); int blob_malloc( int w, int h ); void blob_free(void); - #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index 735a7e29..0377adce 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -459,8 +459,7 @@ extern int bgpush_prepare( VJFrame *frame ); extern void cartonize_apply( VJFrame *frame, int b1, int b2, int b3 ); extern void morphology_apply( VJFrame *frame, int threshold, int kernel, int mode, int channel); extern void colmorphology_apply( VJFrame *frame, int t, int v, int p); - -extern void blob_apply( VJFrame *frame, int w, int h, int p0,int p1, int p2, int p3); +extern void blob_apply( VJFrame *frame, int p0,int p1, int p2, int p3); extern void boids_apply( VJFrame *frame, int w, int h, int p0,int p1, int p2, int p3, int p4, int p5, int p6, int p7 ); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index e77fac57..dc4e7732 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -227,8 +227,7 @@ static void vj_effman_apply_image_effect( cartonize_apply( frames[0], arg[0], arg[1], arg[2] ); break; case VJ_IMAGE_EFFECT_VIDBLOB: - blob_apply( frames[0],frames[0]->width,frames[0]->height, - arg[0],arg[1],arg[2],arg[3] ); + blob_apply( frames[0], arg[0], arg[1], arg[2], arg[3] ); break; case VJ_IMAGE_EFFECT_VIDBOIDS: boids_apply( frames[0],frames[0]->width,frames[0]->height, From e717960e69753244e60c5f2252d06d85b1476d44 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Fri, 29 Jul 2016 18:00:05 +0200 Subject: [PATCH 015/170] Libvje / refactor : boids * w,h * clean headers --- .../veejay-server/libvje/effects/boids.c | 15 ++++++--------- .../veejay-server/libvje/effects/boids.h | 8 ++------ veejay-current/veejay-server/libvje/internal.h | 5 ++--- veejay-current/veejay-server/libvje/vj-effman.c | 3 +-- 4 files changed, 11 insertions(+), 20 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/boids.c b/veejay-current/veejay-server/libvje/effects/boids.c index 3482422d..50dd1f41 100644 --- a/veejay-current/veejay-server/libvje/effects/boids.c +++ b/veejay-current/veejay-server/libvje/effects/boids.c @@ -56,15 +56,10 @@ */ -#include -#include -#include -#include -#include #include "common.h" +#include #include "boids.h" - typedef struct { short x; // x @@ -333,10 +328,12 @@ static void boid_rule4_( int boid_id, int vlim ) blobs_[boid_id].vy = ( blobs_[boid_id].vy / fabs( blobs_[boid_id].vy) ) * vlim; } -void boids_apply(VJFrame *frame, - int width, int height, int radius, int num, int shape, int m1, int m2, int m3, int speed, int home_radius ) +void boids_apply(VJFrame *frame, int radius, int num, int shape, int m1, int m2, + int m3, int speed, int home_radius ) { - const int len = frame->len; + const unsigned int width = frame->width; + const unsigned int height = frame->height; + const unsigned int len = frame->len; uint8_t *srcY = frame->data[0]; uint8_t *srcCb= frame->data[1]; uint8_t *srcCr= frame->data[2]; diff --git a/veejay-current/veejay-server/libvje/effects/boids.h b/veejay-current/veejay-server/libvje/effects/boids.h index 0c0ebfb7..f2a19244 100644 --- a/veejay-current/veejay-server/libvje/effects/boids.h +++ b/veejay-current/veejay-server/libvje/effects/boids.h @@ -20,13 +20,9 @@ #ifndef BOIDS_H #define BOIDS_H -#include -#include -#include - vj_effect *boids_init(int w, int h); -void boids_apply( VJFrame *frame, int width, int height, int p0,int p1, int p2, int p3, int p4, int p5, int p6, int p7); +void boids_apply( VJFrame *frame, int p0,int p1, int p2, int p3, int p4, int p5, + int p6, int p7); int boids_malloc( int w, int h ); void boids_free(void); - #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index 0377adce..3473a5b5 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -460,9 +460,8 @@ extern void cartonize_apply( VJFrame *frame, int b1, int b2, int b3 ); extern void morphology_apply( VJFrame *frame, int threshold, int kernel, int mode, int channel); extern void colmorphology_apply( VJFrame *frame, int t, int v, int p); extern void blob_apply( VJFrame *frame, int p0,int p1, int p2, int p3); - -extern void boids_apply( VJFrame *frame, int w, int h, int p0,int p1, int p2, int p3, int p4, int p5, int p6, int p7 -); +extern void boids_apply( VJFrame *frame, int p0,int p1, int p2, int p3, + int p4, int p5, int p6, int p7); extern void porterduff_apply( VJFrame *frame, VJFrame *frame2, int w, int h, int mode); extern void ghost_apply(VJFrame *frame, int w, int h, int o ); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index dc4e7732..fed5761c 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -230,8 +230,7 @@ static void vj_effman_apply_image_effect( blob_apply( frames[0], arg[0], arg[1], arg[2], arg[3] ); break; case VJ_IMAGE_EFFECT_VIDBOIDS: - boids_apply( frames[0],frames[0]->width,frames[0]->height, - arg[0],arg[1],arg[2],arg[3],arg[4],arg[5],arg[6],arg[7] ); + boids_apply( frames[0], arg[0],arg[1],arg[2],arg[3],arg[4],arg[5],arg[6],arg[7] ); break; case VJ_IMAGE_EFFECT_GHOST: ghost_apply( frames[0], frames[0]->width,frames[0]->height,arg[0]); From f81cf49fd3da95e3a0d6eb2765ddbca813731974 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Fri, 29 Jul 2016 18:01:55 +0200 Subject: [PATCH 016/170] Libvje / refactor : porterduff * w,h * clean headers --- .../veejay-server/libvje/effects/porterduff.c | 11 ++++------- .../veejay-server/libvje/effects/porterduff.h | 6 +----- veejay-current/veejay-server/libvje/internal.h | 2 +- veejay-current/veejay-server/libvje/vj-effman.c | 2 +- 4 files changed, 7 insertions(+), 14 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/porterduff.c b/veejay-current/veejay-server/libvje/effects/porterduff.c index cab4eb2c..330c6ebb 100644 --- a/veejay-current/veejay-server/libvje/effects/porterduff.c +++ b/veejay-current/veejay-server/libvje/effects/porterduff.c @@ -17,13 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include + +#include "common.h" #include #include "porterduff.h" -#include -#include -#include "common.h" #ifndef MIN #define MIN(a,b) ( (a)>(b) ? (b) : (a) ) @@ -359,9 +356,9 @@ static void divide( uint8_t *A, uint8_t *B, int n_pixels ) } } -void porterduff_apply(VJFrame *frame, VJFrame *frame2, int width,int height, int mode) +void porterduff_apply(VJFrame *frame, VJFrame *frame2, int mode) { - switch( mode ) + switch( mode ) { case 0: porterduff_dst( frame->data[0],frame2->data[0],frame->len ); diff --git a/veejay-current/veejay-server/libvje/effects/porterduff.h b/veejay-current/veejay-server/libvje/effects/porterduff.h index e2e8fa0e..2bce8e86 100644 --- a/veejay-current/veejay-server/libvje/effects/porterduff.h +++ b/veejay-current/veejay-server/libvje/effects/porterduff.h @@ -20,10 +20,6 @@ #ifndef PORTERDUFF_H #define PORTERUDFF_H -#include -#include -#include - vj_effect *porterduff_init(); -void porterduff_apply( VJFrame *frame, VJFrame *frame2, int width,int height,int mode ); +void porterduff_apply( VJFrame *frame, VJFrame *frame2,int mode ); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index 3473a5b5..24779c13 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -462,7 +462,7 @@ extern void colmorphology_apply( VJFrame *frame, int t, int v, int p); extern void blob_apply( VJFrame *frame, int p0,int p1, int p2, int p3); extern void boids_apply( VJFrame *frame, int p0,int p1, int p2, int p3, int p4, int p5, int p6, int p7); -extern void porterduff_apply( VJFrame *frame, VJFrame *frame2, int w, int h, int mode); +extern void porterduff_apply( VJFrame *frame, VJFrame *frame2, int mode); extern void ghost_apply(VJFrame *frame, int w, int h, int o ); extern void neighbours_apply( VJFrame *frame, int width, int height, int brush_size, int level, int mode); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index fed5761c..190c7a40 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -641,7 +641,7 @@ static void vj_effman_apply_video_effect( VJFrame **frames, vjp_kf *todo_info,in alphablend_apply(frames[0],frames[1],frames[0]->width,frames[0]->height); break; case VJ_VIDEO_EFFECT_PORTERDUFF: - porterduff_apply(frames[0],frames[1],frames[0]->width,frames[0]->height,arg[0]); + porterduff_apply(frames[0], frames[1], arg[0]); break; case VJ_VIDEO_EFFECT_LUMAKEYALPHA: lumakeyalpha_apply(frames[0],frames[1],frames[0]->width,frames[0]->height,arg[0],arg[1]); From 6e0eeeb4f70a5a81d711880805c99aa5880d73be Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Fri, 29 Jul 2016 18:04:20 +0200 Subject: [PATCH 017/170] Libvje / refactor : ghost * w,h * clean headers --- .../veejay-server/libvje/effects/ghost.c | 19 +++++++------------ .../veejay-server/libvje/effects/ghost.h | 6 +----- .../veejay-server/libvje/internal.h | 3 +-- .../veejay-server/libvje/vj-effman.c | 2 +- 4 files changed, 10 insertions(+), 20 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/ghost.c b/veejay-current/veejay-server/libvje/effects/ghost.c index e89d1e0e..4380da5b 100644 --- a/veejay-current/veejay-server/libvje/effects/ghost.c +++ b/veejay-current/veejay-server/libvje/effects/ghost.c @@ -18,11 +18,8 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include #include "common.h" +#include #include "ghost.h" static uint8_t *ghost_buf[4] = { NULL,NULL,NULL, NULL}; @@ -77,14 +74,14 @@ void ghost_free() diff_map = NULL; } -void ghost_apply(VJFrame *frame, - int width, int height, int opacity) +void ghost_apply(VJFrame *frame, int opacity) { register int q,z=0; - int x,y,i; - const int len = frame->len; - const unsigned int op_a = opacity; - const unsigned int op_b = 255 - op_a; + int x,y,i; + const unsigned int width = frame->width; + const unsigned int len = frame->len; + const unsigned int op_a = opacity; + const unsigned int op_b = 255 - op_a; uint8_t *srcY = frame->data[0]; uint8_t *srcCb= frame->data[1]; uint8_t *srcCr= frame->data[2]; @@ -112,8 +109,6 @@ void ghost_apply(VJFrame *frame, for(i = 0; i < len; i ++ ) bm[i] = ( abs(srcY[i] - dY[i]) > 1 ? 0xff: 0x0); - - for( y = width; y < (len-width); y += width ) { for( x = 1; x < width - 1; x ++ ) diff --git a/veejay-current/veejay-server/libvje/effects/ghost.h b/veejay-current/veejay-server/libvje/effects/ghost.h index 3a0cb954..2e1ef33e 100644 --- a/veejay-current/veejay-server/libvje/effects/ghost.h +++ b/veejay-current/veejay-server/libvje/effects/ghost.h @@ -20,12 +20,8 @@ #ifndef GHOST_H #define GHOST_H -#include -#include -#include - vj_effect *ghost_init(int w, int h); -void ghost_apply( VJFrame *frame, int width, int height, int op); +void ghost_apply( VJFrame *frame, int op); int ghost_malloc( int w, int h ); void ghost_free(void); diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index 24779c13..d5d5cd95 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -463,8 +463,7 @@ extern void blob_apply( VJFrame *frame, int p0,int p1, int p2, int p3); extern void boids_apply( VJFrame *frame, int p0,int p1, int p2, int p3, int p4, int p5, int p6, int p7); extern void porterduff_apply( VJFrame *frame, VJFrame *frame2, int mode); - -extern void ghost_apply(VJFrame *frame, int w, int h, int o ); +extern void ghost_apply(VJFrame *frame, int o ); extern void neighbours_apply( VJFrame *frame, int width, int height, int brush_size, int level, int mode); extern void neighbours2_apply( VJFrame *frame, int width, int height, int brush_size, int level, int mode); extern void neighbours3_apply( VJFrame *frame, int width, int height, int brush_size, int level, int mode); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index 190c7a40..c78bf981 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -233,7 +233,7 @@ static void vj_effman_apply_image_effect( boids_apply( frames[0], arg[0],arg[1],arg[2],arg[3],arg[4],arg[5],arg[6],arg[7] ); break; case VJ_IMAGE_EFFECT_GHOST: - ghost_apply( frames[0], frames[0]->width,frames[0]->height,arg[0]); + ghost_apply( frames[0], arg[0]); break; case VJ_IMAGE_EFFECT_MORPHOLOGY: morphology_apply( frames[0], arg[0],arg[1],arg[2],arg[3] ); From 8cd394e2a30f7885dd4bc81533af3617d3b55697 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Fri, 29 Jul 2016 18:06:58 +0200 Subject: [PATCH 018/170] Libvje / refactor : neighbours * w,h * clean headers --- .../veejay-server/libvje/effects/neighbours.c | 21 ++++++++++--------- .../veejay-server/libvje/effects/neighbours.h | 6 +----- .../veejay-server/libvje/internal.h | 2 +- .../veejay-server/libvje/vj-effman.c | 2 +- 4 files changed, 14 insertions(+), 17 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/neighbours.c b/veejay-current/veejay-server/libvje/effects/neighbours.c index af85bb1c..a945fc41 100644 --- a/veejay-current/veejay-server/libvje/effects/neighbours.c +++ b/veejay-current/veejay-server/libvje/effects/neighbours.c @@ -17,13 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include -#include -#include "neighbours.h" + #include "common.h" +#include +#include "neighbours.h" vj_effect *neighbours_init(int w, int h) { @@ -225,26 +222,30 @@ static inline pixel_t evaluate_pixel_c( } -void neighbours_apply( VJFrame *frame, int width, int height, int brush_size, int intensity_level, int mode ) +void neighbours_apply( VJFrame *frame, int brush_size, int intensity_level, int mode ) { int x,y; const double intensity = intensity_level / 255.0; uint8_t *Y = tmp_buf[0]; uint8_t *Y2 = tmp_buf[1]; + + const unsigned int width = frame->width; + const unsigned int height = frame->height; + const unsigned int len = frame->len; uint8_t *dstY = frame->data[0]; uint8_t *dstCb = frame->data[1]; uint8_t *dstCr = frame->data[2]; // keep luma - vj_frame_copy1( frame->data[0],Y2,frame->len ); + vj_frame_copy1( frame->data[0],Y2,len ); if(mode) { - int strides[4] = { 0,frame->len, frame->len }; + int strides[4] = { 0,len, len }; uint8_t *dest[4] = { NULL, chromacity[0], chromacity[1],NULL }; vj_frame_copy( frame->data, dest, strides ); } // premultiply intensity map - for( y = 0 ; y < frame->len ; y ++ ) + for( y = 0 ; y < len ; y ++ ) Y[y] = (uint8_t) ( (double)Y2[y] * intensity ); if(!mode) diff --git a/veejay-current/veejay-server/libvje/effects/neighbours.h b/veejay-current/veejay-server/libvje/effects/neighbours.h index 3c1e1ff7..d7815cb7 100644 --- a/veejay-current/veejay-server/libvje/effects/neighbours.h +++ b/veejay-current/veejay-server/libvje/effects/neighbours.h @@ -20,12 +20,8 @@ #ifndef NEIGHBOURS_H #define NEIGHBOURS_H -#include -#include -#include - vj_effect *neighbours_init(int w, int h); int neighbours_malloc(int w, int h); void neighbours_free(void); -void neighbours_apply( VJFrame *frame, int width, int height, int brush_size, int level,int mode); +void neighbours_apply( VJFrame *frame, int brush_size, int level,int mode); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index d5d5cd95..82db0058 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -464,7 +464,7 @@ extern void boids_apply( VJFrame *frame, int p0,int p1, int p2, int p3, int p4, int p5, int p6, int p7); extern void porterduff_apply( VJFrame *frame, VJFrame *frame2, int mode); extern void ghost_apply(VJFrame *frame, int o ); -extern void neighbours_apply( VJFrame *frame, int width, int height, int brush_size, int level, int mode); +extern void neighbours_apply( VJFrame *frame, int brush_size, int level, int mode); extern void neighbours2_apply( VJFrame *frame, int width, int height, int brush_size, int level, int mode); extern void neighbours3_apply( VJFrame *frame, int width, int height, int brush_size, int level, int mode); extern void neighbours4_apply( VJFrame *frame, int width, int height, int radius, int brush_size, int level, int mode); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index c78bf981..f3a26a96 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -115,7 +115,7 @@ static void vj_effman_apply_image_effect( frames[0]->height,arg[0],arg[1],arg[2]); break; case VJ_IMAGE_EFFECT_NEIGHBOUR: - neighbours_apply(frames[0],frames[0]->width,frames[0]->height,arg[0],arg[1],arg[2]); + neighbours_apply(frames[0], arg[0], arg[1], arg[2]); break; case VJ_IMAGE_EFFECT_NEIGHBOUR3: neighbours3_apply(frames[0],frames[0]->width, From 23624a596d3986748dfd5afe7fe1cfe2eaafb408 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Fri, 29 Jul 2016 18:09:40 +0200 Subject: [PATCH 019/170] Libvje / refactor : neighbours2 * w,h * clean headers --- .../libvje/effects/neighbours2.c | 21 ++++++++++--------- .../libvje/effects/neighbours2.h | 6 +----- .../veejay-server/libvje/internal.h | 2 +- .../veejay-server/libvje/vj-effman.c | 3 +-- 4 files changed, 14 insertions(+), 18 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/neighbours2.c b/veejay-current/veejay-server/libvje/effects/neighbours2.c index 3a746401..2840568d 100644 --- a/veejay-current/veejay-server/libvje/effects/neighbours2.c +++ b/veejay-current/veejay-server/libvje/effects/neighbours2.c @@ -17,13 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include -#include -#include "neighbours2.h" + #include "common.h" +#include +#include "neighbours2.h" vj_effect *neighbours2_init(int w, int h) { @@ -225,27 +222,31 @@ static inline uint8_t evaluate_pixel_b( return( (uint8_t) ( y_map[ peak_index] )); } -void neighbours2_apply( VJFrame *frame, int width, int height, int brush_size, int intensity_level, int mode ) +void neighbours2_apply( VJFrame *frame, int brush_size, int intensity_level, int mode ) { int x,y; const double intensity = intensity_level / 255.0; uint8_t *Y = tmp_buf[0]; uint8_t *Y2 = tmp_buf[1]; + + const unsigned int width = frame->width; + const unsigned int height = frame->height; + const unsigned int len = frame->len; uint8_t *dstY = frame->data[0]; uint8_t *dstCb = frame->data[1]; uint8_t *dstCr = frame->data[2]; // keep luma - vj_frame_copy1( frame->data[0],Y2, frame->len ); + vj_frame_copy1( frame->data[0],Y2, len ); if(mode) { - int strides[4] = { 0, frame->len, frame->len,0 }; + int strides[4] = { 0, len, len,0 }; uint8_t *dest[4] = { NULL, chromacity[0],chromacity[1],NULL }; vj_frame_copy( frame->data, dest, strides ); } // premultiply intensity map - for( y = 0 ; y < frame->len ; y ++ ) + for( y = 0 ; y < len ; y ++ ) Y[y] = (uint8_t) ( (double)Y2[y] * intensity ); if(!mode) diff --git a/veejay-current/veejay-server/libvje/effects/neighbours2.h b/veejay-current/veejay-server/libvje/effects/neighbours2.h index 04b49426..13595c8f 100644 --- a/veejay-current/veejay-server/libvje/effects/neighbours2.h +++ b/veejay-current/veejay-server/libvje/effects/neighbours2.h @@ -20,12 +20,8 @@ #ifndef NEIGHBOURS2_H #define NEIGHBOURS2_H -#include -#include -#include - vj_effect *neighbours2_init(int w, int h); int neighbours2_malloc(int w, int h); void neighbours2_free(void); -void neighbours2_apply( VJFrame *frame, int width, int height, int brush_size, int level,int mode); +void neighbours2_apply( VJFrame *frame, int brush_size, int level,int mode); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index 82db0058..e68abce2 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -465,7 +465,7 @@ extern void boids_apply( VJFrame *frame, int p0,int p1, int p2, int p3, extern void porterduff_apply( VJFrame *frame, VJFrame *frame2, int mode); extern void ghost_apply(VJFrame *frame, int o ); extern void neighbours_apply( VJFrame *frame, int brush_size, int level, int mode); -extern void neighbours2_apply( VJFrame *frame, int width, int height, int brush_size, int level, int mode); +extern void neighbours2_apply( VJFrame *frame, int brush_size, int level, int mode); extern void neighbours3_apply( VJFrame *frame, int width, int height, int brush_size, int level, int mode); extern void neighbours4_apply( VJFrame *frame, int width, int height, int radius, int brush_size, int level, int mode); extern void neighbours5_apply( VJFrame *frame, int width, int height, int radius, int brush_size, int level); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index f3a26a96..e67a7221 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -111,8 +111,7 @@ static void vj_effman_apply_image_effect( frames[0]->height,arg[0],arg[1],arg[2]); break; case VJ_IMAGE_EFFECT_NEIGHBOUR2: - neighbours2_apply(frames[0],frames[0]->width, - frames[0]->height,arg[0],arg[1],arg[2]); + neighbours2_apply(frames[0], arg[0], arg[1], arg[2]); break; case VJ_IMAGE_EFFECT_NEIGHBOUR: neighbours_apply(frames[0], arg[0], arg[1], arg[2]); From d069f4f9c539d398297ce101758742ac236fc39e Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Fri, 29 Jul 2016 18:11:50 +0200 Subject: [PATCH 020/170] Libvje / refactor : neighbours3 * w,h * clean headers --- .../libvje/effects/neighbours3.c | 24 +++++++++---------- .../libvje/effects/neighbours3.h | 6 +---- .../veejay-server/libvje/internal.h | 2 +- .../veejay-server/libvje/vj-effman.c | 3 +-- 4 files changed, 15 insertions(+), 20 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/neighbours3.c b/veejay-current/veejay-server/libvje/effects/neighbours3.c index f3137cc8..ce74509d 100644 --- a/veejay-current/veejay-server/libvje/effects/neighbours3.c +++ b/veejay-current/veejay-server/libvje/effects/neighbours3.c @@ -18,13 +18,9 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include -#include -#include "neighbours3.h" #include "common.h" +#include +#include "neighbours3.h" vj_effect *neighbours3_init(int w, int h) { @@ -227,27 +223,31 @@ static inline uint8_t evaluate_pixel_b( return( (uint8_t) ( y_map[ peak_index] / peak_value )); } -void neighbours3_apply( VJFrame *frame, int width, int height, int brush_size, int intensity_level, int mode ) +void neighbours3_apply( VJFrame *frame, int brush_size, int intensity_level, int mode ) { int x,y; const double intensity = intensity_level / 255.0; uint8_t *Y = tmp_buf[0]; uint8_t *Y2 = tmp_buf[1]; + + const unsigned int width = frame->width; + const unsigned int height = frame->height; + const unsigned int len = frame->len; uint8_t *dstY = frame->data[0]; uint8_t *dstCb = frame->data[1]; uint8_t *dstCr = frame->data[2]; // keep luma - vj_frame_copy1( frame->data[0],Y2, frame->len ); + vj_frame_copy1( frame->data[0],Y2, len ); if(mode) { - int strides[4] = { 0, frame->len, frame->len, 0 }; + int strides[4] = { 0, len, len, 0 }; uint8_t *dest[4] = { NULL, chromacity[0], chromacity[1], NULL }; vj_frame_copy( frame->data, dest, strides ); } // premultiply intensity map - for( y = 0 ; y < frame->len ; y ++ ) + for( y = 0 ; y < len ; y ++ ) Y[y] = (uint8_t) ( (double)Y2[y] * intensity ); if(!mode) @@ -267,8 +267,8 @@ void neighbours3_apply( VJFrame *frame, int width, int height, int brush_size, i ); } } - veejay_memset( frame->data[1], 128, frame->len ); - veejay_memset( frame->data[2], 128, frame->len ); + veejay_memset( frame->data[1], 128, len ); + veejay_memset( frame->data[2], 128, len ); } else { diff --git a/veejay-current/veejay-server/libvje/effects/neighbours3.h b/veejay-current/veejay-server/libvje/effects/neighbours3.h index ae36db72..a885d855 100644 --- a/veejay-current/veejay-server/libvje/effects/neighbours3.h +++ b/veejay-current/veejay-server/libvje/effects/neighbours3.h @@ -20,12 +20,8 @@ #ifndef NEIGHBOURS3_H #define NEIGHBOURS3_H -#include -#include -#include - vj_effect *neighbours3_init(int w, int h); int neighbours3_malloc(int w, int h); void neighbours3_free(void); -void neighbours3_apply( VJFrame *frame, int width, int height, int brush_size, int level,int mode); +void neighbours3_apply( VJFrame *frame, int brush_size, int level,int mode); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index e68abce2..32ef0351 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -466,7 +466,7 @@ extern void porterduff_apply( VJFrame *frame, VJFrame *frame2, int mode); extern void ghost_apply(VJFrame *frame, int o ); extern void neighbours_apply( VJFrame *frame, int brush_size, int level, int mode); extern void neighbours2_apply( VJFrame *frame, int brush_size, int level, int mode); -extern void neighbours3_apply( VJFrame *frame, int width, int height, int brush_size, int level, int mode); +extern void neighbours3_apply( VJFrame *frame, int brush_size, int level, int mode); extern void neighbours4_apply( VJFrame *frame, int width, int height, int radius, int brush_size, int level, int mode); extern void neighbours5_apply( VJFrame *frame, int width, int height, int radius, int brush_size, int level); extern void cutstop_apply( VJFrame *frame, diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index e67a7221..1c85ef88 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -117,8 +117,7 @@ static void vj_effman_apply_image_effect( neighbours_apply(frames[0], arg[0], arg[1], arg[2]); break; case VJ_IMAGE_EFFECT_NEIGHBOUR3: - neighbours3_apply(frames[0],frames[0]->width, - frames[0]->height,arg[0],arg[1],arg[2]); + neighbours3_apply(frames[0], arg[0], arg[1], arg[2]); break; case VJ_IMAGE_EFFECT_RIPPLETV: From a9b57951e66f14a41588b5a2d4284b7e32a51994 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Fri, 29 Jul 2016 18:13:59 +0200 Subject: [PATCH 021/170] Libvje / refactor : neighbours4 * w,h * clean headers --- .../libvje/effects/neighbours4.c | 26 ++++++++++--------- .../libvje/effects/neighbours4.h | 6 +---- .../veejay-server/libvje/internal.h | 2 +- .../veejay-server/libvje/vj-effman.c | 3 +-- 4 files changed, 17 insertions(+), 20 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/neighbours4.c b/veejay-current/veejay-server/libvje/effects/neighbours4.c index c30d5988..29a0b824 100644 --- a/veejay-current/veejay-server/libvje/effects/neighbours4.c +++ b/veejay-current/veejay-server/libvje/effects/neighbours4.c @@ -17,13 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include -#include -#include "neighbours4.h" + #include "common.h" +#include +#include "neighbours4.h" vj_effect *neighbours4_init(int w, int h) { @@ -265,32 +262,37 @@ static inline uint8_t evaluate_pixel_b( return( (uint8_t) ( y_map[ peak_index] / peak_value )); } -void neighbours4_apply( VJFrame *frame, int width, int height, int radius, int brush_size, int intensity_level, int mode ) +void neighbours4_apply( VJFrame *frame, int radius, int brush_size, + int intensity_level, int mode ) { int x,y; const double intensity = intensity_level / 255.0; uint8_t *Y = tmp_buf[0]; uint8_t *Y2 = tmp_buf[1]; + + const unsigned int width = frame->width; + const unsigned int height = frame->height; + const unsigned int len = frame->len; uint8_t *dstY = frame->data[0]; uint8_t *dstCb = frame->data[1]; uint8_t *dstCr = frame->data[2]; double r = (double)radius; // keep luma - vj_frame_copy1( frame->data[0], Y2, frame->len ); + vj_frame_copy1( frame->data[0], Y2, len ); create_circle( r, brush_size,width ); relpoint_t *p_points = &points[0]; if(mode) { - int strides[4] = { 0,frame->len, frame->len }; + int strides[4] = { 0,len, len }; uint8_t *dest[3] = { NULL, chromacity[0], chromacity[1] }; vj_frame_copy( frame->data, dest, strides ); } // premultiply intensity map - for( y = 0 ; y < frame->len ; y ++ ) + for( y = 0 ; y < len ; y ++ ) Y[y] = (uint8_t) ( (double)Y2[y] * intensity ); if(!mode) @@ -311,8 +313,8 @@ void neighbours4_apply( VJFrame *frame, int width, int height, int radius, int b ); } } - veejay_memset( frame->data[1], 128, frame->len ); - veejay_memset( frame->data[2], 128, frame->len ); + veejay_memset( frame->data[1], 128, len ); + veejay_memset( frame->data[2], 128, len ); } else { diff --git a/veejay-current/veejay-server/libvje/effects/neighbours4.h b/veejay-current/veejay-server/libvje/effects/neighbours4.h index 3c28115e..877f28c5 100644 --- a/veejay-current/veejay-server/libvje/effects/neighbours4.h +++ b/veejay-current/veejay-server/libvje/effects/neighbours4.h @@ -20,12 +20,8 @@ #ifndef NEIGHBOURS4_H #define NEIGHBOURS4_H -#include -#include -#include - vj_effect *neighbours4_init(int w, int h); int neighbours4_malloc(int w, int h); void neighbours4_free(void); -void neighbours4_apply( VJFrame *frame, int width, int height, int radius,int brush_size, int level,int mode); +void neighbours4_apply( VJFrame *frame, int radius,int brush_size, int level,int mode); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index 32ef0351..ac86cf3c 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -467,7 +467,7 @@ extern void ghost_apply(VJFrame *frame, int o ); extern void neighbours_apply( VJFrame *frame, int brush_size, int level, int mode); extern void neighbours2_apply( VJFrame *frame, int brush_size, int level, int mode); extern void neighbours3_apply( VJFrame *frame, int brush_size, int level, int mode); -extern void neighbours4_apply( VJFrame *frame, int width, int height, int radius, int brush_size, int level, int mode); +extern void neighbours4_apply( VJFrame *frame, int radius, int brush_size, int level, int mode); extern void neighbours5_apply( VJFrame *frame, int width, int height, int radius, int brush_size, int level); extern void cutstop_apply( VJFrame *frame, int width, int height, int treshold, diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index 1c85ef88..b54faa31 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -103,8 +103,7 @@ static void vj_effman_apply_image_effect( frames[0]->height,arg[0],arg[1],arg[2],arg[3]); break; case VJ_IMAGE_EFFECT_NEIGHBOUR4: - neighbours4_apply(frames[0],frames[0]->width, - frames[0]->height,arg[0],arg[1],arg[2],arg[3]); + neighbours4_apply(frames[0],arg[0],arg[1],arg[2],arg[3]); break; case VJ_IMAGE_EFFECT_NEIGHBOUR5: neighbours5_apply(frames[0],frames[0]->width, From 047b522e3ebad5d940d5889a52a5d66ea5cf69b7 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Fri, 29 Jul 2016 18:15:47 +0200 Subject: [PATCH 022/170] Libvje / refactor : neighbours5 * w,h * clean headers --- .../libvje/effects/neighbours5.c | 25 ++++++++++--------- .../libvje/effects/neighbours5.h | 6 +---- .../veejay-server/libvje/internal.h | 2 +- .../veejay-server/libvje/vj-effman.c | 3 +-- 4 files changed, 16 insertions(+), 20 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/neighbours5.c b/veejay-current/veejay-server/libvje/effects/neighbours5.c index d90b32da..8f6b7f75 100644 --- a/veejay-current/veejay-server/libvje/effects/neighbours5.c +++ b/veejay-current/veejay-server/libvje/effects/neighbours5.c @@ -17,13 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include -#include -#include "neighbours5.h" + #include "common.h" +#include +#include "neighbours5.h" vj_effect *neighbours5_init(int w, int h) { @@ -227,28 +224,32 @@ static inline uint8_t evaluate_pixel_b( return( (uint8_t) ( y_map[ peak_index] / peak_value )); } -void neighbours5_apply( VJFrame *frame, int width, int height, int brush_size, int intensity_level, int mode ) +void neighbours5_apply( VJFrame *frame, int brush_size, int intensity_level, int mode ) { int x,y; const double intensity = intensity_level / 255.0; uint8_t *Y = tmp_buf[0]; uint8_t *Y2 = tmp_buf[1]; + + const unsigned int width = frame->width; + const unsigned int height = frame->height; + const unsigned int len = frame->len; uint8_t *dstY = frame->data[0]; uint8_t *dstCb = frame->data[1]; uint8_t *dstCr = frame->data[2]; // keep luma - vj_frame_copy1( frame->data[0], Y2, frame->len ); + vj_frame_copy1( frame->data[0], Y2, len ); if(mode) { - int strides[4] = { 0,frame->len, frame->len,0 }; + int strides[4] = { 0,len, len,0 }; uint8_t *dest[4] = { NULL, chromacity[0], chromacity[1],NULL }; vj_frame_copy( frame->data, dest, strides ); } // premultiply intensity map - for( y = 0 ; y < frame->len ; y ++ ) + for( y = 0 ; y < len ; y ++ ) Y[y] = (uint8_t) ( (double)Y2[y] * intensity ); if(!mode) @@ -268,8 +269,8 @@ void neighbours5_apply( VJFrame *frame, int width, int height, int brush_size, i ); } } - veejay_memset( frame->data[1], 128, frame->len ); - veejay_memset( frame->data[2], 128, frame->len ); + veejay_memset( frame->data[1], 128, len ); + veejay_memset( frame->data[2], 128, len ); } else { diff --git a/veejay-current/veejay-server/libvje/effects/neighbours5.h b/veejay-current/veejay-server/libvje/effects/neighbours5.h index bf3f92c6..e8aa74b7 100644 --- a/veejay-current/veejay-server/libvje/effects/neighbours5.h +++ b/veejay-current/veejay-server/libvje/effects/neighbours5.h @@ -20,12 +20,8 @@ #ifndef NEIGHBOURS5_H #define NEIGHBOURS5_H -#include -#include -#include - vj_effect *neighbours5_init(int w, int h); int neighbours5_malloc(int w, int h); void neighbours5_free(void); -void neighbours5_apply( VJFrame *frame, int width, int height, int radius,int brush_size, int level); +void neighbours5_apply( VJFrame *frame, int radius,int brush_size, int level); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index ac86cf3c..5b344ded 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -468,7 +468,7 @@ extern void neighbours_apply( VJFrame *frame, int brush_size, int level, int mod extern void neighbours2_apply( VJFrame *frame, int brush_size, int level, int mode); extern void neighbours3_apply( VJFrame *frame, int brush_size, int level, int mode); extern void neighbours4_apply( VJFrame *frame, int radius, int brush_size, int level, int mode); -extern void neighbours5_apply( VJFrame *frame, int width, int height, int radius, int brush_size, int level); +extern void neighbours5_apply( VJFrame *frame, int radius, int brush_size, int level); extern void cutstop_apply( VJFrame *frame, int width, int height, int treshold, int freq, int cutmode, int holdmode); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index b54faa31..d0e7b05a 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -106,8 +106,7 @@ static void vj_effman_apply_image_effect( neighbours4_apply(frames[0],arg[0],arg[1],arg[2],arg[3]); break; case VJ_IMAGE_EFFECT_NEIGHBOUR5: - neighbours5_apply(frames[0],frames[0]->width, - frames[0]->height,arg[0],arg[1],arg[2]); + neighbours5_apply(frames[0],arg[0],arg[1],arg[2]); break; case VJ_IMAGE_EFFECT_NEIGHBOUR2: neighbours2_apply(frames[0], arg[0], arg[1], arg[2]); From 2c33582972d26cb50dcb305e55b1a7662b7b576b Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Fri, 29 Jul 2016 18:18:49 +0200 Subject: [PATCH 023/170] Libvje / refactor : cutstop * w,h * clean headers * add missing licence --- .../veejay-server/libvje/effects/cutstop.c | 13 ++++----- .../veejay-server/libvje/effects/cutstop.h | 28 ++++++++++++++----- .../veejay-server/libvje/internal.h | 4 +-- .../veejay-server/libvje/vj-effman.c | 3 +- 4 files changed, 28 insertions(+), 20 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/cutstop.c b/veejay-current/veejay-server/libvje/effects/cutstop.c index 2c3dab87..4a83267f 100644 --- a/veejay-current/veejay-server/libvje/effects/cutstop.c +++ b/veejay-current/veejay-server/libvje/effects/cutstop.c @@ -20,13 +20,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include -#include -#include + #include "common.h" +#include #include "cutstop.h" static uint8_t *vvcutstop_buffer[4] = { NULL,NULL,NULL,NULL }; @@ -90,10 +86,11 @@ void cutstop_free() { } -void cutstop_apply( VJFrame *frame, int width, int height, int threshold, int freq, int cutmode, int holdmode) { +void cutstop_apply( VJFrame *frame, int threshold, int freq, int cutmode, int holdmode) +{ int i=0; const unsigned int len = frame->len; - + uint8_t *Yb = vvcutstop_buffer[0]; uint8_t *Ub = vvcutstop_buffer[1]; uint8_t *Vb = vvcutstop_buffer[2]; diff --git a/veejay-current/veejay-server/libvje/effects/cutstop.h b/veejay-current/veejay-server/libvje/effects/cutstop.h index 8e9571b7..902bb691 100644 --- a/veejay-current/veejay-server/libvje/effects/cutstop.h +++ b/veejay-current/veejay-server/libvje/effects/cutstop.h @@ -1,13 +1,27 @@ +/* + * Linux VeeJay + * + * Copyright(C)2002 Niels Elburg + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License , or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. + */ + #ifndef CUTSTOP_H #define CUTSTOP_H void cutstop_free() ; - vj_effect *cutstop_init(int width , int height); - int cutstop_malloc(int width, int height); - -void cutstop_apply( VJFrame *frame, - int width, int height, int treshold, - int freq, int cutmode, int holdmode); - +void cutstop_apply( VJFrame *frame, int treshold, int freq, int cutmode, int holdmode); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index 5b344ded..033d8086 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -469,9 +469,7 @@ extern void neighbours2_apply( VJFrame *frame, int brush_size, int level, int mo extern void neighbours3_apply( VJFrame *frame, int brush_size, int level, int mode); extern void neighbours4_apply( VJFrame *frame, int radius, int brush_size, int level, int mode); extern void neighbours5_apply( VJFrame *frame, int radius, int brush_size, int level); -extern void cutstop_apply( VJFrame *frame, - int width, int height, int treshold, - int freq, int cutmode, int holdmode); +extern void cutstop_apply( VJFrame *frame, int treshold, int freq, int cutmode, int holdmode); extern void maskstop_apply( VJFrame *frame, int width, int height, int treshold, int freq, int cutmode, int holdmode); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index d0e7b05a..d25bf366 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -99,8 +99,7 @@ static void vj_effman_apply_image_effect( frames[0]->height,arg[0],arg[1],arg[2],arg[3]); break; case VJ_IMAGE_EFFECT_CUTSTOP: - cutstop_apply(frames[0],frames[0]->width, - frames[0]->height,arg[0],arg[1],arg[2],arg[3]); + cutstop_apply(frames[0],arg[0],arg[1],arg[2],arg[3]); break; case VJ_IMAGE_EFFECT_NEIGHBOUR4: neighbours4_apply(frames[0],arg[0],arg[1],arg[2],arg[3]); From e3a0f54470e47b2c182c25aaae60a7ba7416b950 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Fri, 29 Jul 2016 18:20:31 +0200 Subject: [PATCH 024/170] Libvje / refactor : maskstop * w,h * clean headers --- veejay-current/veejay-server/libvje/effects/maskstop.c | 10 ++++------ veejay-current/veejay-server/libvje/effects/maskstop.h | 2 +- veejay-current/veejay-server/libvje/internal.h | 4 +--- veejay-current/veejay-server/libvje/vj-effman.c | 3 +-- 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/maskstop.c b/veejay-current/veejay-server/libvje/effects/maskstop.c index f6945113..14583583 100644 --- a/veejay-current/veejay-server/libvje/effects/maskstop.c +++ b/veejay-current/veejay-server/libvje/effects/maskstop.c @@ -20,12 +20,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include -#include + #include "common.h" +#include #include "maskstop.h" static uint8_t *vvmaskstop_buffer[6]; @@ -90,7 +87,8 @@ void maskstop_free() { } -void maskstop_apply( VJFrame *frame, int width, int height, int negmask, int swapmask, int framefreq, int maskfreq) { +void maskstop_apply( VJFrame *frame, int negmask, int swapmask, int framefreq, int maskfreq) +{ int i=0; const unsigned int len = frame->len; diff --git a/veejay-current/veejay-server/libvje/effects/maskstop.h b/veejay-current/veejay-server/libvje/effects/maskstop.h index 0e03f62d..4d520823 100644 --- a/veejay-current/veejay-server/libvje/effects/maskstop.h +++ b/veejay-current/veejay-server/libvje/effects/maskstop.h @@ -23,6 +23,6 @@ vj_effect *maskstop_init(int width, int height); int maskstop_malloc(int w, int h); void maskstop_free(); -void maskstop_apply( VJFrame *frame, int width, int height, int negmask, int swapmask, int framefreq, int maskfreq); +void maskstop_apply( VJFrame *frame,int negmask, int swapmask, int framefreq, int maskfreq); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index 033d8086..39e649ef 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -470,9 +470,7 @@ extern void neighbours3_apply( VJFrame *frame, int brush_size, int level, int mo extern void neighbours4_apply( VJFrame *frame, int radius, int brush_size, int level, int mode); extern void neighbours5_apply( VJFrame *frame, int radius, int brush_size, int level); extern void cutstop_apply( VJFrame *frame, int treshold, int freq, int cutmode, int holdmode); -extern void maskstop_apply( VJFrame *frame, - int width, int height, int treshold, - int freq, int cutmode, int holdmode); +extern void maskstop_apply( VJFrame *frame, int treshold, int freq, int cutmode, int holdmode); extern void photoplay_apply(VJFrame *frame, int w, int h, int a, int b, int c); extern void videoplay_apply(VJFrame *frame,VJFrame *B, int w, int h, int a, int b, int c); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index d25bf366..2bdf9ce3 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -95,8 +95,7 @@ static void vj_effman_apply_image_effect( frames[0]->height,arg[0],arg[1],arg[2]); break; case VJ_IMAGE_EFFECT_MASKSTOP: - maskstop_apply(frames[0],frames[0]->width, - frames[0]->height,arg[0],arg[1],arg[2],arg[3]); + maskstop_apply(frames[0],arg[0],arg[1],arg[2],arg[3]); break; case VJ_IMAGE_EFFECT_CUTSTOP: cutstop_apply(frames[0],arg[0],arg[1],arg[2],arg[3]); From 67f6b11b0bfab2f59c8a2fb958ec0bf069a76e3d Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Fri, 29 Jul 2016 18:23:35 +0200 Subject: [PATCH 025/170] Libvje / refactor : photoplay * w,h * clean headers --- .../veejay-server/libvje/effects/photoplay.c | 10 ++++++---- .../veejay-server/libvje/effects/photoplay.h | 6 +----- veejay-current/veejay-server/libvje/internal.h | 2 +- veejay-current/veejay-server/libvje/vj-effman.c | 3 +-- 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/photoplay.c b/veejay-current/veejay-server/libvje/effects/photoplay.c index 0a88fc9c..6b2794a5 100644 --- a/veejay-current/veejay-server/libvje/effects/photoplay.c +++ b/veejay-current/veejay-server/libvje/effects/photoplay.c @@ -17,11 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include + +#include "common.h" #include #include "photoplay.h" -#include "common.h" vj_effect *photoplay_init(int w, int h) { @@ -201,9 +200,12 @@ static void put_photo( uint8_t *dst_plane, uint8_t *photo, int dst_w, int dst_h, } } -void photoplay_apply( VJFrame *frame, int width, int height, int size, int delay, int mode ) +void photoplay_apply( VJFrame *frame, int size, int delay, int mode ) { unsigned int i; + + const unsigned int width = frame->width; + const unsigned int height = frame->height; uint8_t *dstY = frame->data[0]; uint8_t *dstU = frame->data[1]; uint8_t *dstV = frame->data[2]; diff --git a/veejay-current/veejay-server/libvje/effects/photoplay.h b/veejay-current/veejay-server/libvje/effects/photoplay.h index 5084f1a7..293e8825 100644 --- a/veejay-current/veejay-server/libvje/effects/photoplay.h +++ b/veejay-current/veejay-server/libvje/effects/photoplay.h @@ -20,12 +20,8 @@ #ifndef PHOTOPLAY_H #define PHOTOPLAY_H -#include -#include -#include - vj_effect *photoplay_init(int w, int h); int photoplay_malloc(int w, int h); void photoplay_free(void); -void photoplay_apply( VJFrame *frame, int width, int height, int size, int behaviour, int mode); +void photoplay_apply( VJFrame *frame, int size, int behaviour, int mode); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index 39e649ef..f1c547e5 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -471,7 +471,7 @@ extern void neighbours4_apply( VJFrame *frame, int radius, int brush_size, int l extern void neighbours5_apply( VJFrame *frame, int radius, int brush_size, int level); extern void cutstop_apply( VJFrame *frame, int treshold, int freq, int cutmode, int holdmode); extern void maskstop_apply( VJFrame *frame, int treshold, int freq, int cutmode, int holdmode); -extern void photoplay_apply(VJFrame *frame, int w, int h, int a, int b, int c); +extern void photoplay_apply(VJFrame *frame, int a, int b, int c); extern void videoplay_apply(VJFrame *frame,VJFrame *B, int w, int h, int a, int b, int c); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index 2bdf9ce3..7a9ff3a4 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -91,8 +91,7 @@ static void vj_effman_apply_image_effect( frames[0]->height,arg[0],arg[1],arg[2] ); break; case VJ_IMAGE_EFFECT_PHOTOPLAY: - photoplay_apply(frames[0],frames[0]->width, - frames[0]->height,arg[0],arg[1],arg[2]); + photoplay_apply(frames[0],arg[0],arg[1],arg[2]); break; case VJ_IMAGE_EFFECT_MASKSTOP: maskstop_apply(frames[0],arg[0],arg[1],arg[2],arg[3]); From 4597343e6d4471e30204a4bd4736874d1532d537 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Fri, 29 Jul 2016 19:39:24 +0200 Subject: [PATCH 026/170] Libvje / refactor : videoplay * w,h * clean headers --- veejay-current/veejay-server/libvje/effects/videoplay.c | 9 +++++---- veejay-current/veejay-server/libvje/effects/videoplay.h | 6 +----- veejay-current/veejay-server/libvje/internal.h | 3 +-- veejay-current/veejay-server/libvje/vj-effman.c | 3 +-- 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/videoplay.c b/veejay-current/veejay-server/libvje/effects/videoplay.c index e5928afc..1b42fe03 100644 --- a/veejay-current/veejay-server/libvje/effects/videoplay.c +++ b/veejay-current/veejay-server/libvje/effects/videoplay.c @@ -18,11 +18,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include + +#include "common.h" #include #include "videoplay.h" -#include "common.h" vj_effect *videoplay_init(int w, int h) { @@ -202,9 +201,11 @@ static void put_video( uint8_t *dst_plane, uint8_t *video, int dst_w, int dst_h, } } -void videoplay_apply( VJFrame *frame, VJFrame *B, int width, int height, int size, int delay, int mode ) +void videoplay_apply( VJFrame *frame, VJFrame *B, int size, int delay, int mode ) { unsigned int i; + const unsigned int width = frame->width; + const unsigned int height = frame->height; uint8_t *dstY = frame->data[0]; uint8_t *dstU = frame->data[1]; uint8_t *dstV = frame->data[2]; diff --git a/veejay-current/veejay-server/libvje/effects/videoplay.h b/veejay-current/veejay-server/libvje/effects/videoplay.h index 59a80fa1..f182ac90 100644 --- a/veejay-current/veejay-server/libvje/effects/videoplay.h +++ b/veejay-current/veejay-server/libvje/effects/videoplay.h @@ -20,12 +20,8 @@ #ifndef VIDEOPLAY_H #define VIDEOPLAY_H -#include -#include -#include - vj_effect *videoplay_init(int w, int h); int videoplay_malloc(int w, int h); void videoplay_free(void); -void videoplay_apply( VJFrame *frame, VJFrame *b,int width, int height, int size, int behaviour, int mode); +void videoplay_apply( VJFrame *frame, VJFrame *b, int size, int behaviour, int mode); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index f1c547e5..b85d1d8d 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -472,8 +472,7 @@ extern void neighbours5_apply( VJFrame *frame, int radius, int brush_size, int l extern void cutstop_apply( VJFrame *frame, int treshold, int freq, int cutmode, int holdmode); extern void maskstop_apply( VJFrame *frame, int treshold, int freq, int cutmode, int holdmode); extern void photoplay_apply(VJFrame *frame, int a, int b, int c); - -extern void videoplay_apply(VJFrame *frame,VJFrame *B, int w, int h, int a, int b, int c); +extern void videoplay_apply(VJFrame *frame,VJFrame *B, int a, int b, int c); extern void videowall_apply(VJFrame *frame,VJFrame *B, int w, int h, int a, int b, int c, int d); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index 7a9ff3a4..b7ea7359 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -448,8 +448,7 @@ static void vj_effman_apply_video_effect( VJFrame **frames, vjp_kf *todo_info,in frames[0]->height,arg[0],arg[1],arg[2],arg[3]); break; case VJ_VIDEO_EFFECT_VIDEOPLAY: - videoplay_apply(frames[0],frames[1],frames[0]->width, - frames[0]->height,arg[0],arg[1],arg[2]); + videoplay_apply(frames[0],frames[1],arg[0],arg[1],arg[2]); break; case VJ_VIDEO_EFFECT_TRIPPLICITY: tripplicity_apply(frames[0],frames[1], From eff4b582f4585b642c7861f410474cf0351e5418 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Fri, 29 Jul 2016 19:44:14 +0200 Subject: [PATCH 027/170] Libvje / refactor : videowall * w,h * clean headers --- .../veejay-server/libvje/effects/videowall.c | 14 ++++++++------ .../veejay-server/libvje/effects/videowall.h | 7 +------ veejay-current/veejay-server/libvje/internal.h | 3 +-- veejay-current/veejay-server/libvje/vj-effman.c | 3 +-- 4 files changed, 11 insertions(+), 16 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/videowall.c b/veejay-current/veejay-server/libvje/effects/videowall.c index 6052fc7c..fc8d41db 100644 --- a/veejay-current/veejay-server/libvje/effects/videowall.c +++ b/veejay-current/veejay-server/libvje/effects/videowall.c @@ -17,11 +17,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include + +#include "common.h" #include #include "videowall.h" -#include "common.h" + static inline int gcd(int p, int q ) { if(q==0) return p; else return(gcd(q,p%q)); } static inline int n_pics(int w, int h) @@ -214,9 +214,11 @@ static void put_photo( uint8_t *dst_plane, uint8_t *photo, int dst_w, int dst_h, } } -void videowall_apply( VJFrame *frameA, VJFrame *frameB, int width, int height, int a,int b, int c, int d ) +void videowall_apply( VJFrame *frameA, VJFrame *frameB, int a,int b, int c, int d ) { unsigned int i; + const unsigned int width = frameA->width; + const unsigned int height = frameA->height; uint8_t *dstY = frameA->data[0]; uint8_t *dstU = frameA->data[1]; uint8_t *dstV = frameA->data[2]; @@ -225,14 +227,14 @@ void videowall_apply( VJFrame *frameA, VJFrame *frameB, int width, int height, i { offset_table_x[a] = b; offset_table_y[a] = c; - } + } for( i = 0; i < 3; i ++ ) { take_photo( frameA->data[i], photo_list[(frame_counter%num_photos)]->data[i], width, height , frame_counter % num_photos); } frame_counter++; - + for( i = 0; i < 3; i ++ ) { take_photo( frameB->data[i], photo_list[(frame_counter%num_photos)]->data[i], width, height , frame_counter % num_photos); diff --git a/veejay-current/veejay-server/libvje/effects/videowall.h b/veejay-current/veejay-server/libvje/effects/videowall.h index ab9e5ba3..cde4552a 100644 --- a/veejay-current/veejay-server/libvje/effects/videowall.h +++ b/veejay-current/veejay-server/libvje/effects/videowall.h @@ -20,13 +20,8 @@ #ifndef VIDEOWALL_H #define VIDEOWALL_H -#include -#include -#include - vj_effect *videowall_init(int w, int h); int videowall_malloc(int w, int h); void videowall_free(void); -void videowall_apply( VJFrame *frameA, VJFrame *frameB,int width, int height, - int a, int b , int c, int d); +void videowall_apply( VJFrame *frameA, VJFrame *frameB, int a, int b , int c, int d); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index b85d1d8d..04bf1c26 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -473,8 +473,7 @@ extern void cutstop_apply( VJFrame *frame, int treshold, int freq, int cutmode, extern void maskstop_apply( VJFrame *frame, int treshold, int freq, int cutmode, int holdmode); extern void photoplay_apply(VJFrame *frame, int a, int b, int c); extern void videoplay_apply(VJFrame *frame,VJFrame *B, int a, int b, int c); - -extern void videowall_apply(VJFrame *frame,VJFrame *B, int w, int h, int a, int b, int c, int d); +extern void videowall_apply(VJFrame *frame,VJFrame *B, int a, int b, int c, int d); extern void flare_apply(VJFrame *frame, int w, int h, int type, int threshold, int radius ); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index b7ea7359..f06902c9 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -444,8 +444,7 @@ static void vj_effman_apply_video_effect( VJFrame **frames, vjp_kf *todo_info,in threshold_apply( frames[0],frames[1],frames[0]->width,frames[0]->height,arg[0],arg[1]); break; case VJ_VIDEO_EFFECT_VIDEOWALL: - videowall_apply(frames[0],frames[1],frames[0]->width, - frames[0]->height,arg[0],arg[1],arg[2],arg[3]); + videowall_apply(frames[0],frames[1],arg[0],arg[1],arg[2],arg[3]); break; case VJ_VIDEO_EFFECT_VIDEOPLAY: videoplay_apply(frames[0],frames[1],arg[0],arg[1],arg[2]); From afa30eb62448ed7b118161beca7ccd876db9f34f Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Fri, 29 Jul 2016 19:52:33 +0200 Subject: [PATCH 028/170] Libvje / refactor : flare * w,h * rename A, B ---> frame , frame2 * clean headers --- .../veejay-server/libvje/effects/flare.c | 54 +++++++++---------- .../veejay-server/libvje/effects/flare.h | 6 +-- .../veejay-server/libvje/internal.h | 3 +- .../veejay-server/libvje/vj-effman.c | 3 +- 4 files changed, 29 insertions(+), 37 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/flare.c b/veejay-current/veejay-server/libvje/effects/flare.c index 03490a45..5b4b71a9 100644 --- a/veejay-current/veejay-server/libvje/effects/flare.c +++ b/veejay-current/veejay-server/libvje/effects/flare.c @@ -18,14 +18,9 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ - -#include -#include -#include -#include -#include -#include "flare.h" #include "common.h" +#include +#include "flare.h" /* blend by blurred mask. derived from radial blur and chromamagick effect. @@ -264,20 +259,23 @@ static void flare_lighten(VJFrame *frame, VJFrame *frame2, int w, int h, int op_ } } -void flare_apply(VJFrame *A, - int width, int height, int type, int op_a, int radius) +void flare_apply(VJFrame *frame, int type, int op_a, int radius) { - int y,x; + int y,x; int plane = 0; - /* clone A */ - VJFrame B; - veejay_memcpy( &B, A, sizeof(VJFrame)); + const unsigned int width = frame->width; + const unsigned int height = frame->height; + const unsigned int len = frame->len; + + /* clone frame */ + VJFrame frame2; + veejay_memcpy( &frame2, frame, sizeof(VJFrame)); /* data is local */ - B.data[0] = flare_buf[0]; - B.data[1] = flare_buf[1]; - B.data[2] = flare_buf[2]; - int strides[4] = { A->len, A->len, A->len, 0 }; - vj_frame_copy( A->data, B.data,strides ); + frame2.data[0] = flare_buf[0]; + frame2.data[1] = flare_buf[1]; + frame2.data[2] = flare_buf[2]; + int strides[4] = { len, len, len, 0 }; + vj_frame_copy( frame->data, frame2.data,strides ); /* apply blur on Image, horizontal and vertical (blur2 is from xine, see radial blur */ @@ -285,8 +283,8 @@ void flare_apply(VJFrame *A, for( plane = 0; plane < 2; plane ++ ) { for( y = 0; y < height; y ++ ) - blur2( A->data[plane] + (y * width), - B.data[plane] + (y * width), + blur2( frame->data[plane] + (y * width), + frame2.data[plane] + (y * width), width, radius, 2, @@ -297,8 +295,8 @@ void flare_apply(VJFrame *A, for( plane = 0; plane <2; plane ++ ) { for( x = 0; x < width; x ++ ) - blur2( A->data[plane] + x , - B.data[plane] + x, + blur2( frame->data[plane] + x , + frame2.data[plane] + x, height, radius, 2, @@ -310,23 +308,23 @@ void flare_apply(VJFrame *A, switch( type ) { case 1: - flare_exclusive(A,&B,width,height,op_a); + flare_exclusive(frame,&frame2,width,height,op_a); break; case 2: - flare_additive(A,&B,width,height,op_a); + flare_additive(frame,&frame2,width,height,op_a); break; case 3: - flare_unfreeze(A,&B,width,height,op_a); + flare_unfreeze(frame,&frame2,width,height,op_a); break; case 4: - flare_darken(A,&B,width,height,op_a); + flare_darken(frame,&frame2,width,height,op_a); break; case 5: - flare_lighten( A, &B, width, height, op_a ); + flare_lighten( frame, &frame2, width, height, op_a ); break; default: - flare_simple( A, &B, width,height, op_a ); + flare_simple( frame, &frame2, width,height, op_a ); break; } diff --git a/veejay-current/veejay-server/libvje/effects/flare.h b/veejay-current/veejay-server/libvje/effects/flare.h index 6b2b33cb..574f9e61 100644 --- a/veejay-current/veejay-server/libvje/effects/flare.h +++ b/veejay-current/veejay-server/libvje/effects/flare.h @@ -20,12 +20,8 @@ #ifndef FLARE_H #define FLARE_H -#include -#include -#include - vj_effect *flare_init(int w, int h); int flare_malloc(int w, int h); -void flare_apply(VJFrame *A, int width, int height, int type, int theshold,int radius ); +void flare_apply(VJFrame *frame, int type, int theshold,int radius ); void flare_free(); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index 04bf1c26..ab33d4b9 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -474,8 +474,7 @@ extern void maskstop_apply( VJFrame *frame, int treshold, int freq, int cutmode, extern void photoplay_apply(VJFrame *frame, int a, int b, int c); extern void videoplay_apply(VJFrame *frame,VJFrame *B, int a, int b, int c); extern void videowall_apply(VJFrame *frame,VJFrame *B, int a, int b, int c, int d); - -extern void flare_apply(VJFrame *frame, int w, int h, int type, int threshold, int radius ); +extern void flare_apply(VJFrame *frame, int type, int threshold, int radius ); extern void constantblend_apply(VJFrame *frame , int w, int h, int type, int scale, int y ); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index f06902c9..66a9cb1c 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -87,8 +87,7 @@ static void vj_effman_apply_image_effect( frames[0]->height, arg[0], arg[1], arg[2]); break; case VJ_IMAGE_EFFECT_FLARE: - flare_apply( frames[0], frames[0]->width, - frames[0]->height,arg[0],arg[1],arg[2] ); + flare_apply( frames[0],arg[0],arg[1],arg[2] ); break; case VJ_IMAGE_EFFECT_PHOTOPLAY: photoplay_apply(frames[0],arg[0],arg[1],arg[2]); From 33bd500db9d8a5857f7619dab7c47eaad052b0ec Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Fri, 29 Jul 2016 19:55:07 +0200 Subject: [PATCH 029/170] Libvje / refactor : constantblend * w,h * clean headers --- .../veejay-server/libvje/effects/constantblend.c | 11 ++++------- .../veejay-server/libvje/effects/constantblend.h | 7 +------ veejay-current/veejay-server/libvje/internal.h | 3 +-- veejay-current/veejay-server/libvje/vj-effman.c | 3 +-- 4 files changed, 7 insertions(+), 17 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/constantblend.c b/veejay-current/veejay-server/libvje/effects/constantblend.c index 87726583..e8759181 100644 --- a/veejay-current/veejay-server/libvje/effects/constantblend.c +++ b/veejay-current/veejay-server/libvje/effects/constantblend.c @@ -25,12 +25,10 @@ */ -#include -#include -#include +#include "common.h" #include #include "constantblend.h" -#include "common.h" + vj_effect *constantblend_init(int w, int h) { vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); @@ -68,11 +66,10 @@ vj_effect *constantblend_init(int w, int h) return ve; } -void constantblend_apply( VJFrame *frame, int width, int height, - int type, int scale, int valY ) +void constantblend_apply( VJFrame *frame, int type, int scale, int valY ) { unsigned int i; - const int len = (width * height); + const unsigned int len = frame->len; const uint8_t y = (uint8_t) valY; const float s = ((float) scale / 100.0 ); diff --git a/veejay-current/veejay-server/libvje/effects/constantblend.h b/veejay-current/veejay-server/libvje/effects/constantblend.h index 2a2b675f..39a48b92 100644 --- a/veejay-current/veejay-server/libvje/effects/constantblend.h +++ b/veejay-current/veejay-server/libvje/effects/constantblend.h @@ -20,11 +20,6 @@ #ifndef constantblend_H #define constantblend_H -#include -#include -#include - vj_effect *constantblend_init(int w, int h); -void constantblend_apply( VJFrame *frame, int width, int height, int a, - int b, int c ); +void constantblend_apply( VJFrame *frame, int a, int b, int c); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index ab33d4b9..de18cb96 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -475,8 +475,7 @@ extern void photoplay_apply(VJFrame *frame, int a, int b, int c); extern void videoplay_apply(VJFrame *frame,VJFrame *B, int a, int b, int c); extern void videowall_apply(VJFrame *frame,VJFrame *B, int a, int b, int c, int d); extern void flare_apply(VJFrame *frame, int type, int threshold, int radius ); - -extern void constantblend_apply(VJFrame *frame , int w, int h, int type, int scale, int y ); +extern void constantblend_apply(VJFrame *frame, int type, int scale, int y ); extern void picinpic_apply( void *user_data, VJFrame *frame, VJFrame *frame2, int twidth, int theight, int x1, int y1, diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index 66a9cb1c..b8260123 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -83,8 +83,7 @@ static void vj_effman_apply_image_effect( switch (e) { case VJ_IMAGE_EFFECT_CONSTANTBLEND: - constantblend_apply( frames[0], frames[0]->width, - frames[0]->height, arg[0], arg[1], arg[2]); + constantblend_apply( frames[0], arg[0], arg[1], arg[2]); break; case VJ_IMAGE_EFFECT_FLARE: flare_apply( frames[0],arg[0],arg[1],arg[2] ); From cf2ce4739f2664f67d12bd4ce159f1bf702eeb09 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Fri, 29 Jul 2016 20:01:07 +0200 Subject: [PATCH 030/170] Libvje / refactor : picnic * w,h * clean headers --- .../veejay-server/libvje/effects/picinpic.c | 15 +++++++-------- .../veejay-server/libvje/effects/picinpic.h | 19 +++++-------------- .../veejay-server/libvje/internal.h | 4 +--- .../veejay-server/libvje/vj-effman.c | 4 ++-- 4 files changed, 15 insertions(+), 27 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/picinpic.c b/veejay-current/veejay-server/libvje/effects/picinpic.c index 11868dee..4ed687b1 100644 --- a/veejay-current/veejay-server/libvje/effects/picinpic.c +++ b/veejay-current/veejay-server/libvje/effects/picinpic.c @@ -22,15 +22,12 @@ This effect uses libpostproc , it should be enabled at compile time (--with-swscaler) if you want to use this Effect. */ -#include -#include -#include +#include "common.h" #include -#include "picinpic.h" #include #include -#include -#include "common.h" +#include "picinpic.h" + extern void vj_get_yuv444_template(VJFrame *src, int w, int h); typedef struct { @@ -99,10 +96,12 @@ static int nearest_div(int val ) return val; } -void picinpic_apply( void *user_data, VJFrame *frame, VJFrame *frame2, int width, int height, - int twidth, int theight, int x1, int y1 ) +void picinpic_apply( void *user_data, VJFrame *frame, VJFrame *frame2, + int twidth, int theight, int x1, int y1 ) { int x, y; + const unsigned int width = frame->width; + const unsigned int height = frame->height; pic_t *picture = (pic_t*) user_data; int view_width = nearest_div(twidth); int view_height = nearest_div(theight); diff --git a/veejay-current/veejay-server/libvje/effects/picinpic.h b/veejay-current/veejay-server/libvje/effects/picinpic.h index 3c8bc3af..d2f960a7 100644 --- a/veejay-current/veejay-server/libvje/effects/picinpic.h +++ b/veejay-current/veejay-server/libvje/effects/picinpic.h @@ -20,18 +20,9 @@ #ifndef PICINPIC_H #define PICINPIC_H - -#include -#include -#include -vj_effect *picinpic_init( int w, int h ); - -void picinpic_free(void *d); - -int picinpic_malloc( void **c, int w , int h ); - - -void picinpic_apply( void *user_data, VJFrame *frame, VJFrame *frame2, - int w, int h, int twidth, int theight, int x1, int y1 ); - +vj_effect *picinpic_init( int w, int h ); +void picinpic_free(void *d); +int picinpic_malloc( void **c, int w , int h ); +void picinpic_apply( void *user_data, VJFrame *frame, VJFrame *frame2, + int twidth, int theight, int x1, int y1 ); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index de18cb96..06c94e30 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -476,10 +476,8 @@ extern void videoplay_apply(VJFrame *frame,VJFrame *B, int a, int b, int c); extern void videowall_apply(VJFrame *frame,VJFrame *B, int a, int b, int c, int d); extern void flare_apply(VJFrame *frame, int type, int threshold, int radius ); extern void constantblend_apply(VJFrame *frame, int type, int scale, int y ); - extern void picinpic_apply( void *user_data, VJFrame *frame, VJFrame *frame2, - int twidth, int theight, int x1, int y1, - int width, int height); + int x1, int y1, int width, int height); extern void threshold_apply( VJFrame *frame, VJFrame *frame2,int width, int height, int threshold, int reverse ); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index b8260123..a960a089 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -603,8 +603,8 @@ static void vj_effman_apply_video_effect( VJFrame **frames, vjp_kf *todo_info,in arg[4], arg[5], arg[6]); break; case VJ_VIDEO_EFFECT_PICINPIC: - picinpic_apply( vj_effects[entry]->user_data,frames[0], frames[1], frames[0]->width, frames[0]->height, - arg[0], arg[1], arg[2], arg[3] ); + picinpic_apply( vj_effects[entry]->user_data,frames[0], frames[1], + arg[0], arg[1], arg[2], arg[3] ); break; case VJ_VIDEO_EFFECT_RIPPLETV: water_apply( vj_effects[entry]->user_data,frames[0],frames[1],arg[0],arg[1],arg[2],arg[3],arg[4] ); From fbfef64b3552897321e6149a4d42f637d87acaf2 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Fri, 29 Jul 2016 20:03:41 +0200 Subject: [PATCH 031/170] Libvje / refactor : threshold * w,h * clean headers --- .../veejay-server/libvje/effects/threshold.c | 18 ++++++++---------- .../veejay-server/libvje/effects/threshold.h | 6 +++--- veejay-current/veejay-server/libvje/internal.h | 3 +-- .../veejay-server/libvje/vj-effman.c | 2 +- 4 files changed, 13 insertions(+), 16 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/threshold.c b/veejay-current/veejay-server/libvje/effects/threshold.c index 4fdc5cd4..f13ad9aa 100644 --- a/veejay-current/veejay-server/libvje/effects/threshold.c +++ b/veejay-current/veejay-server/libvje/effects/threshold.c @@ -17,14 +17,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include -#include -#include "threshold.h" + #include "common.h" +#include #include "softblur.h" +#include "threshold.h" typedef int (*morph_func)(uint8_t *kernel, uint8_t mt[9] ); @@ -75,17 +72,18 @@ void threshold_free(void) #define MAX(a,b) ( (a)>(b) ? (a) : (b) ) #endif -void threshold_apply( VJFrame *frame, VJFrame *frame2,int width, int height, int threshold, int reverse ) +void threshold_apply( VJFrame *frame, VJFrame *frame2, int threshold, int reverse ) { unsigned int y,x; - uint8_t *Y = frame->data[0]; + const unsigned int width = frame->width; + const unsigned int height = frame->height; + const unsigned int len = frame->len; + 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]; - - int len = frame->len; softblur_apply( frame, 0); binarify_1src( binary_img,Y,threshold,0, width,height); diff --git a/veejay-current/veejay-server/libvje/effects/threshold.h b/veejay-current/veejay-server/libvje/effects/threshold.h index 3a5e4df5..2268f7c8 100644 --- a/veejay-current/veejay-server/libvje/effects/threshold.h +++ b/veejay-current/veejay-server/libvje/effects/threshold.h @@ -21,7 +21,7 @@ #ifndef THRESHOLD_H #define THRESHOLD_H vj_effect *threshold_init(int w, int h); -void threshold_apply( VJFrame *frame,VJFrame *frame2, int width, int height, int t, int n); -int threshold_malloc(int w, int h); -void threshold_free(void); +void threshold_apply( VJFrame *frame,VJFrame *frame2, int t, int n); +int threshold_malloc(int w, int h); +void threshold_free(void); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index 06c94e30..b3e3c1b2 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -478,8 +478,7 @@ extern void flare_apply(VJFrame *frame, int type, int threshold, int radius ); extern void constantblend_apply(VJFrame *frame, int type, int scale, int y ); extern void picinpic_apply( void *user_data, VJFrame *frame, VJFrame *frame2, int x1, int y1, int width, int height); - -extern void threshold_apply( VJFrame *frame, VJFrame *frame2,int width, int height, int threshold, int reverse ); +extern void threshold_apply( VJFrame *frame, VJFrame *frame2, int threshold, int reverse ); extern void motionmap_apply( VJFrame *frame, int threshold, int reverse, int draw, int his, int op, int ip, int la, int ad ); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index a960a089..48f48367 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -439,7 +439,7 @@ static void vj_effman_apply_video_effect( VJFrame **frames, vjp_kf *todo_info,in differencemap_apply( frames[0],frames[1],frames[0]->width,frames[0]->height,arg[0],arg[1],arg[2]); break; case VJ_VIDEO_EFFECT_EXTTHRESHOLD: - threshold_apply( frames[0],frames[1],frames[0]->width,frames[0]->height,arg[0],arg[1]); + threshold_apply( frames[0],frames[1],arg[0],arg[1]); break; case VJ_VIDEO_EFFECT_VIDEOWALL: videowall_apply(frames[0],frames[1],arg[0],arg[1],arg[2],arg[3]); From 62375bea6e415bfa25d0cffdff5405eb6551ef0d Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Fri, 29 Jul 2016 20:07:14 +0200 Subject: [PATCH 032/170] Libvje / refactor : motionmap * clean headers --- .../veejay-server/libvje/effects/motionmap.c | 14 +++++--------- .../veejay-server/libvje/effects/motionmap.h | 1 - veejay-current/veejay-server/libvje/internal.h | 2 -- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/motionmap.c b/veejay-current/veejay-server/libvje/effects/motionmap.c index 117199eb..073c4bd5 100644 --- a/veejay-current/veejay-server/libvje/effects/motionmap.c +++ b/veejay-current/veejay-server/libvje/effects/motionmap.c @@ -18,18 +18,14 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include +#include "common.h" #include -#include #include #include -#include "motionmap.h" -#include "common.h" +#include #include "softblur.h" #include "opacity.h" -#include +#include "motionmap.h" #define HIS_DEFAULT 6 #define HIS_LEN (8*25) @@ -372,8 +368,8 @@ static int last_act_decay = -1; void motionmap_apply( VJFrame *frame, int threshold, int limit1, int draw, int history, int decay, int interpol, int last_act_level, int act_decay ) { unsigned int i; - const int width = frame->width; - const int height = frame->height; + const unsigned int width = frame->width; + const unsigned int height = frame->height; const unsigned int len = frame->len; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; diff --git a/veejay-current/veejay-server/libvje/effects/motionmap.h b/veejay-current/veejay-server/libvje/effects/motionmap.h index 3bc28508..edc9d93d 100644 --- a/veejay-current/veejay-server/libvje/effects/motionmap.h +++ b/veejay-current/veejay-server/libvje/effects/motionmap.h @@ -20,7 +20,6 @@ #ifndef MOTIONMAP_H #define MOTIONMAP_H - vj_effect *motionmap_init(int w, int h); void motionmap_apply( VJFrame *frame, int t, int n, int draw, int histo, int op, int ip, int la, int ad); int motionmap_malloc(int w,int h); diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index b3e3c1b2..2c06284a 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -479,9 +479,7 @@ extern void constantblend_apply(VJFrame *frame, int type, int scale, int y ); extern void picinpic_apply( void *user_data, VJFrame *frame, VJFrame *frame2, int x1, int y1, int width, int height); extern void threshold_apply( VJFrame *frame, VJFrame *frame2, int threshold, int reverse ); - extern void motionmap_apply( VJFrame *frame, int threshold, int reverse, int draw, int his, int op, int ip, int la, int ad ); - extern void rgbchannel_apply( VJFrame *frame, int width, int height, int chr, int chg , int chb); extern void differencemap_apply( VJFrame *f, VJFrame *f2, int w, int h, int t1, int rev, int show ); From 0da438d902bc7db63deaeaf4262b010fe7bb5068 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Fri, 29 Jul 2016 20:09:18 +0200 Subject: [PATCH 033/170] Libvje / refactor : rgbchannel * w,h * clean headers --- .../veejay-server/libvje/effects/rgbchannel.c | 11 +++++------ .../veejay-server/libvje/effects/rgbchannel.h | 6 +----- veejay-current/veejay-server/libvje/internal.h | 2 +- veejay-current/veejay-server/libvje/vj-effman.c | 2 +- 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/rgbchannel.c b/veejay-current/veejay-server/libvje/effects/rgbchannel.c index 9917c40e..ed1ff39a 100644 --- a/veejay-current/veejay-server/libvje/effects/rgbchannel.c +++ b/veejay-current/veejay-server/libvje/effects/rgbchannel.c @@ -17,12 +17,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include + +#include "common.h" #include -#include #include #include #include "rgbchannel.h" @@ -55,8 +52,10 @@ vj_effect *rgbchannel_init(int w, int h) return ve; } -void rgbchannel_apply( VJFrame *frame, int width, int height, int chr, int chg , int chb) +void rgbchannel_apply( VJFrame *frame, int chr, int chg , int chb) { + const unsigned int width = frame->width; + const unsigned int height = frame->height; int row_stride = width * 4; int x,y; uint8_t *rgba = frame->data[0]; diff --git a/veejay-current/veejay-server/libvje/effects/rgbchannel.h b/veejay-current/veejay-server/libvje/effects/rgbchannel.h index 1a82ea92..04b10293 100644 --- a/veejay-current/veejay-server/libvje/effects/rgbchannel.h +++ b/veejay-current/veejay-server/libvje/effects/rgbchannel.h @@ -20,10 +20,6 @@ #ifndef RGBCHANNEL_H #define RGBCHANNEL_H -#include -#include -#include - vj_effect *rgbchannel_init(int w, int h); -void rgbchannel_apply( VJFrame *frame, int width, int height, int r, int g, int b); +void rgbchannel_apply( VJFrame *frame, int r, int g, int b); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index 2c06284a..c678897c 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -480,7 +480,7 @@ extern void picinpic_apply( void *user_data, VJFrame *frame, VJFrame *frame2, int x1, int y1, int width, int height); extern void threshold_apply( VJFrame *frame, VJFrame *frame2, int threshold, int reverse ); extern void motionmap_apply( VJFrame *frame, int threshold, int reverse, int draw, int his, int op, int ip, int la, int ad ); -extern void rgbchannel_apply( VJFrame *frame, int width, int height, int chr, int chg , int chb); +extern void rgbchannel_apply( VJFrame *frame, int chr, int chg , int chb); extern void differencemap_apply( VJFrame *f, VJFrame *f2, int w, int h, int t1, int rev, int show ); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index 48f48367..ea98068c 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -349,7 +349,7 @@ static void vj_effman_apply_image_effect( bathroom_apply(frames[0], arg[0], arg[1], arg[2], arg[3]); break; case VJ_IMAGE_EFFECT_RGBCHANNEL: - rgbchannel_apply(frames[0],frames[0]->width,frames[0]->height,arg[0],arg[1],arg[2]); + rgbchannel_apply(frames[0],arg[0],arg[1],arg[2]); break; case VJ_IMAGE_EFFECT_ZOOM: zoom_apply(frames[0], arg[0], arg[1], arg[2], arg[3], arg[4]); From 6471b8e47a2b87df4c58197ee5e2e8e7176bab23 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 09:32:01 +0200 Subject: [PATCH 034/170] Libvje / refactor : diffmap * w, h * clean headers --- .../veejay-server/libvje/effects/diffmap.c | 16 +++++++--------- .../veejay-server/libvje/effects/diffmap.h | 2 +- veejay-current/veejay-server/libvje/internal.h | 3 +-- veejay-current/veejay-server/libvje/vj-effman.c | 2 +- 4 files changed, 10 insertions(+), 13 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/diffmap.c b/veejay-current/veejay-server/libvje/effects/diffmap.c index 2833e514..5ed89534 100644 --- a/veejay-current/veejay-server/libvje/effects/diffmap.c +++ b/veejay-current/veejay-server/libvje/effects/diffmap.c @@ -17,14 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include -#include -#include "diffmap.h" #include "common.h" +#include #include "softblur.h" +#include "diffmap.h" typedef int (*morph_func)(uint8_t *kernel, uint8_t mt[9] ); @@ -78,12 +74,14 @@ void differencemap_free(void) #define MAX(a,b) ( (a)>(b) ? (a) : (b) ) #endif -void differencemap_apply( VJFrame *frame, VJFrame *frame2,int width, int height, int threshold, int reverse, +void differencemap_apply( VJFrame *frame, VJFrame *frame2, int threshold, int reverse, int show ) { unsigned int x,y; - int len = (width * height); - uint8_t *Y = frame->data[0]; + const unsigned int width = frame->width; + const unsigned int height = frame->height; + unsigned int len = frame->len; + uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; uint8_t *Y2 = frame2->data[0]; diff --git a/veejay-current/veejay-server/libvje/effects/diffmap.h b/veejay-current/veejay-server/libvje/effects/diffmap.h index cab29704..286a6583 100644 --- a/veejay-current/veejay-server/libvje/effects/diffmap.h +++ b/veejay-current/veejay-server/libvje/effects/diffmap.h @@ -21,7 +21,7 @@ #ifndef DIFFERENCEMAP_H #define DIFFERENCEMAP_H vj_effect *differencemap_init(int w, int h); -void differencemap_apply( VJFrame *frame,VJFrame *frame2, int width, int height, int t, int n, int show); +void differencemap_apply( VJFrame *frame,VJFrame *frame2, int t, int n, int show); int differencemap_malloc(int w, int h); void differencemap_free(void); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index c678897c..4770e433 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -481,8 +481,7 @@ extern void picinpic_apply( void *user_data, VJFrame *frame, VJFrame *frame2, extern void threshold_apply( VJFrame *frame, VJFrame *frame2, int threshold, int reverse ); extern void motionmap_apply( VJFrame *frame, int threshold, int reverse, int draw, int his, int op, int ip, int la, int ad ); extern void rgbchannel_apply( VJFrame *frame, int chr, int chg , int chb); - -extern void differencemap_apply( VJFrame *f, VJFrame *f2, int w, int h, int t1, int rev, int show ); +extern void differencemap_apply( VJFrame *f, VJFrame *f2, int t1, int rev, int show ); extern void autoeq_apply( VJFrame *frame, int width, int height, int val, int i, int s); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index ea98068c..54b63fb7 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -436,7 +436,7 @@ static void vj_effman_apply_video_effect( VJFrame **frames, vjp_kf *todo_info,in chameleonblend_apply(frames[0],frames[1], frames[0]->width,frames[0]->height,arg[0]); break; case VJ_VIDEO_EFFECT_EXTDIFF: - differencemap_apply( frames[0],frames[1],frames[0]->width,frames[0]->height,arg[0],arg[1],arg[2]); + differencemap_apply( frames[0],frames[1],arg[0],arg[1],arg[2]); break; case VJ_VIDEO_EFFECT_EXTTHRESHOLD: threshold_apply( frames[0],frames[1],arg[0],arg[1]); From c9ac0ad093ddc8e483a27d423a2902fec650eb7d Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 09:34:14 +0200 Subject: [PATCH 035/170] Libvje / refactor : autoeq * w, h * clean headers --- veejay-current/veejay-server/libvje/effects/autoeq.c | 10 ++++------ veejay-current/veejay-server/libvje/effects/autoeq.h | 6 +----- veejay-current/veejay-server/libvje/internal.h | 3 +-- veejay-current/veejay-server/libvje/vj-effman.c | 2 +- 4 files changed, 7 insertions(+), 14 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/autoeq.c b/veejay-current/veejay-server/libvje/effects/autoeq.c index f46f0279..c510a461 100644 --- a/veejay-current/veejay-server/libvje/effects/autoeq.c +++ b/veejay-current/veejay-server/libvje/effects/autoeq.c @@ -17,13 +17,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include + +#include "common.h" #include #include "autoeq.h" -#include -#include "common.h" + vj_effect *autoeq_init(int w, int h) { vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); @@ -73,7 +71,7 @@ void autoeq_free() } -void autoeq_apply( VJFrame *frame, int width, int height, int val, int intensity, int strength) +void autoeq_apply( VJFrame *frame, int val, int intensity, int strength) { if( val == 0 ) { diff --git a/veejay-current/veejay-server/libvje/effects/autoeq.h b/veejay-current/veejay-server/libvje/effects/autoeq.h index 9a5f175e..ba872f91 100644 --- a/veejay-current/veejay-server/libvje/effects/autoeq.h +++ b/veejay-current/veejay-server/libvje/effects/autoeq.h @@ -20,12 +20,8 @@ #ifndef AUTOEQ_H #define AUTOEQ_H -#include -#include -#include - vj_effect *autoeq_init(int w, int h); int autoeq_malloc(int w , int h ); void autoeq_free( ); -void autoeq_apply( VJFrame *frame, int width, int height, int val, int intensity, int strength); +void autoeq_apply( VJFrame *frame, int val, int intensity, int strength); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index 4770e433..ccbad833 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -482,8 +482,7 @@ extern void threshold_apply( VJFrame *frame, VJFrame *frame2, int threshold, int extern void motionmap_apply( VJFrame *frame, int threshold, int reverse, int draw, int his, int op, int ip, int la, int ad ); extern void rgbchannel_apply( VJFrame *frame, int chr, int chg , int chb); extern void differencemap_apply( VJFrame *f, VJFrame *f2, int t1, int rev, int show ); - -extern void autoeq_apply( VJFrame *frame, int width, int height, int val, int i, int s); +extern void autoeq_apply( VJFrame *frame, int val, int i, int s); extern void colorhis_apply( VJFrame *frame, int w, int h, int v, int m, int i, int s ); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index 54b63fb7..3e446bfc 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -242,7 +242,7 @@ static void vj_effman_apply_image_effect( colorhis_apply( frames[0], frames[0]->width,frames[0]->height,arg[0],arg[1],arg[2],arg[3] ); break; case VJ_IMAGE_EFFECT_AUTOEQ: - autoeq_apply(frames[0],frames[0]->width,frames[0]->height,arg[0],arg[1],arg[2]); + autoeq_apply(frames[0],arg[0],arg[1],arg[2]); break; case VJ_IMAGE_EFFECT_BALTANTV: baltantv_apply(frames[0],frames[0]->width,frames[0]->height,arg[0],arg[1]); From 0f2700abf1192ae5addfba728fecde81daa780d3 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 09:37:50 +0200 Subject: [PATCH 036/170] Libvje / refactor : colorhis * w,h * clean headers --- .../veejay-server/libvje/effects/colorhis.c | 20 +++++++++---------- .../veejay-server/libvje/effects/colorhis.h | 6 +----- .../veejay-server/libvje/internal.h | 3 +-- .../veejay-server/libvje/vj-effman.c | 2 +- 4 files changed, 12 insertions(+), 19 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/colorhis.c b/veejay-current/veejay-server/libvje/effects/colorhis.c index 75973dae..f8f30646 100644 --- a/veejay-current/veejay-server/libvje/effects/colorhis.c +++ b/veejay-current/veejay-server/libvje/effects/colorhis.c @@ -17,16 +17,14 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include + +#include "common.h" #include -#include "colorhis.h" #include #include #include -#include -#include "common.h" +#include "colorhis.h" + vj_effect *colorhis_init(int w, int h) { vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); @@ -107,10 +105,10 @@ void colorhis_free() } -void colorhis_apply( VJFrame *frame, int width, int height,int mode, int val, int intensity, int strength) +void colorhis_apply( VJFrame *frame,int mode, int val, int intensity, int strength) { - int src_fmt = (frame->uv_height == height ? PIX_FMT_YUV422P : PIX_FMT_YUV420P); - + int src_fmt = (frame->uv_height == frame->height ? PIX_FMT_YUV422P : PIX_FMT_YUV420P); + if(!convert_yuv) convert_yuv = yuv_fx_context_create( frame, rgb_frame_, src_fmt, PIX_FMT_RGB24 ); @@ -124,10 +122,10 @@ void colorhis_apply( VJFrame *frame, int width, int height,int mode, int val, in { veejay_histogram_analyze_rgb( histogram_,rgb_, frame ); veejay_histogram_equalize_rgb( histogram_, frame, rgb_, intensity, strength, mode ); - + if(!convert_rgb ) convert_rgb = yuv_fx_context_create( rgb_frame_, frame, PIX_FMT_RGB24, src_fmt ); yuv_fx_context_process( convert_rgb, rgb_frame_, frame ); - } + } } diff --git a/veejay-current/veejay-server/libvje/effects/colorhis.h b/veejay-current/veejay-server/libvje/effects/colorhis.h index 343abee6..cf969e21 100644 --- a/veejay-current/veejay-server/libvje/effects/colorhis.h +++ b/veejay-current/veejay-server/libvje/effects/colorhis.h @@ -20,12 +20,8 @@ #ifndef COLORHIS_H #define COLORHIS_H -#include -#include -#include - vj_effect *colorhis_init(int w, int h); int colorhis_malloc(int w , int h ); void colorhis_free( ); -void colorhis_apply( VJFrame *frame, int width, int height, int mode,int val, int intensity, int strength); +void colorhis_apply( VJFrame *frame, int mode,int val, int intensity, int strength); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index ccbad833..96c1a4d2 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -483,8 +483,7 @@ extern void motionmap_apply( VJFrame *frame, int threshold, int reverse, int dra extern void rgbchannel_apply( VJFrame *frame, int chr, int chg , int chb); extern void differencemap_apply( VJFrame *f, VJFrame *f2, int t1, int rev, int show ); extern void autoeq_apply( VJFrame *frame, int val, int i, int s); - -extern void colorhis_apply( VJFrame *frame, int w, int h, int v, int m, int i, int s ); +extern void colorhis_apply( VJFrame *frame, int v, int m, int i, int s ); extern void diff_destroy(); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index 3e446bfc..c3c963de 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -239,7 +239,7 @@ static void vj_effman_apply_image_effect( overclock_apply(frames[0],arg[0],arg[1]); break; case VJ_IMAGE_EFFECT_COLORHIS: - colorhis_apply( frames[0], frames[0]->width,frames[0]->height,arg[0],arg[1],arg[2],arg[3] ); + colorhis_apply( frames[0],arg[0],arg[1],arg[2],arg[3] ); break; case VJ_IMAGE_EFFECT_AUTOEQ: autoeq_apply(frames[0],arg[0],arg[1],arg[2]); From 99341de56c98d1d6180b613a49d5e9b05a68654e Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 09:41:06 +0200 Subject: [PATCH 037/170] Libvje / refactor : timedistort * w, h * clean headers --- .../veejay-server/libvje/effects/timedistort.c | 15 +++++++-------- .../veejay-server/libvje/effects/timedistort.h | 2 +- veejay-current/veejay-server/libvje/internal.h | 6 +----- veejay-current/veejay-server/libvje/vj-effman.c | 2 +- 4 files changed, 10 insertions(+), 15 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/timedistort.c b/veejay-current/veejay-server/libvje/effects/timedistort.c index 1cf02a89..b3bac9a2 100644 --- a/veejay-current/veejay-server/libvje/effects/timedistort.c +++ b/veejay-current/veejay-server/libvje/effects/timedistort.c @@ -25,14 +25,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include -#include -#include "timedistort.h" #include "common.h" +#include #include "softblur.h" +#include "timedistort.h" + #define PLANES 32 vj_effect *timedistort_init(int w, int h) @@ -129,10 +126,12 @@ void timedistort_free() nonmap = NULL; } -void timedistort_apply( VJFrame *frame, int width, int height, int val) +void timedistort_apply( VJFrame *frame, int val) { unsigned int i; - const int len = (width * height); + const unsigned int width = frame->width; + const unsigned int height = frame->height; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; diff --git a/veejay-current/veejay-server/libvje/effects/timedistort.h b/veejay-current/veejay-server/libvje/effects/timedistort.h index 308fe128..43ab50e0 100644 --- a/veejay-current/veejay-server/libvje/effects/timedistort.h +++ b/veejay-current/veejay-server/libvje/effects/timedistort.h @@ -21,7 +21,7 @@ #ifndef TIMEDISTORT_H #define TIMEDISTORT_H vj_effect *timedistort_init(int w, int h); -void timedistort_apply( VJFrame *frame, int width, int height, int val); +void timedistort_apply( VJFrame *frame, int val); int timedistort_malloc(int w, int h); void timedistort_free(); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index 96c1a4d2..b01b2e6b 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -486,16 +486,12 @@ extern void autoeq_apply( VJFrame *frame, int val, int i, int s); extern void colorhis_apply( VJFrame *frame, int v, int m, int i, int s ); extern void diff_destroy(); - extern void texmap_destroy(); - extern void contourextract_destroy(); - extern void distortion_destroy(); - extern void rotozoom_destroy(); -extern void timedistort_apply( VJFrame *frame, int w, int h, int val ); +extern void timedistort_apply( VJFrame *frame, int val ); extern void chameleon_apply( VJFrame *frame, int w, int h, int mode ); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index c3c963de..00244429 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -251,7 +251,7 @@ static void vj_effman_apply_image_effect( chameleon_apply(frames[0],frames[0]->width,frames[0]->height,arg[0]); break; case VJ_IMAGE_EFFECT_TIMEDISTORT: - timedistort_apply(frames[0],frames[0]->width,frames[0]->height,arg[0]); + timedistort_apply(frames[0],arg[0]); break; case VJ_IMAGE_EFFECT_LENSCORRECTION: radcor_apply( frames[0], arg[0],arg[1] ,arg[2],arg[3]); From 3ca4010e148c140bb9332f58017199f7e9c5b6f2 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 09:42:59 +0200 Subject: [PATCH 038/170] Libvje / refactor : chameleon * w,h * clean headers --- .../veejay-server/libvje/effects/chameleon.c | 14 ++++++-------- .../veejay-server/libvje/effects/chameleon.h | 2 +- veejay-current/veejay-server/libvje/internal.h | 3 +-- veejay-current/veejay-server/libvje/vj-effman.c | 2 +- 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/chameleon.c b/veejay-current/veejay-server/libvje/effects/chameleon.c index 6275749a..683279d5 100644 --- a/veejay-current/veejay-server/libvje/effects/chameleon.c +++ b/veejay-current/veejay-server/libvje/effects/chameleon.c @@ -22,15 +22,13 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include + +#include "common.h" #include #include -#include "chameleon.h" -#include "common.h" #include "softblur.h" +#include "chameleon.h" + vj_effect *chameleon_init(int w, int h) { vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); @@ -237,9 +235,9 @@ static void drawDisappearing(VJFrame *src, VJFrame *dest) plane = plane & (PLANES-1); } -void chameleon_apply( VJFrame *frame, int width, int height, int mode) +void chameleon_apply( VJFrame *frame, int mode) { - const int len = (width * height); + const unsigned int len = frame->len; VJFrame source; int strides[4] = { len, len, len, 0 }; vj_frame_copy( frame->data, tmpimage, strides ); diff --git a/veejay-current/veejay-server/libvje/effects/chameleon.h b/veejay-current/veejay-server/libvje/effects/chameleon.h index 42f5052d..9d877961 100644 --- a/veejay-current/veejay-server/libvje/effects/chameleon.h +++ b/veejay-current/veejay-server/libvje/effects/chameleon.h @@ -21,7 +21,7 @@ #ifndef CHAMELEON_H #define CHAMELEON_H vj_effect *chameleon_init(int w, int h); -void chameleon_apply( VJFrame *frame, int width, int height, int mode); +void chameleon_apply( VJFrame *frame, int mode); int chameleon_malloc(int w, int h ); void chameleon_free(); int chameleon_prepare( uint8_t *bg[4], int w, int h ); diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index b01b2e6b..c08c4c3f 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -492,8 +492,7 @@ extern void distortion_destroy(); extern void rotozoom_destroy(); extern void timedistort_apply( VJFrame *frame, int val ); - -extern void chameleon_apply( VJFrame *frame, int w, int h, int mode ); +extern void chameleon_apply( VJFrame *frame, int mode ); extern void chameleonblend_apply( VJFrame *frame, VJFrame *source, int w, int h, int mode ); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index 00244429..a16ab90c 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -248,7 +248,7 @@ static void vj_effman_apply_image_effect( baltantv_apply(frames[0],frames[0]->width,frames[0]->height,arg[0],arg[1]); break; case VJ_IMAGE_EFFECT_CHAMELEON: - chameleon_apply(frames[0],frames[0]->width,frames[0]->height,arg[0]); + chameleon_apply(frames[0], arg[0]); break; case VJ_IMAGE_EFFECT_TIMEDISTORT: timedistort_apply(frames[0],arg[0]); From 08c492f32009941e8c2b9a8ac3d3b0d6abbd31b1 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 09:44:42 +0200 Subject: [PATCH 039/170] Libvje / refactor : chameleonblend * w,h * clean headers --- .../veejay-server/libvje/effects/chameleonblend.c | 9 +++------ .../veejay-server/libvje/effects/chameleonblend.h | 2 +- veejay-current/veejay-server/libvje/internal.h | 3 +-- veejay-current/veejay-server/libvje/vj-effman.c | 2 +- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/chameleonblend.c b/veejay-current/veejay-server/libvje/effects/chameleonblend.c index e82c3de7..89c73868 100644 --- a/veejay-current/veejay-server/libvje/effects/chameleonblend.c +++ b/veejay-current/veejay-server/libvje/effects/chameleonblend.c @@ -22,14 +22,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include + +#include "common.h" #include #include "softblur.h" #include "chameleonblend.h" -#include "common.h" vj_effect *chameleonblend_init(int w, int h) { @@ -239,7 +236,7 @@ static void drawDisappearing(VJFrame *src, VJFrame *dest) plane = plane & (PLANES-1); } -void chameleonblend_apply( VJFrame *frame, VJFrame *source, int width, int height, int mode ) +void chameleonblend_apply( VJFrame *frame, VJFrame *source, int mode ) { uint32_t activity = 0; int auto_switch = 0; diff --git a/veejay-current/veejay-server/libvje/effects/chameleonblend.h b/veejay-current/veejay-server/libvje/effects/chameleonblend.h index 657efba3..ba91b3b5 100644 --- a/veejay-current/veejay-server/libvje/effects/chameleonblend.h +++ b/veejay-current/veejay-server/libvje/effects/chameleonblend.h @@ -21,7 +21,7 @@ #ifndef CHAMELEONBLEND_H #define CHAMELEONBLEND_H vj_effect *chameleonblend_init(int w, int h); -void chameleonblend_apply( VJFrame *frame, VJFrame *source, int width, int height, int mode); +void chameleonblend_apply( VJFrame *frame, VJFrame *source, int mode); int chameleonblend_malloc(int w, int h ); int chameleonblend_prepare( uint8_t *bg[4],int w, int h ); void chameleonblend_free(); diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index c08c4c3f..0ca66e4f 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -493,8 +493,7 @@ extern void rotozoom_destroy(); extern void timedistort_apply( VJFrame *frame, int val ); extern void chameleon_apply( VJFrame *frame, int mode ); - -extern void chameleonblend_apply( VJFrame *frame, VJFrame *source, int w, int h, int mode ); +extern void chameleonblend_apply( VJFrame *frame, VJFrame *source, int mode ); extern void baltantv_apply (VJFrame *frame, int w, int h , int stride, int mode ); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index a16ab90c..f9e0524c 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -433,7 +433,7 @@ static void vj_effman_apply_video_effect( VJFrame **frames, vjp_kf *todo_info,in switch(e) { case VJ_VIDEO_EFFECT_CHAMBLEND: - chameleonblend_apply(frames[0],frames[1], frames[0]->width,frames[0]->height,arg[0]); + chameleonblend_apply(frames[0], frames[1], arg[0]); break; case VJ_VIDEO_EFFECT_EXTDIFF: differencemap_apply( frames[0],frames[1],arg[0],arg[1],arg[2]); From 32a6f4518c3c0656dbce871148a365f814f2bcf7 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 09:47:21 +0200 Subject: [PATCH 040/170] Libvje / refactor : baltantv * w,h * clean headers --- .../veejay-server/libvje/effects/baltantv.c | 22 +++++++++---------- .../veejay-server/libvje/effects/baltantv.h | 6 +---- .../veejay-server/libvje/internal.h | 3 +-- .../veejay-server/libvje/vj-effman.c | 2 +- 4 files changed, 13 insertions(+), 20 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/baltantv.c b/veejay-current/veejay-server/libvje/effects/baltantv.c index 08b76130..38d5b21e 100644 --- a/veejay-current/veejay-server/libvje/effects/baltantv.c +++ b/veejay-current/veejay-server/libvje/effects/baltantv.c @@ -22,12 +22,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include + +#include "common.h" #include #include "baltantv.h" -#include "common.h" vj_effect *baltantv_init(int w, int h) { @@ -84,23 +82,23 @@ void baltantv_free() planetable_ = NULL; } -void baltantv_apply( VJFrame *frame, int width, int height, int stride, int mode) +void baltantv_apply( VJFrame *frame, int stride, int mode) { unsigned int i,cf; - const int len = (width * height); + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; - uint8_t *pDst = planetable_ + (plane_ * frame->len); + uint8_t *pDst = planetable_ + (plane_ * len); for( i = 0; i < len ; i ++ ) pDst[i] = (Y[i] >> 2 ); - cf = plane_ & (stride-1); + cf = plane_ & (stride-1); uint8_t *pSrc[4] = { - planetable_ + (cf * frame->len), - planetable_ + ((cf+stride) * frame->len), - planetable_ + ((cf+stride*2) * frame->len), - planetable_ + ((cf+stride*3) * frame->len) + planetable_ + (cf * len), + planetable_ + ((cf+stride) * len), + planetable_ + ((cf+stride*2) * len), + planetable_ + ((cf+stride*3) * len) }; if( mode == 0 ) diff --git a/veejay-current/veejay-server/libvje/effects/baltantv.h b/veejay-current/veejay-server/libvje/effects/baltantv.h index a8d8581e..48dcf78e 100644 --- a/veejay-current/veejay-server/libvje/effects/baltantv.h +++ b/veejay-current/veejay-server/libvje/effects/baltantv.h @@ -20,12 +20,8 @@ #ifndef BALTAN_TVH #define BALTAN_TVH -#include -#include -#include - vj_effect *baltantv_init(int w, int h); -void baltantv_apply( VJFrame *frame, int width, int height, int stride, int mode); +void baltantv_apply( VJFrame *frame, int stride, int mode); int baltantv_malloc(int w, int h ); void baltantv_free(); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index 0ca66e4f..53b554a9 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -494,8 +494,7 @@ extern void rotozoom_destroy(); extern void timedistort_apply( VJFrame *frame, int val ); extern void chameleon_apply( VJFrame *frame, int mode ); extern void chameleonblend_apply( VJFrame *frame, VJFrame *source, int mode ); - -extern void baltantv_apply (VJFrame *frame, int w, int h , int stride, int mode ); +extern void baltantv_apply (VJFrame *frame, int stride, int mode ); extern void radioactivetv_apply( VJFrame *a, VJFrame *b,int w, int h, int mode, int t, int sn, int threhold); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index f9e0524c..89fcc8a2 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -245,7 +245,7 @@ static void vj_effman_apply_image_effect( autoeq_apply(frames[0],arg[0],arg[1],arg[2]); break; case VJ_IMAGE_EFFECT_BALTANTV: - baltantv_apply(frames[0],frames[0]->width,frames[0]->height,arg[0],arg[1]); + baltantv_apply(frames[0], arg[0], arg[1]); break; case VJ_IMAGE_EFFECT_CHAMELEON: chameleon_apply(frames[0], arg[0]); From 0f7ac46847fba625ff097a9371d44cb8f01b3079 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 09:51:29 +0200 Subject: [PATCH 041/170] Libvje / refactor : radioactivetv * w,h * clean headers --- .../libvje/effects/radioactive.c | 32 +++++++++---------- .../libvje/effects/radioactive.h | 3 +- .../veejay-server/libvje/internal.h | 3 +- .../veejay-server/libvje/vj-effman.c | 2 +- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/radioactive.c b/veejay-current/veejay-server/libvje/effects/radioactive.c index 57121f76..38b58b26 100644 --- a/veejay-current/veejay-server/libvje/effects/radioactive.c +++ b/veejay-current/veejay-server/libvje/effects/radioactive.c @@ -27,16 +27,13 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include -#include -#include -#include -#include "radioactive.h" -#include "softblur.h" + #include "common.h" +#include +//#include +#include +#include "softblur.h" +#include "radioactive.h" vj_effect *radioactivetv_init(int w, int h) { @@ -227,13 +224,16 @@ void radioactivetv_free() diffbuf = NULL; } -void radioactivetv_apply( VJFrame *frame, VJFrame *blue, int width, int height, - int mode, int snapRatio, int snapInterval, int threshold) +void radioactivetv_apply( VJFrame *frame, VJFrame *blue, int mode, int snapRatio, + int snapInterval, int threshold) { unsigned int x, y; + const unsigned int width = frame->width; + const unsigned int height = frame->height; + const unsigned int len = frame->len; + uint8_t *diff = diffbuf; - uint8_t *prev = diff + frame->len; - const int len = frame->len; + uint8_t *prev = diff + len; uint8_t *lum = frame->data[0]; uint8_t *dstY = lum; uint8_t *dstU = frame->data[1]; @@ -280,7 +280,7 @@ void radioactivetv_apply( VJFrame *frame, VJFrame *blue, int width, int height, for( y = 0; y < len; y ++ ){ diff[y] = abs(lum[y] - prev[y]); if(diff[y] < threshold ) - diff[y] = 0; + diff[y] = 0; prev[y] = (prev[y] + lum[y])>>1; } break; @@ -288,7 +288,7 @@ void radioactivetv_apply( VJFrame *frame, VJFrame *blue, int width, int height, for( y = 0; y < len; y ++ ) { diff[y] = abs(lum[y] - prev[y]); if(diff[y] < threshold ) - diff[y] = 0; + diff[y] = 0; prev[y] = lum[y]; } break; @@ -324,7 +324,7 @@ void radioactivetv_apply( VJFrame *frame, VJFrame *blue, int width, int height, for( y = 0; y < len; y ++ ) { diff[y] = abs(lum[y] - prev[y]); if(diff[y] < threshold ) - diff[y] = 0; + diff[y] = 0; prev[y] = lum[y]; } break; diff --git a/veejay-current/veejay-server/libvje/effects/radioactive.h b/veejay-current/veejay-server/libvje/effects/radioactive.h index 6e335284..abba409d 100644 --- a/veejay-current/veejay-server/libvje/effects/radioactive.h +++ b/veejay-current/veejay-server/libvje/effects/radioactive.h @@ -21,7 +21,8 @@ #ifndef RADIOACTIVE_TVH #define RADIOACTIVE_TVH vj_effect *radioactivetv_init(int w, int h); -void radioactivetv_apply( VJFrame *frame, VJFrame *blue,int width, int height, int bla,int stride, int mode, int thres); +void radioactivetv_apply( VJFrame *frame, VJFrame *blue, int bla,int stride, + int mode, int thres); int radioactivetv_malloc(int w, int h ); void radioactivetv_free(); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index 53b554a9..a10636b2 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -495,8 +495,7 @@ extern void timedistort_apply( VJFrame *frame, int val ); extern void chameleon_apply( VJFrame *frame, int mode ); extern void chameleonblend_apply( VJFrame *frame, VJFrame *source, int mode ); extern void baltantv_apply (VJFrame *frame, int stride, int mode ); - -extern void radioactivetv_apply( VJFrame *a, VJFrame *b,int w, int h, int mode, int t, int sn, int threhold); +extern void radioactivetv_apply( VJFrame *a, VJFrame *b, int mode, int t, int sn, int threhold); extern void nervous_apply(VJFrame *Frame, int width, int height,int delay); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index 89fcc8a2..5455a631 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -611,7 +611,7 @@ static void vj_effman_apply_video_effect( VJFrame **frames, vjp_kf *todo_info,in break; case VJ_VIDEO_EFFECT_RADIOACTIVE: - radioactivetv_apply( frames[0],frames[1], frames[0]->width,frames[0]->height,arg[0],arg[1],arg[2],arg[3]); + radioactivetv_apply( frames[0],frames[1],arg[0],arg[1],arg[2],arg[3]); break; case VJ_VIDEO_EFFECT_AVERAGEBLEND: average_blend_apply(frames[0], frames[1], frames[0]->width, From ad1e6e73eb58eb4f33cf3660d3073aeb57854b65 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 09:54:34 +0200 Subject: [PATCH 042/170] Libvje / refactor : nervous * w,h * clean headers --- .../veejay-server/libvje/effects/nervous.c | 12 +++++------- .../veejay-server/libvje/effects/nervous.h | 6 +----- veejay-current/veejay-server/libvje/internal.h | 3 +-- veejay-current/veejay-server/libvje/vj-effman.c | 4 ++-- 4 files changed, 9 insertions(+), 16 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/nervous.c b/veejay-current/veejay-server/libvje/effects/nervous.c index 90401fe6..03457d40 100644 --- a/veejay-current/veejay-server/libvje/effects/nervous.c +++ b/veejay-current/veejay-server/libvje/effects/nervous.c @@ -24,10 +24,8 @@ in EffecTV ( http://effectv.sf.net ). */ -#include -#include -#include -#include + +#include "common.h" #include #include "nervous.h" @@ -85,10 +83,10 @@ void nervous_free(void) } -void nervous_apply( VJFrame *frame, int width, int height, int delay) +void nervous_apply( VJFrame *frame, int delay) { - int len = (width * height); - int uv_len = (frame->ssm == 1 ? frame->len : frame->uv_len); + const unsigned int len = frame->len; + int uv_len = (frame->ssm == 1 ? frame->len : frame->uv_len); uint8_t *NY = nervous_buf[0] + (len * frames_elapsed ); uint8_t *NCb= nervous_buf[1] + (uv_len * frames_elapsed ); uint8_t *NCr= nervous_buf[2] + (uv_len * frames_elapsed ); diff --git a/veejay-current/veejay-server/libvje/effects/nervous.h b/veejay-current/veejay-server/libvje/effects/nervous.h index c8355090..997c62f2 100644 --- a/veejay-current/veejay-server/libvje/effects/nervous.h +++ b/veejay-current/veejay-server/libvje/effects/nervous.h @@ -20,12 +20,8 @@ #ifndef NERVOUS_H #define NERVOUS_H -#include -#include -#include - vj_effect *nervous_init(int w, int h); int nervous_malloc(int w, int h); void nervous_free(void); -void nervous_apply(VJFrame *Frame, int width, int height,int delay); +void nervous_apply(VJFrame *Frame, int delay); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index a10636b2..3307cfee 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -496,8 +496,7 @@ extern void chameleon_apply( VJFrame *frame, int mode ); extern void chameleonblend_apply( VJFrame *frame, VJFrame *source, int mode ); extern void baltantv_apply (VJFrame *frame, int stride, int mode ); extern void radioactivetv_apply( VJFrame *a, VJFrame *b, int mode, int t, int sn, int threhold); - -extern void nervous_apply(VJFrame *Frame, int width, int height,int delay); +extern void nervous_apply(VJFrame *Frame, int delay); extern void colflash_apply( VJFrame *frame, int width, int height, int f,int r, int g, int b, int d); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index 5455a631..ac1ab89f 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -233,8 +233,8 @@ static void vj_effman_apply_image_effect( colmorphology_apply( frames[0], arg[0], arg[1], arg[2]); break; case VJ_IMAGE_EFFECT_NERVOUS: - nervous_apply( frames[0], frames[0]->width, frames[0]->height, - arg[0]); break; + nervous_apply( frames[0], arg[0]); + break; case VJ_IMAGE_EFFECT_OVERCLOCK: overclock_apply(frames[0],arg[0],arg[1]); break; From 4aef7be12089535aa9e820f863afd80132092772 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 09:56:44 +0200 Subject: [PATCH 043/170] Libvje / refactor : colflash * w,h * clean headers --- .../veejay-server/libvje/effects/colflash.c | 23 ++++++++----------- .../veejay-server/libvje/effects/colflash.h | 6 +---- .../veejay-server/libvje/internal.h | 3 +-- .../veejay-server/libvje/vj-effman.c | 3 +-- 4 files changed, 13 insertions(+), 22 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/colflash.c b/veejay-current/veejay-server/libvje/effects/colflash.c index d705f379..12234c17 100644 --- a/veejay-current/veejay-server/libvje/effects/colflash.c +++ b/veejay-current/veejay-server/libvje/effects/colflash.c @@ -17,12 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include + +#include "common.h" #include #include "colflash.h" -#include "common.h" // very simple color flashing fx @@ -61,25 +59,25 @@ vj_effect *colflash_init(int w, int h) static int color_flash_ = 0; 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) +void colflash_apply( VJFrame *frame, int f,int r, int g, int b, int d) { - unsigned int len = frame->len; - unsigned int uv_len = (frame->ssm ? frame->len : frame->uv_len); + const unsigned int len = frame->len; + const unsigned int uv_len = (frame->ssm ? frame->len : frame->uv_len); - uint8_t *Y = frame->data[0]; + uint8_t *Y = frame->data[0]; uint8_t *Cb= frame->data[1]; uint8_t *Cr= frame->data[2]; uint8_t y=0,u=0,v=0; _rgb2yuv( r,g,b,y,u,v ); - + if( d != delay_ ) { delay_ = d; color_delay_ = d; - } - + } + if( color_delay_ ) { veejay_memset( Y, y, len ); @@ -95,8 +93,7 @@ void colflash_apply( VJFrame *frame, int width, int height, int f,int r, int g, color_delay_ = delay_; color_flash_ = 0; } - } - + } diff --git a/veejay-current/veejay-server/libvje/effects/colflash.h b/veejay-current/veejay-server/libvje/effects/colflash.h index 6264bc33..c253590c 100644 --- a/veejay-current/veejay-server/libvje/effects/colflash.h +++ b/veejay-current/veejay-server/libvje/effects/colflash.h @@ -20,10 +20,6 @@ #ifndef COLFLASH_H #define COLFLASH_H -#include -#include -#include - vj_effect *colflash_init(); -void colflash_apply( VJFrame *frame, int width, int height, int f,int r, int g, int b, int d); +void colflash_apply( VJFrame *frame, int f,int r, int g, int b, int d); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index 3307cfee..e606b1ca 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -497,8 +497,7 @@ extern void chameleonblend_apply( VJFrame *frame, VJFrame *source, int mode ); extern void baltantv_apply (VJFrame *frame, int stride, int mode ); extern void radioactivetv_apply( VJFrame *a, VJFrame *b, int mode, int t, int sn, int threhold); extern void nervous_apply(VJFrame *Frame, int delay); - -extern void colflash_apply( VJFrame *frame, int width, int height, int f,int r, int g, int b, int d); +extern void colflash_apply( VJFrame *frame, int f,int r, int g, int b, int d); extern void iris_apply( VJFrame *frame,VJFrame *frame2, int width, int height, int value, int shape ); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index ac1ab89f..0e4e3f6b 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -267,8 +267,7 @@ static void vj_effman_apply_image_effect( break; case VJ_IMAGE_EFFECT_COLFLASH: - colflash_apply(frames[0], frames[0]->width,frames[0]->height,arg[0], - arg[1],arg[2],arg[3],arg[4] ); + colflash_apply(frames[0],arg[0],arg[1],arg[2],arg[3],arg[4] ); break; case VJ_IMAGE_EFFECT_COLORMAP: colormap_apply(frames[0], arg[0], arg[1], arg[2]); From 26ef7083b5fb457c24b260af699992fa208afcc4 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 09:58:28 +0200 Subject: [PATCH 044/170] Libvje / refactor : iris * w,h * clean headers --- veejay-current/veejay-server/libvje/effects/iris.c | 12 ++++++------ veejay-current/veejay-server/libvje/effects/iris.h | 6 +----- veejay-current/veejay-server/libvje/internal.h | 3 +-- veejay-current/veejay-server/libvje/vj-effman.c | 2 +- 4 files changed, 9 insertions(+), 14 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/iris.c b/veejay-current/veejay-server/libvje/effects/iris.c index b08f9fed..c0dd096b 100644 --- a/veejay-current/veejay-server/libvje/effects/iris.c +++ b/veejay-current/veejay-server/libvje/effects/iris.c @@ -23,12 +23,10 @@ * weed-plugins/multi_transitions.c?revision=286 * */ -#include -#include -#include + +#include "common.h" #include #include "iris.h" -#include "common.h" vj_effect *iris_init(int w, int h) { @@ -53,10 +51,12 @@ vj_effect *iris_init(int w, int h) } -void iris_apply( VJFrame *frame, VJFrame *frame2, int width, int height, int val, int shape) +void iris_apply( VJFrame *frame, VJFrame *frame2, int val, int shape) { int i,j,k=0; - int len = (width * height); + const unsigned int width = frame->width; + const unsigned int height = frame->height; + const unsigned int len = frame->len; uint8_t *Y0 = frame->data[0]; uint8_t *Cb0 = frame->data[1]; diff --git a/veejay-current/veejay-server/libvje/effects/iris.h b/veejay-current/veejay-server/libvje/effects/iris.h index 95375307..128fc11d 100644 --- a/veejay-current/veejay-server/libvje/effects/iris.h +++ b/veejay-current/veejay-server/libvje/effects/iris.h @@ -20,11 +20,7 @@ #ifndef IRIS_H #define IRIS_H -#include -#include -#include - vj_effect *iris_init(); -void iris_apply( VJFrame *frame, VJFrame *frame2, int width, int height, int value, int shape); +void iris_apply( VJFrame *frame, VJFrame *frame2, int value, int shape); void iris_free(); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index e606b1ca..3de47d31 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -498,8 +498,7 @@ extern void baltantv_apply (VJFrame *frame, int stride, int mode ); extern void radioactivetv_apply( VJFrame *a, VJFrame *b, int mode, int t, int sn, int threhold); extern void nervous_apply(VJFrame *Frame, int delay); extern void colflash_apply( VJFrame *frame, int f,int r, int g, int b, int d); - -extern void iris_apply( VJFrame *frame,VJFrame *frame2, int width, int height, int value, int shape ); +extern void iris_apply( VJFrame *frame,VJFrame *frame2, int value, int shape ); extern void cali_apply(void *d , VJFrame *frame, int width, int height, diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index 0e4e3f6b..db9ba01c 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -482,7 +482,7 @@ static void vj_effman_apply_video_effect( VJFrame **frames, vjp_kf *todo_info,in opacity_apply(frames[0], frames[1], arg[0]); break; case VJ_VIDEO_EFFECT_IRIS: - iris_apply( frames[0],frames[1], frames[0]->width,frames[0]->height,arg[0],arg[1]); + iris_apply( frames[0],frames[1],arg[0],arg[1]); break; case VJ_VIDEO_EFFECT_THRESHOLDSMOOTH: opacitythreshold_apply(frames[0], frames[1], arg[0], arg[1], arg[2]); From 410b0faa9f7ad89f48bbe4ee399f5853cf589108 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 10:02:44 +0200 Subject: [PATCH 045/170] Libvje / refactor : cali * w,h * clean headers --- .../veejay-server/libvje/effects/cali.c | 30 +++++++------------ .../veejay-server/libvje/effects/cali.h | 2 +- .../veejay-server/libvje/internal.h | 5 +--- .../veejay-server/libvje/vj-effman.c | 2 +- 4 files changed, 13 insertions(+), 26 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/cali.c b/veejay-current/veejay-server/libvje/effects/cali.c index ca416ee6..5df00941 100644 --- a/veejay-current/veejay-server/libvje/effects/cali.c +++ b/veejay-current/veejay-server/libvje/effects/cali.c @@ -17,19 +17,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include -#include +#include "common.h" #include -#include -#include #include #include -#include "common.h" -#include "cali.h" #include "softblur.h" +#include "cali.h" typedef struct { @@ -111,7 +104,7 @@ void cali_free(void *d) static int flood =0; -void cali_apply(void *ed, VJFrame *frame, int w, int h,int mode, int full) +void cali_apply(void *ed, VJFrame *frame,int mode, int full) { cali_data *c = (cali_data*) ed; @@ -129,24 +122,25 @@ 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 chroma = 127; + const int chroma = 127; const int uv_len = frame->uv_len; + const unsigned int len = frame->len; int p,i; - const int len = w*h; + if( mode == 1 ) { //@ just show dark frame - veejay_memcpy(Y, c->b[0], (w*h)); + veejay_memcpy(Y, c->b[0], (len)); veejay_memcpy(U, c->b[1], uv_len); veejay_memcpy(V, c->b[2], uv_len); return; } else if ( mode == 2 ) { //@ just show light frame - veejay_memcpy(Y, c->l[0], (w*h)); + veejay_memcpy(Y, c->l[0], (len)); veejay_memcpy(U, c->l[1], uv_len); veejay_memcpy(V, c->l[2], uv_len); return; } else if ( mode == 3 ) { - veejay_memcpy(Y, c->m[0], (w*h)); + veejay_memcpy(Y, c->m[0], (len)); veejay_memcpy(U, c->m[1], uv_len); veejay_memcpy(V, c->m[2], uv_len); return; @@ -195,7 +189,7 @@ void cali_apply(void *ed, VJFrame *frame, int w, int h,int mode, int full) } else { //@ just show result of frame - dark current - for( i = 0; i <(w*h); i ++ ) { + for( i = 0; i <(len); i ++ ) { p = ( Y[i] - by[i] ); if( p < 0 ) Y[i] = pixel_Y_lo_; @@ -218,7 +212,3 @@ void cali_apply(void *ed, VJFrame *frame, int w, int h,int mode, int full) } } - - - - diff --git a/veejay-current/veejay-server/libvje/effects/cali.h b/veejay-current/veejay-server/libvje/effects/cali.h index f60e582f..be38056e 100644 --- a/veejay-current/veejay-server/libvje/effects/cali.h +++ b/veejay-current/veejay-server/libvje/effects/cali.h @@ -24,5 +24,5 @@ vj_effect *cali_init(int width, int height); void cali_free(void *d); int cali_malloc(void **c, int w, int h); int cali_prepare( void *ed, double meanY, double meanU, double meanV, uint8_t *data, int len, int uv_len ); -void cali_apply(void *d , VJFrame *frame,int width, int height, int mode, int full); +void cali_apply(void *d , VJFrame *frame, int mode, int full); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index 3de47d31..da98a279 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -499,10 +499,7 @@ extern void radioactivetv_apply( VJFrame *a, VJFrame *b, int mode, int t, int sn extern void nervous_apply(VJFrame *Frame, int delay); extern void colflash_apply( VJFrame *frame, int f,int r, int g, int b, int d); extern void iris_apply( VJFrame *frame,VJFrame *frame2, int value, int shape ); - -extern void cali_apply(void *d , VJFrame *frame, - int width, int height, - int mode, int full); +extern void cali_apply(void *d , VJFrame *frame, int mode, int full); extern void waterrippletv_apply(VJFrame *frame, int width, int height, int fresh_rate, int loopnum, int decay); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index db9ba01c..7f4dfdb8 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -123,7 +123,7 @@ static void vj_effman_apply_image_effect( noisepencil_apply(frames[0], arg[0], arg[1], arg[2], arg[3]); break; case VJ_IMAGE_EFFECT_CALI: - cali_apply( vj_effects[entry]->user_data,frames[0], frames[0]->width,frames[0]->height,arg[0], arg[1] ); + cali_apply( vj_effects[entry]->user_data,frames[0],arg[0], arg[1] ); break; case VJ_IMAGE_EFFECT_DIFF: diffimg_apply(frames[0], arg[0], arg[1], arg[2]); From b98863594ee64267b76366ce9565a0a619367797 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 10:05:20 +0200 Subject: [PATCH 046/170] Libvje / refactor : waterrippletv * w,h * clean headers --- .../veejay-server/libvje/effects/waterrippletv.c | 16 +++++----------- .../veejay-server/libvje/effects/waterrippletv.h | 7 +------ veejay-current/veejay-server/libvje/internal.h | 3 +-- veejay-current/veejay-server/libvje/vj-effman.c | 2 +- 4 files changed, 8 insertions(+), 20 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/waterrippletv.c b/veejay-current/veejay-server/libvje/effects/waterrippletv.c index b06e38bd..724d484e 100644 --- a/veejay-current/veejay-server/libvje/effects/waterrippletv.c +++ b/veejay-current/veejay-server/libvje/effects/waterrippletv.c @@ -22,15 +22,9 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ - -#include -#include -#include +#include "common.h" #include #include "waterrippletv.h" -#include -#include -#include "common.h" static uint8_t *ripple_data[3]; @@ -218,7 +212,7 @@ static void raindrop() } static int last_fresh_rate = 0; -void waterrippletv_apply(VJFrame *frame, int width, int height, int fresh_rate, int loopnum, int decay) +void waterrippletv_apply(VJFrame *frame, int fresh_rate, int loopnum, int decay) { int x, y, i; int dx, dy; @@ -227,7 +221,7 @@ void waterrippletv_apply(VJFrame *frame, int width, int height, int fresh_rate, int *p, *q, *r; signed char *vp; uint8_t *src,*dest; - const int len = frame->len; + const unsigned int len = frame->len; if(last_fresh_rate != fresh_rate || tick > fresh_rate) { @@ -307,8 +301,8 @@ void waterrippletv_apply(VJFrame *frame, int width, int height, int fresh_rate, vp+=2; } - hi = height; - wi = width; + hi = frame->height; + wi = frame->width; vp = vtable; /* dest2 = dest; diff --git a/veejay-current/veejay-server/libvje/effects/waterrippletv.h b/veejay-current/veejay-server/libvje/effects/waterrippletv.h index e4467053..2f9b3625 100644 --- a/veejay-current/veejay-server/libvje/effects/waterrippletv.h +++ b/veejay-current/veejay-server/libvje/effects/waterrippletv.h @@ -20,13 +20,8 @@ #ifndef WARIPPLETV_H #define WARIPPLETV_H -#include -#include -#include -#include - vj_effect* waterrippletv_init(int width, int height); int waterrippletv_malloc(int w, int h); void waterrippletv_free(); -void waterrippletv_apply(VJFrame *frame, int width, int height, int val, int loop, int decay); +void waterrippletv_apply(VJFrame *frame, int val, int loop, int decay); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index da98a279..a07c11b2 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -500,8 +500,7 @@ extern void nervous_apply(VJFrame *Frame, int delay); extern void colflash_apply( VJFrame *frame, int f,int r, int g, int b, int d); extern void iris_apply( VJFrame *frame,VJFrame *frame2, int value, int shape ); extern void cali_apply(void *d , VJFrame *frame, int mode, int full); - -extern void waterrippletv_apply(VJFrame *frame, int width, int height, int fresh_rate, int loopnum, int decay); +extern void waterrippletv_apply(VJFrame *frame, int fresh_rate, int loopnum, int decay); extern void radcor_apply( VJFrame *frame, int a, int b, int c, int alpha); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index 7f4dfdb8..71d3a1c6 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -114,7 +114,7 @@ static void vj_effman_apply_image_effect( break; case VJ_IMAGE_EFFECT_RIPPLETV: - waterrippletv_apply(frames[0],frames[0]->width,frames[0]->height,arg[0],arg[1],arg[2]); + waterrippletv_apply(frames[0],arg[0],arg[1],arg[2]); break; case VJ_IMAGE_EFFECT_PENCILSKETCH: pencilsketch_apply(frames[0],arg[0],arg[1],arg[2],arg[3]); From e1bad5d855c886c982d58abea9929e4387e47782 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 10:11:45 +0200 Subject: [PATCH 047/170] Libvje / refactor : radcor * w,h * clean headers --- veejay-current/veejay-server/libvje/effects/radcor.c | 12 +++++------- veejay-current/veejay-server/libvje/effects/radcor.h | 4 ---- veejay-current/veejay-server/libvje/internal.h | 1 - 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/radcor.c b/veejay-current/veejay-server/libvje/effects/radcor.c index 1d7eb6d6..322c1488 100644 --- a/veejay-current/veejay-server/libvje/effects/radcor.c +++ b/veejay-current/veejay-server/libvje/effects/radcor.c @@ -22,12 +22,10 @@ * http://local.wasp.uwa.edu.au/~pbourke/projection/lenscorrection/ * */ -#include -#include -#include + +#include "common.h" #include #include "radcor.h" -#include "common.h" vj_effect *radcor_init(int w, int h) { @@ -94,10 +92,10 @@ typedef struct void radcor_apply( VJFrame *frame, int alpaX, int alpaY, int dir, int alpha) { int i,j; - int width, height; - width = frame->width; height = frame->height; - int len = (width * height); int i2,j2; + const unsigned int width = frame->width; + const unsigned int height = frame->height; + const unsigned int len = frame->len; double x,y,x2,x3,y2,y3,r; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; diff --git a/veejay-current/veejay-server/libvje/effects/radcor.h b/veejay-current/veejay-server/libvje/effects/radcor.h index 98063922..02d4c71b 100644 --- a/veejay-current/veejay-server/libvje/effects/radcor.h +++ b/veejay-current/veejay-server/libvje/effects/radcor.h @@ -20,10 +20,6 @@ #ifndef LENSCOR_H #define LENSCOR_H -#include -#include -#include - vj_effect *radcor_init(int w, int h); int radcor_malloc(int w, int h); void radcor_free(); diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index a07c11b2..5bfead8a 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -501,7 +501,6 @@ extern void colflash_apply( VJFrame *frame, int f,int r, int g, int b, int d); extern void iris_apply( VJFrame *frame,VJFrame *frame2, int value, int shape ); extern void cali_apply(void *d , VJFrame *frame, int mode, int full); extern void waterrippletv_apply(VJFrame *frame, int fresh_rate, int loopnum, int decay); - extern void radcor_apply( VJFrame *frame, int a, int b, int c, int alpha); extern int motionmap_prepare( uint8_t *map[4], int w, int h ); From 55610764c0b1094ced9b8d549b304c26a12711a2 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 10:22:23 +0200 Subject: [PATCH 048/170] Libvje / refactor : average-blend * __remove average_blend_applyN from internal.h__ (unused) * w,h * clean headers --- .../libvje/effects/average-blend.c | 21 +++++++------------ .../libvje/effects/average-blend.h | 8 ++----- .../veejay-server/libvje/internal.h | 4 +--- .../veejay-server/libvje/vj-effman.c | 3 +-- 4 files changed, 11 insertions(+), 25 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/average-blend.c b/veejay-current/veejay-server/libvje/effects/average-blend.c index 39770128..1c3a6a2e 100644 --- a/veejay-current/veejay-server/libvje/effects/average-blend.c +++ b/veejay-current/veejay-server/libvje/effects/average-blend.c @@ -18,11 +18,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include -#include +#include "common.h" #include #include #include "average-blend.h" @@ -48,8 +44,7 @@ vj_effect *average_blend_init(int w, int h) return ve; } -static void average_blend_apply1( VJFrame *frame, VJFrame *frame2, int width, - int height, int average_blend) +static void average_blend_apply1( VJFrame *frame, VJFrame *frame2, int average_blend) { unsigned int i; for( i = 0; i < average_blend; i ++ ) { @@ -70,24 +65,22 @@ static void average_blend_apply_job( void *arg ) } } -void average_blend_apply( VJFrame *frame, VJFrame *frame2, int width, - int height, int average_blend) +void average_blend_apply( VJFrame *frame, VJFrame *frame2, int average_blend) { - average_blend_apply1( frame,frame2,width,height,average_blend ); + average_blend_apply1( frame,frame2,average_blend ); } -void average_blend_applyN( VJFrame *frame, VJFrame *frame2, int width, - int height, int average_blend) +void average_blend_applyN( VJFrame *frame, VJFrame *frame2,int average_blend) { if( vj_task_available() ) { vj_task_set_from_frame( frame ); vj_task_set_param( average_blend,0 ); vj_task_run( frame->data, frame2->data, NULL, NULL, 3, (performer_job_routine) &average_blend_apply_job ); } else { - average_blend_apply1( frame,frame2,width,height,average_blend ); + average_blend_apply1( frame,frame2,average_blend ); } } - + static void average_blend_blend_apply1( uint8_t *src1[3], uint8_t *src2[3], int len, int uv_len, int average_blend ) { } diff --git a/veejay-current/veejay-server/libvje/effects/average-blend.h b/veejay-current/veejay-server/libvje/effects/average-blend.h index d9d0e540..b8051763 100644 --- a/veejay-current/veejay-server/libvje/effects/average-blend.h +++ b/veejay-current/veejay-server/libvje/effects/average-blend.h @@ -20,14 +20,10 @@ #ifndef AVERAGEBLEND_H #define AVERAGEBLEND_H -#include -#include -#include - vj_effect *average_blend_init(); -void average_blend_apply( VJFrame *frame, VJFrame *frame2, int width,int height, int average_blend); +void average_blend_apply( VJFrame *frame, VJFrame *frame2, int average_blend); void average_blend_blend_luma_apply( uint8_t *src, uint8_t *dst, int len, int average_blend ); void average_blend_blend_apply( uint8_t *src[3], uint8_t *dst[3], int len, int uv_len, int average_blend ); -void average_blend_applyN( VJFrame *frame, VJFrame *frame2, int width, int height, int average_blend); +void average_blend_applyN( VJFrame *frame, VJFrame *frame2, int average_blend); void average_blend_free(); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index 5bfead8a..531efeea 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -508,9 +508,7 @@ extern int chameleon_prepare( uint8_t *bg[4], int w, int h ); extern int contourextract_prepare(uint8_t *map[4], int w, int h); extern int chameleonblend_prepare( uint8_t *bg[4],int w, int h ); -extern void average_blend_applyN( VJFrame *frame, VJFrame *frame2, int width, int height, int average_blend); - -extern void average_blend_apply( VJFrame *frame, VJFrame *frame2, int width,int height, int average_blend); +extern void average_blend_apply( VJFrame *frame, VJFrame *frame2, int average_blend); extern void toalpha_apply( VJFrame *frame, int width, int height, int mode); extern void mixtoalpha_apply( VJFrame *frame, VJFrame *frame2, int width,int height, int mode, int scale); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index 71d3a1c6..3ba2b6e6 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -613,8 +613,7 @@ static void vj_effman_apply_video_effect( VJFrame **frames, vjp_kf *todo_info,in radioactivetv_apply( frames[0],frames[1],arg[0],arg[1],arg[2],arg[3]); break; case VJ_VIDEO_EFFECT_AVERAGEBLEND: - average_blend_apply(frames[0], frames[1], frames[0]->width, - frames[0]->height, arg[0]); + average_blend_apply(frames[0], frames[1], arg[0]); break; case VJ_VIDEO_EFFECT_MIXTOALPHA: mixtoalpha_apply( frames[0],frames[1], frames[0]->width,frames[0]->height,arg[0],arg[1]); From 45aaa88ed0c6abf42539ddf8f232efb7fc379761 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 10:24:35 +0200 Subject: [PATCH 049/170] Libvje / refactor : toalpha * w,h * clean headers --- veejay-current/veejay-server/libvje/effects/toalpha.c | 10 ++++------ veejay-current/veejay-server/libvje/effects/toalpha.h | 6 +----- veejay-current/veejay-server/libvje/internal.h | 3 +-- veejay-current/veejay-server/libvje/vj-effman.c | 2 +- 4 files changed, 7 insertions(+), 14 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/toalpha.c b/veejay-current/veejay-server/libvje/effects/toalpha.c index 19d0ab15..3307c509 100644 --- a/veejay-current/veejay-server/libvje/effects/toalpha.c +++ b/veejay-current/veejay-server/libvje/effects/toalpha.c @@ -17,11 +17,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include + #include "common.h" +#include #include "toalpha.h" static int __lookup_table[256]; @@ -56,9 +54,9 @@ vj_effect *toalpha_init(int w, int h) } -void toalpha_apply( VJFrame *frame, int width, int height, int mode) +void toalpha_apply( VJFrame *frame, int mode) { - int len = frame->len; + const unsigned int len = frame->len; uint8_t *a = frame->data[3]; uint8_t *Y = frame->data[0]; diff --git a/veejay-current/veejay-server/libvje/effects/toalpha.h b/veejay-current/veejay-server/libvje/effects/toalpha.h index 3862cdec..6dc2f0d0 100644 --- a/veejay-current/veejay-server/libvje/effects/toalpha.h +++ b/veejay-current/veejay-server/libvje/effects/toalpha.h @@ -20,10 +20,6 @@ #ifndef TOALPHA_H #define TOALPHA_H -#include -#include -#include - vj_effect *toalpha_init(int w, int h); -void toalpha_apply( VJFrame *frame, int width, int height,int mode); +void toalpha_apply( VJFrame *frame, int mode); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index 531efeea..eeec1668 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -509,8 +509,7 @@ extern int contourextract_prepare(uint8_t *map[4], int w, int h); extern int chameleonblend_prepare( uint8_t *bg[4],int w, int h ); extern void average_blend_apply( VJFrame *frame, VJFrame *frame2, int average_blend); - -extern void toalpha_apply( VJFrame *frame, int width, int height, int mode); +extern void toalpha_apply( VJFrame *frame, int mode); extern void mixtoalpha_apply( VJFrame *frame, VJFrame *frame2, int width,int height, int mode, int scale); extern void alpha2img_apply( VJFrame *frame, int width, int height); extern void alphafill_apply( VJFrame *frame, int width, int height, int val); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index 3ba2b6e6..3cf08968 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -387,7 +387,7 @@ static void vj_effman_apply_image_effect( alpha2img_apply( frames[0], frames[0]->width,frames[0]->height ); break; case VJ_IMAGE_EFFECT_TOALPHA: - toalpha_apply( frames[0], frames[0]->width,frames[0]->height, arg[0] ); + toalpha_apply( frames[0], arg[0] ); break; case VJ_IMAGE_EFFECT_ALPHAFLATTEN: alphaflatten_apply(frames[0],frames[0]->width,frames[0]->height,arg[0]); From 39d637ef8f3cc43fc6a7b6f3532d61d75224b1d0 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 10:28:26 +0200 Subject: [PATCH 050/170] Libvje / refactor : mixtoalpha * w,h * clean headers --- .../veejay-server/libvje/effects/mixtoalpha.c | 15 +++++---------- .../veejay-server/libvje/effects/mixtoalpha.h | 7 +------ veejay-current/veejay-server/libvje/internal.h | 2 +- veejay-current/veejay-server/libvje/vj-effman.c | 2 +- 4 files changed, 8 insertions(+), 18 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/mixtoalpha.c b/veejay-current/veejay-server/libvje/effects/mixtoalpha.c index a6d8d54e..96ba8b4b 100644 --- a/veejay-current/veejay-server/libvje/effects/mixtoalpha.c +++ b/veejay-current/veejay-server/libvje/effects/mixtoalpha.c @@ -17,14 +17,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ - -#include -#include -#include -#include -#include -#include + #include "common.h" +#include #include "mixtoalpha.h" vj_effect *mixtoalpha_init(int w, int h) @@ -57,9 +52,9 @@ vj_effect *mixtoalpha_init(int w, int h) return ve; } -void mixtoalpha_apply( VJFrame *frame, VJFrame *frame2, int width,int height, int mode, int scale) +void mixtoalpha_apply( VJFrame *frame, VJFrame *frame2, int mode, int scale) { - int len = frame->len; + const unsigned int len = frame->len; uint8_t *a = frame->data[3]; const uint8_t *Y = frame2->data[0]; uint8_t __lookup_table[256]; @@ -74,7 +69,7 @@ void mixtoalpha_apply( VJFrame *frame, VJFrame *frame2, int width,int height, in veejay_memcpy(a, frame2->data[3], len ); } - if( scale ) { + if( scale ) { int i; for( i = 0; i < len; i ++ ) { diff --git a/veejay-current/veejay-server/libvje/effects/mixtoalpha.h b/veejay-current/veejay-server/libvje/effects/mixtoalpha.h index b2c2c195..24cf7af6 100644 --- a/veejay-current/veejay-server/libvje/effects/mixtoalpha.h +++ b/veejay-current/veejay-server/libvje/effects/mixtoalpha.h @@ -20,11 +20,6 @@ #ifndef MIX2ALPHA_H #define MIX2ALPHA_H -#include -#include -#include - vj_effect *mixtoalpha_init(int w, int h); -void mixtoalpha_apply( VJFrame *frame, VJFrame *frame2, int width,int height, int mode, int alpha); - +void mixtoalpha_apply( VJFrame *frame, VJFrame *frame2, int mode, int alpha); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index eeec1668..ffd3cfeb 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -510,7 +510,7 @@ extern int chameleonblend_prepare( uint8_t *bg[4],int w, int h ); extern void average_blend_apply( VJFrame *frame, VJFrame *frame2, int average_blend); extern void toalpha_apply( VJFrame *frame, int mode); -extern void mixtoalpha_apply( VJFrame *frame, VJFrame *frame2, int width,int height, int mode, int scale); +extern void mixtoalpha_apply( VJFrame *frame, VJFrame *frame2, int mode, int scale); extern void alpha2img_apply( VJFrame *frame, int width, int height); extern void alphafill_apply( VJFrame *frame, int width, int height, int val); extern void alphaflatten_apply( VJFrame *frame, int width, int height, int mode); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index 3cf08968..353e269a 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -616,7 +616,7 @@ static void vj_effman_apply_video_effect( VJFrame **frames, vjp_kf *todo_info,in average_blend_apply(frames[0], frames[1], arg[0]); break; case VJ_VIDEO_EFFECT_MIXTOALPHA: - mixtoalpha_apply( frames[0],frames[1], frames[0]->width,frames[0]->height,arg[0],arg[1]); + mixtoalpha_apply( frames[0],frames[1],arg[0],arg[1]); break; case VJ_VIDEO_EFFECT_MAGICALPHA: overlayalphamagic_apply(frames[0],frames[1],frames[0]->width,frames[0]->height,arg[0],arg[1]); From 80626cc9640b9ced55078e810f01467553485b87 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 10:31:04 +0200 Subject: [PATCH 051/170] Libvje / refactor : alpha2img * w,h * clean headers --- .../veejay-server/libvje/effects/alpha2img.c | 14 ++++++-------- .../veejay-server/libvje/effects/alpha2img.h | 6 +----- veejay-current/veejay-server/libvje/internal.h | 2 +- veejay-current/veejay-server/libvje/vj-effman.c | 2 +- 4 files changed, 9 insertions(+), 15 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/alpha2img.c b/veejay-current/veejay-server/libvje/effects/alpha2img.c index 1b33f6f0..d8bbfd1a 100644 --- a/veejay-current/veejay-server/libvje/effects/alpha2img.c +++ b/veejay-current/veejay-server/libvje/effects/alpha2img.c @@ -17,11 +17,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include + #include "common.h" +#include #include "alpha2img.h" vj_effect *alpha2img_init(int w, int h) @@ -38,11 +36,11 @@ vj_effect *alpha2img_init(int w, int h) } -void alpha2img_apply( VJFrame *frame, int width, int height) +void alpha2img_apply( VJFrame *frame) { - uint8_t *Y = frame->data[0]; - uint8_t *Cb = frame->data[1]; - uint8_t *Cr = frame->data[2]; + uint8_t *Y = frame->data[0]; + uint8_t *Cb = frame->data[1]; + uint8_t *Cr = frame->data[2]; uint8_t *a = frame->data[3]; veejay_memcpy( Y, a, frame->len ); diff --git a/veejay-current/veejay-server/libvje/effects/alpha2img.h b/veejay-current/veejay-server/libvje/effects/alpha2img.h index f1aeada3..b756e342 100644 --- a/veejay-current/veejay-server/libvje/effects/alpha2img.h +++ b/veejay-current/veejay-server/libvje/effects/alpha2img.h @@ -20,10 +20,6 @@ #ifndef ALPHA2IMG_H #define ALPHA2IMG_H -#include -#include -#include - vj_effect *alpha2img_init(int w, int h); -void alpha2img_apply( VJFrame *frame, int width, int height); +void alpha2img_apply( VJFrame *frame); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index ffd3cfeb..0d00cee2 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -511,7 +511,7 @@ extern int chameleonblend_prepare( uint8_t *bg[4],int w, int h ); extern void average_blend_apply( VJFrame *frame, VJFrame *frame2, int average_blend); extern void toalpha_apply( VJFrame *frame, int mode); extern void mixtoalpha_apply( VJFrame *frame, VJFrame *frame2, int mode, int scale); -extern void alpha2img_apply( VJFrame *frame, int width, int height); +extern void alpha2img_apply( VJFrame *frame); extern void alphafill_apply( VJFrame *frame, int width, int height, int val); extern void alphaflatten_apply( VJFrame *frame, int width, int height, int mode); extern void overlayalphamagic_apply(VJFrame *frame, VJFrame *frame2, int width,int height, int n, int visible); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index 353e269a..4cdb5b7a 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -384,7 +384,7 @@ static void vj_effman_apply_image_effect( alphafill_apply( frames[0], frames[0]->width,frames[0]->height, arg[0] ); break; case VJ_IMAGE_EFFECT_ALPHA2IMG: - alpha2img_apply( frames[0], frames[0]->width,frames[0]->height ); + alpha2img_apply( frames[0] ); break; case VJ_IMAGE_EFFECT_TOALPHA: toalpha_apply( frames[0], arg[0] ); From 9e7b8d1ba91d7e19d9dfbdfcb9427a98bb13260a Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 10:33:18 +0200 Subject: [PATCH 052/170] Libvje / refactor : alphafill * w,h * clean headers --- .../veejay-server/libvje/effects/alphafill.c | 10 ++++------ .../veejay-server/libvje/effects/alphafill.h | 6 +----- veejay-current/veejay-server/libvje/internal.h | 2 +- veejay-current/veejay-server/libvje/vj-effman.c | 2 +- 4 files changed, 7 insertions(+), 13 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/alphafill.c b/veejay-current/veejay-server/libvje/effects/alphafill.c index 2f5ce0a2..b7a95a49 100644 --- a/veejay-current/veejay-server/libvje/effects/alphafill.c +++ b/veejay-current/veejay-server/libvje/effects/alphafill.c @@ -17,11 +17,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include + #include "common.h" +#include #include "alphafill.h" vj_effect *alphafill_init(int w, int h) @@ -45,9 +43,9 @@ vj_effect *alphafill_init(int w, int h) return ve; } -void alphafill_apply( VJFrame *frame, int width, int height, int val) +void alphafill_apply( VJFrame *frame, int val) { - int len = (width * height); + const unsigned int len = frame->len; uint8_t *a = frame->data[3]; veejay_memset(a, val, len ); } diff --git a/veejay-current/veejay-server/libvje/effects/alphafill.h b/veejay-current/veejay-server/libvje/effects/alphafill.h index 95bfd1c0..68c2b3bc 100644 --- a/veejay-current/veejay-server/libvje/effects/alphafill.h +++ b/veejay-current/veejay-server/libvje/effects/alphafill.h @@ -20,10 +20,6 @@ #ifndef ALPHAFILL_H #define ALPHAFILL_H -#include -#include -#include - vj_effect *alphafill_init(int w, int h); -void alphafill_apply( VJFrame *frame, int width, int height, int val); +void alphafill_apply( VJFrame *frame, int val); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index 0d00cee2..894e7c66 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -512,7 +512,7 @@ extern void average_blend_apply( VJFrame *frame, VJFrame *frame2, int average_bl extern void toalpha_apply( VJFrame *frame, int mode); extern void mixtoalpha_apply( VJFrame *frame, VJFrame *frame2, int mode, int scale); extern void alpha2img_apply( VJFrame *frame); -extern void alphafill_apply( VJFrame *frame, int width, int height, int val); +extern void alphafill_apply( VJFrame *frame, int val); extern void alphaflatten_apply( VJFrame *frame, int width, int height, int mode); extern void overlayalphamagic_apply(VJFrame *frame, VJFrame *frame2, int width,int height, int n, int visible); extern void travelmatte_apply( VJFrame *frame, VJFrame *frame2, int width,int height, int mode); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index 4cdb5b7a..466700b3 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -381,7 +381,7 @@ static void vj_effman_apply_image_effect( perspective_apply(frames[0],arg[0],arg[1],arg[2],arg[3],arg[4],arg[5],arg[6],arg[7],arg[8] ); break; case VJ_IMAGE_EFFECT_ALPHAFILL: - alphafill_apply( frames[0], frames[0]->width,frames[0]->height, arg[0] ); + alphafill_apply( frames[0], arg[0] ); break; case VJ_IMAGE_EFFECT_ALPHA2IMG: alpha2img_apply( frames[0] ); From 2350de2035f470f46a56b8e216d6631058e5b1b1 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 10:35:23 +0200 Subject: [PATCH 053/170] Libvje / refactor : alphaflatten * w,h * clean headers --- .../veejay-server/libvje/effects/alphaflatten.c | 14 +++++--------- .../veejay-server/libvje/effects/alphaflatten.h | 6 +----- veejay-current/veejay-server/libvje/internal.h | 2 +- veejay-current/veejay-server/libvje/vj-effman.c | 2 +- 4 files changed, 8 insertions(+), 16 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/alphaflatten.c b/veejay-current/veejay-server/libvje/effects/alphaflatten.c index 9dc591d9..c261bc85 100644 --- a/veejay-current/veejay-server/libvje/effects/alphaflatten.c +++ b/veejay-current/veejay-server/libvje/effects/alphaflatten.c @@ -17,11 +17,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include + #include "common.h" +#include #include "alphaflatten.h" vj_effect *alphaflatten_init(int w, int h) @@ -49,10 +47,10 @@ vj_effect *alphaflatten_init(int w, int h) } -void alphaflatten_apply( VJFrame *frame, int width, int height, int mode) +void alphaflatten_apply( VJFrame *frame, int mode) { - unsigned int i; - const unsigned int len = frame->len; + unsigned int i; + const unsigned int len = frame->len; uint8_t *o0 = frame->data[0]; uint8_t *o1 = frame->data[1]; @@ -75,6 +73,4 @@ void alphaflatten_apply( VJFrame *frame, int width, int height, int mode) if( mode ) { veejay_memset( oA, 0, len ); } - - } diff --git a/veejay-current/veejay-server/libvje/effects/alphaflatten.h b/veejay-current/veejay-server/libvje/effects/alphaflatten.h index 8043713f..361bc1ab 100644 --- a/veejay-current/veejay-server/libvje/effects/alphaflatten.h +++ b/veejay-current/veejay-server/libvje/effects/alphaflatten.h @@ -20,10 +20,6 @@ #ifndef ALPHAFLATTEN_H #define ALPHAFLATTEN_H -#include -#include -#include - vj_effect *alphaflatten_init(int w, int h); -void alphaflatten_apply( VJFrame *frame, int width, int height, int mode); +void alphaflatten_apply( VJFrame *frame, int mode); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index 894e7c66..d13a4431 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -513,7 +513,7 @@ extern void toalpha_apply( VJFrame *frame, int mode); extern void mixtoalpha_apply( VJFrame *frame, VJFrame *frame2, int mode, int scale); extern void alpha2img_apply( VJFrame *frame); extern void alphafill_apply( VJFrame *frame, int val); -extern void alphaflatten_apply( VJFrame *frame, int width, int height, int mode); +extern void alphaflatten_apply( VJFrame *frame, int mode); extern void overlayalphamagic_apply(VJFrame *frame, VJFrame *frame2, int width,int height, int n, int visible); extern void travelmatte_apply( VJFrame *frame, VJFrame *frame2, int width,int height, int mode); extern void feathermask_apply( VJFrame *frame, int width, int height ); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index 466700b3..5afd9013 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -390,7 +390,7 @@ static void vj_effman_apply_image_effect( toalpha_apply( frames[0], arg[0] ); break; case VJ_IMAGE_EFFECT_ALPHAFLATTEN: - alphaflatten_apply(frames[0],frames[0]->width,frames[0]->height,arg[0]); + alphaflatten_apply(frames[0], arg[0]); break; case VJ_IMAGE_EFFECT_ALPHAFEATHERMASK: feathermask_apply(frames[0], frames[0]->width, frames[0]->height ); From e3c6caaf4273830057e9f09a1f8f68df16d1d6d2 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 10:48:54 +0200 Subject: [PATCH 054/170] Libvje / refactor : overlayalphamagic * w,h * clean headers --- .../libvje/effects/magicalphaoverlays.c | 215 +++++++++--------- .../libvje/effects/magicalphaoverlays.h | 2 +- .../veejay-server/libvje/internal.h | 2 +- .../veejay-server/libvje/vj-effman.c | 2 +- 4 files changed, 108 insertions(+), 113 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/magicalphaoverlays.c b/veejay-current/veejay-server/libvje/effects/magicalphaoverlays.c index aa0dddd2..8bd5e045 100644 --- a/veejay-current/veejay-server/libvje/effects/magicalphaoverlays.c +++ b/veejay-current/veejay-server/libvje/effects/magicalphaoverlays.c @@ -17,15 +17,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include + +#include "common.h" #include #include #include #include "magicalphaoverlays.h" -#include "common.h" vj_effect *overlayalphamagic_init(int w, int h) { @@ -64,11 +61,11 @@ vj_effect *overlayalphamagic_init(int w, int h) return ve; } -static void overlayalphamagic_adddistorted(VJFrame *frame, VJFrame *frame2,int width, int height) +static void overlayalphamagic_adddistorted(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; - + const unsigned int len = frame->len; + uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -82,12 +79,11 @@ static void overlayalphamagic_adddistorted(VJFrame *frame, VJFrame *frame2,int w } -static void overlayalphamagic_add_distorted(VJFrame *frame, VJFrame *frame2,int width, int height) +static void overlayalphamagic_add_distorted(VJFrame *frame, VJFrame *frame2) { - unsigned int i; uint8_t y1, y2; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -99,10 +95,10 @@ static void overlayalphamagic_add_distorted(VJFrame *frame, VJFrame *frame2,int } -static void overlayalphamagic_subdistorted(VJFrame *frame, VJFrame *frame2,int width, int height) +static void overlayalphamagic_subdistorted(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -115,11 +111,11 @@ static void overlayalphamagic_subdistorted(VJFrame *frame, VJFrame *frame2,int w } } -/*static void overlayalphamagic_sub_distorted(VJFrame *frame, VJFrame *frame2,int width, int height) +/*static void overlayalphamagic_sub_distorted(VJFrame *frame, VJFrame *frame2) { unsigned int i ; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -131,20 +127,20 @@ static void overlayalphamagic_subdistorted(VJFrame *frame, VJFrame *frame2,int w } }*/ -static void overlayalphamagic_multiply(VJFrame *frame, VJFrame *frame2,int width, int height) +static void overlayalphamagic_multiply(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; for (i = 0; i < len; i++) A[i] = (A[i] * A2[i]) >> 8; } -static void overlayalphamagic_simpledivide(VJFrame *frame, VJFrame *frame2, int width,int height) +static void overlayalphamagic_simpledivide(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; for (i = 0; i < len; i++) { @@ -153,11 +149,11 @@ static void overlayalphamagic_simpledivide(VJFrame *frame, VJFrame *frame2, int } } -static void overlayalphamagic_divide(VJFrame *frame, VJFrame *frame2, int width,int height) +static void overlayalphamagic_divide(VJFrame *frame, VJFrame *frame2) { unsigned int i; int a, b, c; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; for (i = 0; i < len; i++) { @@ -170,10 +166,9 @@ static void overlayalphamagic_divide(VJFrame *frame, VJFrame *frame2, int width, } } -static void overlayalphamagic_additive(VJFrame *frame, VJFrame *frame2,int width, int height) +static void overlayalphamagic_additive(VJFrame *frame, VJFrame *frame2) { - - unsigned int len = width * height; + unsigned int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -184,11 +179,11 @@ static void overlayalphamagic_additive(VJFrame *frame, VJFrame *frame2,int width } } -static void overlayalphamagic_substractive(VJFrame *frame, VJFrame *frame2,int width, int height) +static void overlayalphamagic_substractive(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -196,10 +191,10 @@ static void overlayalphamagic_substractive(VJFrame *frame, VJFrame *frame2,int w A[i] = CLAMP_Y( A[i] - A2[i] ); } -static void overlayalphamagic_softburn(VJFrame *frame, VJFrame *frame2,int width, int height) +static void overlayalphamagic_softburn(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -223,10 +218,10 @@ static void overlayalphamagic_softburn(VJFrame *frame, VJFrame *frame2,int width } } -static void overlayalphamagic_inverseburn(VJFrame *frame, VJFrame *frame2,int width, int height) +static void overlayalphamagic_inverseburn(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -242,10 +237,10 @@ static void overlayalphamagic_inverseburn(VJFrame *frame, VJFrame *frame2,int wi } } -static void overlayalphamagic_colordodge(VJFrame *frame, VJFrame *frame2,int width, int height) +static void overlayalphamagic_colordodge(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -264,10 +259,10 @@ static void overlayalphamagic_colordodge(VJFrame *frame, VJFrame *frame2,int wid } } -static void overlayalphamagic_mulsub(VJFrame *frame, VJFrame *frame2, int width, int height) +static void overlayalphamagic_mulsub(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -280,10 +275,10 @@ static void overlayalphamagic_mulsub(VJFrame *frame, VJFrame *frame2, int width, } } -static void overlayalphamagic_lighten(VJFrame *frame, VJFrame *frame2, int width,int height) +static void overlayalphamagic_lighten(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -299,10 +294,10 @@ static void overlayalphamagic_lighten(VJFrame *frame, VJFrame *frame2, int width } } -static void overlayalphamagic_difference(VJFrame *frame, VJFrame *frame2,int width, int height) +static void overlayalphamagic_difference(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -314,10 +309,10 @@ static void overlayalphamagic_difference(VJFrame *frame, VJFrame *frame2,int wid } } -static void overlayalphamagic_diffnegate(VJFrame *frame, VJFrame *frame2,int width, int height) +static void overlayalphamagic_diffnegate(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; int a, b; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -329,10 +324,10 @@ static void overlayalphamagic_diffnegate(VJFrame *frame, VJFrame *frame2,int wid } } -static void overlayalphamagic_exclusive(VJFrame *frame, VJFrame *frame2,int width, int height) +static void overlayalphamagic_exclusive(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -343,11 +338,11 @@ static void overlayalphamagic_exclusive(VJFrame *frame, VJFrame *frame2,int widt } } -static void overlayalphamagic_basecolor(VJFrame *frame, VJFrame *frame2,int width, int height) +static void overlayalphamagic_basecolor(VJFrame *frame, VJFrame *frame2) { unsigned int i; int a, b, c, d; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -360,10 +355,10 @@ static void overlayalphamagic_basecolor(VJFrame *frame, VJFrame *frame2,int widt } } -static void overlayalphamagic_freeze(VJFrame *frame, VJFrame *frame2, int width,int height) +static void overlayalphamagic_freeze(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -376,10 +371,10 @@ static void overlayalphamagic_freeze(VJFrame *frame, VJFrame *frame2, int width, } } -static void overlayalphamagic_unfreeze(VJFrame *frame, VJFrame *frame2,int width, int height) +static void overlayalphamagic_unfreeze(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -392,10 +387,10 @@ static void overlayalphamagic_unfreeze(VJFrame *frame, VJFrame *frame2,int width } } -/*static void overlayalphamagic_hardlight(VJFrame *frame, VJFrame *frame2,int width, int height) +/*static void overlayalphamagic_hardlight(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -412,11 +407,11 @@ static void overlayalphamagic_unfreeze(VJFrame *frame, VJFrame *frame2,int width } }*/ -static void overlayalphamagic_relativeaddlum(VJFrame *frame, VJFrame *frame2,int width, int height) +static void overlayalphamagic_relativeaddlum(VJFrame *frame, VJFrame *frame2) { unsigned int i; int a, b, c, d; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -429,10 +424,10 @@ static void overlayalphamagic_relativeaddlum(VJFrame *frame, VJFrame *frame2,int } } -static void overlayalphamagic_relativesublum(VJFrame *frame, VJFrame *frame2, int width, int height) +static void overlayalphamagic_relativesublum(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -444,10 +439,10 @@ static void overlayalphamagic_relativesublum(VJFrame *frame, VJFrame *frame2, in } } -static void overlayalphamagic_relativeadd(VJFrame *frame, VJFrame *frame2,int width, int height) +static void overlayalphamagic_relativeadd(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -461,10 +456,10 @@ static void overlayalphamagic_relativeadd(VJFrame *frame, VJFrame *frame2,int wi } } -static void overlayalphamagic_relativesub(VJFrame *frame, VJFrame *frame2,int width, int height) +static void overlayalphamagic_relativesub(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -477,10 +472,10 @@ static void overlayalphamagic_relativesub(VJFrame *frame, VJFrame *frame2,int wi } -static void overlayalphamagic_minsubselect(VJFrame *frame, VJFrame *frame2,int width, int height) +static void overlayalphamagic_minsubselect(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -495,10 +490,10 @@ static void overlayalphamagic_minsubselect(VJFrame *frame, VJFrame *frame2,int w } } -static void overlayalphamagic_maxsubselect(VJFrame *frame, VJFrame *frame2,int width, int height) +static void overlayalphamagic_maxsubselect(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -513,10 +508,10 @@ static void overlayalphamagic_maxsubselect(VJFrame *frame, VJFrame *frame2,int w } } -static void overlayalphamagic_addsubselect(VJFrame *frame, VJFrame *frame2,int width, int height) +static void overlayalphamagic_addsubselect(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; int c, a, b; @@ -532,10 +527,10 @@ static void overlayalphamagic_addsubselect(VJFrame *frame, VJFrame *frame2,int w } } -static void overlayalphamagic_maxselect(VJFrame *frame, VJFrame *frame2,int width, int height) +static void overlayalphamagic_maxselect(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -548,10 +543,10 @@ static void overlayalphamagic_maxselect(VJFrame *frame, VJFrame *frame2,int widt } } -static void overlayalphamagic_minselect(VJFrame *frame, VJFrame *frame2,int width, int height) +static void overlayalphamagic_minselect(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -564,10 +559,10 @@ static void overlayalphamagic_minselect(VJFrame *frame, VJFrame *frame2,int widt } } -static void overlayalphamagic_addtest(VJFrame *frame, VJFrame *frame2, int width,int height) +static void overlayalphamagic_addtest(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -580,10 +575,10 @@ static void overlayalphamagic_addtest(VJFrame *frame, VJFrame *frame2, int width } } -static void overlayalphamagic_addtest2(VJFrame *frame, VJFrame *frame2,int width, int height) +static void overlayalphamagic_addtest2(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -596,10 +591,10 @@ static void overlayalphamagic_addtest2(VJFrame *frame, VJFrame *frame2,int width } } -static void overlayalphamagic_addtest4(VJFrame *frame, VJFrame *frame2,int width, int height) +static void overlayalphamagic_addtest4(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; int a, b; @@ -614,10 +609,10 @@ static void overlayalphamagic_addtest4(VJFrame *frame, VJFrame *frame2,int width } } -static void overlayalphamagic_try - (VJFrame *frame, VJFrame *frame2, int width, int height) { +static void overlayalphamagic_try (VJFrame *frame, VJFrame *frame2, int width, int height) +{ unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; int a, b, p, q; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -654,104 +649,104 @@ static void overlayalphamagic_try } } -void overlayalphamagic_apply(VJFrame *frame, VJFrame *frame2, int width,int height, int n, int visible) +void overlayalphamagic_apply(VJFrame *frame, VJFrame *frame2, int n, int visible) { switch (n) { case VJ_EFFECT_BLEND_ADDITIVE: - overlayalphamagic_additive(frame, frame2, width, height); + overlayalphamagic_additive(frame, frame2); break; case VJ_EFFECT_BLEND_SUBSTRACTIVE: - overlayalphamagic_substractive(frame, frame2, width, height); + overlayalphamagic_substractive(frame, frame2); break; case VJ_EFFECT_BLEND_MULTIPLY: - overlayalphamagic_multiply(frame, frame2, width, height); + overlayalphamagic_multiply(frame, frame2); break; case VJ_EFFECT_BLEND_DIVIDE: - overlayalphamagic_simpledivide(frame, frame2, width, height); + overlayalphamagic_simpledivide(frame, frame2); break; case VJ_EFFECT_BLEND_LIGHTEN: - overlayalphamagic_lighten(frame, frame2, width, height); + overlayalphamagic_lighten(frame, frame2); break; case VJ_EFFECT_BLEND_DIFFERENCE: - overlayalphamagic_difference(frame, frame2, width, height); + overlayalphamagic_difference(frame, frame2); break; case VJ_EFFECT_BLEND_DIFFNEGATE: - overlayalphamagic_diffnegate(frame, frame2, width, height); + overlayalphamagic_diffnegate(frame, frame2); break; case VJ_EFFECT_BLEND_EXCLUSIVE: - overlayalphamagic_exclusive(frame, frame2, width, height); + overlayalphamagic_exclusive(frame, frame2); break; case VJ_EFFECT_BLEND_BASECOLOR: - overlayalphamagic_basecolor(frame, frame2, width, height); + overlayalphamagic_basecolor(frame, frame2); break; case VJ_EFFECT_BLEND_FREEZE: - overlayalphamagic_freeze(frame, frame2, width, height); + overlayalphamagic_freeze(frame, frame2); break; case VJ_EFFECT_BLEND_UNFREEZE: - overlayalphamagic_unfreeze(frame, frame2, width, height); + overlayalphamagic_unfreeze(frame, frame2); break; case VJ_EFFECT_BLEND_RELADD: - overlayalphamagic_relativeadd(frame, frame2, width, height); + overlayalphamagic_relativeadd(frame, frame2); break; case VJ_EFFECT_BLEND_RELSUB: - overlayalphamagic_relativesub(frame, frame2, width, height); + overlayalphamagic_relativesub(frame, frame2); break; case VJ_EFFECT_BLEND_RELADDLUM: - overlayalphamagic_relativeaddlum(frame, frame2, width, height); + overlayalphamagic_relativeaddlum(frame, frame2); break; case VJ_EFFECT_BLEND_RELSUBLUM: - overlayalphamagic_relativesublum(frame, frame2, width, height); + overlayalphamagic_relativesublum(frame, frame2); break; case VJ_EFFECT_BLEND_MAXSEL: - overlayalphamagic_maxselect(frame, frame2, width, height); + overlayalphamagic_maxselect(frame, frame2); break; case VJ_EFFECT_BLEND_MINSEL: - overlayalphamagic_minselect(frame, frame2, width, height); + overlayalphamagic_minselect(frame, frame2); break; case VJ_EFFECT_BLEND_MINSUBSEL: - overlayalphamagic_minsubselect(frame, frame2, width, height); + overlayalphamagic_minsubselect(frame, frame2); break; case VJ_EFFECT_BLEND_MAXSUBSEL: - overlayalphamagic_maxsubselect(frame, frame2, width, height); + overlayalphamagic_maxsubselect(frame, frame2); break; case VJ_EFFECT_BLEND_ADDSUBSEL: - overlayalphamagic_addsubselect(frame, frame2, width, height); + overlayalphamagic_addsubselect(frame, frame2); break; case VJ_EFFECT_BLEND_ADDAVG: - overlayalphamagic_add_distorted(frame, frame2, width, height); + overlayalphamagic_add_distorted(frame, frame2); break; case VJ_EFFECT_BLEND_ADDTEST2: - overlayalphamagic_addtest(frame, frame2, width, height); + overlayalphamagic_addtest(frame, frame2); break; case VJ_EFFECT_BLEND_ADDTEST3: - overlayalphamagic_addtest2(frame, frame2, width, height); + overlayalphamagic_addtest2(frame, frame2); break; case VJ_EFFECT_BLEND_ADDTEST4: - overlayalphamagic_addtest4(frame, frame2, width, height); + overlayalphamagic_addtest4(frame, frame2); break; case VJ_EFFECT_BLEND_MULSUB: - overlayalphamagic_mulsub(frame, frame2, width, height); + overlayalphamagic_mulsub(frame, frame2); break; case VJ_EFFECT_BLEND_SOFTBURN: - overlayalphamagic_softburn(frame, frame2, width, height); + overlayalphamagic_softburn(frame, frame2); break; case VJ_EFFECT_BLEND_INVERSEBURN: - overlayalphamagic_inverseburn(frame, frame2, width, height); + overlayalphamagic_inverseburn(frame, frame2); break; case VJ_EFFECT_BLEND_COLORDODGE: - overlayalphamagic_colordodge(frame, frame2, width, height); + overlayalphamagic_colordodge(frame, frame2); break; case VJ_EFFECT_BLEND_ADDDISTORT: - overlayalphamagic_adddistorted(frame, frame2, width, height); + overlayalphamagic_adddistorted(frame, frame2); break; case VJ_EFFECT_BLEND_SUBDISTORT: - overlayalphamagic_subdistorted(frame, frame2, width, height); + overlayalphamagic_subdistorted(frame, frame2); break; case VJ_EFFECT_BLEND_ADDTEST5: - overlayalphamagic_try(frame, frame2, width, height); + overlayalphamagic_try(frame, frame2, frame->width, frame->height); break; case VJ_EFFECT_BLEND_NEGDIV: - overlayalphamagic_divide(frame,frame2,width,height); + overlayalphamagic_divide(frame,frame2); break; } diff --git a/veejay-current/veejay-server/libvje/effects/magicalphaoverlays.h b/veejay-current/veejay-server/libvje/effects/magicalphaoverlays.h index 07badcf3..daa52240 100644 --- a/veejay-current/veejay-server/libvje/effects/magicalphaoverlays.h +++ b/veejay-current/veejay-server/libvje/effects/magicalphaoverlays.h @@ -21,5 +21,5 @@ #ifndef MAGICALPHAOVERLAYS_H #define MAGICALPHAOVERLAYS_H vj_effect *overlayalphamagic_init(int w, int h); -void overlayalphamagic_apply( VJFrame *frame, VJFrame *frame2, int width,int height, int n, int mode); +void overlayalphamagic_apply( VJFrame *frame, VJFrame *frame2, int n, int mode); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index d13a4431..354330ea 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -514,7 +514,7 @@ extern void mixtoalpha_apply( VJFrame *frame, VJFrame *frame2, int mode, int sca extern void alpha2img_apply( VJFrame *frame); extern void alphafill_apply( VJFrame *frame, int val); extern void alphaflatten_apply( VJFrame *frame, int mode); -extern void overlayalphamagic_apply(VJFrame *frame, VJFrame *frame2, int width,int height, int n, int visible); +extern void overlayalphamagic_apply(VJFrame *frame, VJFrame *frame2, int n, int visible); extern void travelmatte_apply( VJFrame *frame, VJFrame *frame2, int width,int height, int mode); extern void feathermask_apply( VJFrame *frame, int width, int height ); extern void alphaselect_apply( VJFrame *frame, int width,int height, int i_angle, int r, int g,int b, int swap); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index 5afd9013..09316de4 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -619,7 +619,7 @@ static void vj_effman_apply_video_effect( VJFrame **frames, vjp_kf *todo_info,in mixtoalpha_apply( frames[0],frames[1],arg[0],arg[1]); break; case VJ_VIDEO_EFFECT_MAGICALPHA: - overlayalphamagic_apply(frames[0],frames[1],frames[0]->width,frames[0]->height,arg[0],arg[1]); + overlayalphamagic_apply(frames[0], frames[1], arg[0], arg[1]); break; case VJ_VIDEO_EFFECT_TRAVELMATTE: travelmatte_apply(frames[0],frames[1],frames[0]->width,frames[0]->height,arg[0]); From 8b4003098ce702096403b7486f9f753d9e7adaaf Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 10:51:51 +0200 Subject: [PATCH 055/170] Libvje / refactor : travelmatte * w,h * clean headers --- .../veejay-server/libvje/effects/travelmatte.c | 16 +++++++--------- .../veejay-server/libvje/effects/travelmatte.h | 6 +----- veejay-current/veejay-server/libvje/internal.h | 2 +- veejay-current/veejay-server/libvje/vj-effman.c | 2 +- 4 files changed, 10 insertions(+), 16 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/travelmatte.c b/veejay-current/veejay-server/libvje/effects/travelmatte.c index e759baa4..0ec25a7e 100644 --- a/veejay-current/veejay-server/libvje/effects/travelmatte.c +++ b/veejay-current/veejay-server/libvje/effects/travelmatte.c @@ -17,11 +17,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include + #include "common.h" +#include #include "travelmatte.h" vj_effect *travelmatte_init(int w, int h) @@ -45,13 +43,13 @@ vj_effect *travelmatte_init(int w, int h) } -void travelmatte_apply( VJFrame *frame, VJFrame *frame2, int width, int height, int mode) +void travelmatte_apply( VJFrame *frame, VJFrame *frame2, int mode) { - const unsigned int len = frame->len; + const unsigned int len = frame->len; - uint8_t *a0 = frame->data[0]; - uint8_t *a1 = frame->data[1]; - uint8_t *a2 = frame->data[2]; + uint8_t *a0 = frame->data[0]; + uint8_t *a1 = frame->data[1]; + uint8_t *a2 = frame->data[2]; uint8_t *aA = frame->data[3]; uint8_t *o0 = frame->data[0]; diff --git a/veejay-current/veejay-server/libvje/effects/travelmatte.h b/veejay-current/veejay-server/libvje/effects/travelmatte.h index e2f92e0d..63b222ee 100644 --- a/veejay-current/veejay-server/libvje/effects/travelmatte.h +++ b/veejay-current/veejay-server/libvje/effects/travelmatte.h @@ -20,11 +20,7 @@ #ifndef TRAVELMATTE_H #define TRAVELMATTE_H -#include -#include -#include - vj_effect *travelmatte_init(int w, int h); -void travelmatte_apply( VJFrame *frame, VJFrame *frame2, int width,int height, int mode); +void travelmatte_apply( VJFrame *frame, VJFrame *frame2, int mode); void travelmatte_free(); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index 354330ea..c5d746a7 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -515,7 +515,7 @@ extern void alpha2img_apply( VJFrame *frame); extern void alphafill_apply( VJFrame *frame, int val); extern void alphaflatten_apply( VJFrame *frame, int mode); extern void overlayalphamagic_apply(VJFrame *frame, VJFrame *frame2, int n, int visible); -extern void travelmatte_apply( VJFrame *frame, VJFrame *frame2, int width,int height, int mode); +extern void travelmatte_apply( VJFrame *frame, VJFrame *frame2, int mode); extern void feathermask_apply( VJFrame *frame, int width, int height ); extern void alphaselect_apply( VJFrame *frame, int width,int height, int i_angle, int r, int g,int b, int swap); extern void alphaselect2_apply( VJFrame *frame, int tola, int r, int g,int b, int tolb,int alpha); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index 09316de4..bc4a7b37 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -622,7 +622,7 @@ static void vj_effman_apply_video_effect( VJFrame **frames, vjp_kf *todo_info,in overlayalphamagic_apply(frames[0], frames[1], arg[0], arg[1]); break; case VJ_VIDEO_EFFECT_TRAVELMATTE: - travelmatte_apply(frames[0],frames[1],frames[0]->width,frames[0]->height,arg[0]); + travelmatte_apply(frames[0],frames[1],arg[0]); break; case VJ_VIDEO_EFFECT_ALPHABLEND: alphablend_apply(frames[0],frames[1],frames[0]->width,frames[0]->height); From cc456d9e4ab6731131459eb221250fb944303717 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 11:00:30 +0200 Subject: [PATCH 056/170] Libvje / refactor : feathermask * w,h * clean headers --- .../libvje/effects/feathermask.c | 21 +++++++++---------- .../libvje/effects/feathermask.h | 6 +----- .../veejay-server/libvje/internal.h | 2 +- .../veejay-server/libvje/vj-effman.c | 2 +- 4 files changed, 13 insertions(+), 18 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/feathermask.c b/veejay-current/veejay-server/libvje/effects/feathermask.c index 3c3f2447..9bf431ae 100644 --- a/veejay-current/veejay-server/libvje/effects/feathermask.c +++ b/veejay-current/veejay-server/libvje/effects/feathermask.c @@ -17,13 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include + +#include "common.h" #include #include "feathermask.h" -#include "common.h" vj_effect *feathermask_init(int w,int h) { @@ -54,11 +51,11 @@ void feathermask_free() } } -static void feathermask1_apply( VJFrame *frame, uint8_t *alpha, int width, int height) +static void feathermask1_apply( VJFrame *frame, uint8_t *alpha, unsigned int width, unsigned int height) { - int r, c; - int len = (width * height) - width; - uint8_t *aA = frame->data[3]; + int r, c; + const unsigned int len = frame->len - width; + uint8_t *aA = frame->data[3]; for(r=width; r < len; r+=width) { for(c=1; c < (width-1); c++) { @@ -76,9 +73,11 @@ static void feathermask1_apply( VJFrame *frame, uint8_t *alpha, int width, int h } } -void feathermask_apply(VJFrame *frame, int width, int height) +void feathermask_apply(VJFrame *frame) { - vj_frame_copy1( frame->data[3],mask, width * height ); + const unsigned int width = frame->width; + const unsigned int height = frame->height; + vj_frame_copy1( frame->data[3],mask, frame->len ); feathermask1_apply(frame, mask, width, height); } diff --git a/veejay-current/veejay-server/libvje/effects/feathermask.h b/veejay-current/veejay-server/libvje/effects/feathermask.h index f898717c..ddd3584e 100644 --- a/veejay-current/veejay-server/libvje/effects/feathermask.h +++ b/veejay-current/veejay-server/libvje/effects/feathermask.h @@ -20,12 +20,8 @@ #ifndef FEATHERMASK_H #define FEATHERMASK_H -#include -#include -#include - vj_effect *feathermask_init(int w, int h); -void feathermask_apply( VJFrame *frame, int width, int height); +void feathermask_apply( VJFrame *frame); int feathermask_malloc(int width, int height); void feathermask_free(); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index c5d746a7..2e3e166d 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -516,7 +516,7 @@ extern void alphafill_apply( VJFrame *frame, int val); extern void alphaflatten_apply( VJFrame *frame, int mode); extern void overlayalphamagic_apply(VJFrame *frame, VJFrame *frame2, int n, int visible); extern void travelmatte_apply( VJFrame *frame, VJFrame *frame2, int mode); -extern void feathermask_apply( VJFrame *frame, int width, int height ); +extern void feathermask_apply( VJFrame *frame ); extern void alphaselect_apply( VJFrame *frame, int width,int height, int i_angle, int r, int g,int b, int swap); extern void alphaselect2_apply( VJFrame *frame, int tola, int r, int g,int b, int tolb,int alpha); extern void alphablend_apply( VJFrame *frame, VJFrame *frame2, int width,int height); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index bc4a7b37..6901c1d7 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -393,7 +393,7 @@ static void vj_effman_apply_image_effect( alphaflatten_apply(frames[0], arg[0]); break; case VJ_IMAGE_EFFECT_ALPHAFEATHERMASK: - feathermask_apply(frames[0], frames[0]->width, frames[0]->height ); + feathermask_apply(frames[0] ); break; case VJ_IMAGE_EFFECT_ALPHASELECT: alphaselect_apply(frames[0],frames[0]->width,frames[0]->height,arg[0],arg[1],arg[2],arg[3],arg[4]); From fab6cc8d3bf7109d0f5d0cc5a9ec56e923f6e2ee Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 11:03:51 +0200 Subject: [PATCH 057/170] Libvje / refactor : alphaselect * w,h * clean headers --- .../veejay-server/libvje/effects/alphaselect.c | 15 +++++---------- .../veejay-server/libvje/effects/alphaselect.h | 8 +------- veejay-current/veejay-server/libvje/internal.h | 2 +- veejay-current/veejay-server/libvje/vj-effman.c | 2 +- 4 files changed, 8 insertions(+), 19 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/alphaselect.c b/veejay-current/veejay-server/libvje/effects/alphaselect.c index 5d0ebdd1..edc2cb9a 100644 --- a/veejay-current/veejay-server/libvje/effects/alphaselect.c +++ b/veejay-current/veejay-server/libvje/effects/alphaselect.c @@ -22,11 +22,8 @@ * derived from greyselect.c */ -#include -#include -#include -#include #include "common.h" +#include #include "alphaselect.h" vj_effect *alphaselect_init(int w, int h) @@ -76,9 +73,7 @@ vj_effect *alphaselect_init(int w, int h) return ve; } -void alphaselect_apply( VJFrame *frame, int width, - int height, int i_angle, int r, int g, - int b, int swap) +void alphaselect_apply( VJFrame *frame, int i_angle, int r, int g, int b, int swap) { uint8_t *fg_cb, *fg_cr; int accept_angle_tg; @@ -87,6 +82,7 @@ void alphaselect_apply( VJFrame *frame, int width, float angle = (float) i_angle / 100.0f; unsigned int pos; uint8_t val; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -113,7 +109,7 @@ void alphaselect_apply( VJFrame *frame, int width, fg_cr = Cr; if( swap == 0 ) { - for (pos = (width * height); pos != 0; pos--) { + for (pos = len; pos != 0; pos--) { short xx, yy; xx = (((fg_cb[pos]) * cb) + ((fg_cr[pos]) * cr)) >> 7; yy = (((fg_cr[pos]) * cb) - ((fg_cb[pos]) * cr)) >> 7; @@ -133,7 +129,7 @@ void alphaselect_apply( VJFrame *frame, int width, } } else { - for (pos = (width * height); pos != 0; pos--) { + for (pos = len; pos != 0; pos--) { short xx, yy; xx = (((fg_cb[pos]) * cb) + ((fg_cr[pos]) * cr)) >> 7; yy = (((fg_cr[pos]) * cb) - ((fg_cb[pos]) * cr)) >> 7; @@ -153,4 +149,3 @@ void alphaselect_apply( VJFrame *frame, int width, } } } - diff --git a/veejay-current/veejay-server/libvje/effects/alphaselect.h b/veejay-current/veejay-server/libvje/effects/alphaselect.h index 080c46ea..7aec0194 100644 --- a/veejay-current/veejay-server/libvje/effects/alphaselect.h +++ b/veejay-current/veejay-server/libvje/effects/alphaselect.h @@ -20,13 +20,7 @@ #ifndef ALPHASELECT_H #define ALPHASELECT_H -#include -#include -#include - vj_effect *alphaselect_init(); -void alphaselect_apply( VJFrame *frame, int width, - int height, int i_angle, - int red, int green, int blue, int swap); +void alphaselect_apply( VJFrame *frame, int i_angle, int red, int green, int blue, int swap); void alphaselect_free(); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index 2e3e166d..f0f4b19f 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -517,7 +517,7 @@ extern void alphaflatten_apply( VJFrame *frame, int mode); extern void overlayalphamagic_apply(VJFrame *frame, VJFrame *frame2, int n, int visible); extern void travelmatte_apply( VJFrame *frame, VJFrame *frame2, int mode); extern void feathermask_apply( VJFrame *frame ); -extern void alphaselect_apply( VJFrame *frame, int width,int height, int i_angle, int r, int g,int b, int swap); +extern void alphaselect_apply( VJFrame *frame, int i_angle, int r, int g,int b, int swap); extern void alphaselect2_apply( VJFrame *frame, int tola, int r, int g,int b, int tolb,int alpha); extern void alphablend_apply( VJFrame *frame, VJFrame *frame2, int width,int height); extern void lumakeyalpha_apply( VJFrame *frame, VJFrame *frame2, int width, int height, int type, int opacity ); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index 6901c1d7..18a79aae 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -396,7 +396,7 @@ static void vj_effman_apply_image_effect( feathermask_apply(frames[0] ); break; case VJ_IMAGE_EFFECT_ALPHASELECT: - alphaselect_apply(frames[0],frames[0]->width,frames[0]->height,arg[0],arg[1],arg[2],arg[3],arg[4]); + alphaselect_apply(frames[0],arg[0],arg[1],arg[2],arg[3],arg[4]); break; case VJ_IMAGE_EFFECT_ALPHASELECT2: alphaselect2_apply(frames[0],arg[0],arg[1],arg[2],arg[3],arg[4],arg[5]); From 3b625b739328825d55071b0d90ad29b4e1787a41 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 11:05:04 +0200 Subject: [PATCH 058/170] Libvje / refactor : alphaselect2 * clean headers --- veejay-current/veejay-server/libvje/effects/alphaselect2.c | 5 +---- veejay-current/veejay-server/libvje/effects/alphaselect2.h | 4 ---- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/alphaselect2.c b/veejay-current/veejay-server/libvje/effects/alphaselect2.c index c16fd97c..8139d03c 100644 --- a/veejay-current/veejay-server/libvje/effects/alphaselect2.c +++ b/veejay-current/veejay-server/libvje/effects/alphaselect2.c @@ -22,11 +22,8 @@ * originally from http://gc-films.com/chromakey.html */ -#include -#include -#include -#include #include "common.h" +#include #include "alphaselect2.h" vj_effect *alphaselect2_init(int w, int h) diff --git a/veejay-current/veejay-server/libvje/effects/alphaselect2.h b/veejay-current/veejay-server/libvje/effects/alphaselect2.h index 9d744cdf..fcd82968 100644 --- a/veejay-current/veejay-server/libvje/effects/alphaselect2.h +++ b/veejay-current/veejay-server/libvje/effects/alphaselect2.h @@ -20,10 +20,6 @@ #ifndef ALPHASELECT2_H #define ALPHASELECT2_H -#include -#include -#include - vj_effect *alphaselect2_init(); void alphaselect2_apply( VJFrame *frame, int tola,int red,int green,int blue, int tolb,int use_alpha); #endif From a650bbee13c53d6a6799ff30c183fd76eca74f6e Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 11:06:46 +0200 Subject: [PATCH 059/170] Libvje / refactor : alphablend * w,h * clean headers --- .../veejay-server/libvje/effects/alphablend.c | 10 +++------- .../veejay-server/libvje/effects/alphablend.h | 7 +------ veejay-current/veejay-server/libvje/internal.h | 2 +- veejay-current/veejay-server/libvje/vj-effman.c | 2 +- 4 files changed, 6 insertions(+), 15 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/alphablend.c b/veejay-current/veejay-server/libvje/effects/alphablend.c index 6376ae9a..fd0c2142 100644 --- a/veejay-current/veejay-server/libvje/effects/alphablend.c +++ b/veejay-current/veejay-server/libvje/effects/alphablend.c @@ -17,14 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ - -#include -#include -#include -#include + +#include "common.h" #include #include "alphablend.h" -#include "common.h" vj_effect *alphablend_init(int w, int h) { @@ -51,7 +47,7 @@ static inline int blend_plane( uint8_t *dst, uint8_t *A, uint8_t *B, uint8_t *aA return 0; } -void alphablend_apply( VJFrame *frame, VJFrame *frame2, int width,int height) +void alphablend_apply( VJFrame *frame, VJFrame *frame2) { size_t uv_len = (frame->ssm ? frame->len : frame->uv_len ); blend_plane( frame->data[0], frame->data[0], frame2->data[0], frame2->data[3], frame->len ); diff --git a/veejay-current/veejay-server/libvje/effects/alphablend.h b/veejay-current/veejay-server/libvje/effects/alphablend.h index 43bd8d75..10067d40 100644 --- a/veejay-current/veejay-server/libvje/effects/alphablend.h +++ b/veejay-current/veejay-server/libvje/effects/alphablend.h @@ -20,11 +20,6 @@ #ifndef ALPHABLEND_H #define ALPHABLEND_H -#include -#include -#include - vj_effect *alphablend_init(int w, int h); -void alphablend_apply( VJFrame *frame, VJFrame *frame2, int width,int height); - +void alphablend_apply( VJFrame *frame, VJFrame *frame2); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index f0f4b19f..536562a7 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -519,7 +519,7 @@ extern void travelmatte_apply( VJFrame *frame, VJFrame *frame2, int mode); extern void feathermask_apply( VJFrame *frame ); extern void alphaselect_apply( VJFrame *frame, int i_angle, int r, int g,int b, int swap); extern void alphaselect2_apply( VJFrame *frame, int tola, int r, int g,int b, int tolb,int alpha); -extern void alphablend_apply( VJFrame *frame, VJFrame *frame2, int width,int height); +extern void alphablend_apply( VJFrame *frame, VJFrame *frame2); extern void lumakeyalpha_apply( VJFrame *frame, VJFrame *frame2, int width, int height, int type, int opacity ); extern void chromamagickalpha_apply( VJFrame *frame, VJFrame *frame2, int width, int height, int type, int opacity ); extern void overlaymagicalpha_apply( VJFrame *frame, VJFrame *frame2, int width, int height, int type, int mode ); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index 18a79aae..26f1a77a 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -625,7 +625,7 @@ static void vj_effman_apply_video_effect( VJFrame **frames, vjp_kf *todo_info,in travelmatte_apply(frames[0],frames[1],arg[0]); break; case VJ_VIDEO_EFFECT_ALPHABLEND: - alphablend_apply(frames[0],frames[1],frames[0]->width,frames[0]->height); + alphablend_apply(frames[0],frames[1]); break; case VJ_VIDEO_EFFECT_PORTERDUFF: porterduff_apply(frames[0], frames[1], arg[0]); From 5538b5dce0fcb3648f5ce3b9cfeab99e849fcacd Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 11:09:18 +0200 Subject: [PATCH 060/170] Libvje / refactor : lumakeyalpha * w,h * clean headers --- .../libvje/effects/lumakeyalpha.c | 32 +++++++++---------- .../libvje/effects/lumakeyalpha.h | 6 +--- .../veejay-server/libvje/internal.h | 2 +- .../veejay-server/libvje/vj-effman.c | 2 +- 4 files changed, 19 insertions(+), 23 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/lumakeyalpha.c b/veejay-current/veejay-server/libvje/effects/lumakeyalpha.c index d5366da8..3e87640c 100644 --- a/veejay-current/veejay-server/libvje/effects/lumakeyalpha.c +++ b/veejay-current/veejay-server/libvje/effects/lumakeyalpha.c @@ -17,11 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include + +#include "common.h" #include #include "lumakeyalpha.h" -#include "common.h" vj_effect *lumakeyalpha_init(int width, int height) { @@ -54,9 +53,10 @@ vj_effect *lumakeyalpha_init(int width, int height) return ve; } -void lumakeyalpha_apply( VJFrame *frame, VJFrame *frame2, int width,int height, int type, int opacity ) +void lumakeyalpha_apply( VJFrame *frame, VJFrame *frame2, int type, int opacity ) { - unsigned int i, len = width * height; + unsigned int i; + const unsigned int len = frame->len; unsigned int op1 = (opacity > 255) ? 255 : opacity; unsigned int op0 = 255 - op1; @@ -77,37 +77,37 @@ void lumakeyalpha_apply( VJFrame *frame, VJFrame *frame2, int width,int height, Y[i] = FEATHER( Y[i],op0,aB[i],Y2[i],op1 ); Cb[i]= FEATHER(Cb[i],op0,aB[i],Cb2[i],op1 ); - Cr[i]= FEATHER(Cr[i],op0,aB[i],Cr2[i],op1 ); + Cr[i]= FEATHER(Cr[i],op0,aB[i],Cr2[i],op1 ); } break; - case 1: + case 1: for( i = 0; i < len; i ++ ) { if( aA[i] == 0 ) continue; Y[i] = FEATHER( Y[i],op0,aB[i],Y2[i],op1 ); Cb[i]= FEATHER(Cb[i],op0,aB[i],Cb2[i],op1 ); - Cr[i]= FEATHER(Cr[i],op0,aB[i],Cr2[i],op1 ); + Cr[i]= FEATHER(Cr[i],op0,aB[i],Cr2[i],op1 ); } break; - case 2: + case 2: for( i = 0; i < len; i ++ ) { if( aB[i] == 0 || aA[i] == 0 ) continue; Y[i] = FEATHER( Y[i],op0,aB[i],Y2[i],op1 ); Cb[i]= FEATHER(Cb[i],op0,aB[i],Cb2[i],op1 ); - Cr[i]= FEATHER(Cr[i],op0,aB[i],Cr2[i],op1 ); + Cr[i]= FEATHER(Cr[i],op0,aB[i],Cr2[i],op1 ); } break; - case 3: + case 3: for( i = 0; i < len; i ++ ) { if( aB[i] == 0 && aA[i] == 0 ) continue; Y[i] = FEATHER( Y[i],op0,aB[i],Y2[i],op1 ); Cb[i]= FEATHER(Cb[i],op0,aB[i],Cb2[i],op1 ); - Cr[i]= FEATHER(Cr[i],op0,aB[i],Cr2[i],op1 ); + Cr[i]= FEATHER(Cr[i],op0,aB[i],Cr2[i],op1 ); } break; case 4: @@ -120,14 +120,14 @@ void lumakeyalpha_apply( VJFrame *frame, VJFrame *frame2, int width,int height, Cr[i]= FEATHER(Cr[i],op0,aA[i],Cr2[i],op1 ); } break; - case 5: + case 5: for( i = 0; i < len; i ++ ) { if( aA[i] == 0 ) continue; Y[i] = FEATHER( Y[i],op0,aA[i],Y2[i],op1 ); Cb[i]= FEATHER(Cb[i],op0,aA[i],Cb2[i],op1 ); - Cr[i]= FEATHER(Cr[i],op0,aA[i],Cr2[i],op1 ); + Cr[i]= FEATHER(Cr[i],op0,aA[i],Cr2[i],op1 ); } break; case 6: @@ -137,7 +137,7 @@ void lumakeyalpha_apply( VJFrame *frame, VJFrame *frame2, int width,int height, Y[i] = FEATHER( Y[i],op0,aA[i],Y2[i],op1 ); Cb[i]= FEATHER(Cb[i],op0,aA[i],Cb2[i],op1 ); - Cr[i]= FEATHER(Cr[i],op0,aA[i],Cr2[i],op1 ); + Cr[i]= FEATHER(Cr[i],op0,aA[i],Cr2[i],op1 ); } break; case 7: @@ -147,7 +147,7 @@ void lumakeyalpha_apply( VJFrame *frame, VJFrame *frame2, int width,int height, Y[i] = FEATHER( Y[i],op0,aA[i],Y2[i],op1 ); Cb[i]= FEATHER(Cb[i],op0,aA[i],Cb2[i],op1 ); - Cr[i]= FEATHER(Cr[i],op0,aA[i],Cr2[i],op1 ); + Cr[i]= FEATHER(Cr[i],op0,aA[i],Cr2[i],op1 ); } break; diff --git a/veejay-current/veejay-server/libvje/effects/lumakeyalpha.h b/veejay-current/veejay-server/libvje/effects/lumakeyalpha.h index 6a9938b0..36b43954 100644 --- a/veejay-current/veejay-server/libvje/effects/lumakeyalpha.h +++ b/veejay-current/veejay-server/libvje/effects/lumakeyalpha.h @@ -20,10 +20,6 @@ #ifndef LUMAKEYA_H #define LUMAKEYA_H -#include -#include -#include - vj_effect *lumakeyalpha_init(int w, int h); -void lumakeyalpha_apply( VJFrame *frame, VJFrame *frame2, int width, int height, int type, int opacity ); +void lumakeyalpha_apply( VJFrame *frame, VJFrame *frame2, int type, int opacity ); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index 536562a7..2e236871 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -520,7 +520,7 @@ extern void feathermask_apply( VJFrame *frame ); extern void alphaselect_apply( VJFrame *frame, int i_angle, int r, int g,int b, int swap); extern void alphaselect2_apply( VJFrame *frame, int tola, int r, int g,int b, int tolb,int alpha); extern void alphablend_apply( VJFrame *frame, VJFrame *frame2); -extern void lumakeyalpha_apply( VJFrame *frame, VJFrame *frame2, int width, int height, int type, int opacity ); +extern void lumakeyalpha_apply( VJFrame *frame, VJFrame *frame2, int type, int opacity ); extern void chromamagickalpha_apply( VJFrame *frame, VJFrame *frame2, int width, int height, int type, int opacity ); extern void overlaymagicalpha_apply( VJFrame *frame, VJFrame *frame2, int width, int height, int type, int mode ); extern void alphanegate_apply( VJFrame *frame, int width, int height, int value ); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index 26f1a77a..cb3ead87 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -631,7 +631,7 @@ static void vj_effman_apply_video_effect( VJFrame **frames, vjp_kf *todo_info,in porterduff_apply(frames[0], frames[1], arg[0]); break; case VJ_VIDEO_EFFECT_LUMAKEYALPHA: - lumakeyalpha_apply(frames[0],frames[1],frames[0]->width,frames[0]->height,arg[0],arg[1]); + lumakeyalpha_apply(frames[0],frames[1],arg[0],arg[1]); break; case VJ_VIDEO_EFFECT_CHROMAMAGICKALPHA: chromamagickalpha_apply(frames[0],frames[1],frames[0]->width,frames[0]->height,arg[0],arg[1]); From 9d6cd227e78acc3385fd4d8c5563b0068e37a443 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 11:16:01 +0200 Subject: [PATCH 061/170] Libvje / refactor : chromamagicalpha * w,h * clean headers --- .../libvje/effects/chromamagickalpha.c | 183 ++++++++---------- .../libvje/effects/chromamagickalpha.h | 6 +- .../veejay-server/libvje/internal.h | 2 +- .../veejay-server/libvje/vj-effman.c | 2 +- 4 files changed, 87 insertions(+), 106 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/chromamagickalpha.c b/veejay-current/veejay-server/libvje/effects/chromamagickalpha.c index fc925f15..4669d554 100644 --- a/veejay-current/veejay-server/libvje/effects/chromamagickalpha.c +++ b/veejay-current/veejay-server/libvje/effects/chromamagickalpha.c @@ -23,13 +23,10 @@ threshold value or substraction value depending on the mode of this effect */ -#include -#include +#include "common.h" #include #include "chromamagickalpha.h" -#include -#include "common.h" -// fixme: mode 8 and 9 corrupt (green/purple cbcr) +// FIXME: mode 8 and 9 corrupt (green/purple cbcr) vj_effect *chromamagickalpha_init(int w, int h) { @@ -69,11 +66,10 @@ vj_effect *chromamagickalpha_init(int w, int h) return ve; } -static void chromamagicalpha_selectmin(VJFrame *frame, VJFrame *frame2, int width, - int height, int op_a) +static void chromamagicalpha_selectmin(VJFrame *frame, VJFrame *frame2, int op_a) { unsigned int i; - const int len = frame->len; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -97,12 +93,11 @@ static void chromamagicalpha_selectmin(VJFrame *frame, VJFrame *frame2, int widt } } -static void chromamagicalpha_addsubselectlum(VJFrame *frame, VJFrame *frame2, - int width, int height, int op_a) +static void chromamagicalpha_addsubselectlum(VJFrame *frame, VJFrame *frame2, int op_a) { unsigned int i; int c, a, b; - const int len = frame->len; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -136,11 +131,10 @@ static void chromamagicalpha_addsubselectlum(VJFrame *frame, VJFrame *frame2, } } -static void chromamagicalpha_selectmax(VJFrame *frame, VJFrame *frame2, int width, - int height, int op_a) +static void chromamagicalpha_selectmax(VJFrame *frame, VJFrame *frame2, int op_a) { unsigned int i; - const int len = frame->len; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -166,11 +160,10 @@ static void chromamagicalpha_selectmax(VJFrame *frame, VJFrame *frame2, int widt } } -static void chromamagicalpha_selectdiff(VJFrame *frame, VJFrame *frame2, - int width, int height, int op_a) +static void chromamagicalpha_selectdiff(VJFrame *frame, VJFrame *frame2, int op_a) { unsigned int i; - const int len = frame->len; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -196,10 +189,10 @@ static void chromamagicalpha_selectdiff(VJFrame *frame, VJFrame *frame2, } } -static void chromamagicalpha_diffreplace(VJFrame *frame, VJFrame *frame2, int width, int height, int threshold) +static void chromamagicalpha_diffreplace(VJFrame *frame, VJFrame *frame2, int threshold) { /* op_a = threshold */ - const int len = frame->len; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -244,11 +237,10 @@ static void chromamagicalpha_diffreplace(VJFrame *frame, VJFrame *frame2, int wi } } -static void chromamagicalpha_selectdiffneg(VJFrame *frame, VJFrame *frame2, - int width, int height, int op_a) +static void chromamagicalpha_selectdiffneg(VJFrame *frame, VJFrame *frame2, int op_a) { unsigned int i; - const int len = frame->len; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -274,11 +266,10 @@ static void chromamagicalpha_selectdiffneg(VJFrame *frame, VJFrame *frame2, } } -static void chromamagicalpha_selectunfreeze(VJFrame *frame, VJFrame *frame2, - int width, int height, int op_a) +static void chromamagicalpha_selectunfreeze(VJFrame *frame, VJFrame *frame2, int op_a) { unsigned int i; - const int len = frame->len; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -305,11 +296,10 @@ static void chromamagicalpha_selectunfreeze(VJFrame *frame, VJFrame *frame2, } } -static void chromamagicalpha_addlum(VJFrame *frame, VJFrame *frame2, int width, - int height, int op_a) +static void chromamagicalpha_addlum(VJFrame *frame, VJFrame *frame2, int op_a) { unsigned int i; - const int len = frame->len; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -334,10 +324,10 @@ static void chromamagicalpha_addlum(VJFrame *frame, VJFrame *frame2, int width, } } -static void chromamagicalpha_exclusive(VJFrame *frame, VJFrame *frame2, int width, int height, int op_a) +static void chromamagicalpha_exclusive(VJFrame *frame, VJFrame *frame2, int op_a) { unsigned int i; - const int len = frame->len; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -372,10 +362,10 @@ static void chromamagicalpha_exclusive(VJFrame *frame, VJFrame *frame2, int widt } -static void chromamagicalpha_diffnegate(VJFrame *frame, VJFrame *frame2, int width, int height, int op_a) +static void chromamagicalpha_diffnegate(VJFrame *frame, VJFrame *frame2, int op_a) { unsigned int i; - const int len = frame->len; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -415,11 +405,10 @@ static void chromamagicalpha_diffnegate(VJFrame *frame, VJFrame *frame2, int wid } } -static void chromamagicalpha_additive(VJFrame *frame, VJFrame *frame2, int width, - int height, int op_a) +static void chromamagicalpha_additive(VJFrame *frame, VJFrame *frame2, int op_a) { unsigned int i; - const int len = frame->len; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -452,11 +441,10 @@ static void chromamagicalpha_additive(VJFrame *frame, VJFrame *frame2, int width } -static void chromamagicalpha_basecolor(VJFrame *frame, VJFrame *frame2, - int width, int height, int op_a) +static void chromamagicalpha_basecolor(VJFrame *frame, VJFrame *frame2, int op_a) { unsigned int i; - const int len = frame->len; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -494,9 +482,9 @@ static void chromamagicalpha_basecolor(VJFrame *frame, VJFrame *frame2, } } -static void chromamagicalpha_freeze(VJFrame *frame, VJFrame *frame2, int w, int h, int op_a) +static void chromamagicalpha_freeze(VJFrame *frame, VJFrame *frame2, int op_a) { - const int len = frame->len; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -547,10 +535,10 @@ static void chromamagicalpha_freeze(VJFrame *frame, VJFrame *frame2, int w, int } -static void chromamagicalpha_unfreeze( VJFrame *frame, VJFrame *frame2, int w, int h, int op_a ) +static void chromamagicalpha_unfreeze( VJFrame *frame, VJFrame *frame2, int op_a ) { unsigned int i; - const int len = frame->len; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -584,10 +572,10 @@ static void chromamagicalpha_unfreeze( VJFrame *frame, VJFrame *frame2, int w, i } } -static void chromamagicalpha_hardlight( VJFrame *frame, VJFrame *frame2, int w, int h, int op_a) +static void chromamagicalpha_hardlight( VJFrame *frame, VJFrame *frame2, int op_a) { unsigned int i; - const int len = frame->len; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -629,10 +617,10 @@ static void chromamagicalpha_hardlight( VJFrame *frame, VJFrame *frame2, int w, } } -static void chromamagicalpha_multiply( VJFrame *frame, VJFrame *frame2, int w, int h,int op_a ) +static void chromamagicalpha_multiply( VJFrame *frame, VJFrame *frame2,int op_a ) { unsigned int i; - const int len = frame->len; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -668,10 +656,10 @@ static void chromamagicalpha_multiply( VJFrame *frame, VJFrame *frame2, int w, i } } -static void chromamagicalpha_divide(VJFrame *frame, VJFrame *frame2, int w, int h, int op_a ) +static void chromamagicalpha_divide(VJFrame *frame, VJFrame *frame2, int op_a ) { unsigned int i; - const int len = frame->len; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -705,10 +693,10 @@ static void chromamagicalpha_divide(VJFrame *frame, VJFrame *frame2, int w, int } } -static void chromamagicalpha_substract(VJFrame *frame, VJFrame *frame2, int w, int h, int op_a) +static void chromamagicalpha_substract(VJFrame *frame, VJFrame *frame2, int op_a) { unsigned int i; - const int len = frame->len; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -743,10 +731,10 @@ static void chromamagicalpha_substract(VJFrame *frame, VJFrame *frame2, int w, i } -static void chromamagicalpha_add(VJFrame *frame, VJFrame *frame2, int width, int height, int op_a) +static void chromamagicalpha_add(VJFrame *frame, VJFrame *frame2, int op_a) { unsigned int i; - const int len = frame->len; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -779,10 +767,10 @@ static void chromamagicalpha_add(VJFrame *frame, VJFrame *frame2, int width, int } } -static void chromamagicalpha_screen(VJFrame *frame, VJFrame *frame2, int w, int h, int op_a) +static void chromamagicalpha_screen(VJFrame *frame, VJFrame *frame2, int op_a) { unsigned int i; - const int len = frame->len; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -813,10 +801,10 @@ static void chromamagicalpha_screen(VJFrame *frame, VJFrame *frame2, int w, int } } -static void chromamagicalpha_difference(VJFrame *frame, VJFrame *frame2, int w, int h, int op_a) +static void chromamagicalpha_difference(VJFrame *frame, VJFrame *frame2, int op_a) { unsigned int i; - const int len = frame->len; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -852,10 +840,10 @@ static void chromamagicalpha_difference(VJFrame *frame, VJFrame *frame2, int w, } /* not really softlight but still cool */ -static void chromamagicalpha_softlightmode(VJFrame *frame,VJFrame *frame2,int width,int height, int op_a) +static void chromamagicalpha_softlightmode(VJFrame *frame,VJFrame *frame2, int op_a) { unsigned int i; - const int len = frame->len; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -893,10 +881,9 @@ static void chromamagicalpha_softlightmode(VJFrame *frame,VJFrame *frame2,int wi } } -static void chromamagicalpha_dodge(VJFrame *frame, VJFrame *frame2, int w, int h, - int op_a) { +static void chromamagicalpha_dodge(VJFrame *frame, VJFrame *frame2, int op_a) { unsigned int i; - const int len = frame->len; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -934,10 +921,10 @@ static void chromamagicalpha_dodge(VJFrame *frame, VJFrame *frame2, int w, int h } } -static void chromamagicalpha_darken(VJFrame *frame, VJFrame *frame2, int w, int h, int op_a) +static void chromamagicalpha_darken(VJFrame *frame, VJFrame *frame2, int op_a) { unsigned int i; - const int len = frame->len; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -963,11 +950,11 @@ static void chromamagicalpha_darken(VJFrame *frame, VJFrame *frame2, int w, int } } -static void chromamagicalpha_lighten(VJFrame *frame, VJFrame *frame2, int w, int h, int op_a) +static void chromamagicalpha_lighten(VJFrame *frame, VJFrame *frame2, int op_a) { unsigned int i; - const int len = frame->len; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -993,10 +980,10 @@ static void chromamagicalpha_lighten(VJFrame *frame, VJFrame *frame2, int w, int } } -static void chromamagicalpha_reflect(VJFrame *frame, VJFrame *frame2,int width,int height, int op_a) +static void chromamagicalpha_reflect(VJFrame *frame, VJFrame *frame2, int op_a) { unsigned int i; - const int len = frame->len; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -1040,10 +1027,10 @@ static void chromamagicalpha_reflect(VJFrame *frame, VJFrame *frame2,int width,i } } -static void chromamagicalpha_modadd(VJFrame *frame, VJFrame *frame2, int width,int height, int op_a) +static void chromamagicalpha_modadd(VJFrame *frame, VJFrame *frame2, int op_a) { unsigned int i; - const int len = frame->len; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -1079,91 +1066,89 @@ static void chromamagicalpha_modadd(VJFrame *frame, VJFrame *frame2, int width,i } -void chromamagickalpha_apply(VJFrame *frame, VJFrame *frame2, - int width, int height, int type, int op_a) +void chromamagickalpha_apply(VJFrame *frame, VJFrame *frame2, int type, int op_a) { - switch (type) { case 0: - chromamagicalpha_addsubselectlum(frame, frame2, width, height, op_a); + chromamagicalpha_addsubselectlum(frame, frame2, op_a); break; case 1: - chromamagicalpha_selectmin(frame, frame2, width, height, op_a); + chromamagicalpha_selectmin(frame, frame2, op_a); break; case 2: - chromamagicalpha_selectmax(frame, frame2, width, height, op_a); + chromamagicalpha_selectmax(frame, frame2, op_a); break; case 3: - chromamagicalpha_selectdiff(frame, frame2, width, height, op_a); + chromamagicalpha_selectdiff(frame, frame2, op_a); break; case 4: - chromamagicalpha_selectdiffneg(frame, frame2, width, height, op_a); + chromamagicalpha_selectdiffneg(frame, frame2, op_a); break; case 5: - chromamagicalpha_addlum(frame, frame2, width, height, op_a); + chromamagicalpha_addlum(frame, frame2, op_a); break; case 6: - chromamagicalpha_selectunfreeze(frame, frame2, width, height, op_a); + chromamagicalpha_selectunfreeze(frame, frame2, op_a); break; case 7: - chromamagicalpha_exclusive(frame,frame2,width,height,op_a); + chromamagicalpha_exclusive(frame,frame2,op_a); break; case 8: - chromamagicalpha_diffnegate(frame,frame2,width,height,op_a); + chromamagicalpha_diffnegate(frame,frame2,op_a); break; case 9: - chromamagicalpha_additive( frame,frame2,width,height,op_a); + chromamagicalpha_additive( frame,frame2,op_a); break; case 10: - chromamagicalpha_basecolor(frame,frame2,width,height,op_a); + chromamagicalpha_basecolor(frame,frame2,op_a); break; case 11: - chromamagicalpha_freeze(frame,frame2,width,height,op_a); + chromamagicalpha_freeze(frame,frame2,op_a); break; case 12: - chromamagicalpha_unfreeze(frame,frame2,width,height,op_a); + chromamagicalpha_unfreeze(frame,frame2,op_a); break; case 13: - chromamagicalpha_hardlight(frame,frame2,width,height,op_a); + chromamagicalpha_hardlight(frame,frame2,op_a); break; case 14: - chromamagicalpha_multiply(frame,frame2,width,height,op_a); + chromamagicalpha_multiply(frame,frame2,op_a); break; case 15: - chromamagicalpha_divide(frame,frame2,width,height,op_a); + chromamagicalpha_divide(frame,frame2,op_a); break; case 16: - chromamagicalpha_substract(frame,frame2,width,height,op_a); + chromamagicalpha_substract(frame,frame2,op_a); break; case 17: - chromamagicalpha_add(frame,frame2,width,height,op_a); + chromamagicalpha_add(frame,frame2,op_a); break; case 18: - chromamagicalpha_screen(frame,frame2,width,height,op_a); + chromamagicalpha_screen(frame,frame2,op_a); break; case 19: - chromamagicalpha_difference(frame,frame2,width,height,op_a); + chromamagicalpha_difference(frame,frame2,op_a); break; case 20: - chromamagicalpha_softlightmode(frame,frame2,width,height,op_a); + chromamagicalpha_softlightmode(frame,frame2,op_a); break; case 21: - chromamagicalpha_dodge(frame,frame2,width,height,op_a); + chromamagicalpha_dodge(frame,frame2,op_a); break; case 22: - chromamagicalpha_reflect(frame,frame2,width,height,op_a); + chromamagicalpha_reflect(frame,frame2,op_a); break; case 23: - chromamagicalpha_diffreplace(frame,frame2,width,height,op_a); + chromamagicalpha_diffreplace(frame,frame2,op_a); break; case 24: - chromamagicalpha_darken( frame,frame2,width,height,op_a); + chromamagicalpha_darken( frame,frame2,op_a); break; case 25: - chromamagicalpha_lighten( frame,frame2,width,height,op_a); + chromamagicalpha_lighten( frame,frame2,op_a); break; case 26: - chromamagicalpha_modadd( frame,frame2,width,height,op_a); + chromamagicalpha_modadd( frame,frame2,op_a); break; } } diff --git a/veejay-current/veejay-server/libvje/effects/chromamagickalpha.h b/veejay-current/veejay-server/libvje/effects/chromamagickalpha.h index 7d92e658..c7f04768 100644 --- a/veejay-current/veejay-server/libvje/effects/chromamagickalpha.h +++ b/veejay-current/veejay-server/libvje/effects/chromamagickalpha.h @@ -20,10 +20,6 @@ #ifndef CHROMAMAGICKALPHA_H #define CHROMAMAGICKALPHA_H -#include -#include -#include - vj_effect *chromamagickalpha_init(); -void chromamagickalpha_apply(VJFrame *frame, VJFrame *frame2 , int width,int height, int type, int op0); +void chromamagickalpha_apply(VJFrame *frame, VJFrame *frame2, int type, int op0); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index 2e236871..478c6081 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -521,7 +521,7 @@ extern void alphaselect_apply( VJFrame *frame, int i_angle, int r, int g,int b, extern void alphaselect2_apply( VJFrame *frame, int tola, int r, int g,int b, int tolb,int alpha); extern void alphablend_apply( VJFrame *frame, VJFrame *frame2); extern void lumakeyalpha_apply( VJFrame *frame, VJFrame *frame2, int type, int opacity ); -extern void chromamagickalpha_apply( VJFrame *frame, VJFrame *frame2, int width, int height, int type, int opacity ); +extern void chromamagickalpha_apply( VJFrame *frame, VJFrame *frame2, int type, int opacity ); extern void overlaymagicalpha_apply( VJFrame *frame, VJFrame *frame2, int width, int height, int type, int mode ); extern void alphanegate_apply( VJFrame *frame, int width, int height, int value ); extern void gaussblur_apply(VJFrame *frame, int radius, int strength, int quality ); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index cb3ead87..9168f885 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -634,7 +634,7 @@ static void vj_effman_apply_video_effect( VJFrame **frames, vjp_kf *todo_info,in lumakeyalpha_apply(frames[0],frames[1],arg[0],arg[1]); break; case VJ_VIDEO_EFFECT_CHROMAMAGICKALPHA: - chromamagickalpha_apply(frames[0],frames[1],frames[0]->width,frames[0]->height,arg[0],arg[1]); + chromamagickalpha_apply(frames[0],frames[1],arg[0],arg[1]); break; case VJ_VIDEO_EFFECT_MAGICOVERLAYALPHA: overlaymagicalpha_apply(frames[0],frames[1],frames[0]->width,frames[0]->height,arg[0],arg[1]); From 6b14c2a44196cbf7afe337b54ebe5947535b4ecb Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 11:23:09 +0200 Subject: [PATCH 062/170] Libvje / refactor : magicoverlayalpha * w,h * clean headers --- .../libvje/effects/magicoverlaysalpha.c | 218 +++++++++--------- .../libvje/effects/magicoverlaysalpha.h | 8 +- .../veejay-server/libvje/internal.h | 2 +- .../veejay-server/libvje/vj-effman.c | 2 +- 4 files changed, 108 insertions(+), 122 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/magicoverlaysalpha.c b/veejay-current/veejay-server/libvje/effects/magicoverlaysalpha.c index f5b3768f..ec65ad8d 100644 --- a/veejay-current/veejay-server/libvje/effects/magicoverlaysalpha.c +++ b/veejay-current/veejay-server/libvje/effects/magicoverlaysalpha.c @@ -17,14 +17,13 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include + +#include "common.h" #include -#include "magicoverlaysalpha.h" #include -#include "common.h" #include +#include "magicoverlaysalpha.h" + vj_effect *overlaymagicalpha_init(int w, int h) { vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); @@ -61,11 +60,10 @@ vj_effect *overlaymagicalpha_init(int w, int h) return ve; } -static void overlaymagicalpha_adddistorted(VJFrame *frame, VJFrame *frame2, - int width, int height) +static void overlaymagicalpha_adddistorted(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -84,13 +82,12 @@ static void overlaymagicalpha_adddistorted(VJFrame *frame, VJFrame *frame2, } -static void overlaymagicalpha_add_distorted(VJFrame *frame, VJFrame *frame2, - int width, int height) +static void overlaymagicalpha_add_distorted(VJFrame *frame, VJFrame *frame2) { unsigned int i; uint8_t y1, y2; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -106,11 +103,10 @@ static void overlaymagicalpha_add_distorted(VJFrame *frame, VJFrame *frame2, } -static void overlaymagicalpha_subdistorted(VJFrame *frame, VJFrame *frame2, - int width, int height) +static void overlaymagicalpha_subdistorted(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -127,12 +123,11 @@ static void overlaymagicalpha_subdistorted(VJFrame *frame, VJFrame *frame2, } /* - static void overlaymagicalpha_sub_distorted(VJFrame *frame, VJFrame *frame2, - int width, int height) + static void overlaymagicalpha_sub_distorted(VJFrame *frame, VJFrame *frame2) { unsigned int i ; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -149,11 +144,10 @@ static void overlaymagicalpha_subdistorted(VJFrame *frame, VJFrame *frame2, } */ -static void overlaymagicalpha_multiply(VJFrame *frame, VJFrame *frame2, - int width, int height) +static void overlaymagicalpha_multiply(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -166,10 +160,10 @@ static void overlaymagicalpha_multiply(VJFrame *frame, VJFrame *frame2, } } -static void overlaymagicalpha_simpledivide(VJFrame *frame, VJFrame *frame2, int width,int height) +static void overlaymagicalpha_simpledivide(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -184,12 +178,11 @@ static void overlaymagicalpha_simpledivide(VJFrame *frame, VJFrame *frame2, int } } -static void overlaymagicalpha_divide(VJFrame *frame, VJFrame *frame2, int width, - int height) +static void overlaymagicalpha_divide(VJFrame *frame, VJFrame *frame2) { unsigned int i; int a, b, c; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -208,10 +201,10 @@ static void overlaymagicalpha_divide(VJFrame *frame, VJFrame *frame2, int width, } } -static void overlaymagicalpha_additive(VJFrame *frame, VJFrame *frame2,int width, int height) +static void overlaymagicalpha_additive(VJFrame *frame, VJFrame *frame2) { - unsigned int len = width * height; + unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -227,10 +220,10 @@ static void overlaymagicalpha_additive(VJFrame *frame, VJFrame *frame2,int width } } -static void overlaymagicalpha_substractive(VJFrame *frame, VJFrame *frame2,int width, int height) +static void overlaymagicalpha_substractive(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -244,10 +237,10 @@ static void overlaymagicalpha_substractive(VJFrame *frame, VJFrame *frame2,int w } } -static void overlaymagicalpha_softburn(VJFrame *frame, VJFrame *frame2,int width, int height) +static void overlaymagicalpha_softburn(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -276,10 +269,10 @@ static void overlaymagicalpha_softburn(VJFrame *frame, VJFrame *frame2,int width } } -static void overlaymagicalpha_inverseburn(VJFrame *frame, VJFrame *frame2,int width, int height) +static void overlaymagicalpha_inverseburn(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -300,10 +293,10 @@ static void overlaymagicalpha_inverseburn(VJFrame *frame, VJFrame *frame2,int wi } } -static void overlaymagicalpha_colordodge(VJFrame *frame, VJFrame *frame2,int width, int height) +static void overlaymagicalpha_colordodge(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -327,10 +320,10 @@ static void overlaymagicalpha_colordodge(VJFrame *frame, VJFrame *frame2,int wid } } -static void overlaymagicalpha_mulsub(VJFrame *frame, VJFrame *frame2, int width,int height) +static void overlaymagicalpha_mulsub(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -347,10 +340,10 @@ static void overlaymagicalpha_mulsub(VJFrame *frame, VJFrame *frame2, int width, } } -static void overlaymagicalpha_lighten(VJFrame *frame, VJFrame *frame2, int width,int height) +static void overlaymagicalpha_lighten(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -371,10 +364,10 @@ static void overlaymagicalpha_lighten(VJFrame *frame, VJFrame *frame2, int width } } -static void overlaymagicalpha_difference(VJFrame *frame, VJFrame *frame2,int width, int height) +static void overlaymagicalpha_difference(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -391,10 +384,10 @@ static void overlaymagicalpha_difference(VJFrame *frame, VJFrame *frame2,int wid } } -static void overlaymagicalpha_diffnegate(VJFrame *frame, VJFrame *frame2,int width, int height) +static void overlaymagicalpha_diffnegate(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; int a, b; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -411,10 +404,10 @@ static void overlaymagicalpha_diffnegate(VJFrame *frame, VJFrame *frame2,int wid } } -static void overlaymagicalpha_exclusive(VJFrame *frame, VJFrame *frame2,int width, int height) +static void overlaymagicalpha_exclusive(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -430,11 +423,11 @@ static void overlaymagicalpha_exclusive(VJFrame *frame, VJFrame *frame2,int widt } } -static void overlaymagicalpha_basecolor(VJFrame *frame, VJFrame *frame2,int width, int height) +static void overlaymagicalpha_basecolor(VJFrame *frame, VJFrame *frame2) { unsigned int i; int a, b, c, d; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -451,10 +444,10 @@ static void overlaymagicalpha_basecolor(VJFrame *frame, VJFrame *frame2,int widt } } -static void overlaymagicalpha_freeze(VJFrame *frame, VJFrame *frame2, int width,int height) +static void overlaymagicalpha_freeze(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -472,10 +465,10 @@ static void overlaymagicalpha_freeze(VJFrame *frame, VJFrame *frame2, int width, } } -static void overlaymagicalpha_unfreeze(VJFrame *frame, VJFrame *frame2,int width, int height) +static void overlaymagicalpha_unfreeze(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -494,10 +487,10 @@ static void overlaymagicalpha_unfreeze(VJFrame *frame, VJFrame *frame2,int width } /* -static void overlaymagicalpha_hardlight(VJFrame *frame, VJFrame *frame2,int width, int height) +static void overlaymagicalpha_hardlight(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -520,11 +513,11 @@ static void overlaymagicalpha_hardlight(VJFrame *frame, VJFrame *frame2,int widt } */ -static void overlaymagicalpha_relativeaddlum(VJFrame *frame, VJFrame *frame2, int width, int height) +static void overlaymagicalpha_relativeaddlum(VJFrame *frame, VJFrame *frame2) { unsigned int i; int a, b, c, d; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -542,10 +535,10 @@ static void overlaymagicalpha_relativeaddlum(VJFrame *frame, VJFrame *frame2, in } } -static void overlaymagicalpha_relativesublum(VJFrame *frame, VJFrame *frame2, int width, int height) +static void overlaymagicalpha_relativesublum(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -562,10 +555,10 @@ static void overlaymagicalpha_relativesublum(VJFrame *frame, VJFrame *frame2, in } } -static void overlaymagicalpha_relativeadd(VJFrame *frame, VJFrame *frame2,int width, int height) +static void overlaymagicalpha_relativeadd(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -584,10 +577,10 @@ static void overlaymagicalpha_relativeadd(VJFrame *frame, VJFrame *frame2,int wi } } -static void overlaymagicalpha_relativesub(VJFrame *frame, VJFrame *frame2,int width, int height) +static void overlaymagicalpha_relativesub(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -605,10 +598,10 @@ static void overlaymagicalpha_relativesub(VJFrame *frame, VJFrame *frame2,int wi } -static void overlaymagicalpha_minsubselect(VJFrame *frame, VJFrame *frame2, int width, int height) +static void overlaymagicalpha_minsubselect(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -628,10 +621,10 @@ static void overlaymagicalpha_minsubselect(VJFrame *frame, VJFrame *frame2, int } } -static void overlaymagicalpha_maxsubselect(VJFrame *frame, VJFrame *frame2,int width, int height) +static void overlaymagicalpha_maxsubselect(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -651,10 +644,10 @@ static void overlaymagicalpha_maxsubselect(VJFrame *frame, VJFrame *frame2,int w } } -static void overlaymagicalpha_addsubselect(VJFrame *frame, VJFrame *frame2,int width, int height) +static void overlaymagicalpha_addsubselect(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -675,10 +668,10 @@ static void overlaymagicalpha_addsubselect(VJFrame *frame, VJFrame *frame2,int w } } -static void overlaymagicalpha_maxselect(VJFrame *frame, VJFrame *frame2,int width, int height) +static void overlaymagicalpha_maxselect(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -696,10 +689,10 @@ static void overlaymagicalpha_maxselect(VJFrame *frame, VJFrame *frame2,int widt } } -static void overlaymagicalpha_minselect(VJFrame *frame, VJFrame *frame2,int width, int height) +static void overlaymagicalpha_minselect(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -717,10 +710,10 @@ static void overlaymagicalpha_minselect(VJFrame *frame, VJFrame *frame2,int widt } } -static void overlaymagicalpha_addtest(VJFrame *frame, VJFrame *frame2, int width,int height) +static void overlaymagicalpha_addtest(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -738,10 +731,10 @@ static void overlaymagicalpha_addtest(VJFrame *frame, VJFrame *frame2, int width } } -static void overlaymagicalpha_addtest2(VJFrame *frame, VJFrame *frame2,int width, int height) +static void overlaymagicalpha_addtest2(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -759,10 +752,10 @@ static void overlaymagicalpha_addtest2(VJFrame *frame, VJFrame *frame2,int width } } -static void overlaymagicalpha_addtest4(VJFrame *frame, VJFrame *frame2,int width, int height) +static void overlaymagicalpha_addtest4(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -784,10 +777,10 @@ static void overlaymagicalpha_addtest4(VJFrame *frame, VJFrame *frame2,int width } -static void overlaymagicalpha_try(VJFrame *frame, VJFrame *frame2, int width, int height) +static void overlaymagicalpha_try(VJFrame *frame, VJFrame *frame2) { unsigned int i; - unsigned int len = width * height; + const unsigned int len = frame->len; int a, b, p, q; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -829,105 +822,104 @@ static void overlaymagicalpha_try(VJFrame *frame, VJFrame *frame2, int width, in } } -void overlaymagicalpha_apply(VJFrame *frame, VJFrame *frame2, int width, - int height, int n, int clearchroma) +void overlaymagicalpha_apply(VJFrame *frame, VJFrame *frame2, int n, int clearchroma) { switch (n) { case VJ_EFFECT_BLEND_ADDITIVE: - overlaymagicalpha_additive(frame, frame2, width, height); + overlaymagicalpha_additive(frame, frame2); break; case VJ_EFFECT_BLEND_SUBSTRACTIVE: - overlaymagicalpha_substractive(frame, frame2, width, height); + overlaymagicalpha_substractive(frame, frame2); break; case VJ_EFFECT_BLEND_MULTIPLY: - overlaymagicalpha_multiply(frame, frame2, width, height); + overlaymagicalpha_multiply(frame, frame2); break; case VJ_EFFECT_BLEND_DIVIDE: - overlaymagicalpha_simpledivide(frame, frame2, width, height); + overlaymagicalpha_simpledivide(frame, frame2); break; case VJ_EFFECT_BLEND_LIGHTEN: - overlaymagicalpha_lighten(frame, frame2, width, height); + overlaymagicalpha_lighten(frame, frame2); break; case VJ_EFFECT_BLEND_DIFFERENCE: - overlaymagicalpha_difference(frame, frame2, width, height); + overlaymagicalpha_difference(frame, frame2); break; case VJ_EFFECT_BLEND_DIFFNEGATE: - overlaymagicalpha_diffnegate(frame, frame2, width, height); + overlaymagicalpha_diffnegate(frame, frame2); break; case VJ_EFFECT_BLEND_EXCLUSIVE: - overlaymagicalpha_exclusive(frame, frame2, width, height); + overlaymagicalpha_exclusive(frame, frame2); break; case VJ_EFFECT_BLEND_BASECOLOR: - overlaymagicalpha_basecolor(frame, frame2, width, height); + overlaymagicalpha_basecolor(frame, frame2); break; case VJ_EFFECT_BLEND_FREEZE: - overlaymagicalpha_freeze(frame, frame2, width, height); + overlaymagicalpha_freeze(frame, frame2); break; case VJ_EFFECT_BLEND_UNFREEZE: - overlaymagicalpha_unfreeze(frame, frame2, width, height); + overlaymagicalpha_unfreeze(frame, frame2); break; case VJ_EFFECT_BLEND_RELADD: - overlaymagicalpha_relativeadd(frame, frame2, width, height); + overlaymagicalpha_relativeadd(frame, frame2); break; case VJ_EFFECT_BLEND_RELSUB: - overlaymagicalpha_relativesub(frame, frame2, width, height); + overlaymagicalpha_relativesub(frame, frame2); break; case VJ_EFFECT_BLEND_RELADDLUM: - overlaymagicalpha_relativeaddlum(frame, frame2, width, height); + overlaymagicalpha_relativeaddlum(frame, frame2); break; case VJ_EFFECT_BLEND_RELSUBLUM: - overlaymagicalpha_relativesublum(frame, frame2, width, height); + overlaymagicalpha_relativesublum(frame, frame2); break; case VJ_EFFECT_BLEND_MAXSEL: - overlaymagicalpha_maxselect(frame, frame2, width, height); + overlaymagicalpha_maxselect(frame, frame2); break; case VJ_EFFECT_BLEND_MINSEL: - overlaymagicalpha_minselect(frame, frame2, width, height); + overlaymagicalpha_minselect(frame, frame2); break; case VJ_EFFECT_BLEND_MINSUBSEL: - overlaymagicalpha_minsubselect(frame, frame2, width, height); + overlaymagicalpha_minsubselect(frame, frame2); break; case VJ_EFFECT_BLEND_MAXSUBSEL: - overlaymagicalpha_maxsubselect(frame, frame2, width, height); + overlaymagicalpha_maxsubselect(frame, frame2); break; case VJ_EFFECT_BLEND_ADDSUBSEL: - overlaymagicalpha_addsubselect(frame, frame2, width, height); + overlaymagicalpha_addsubselect(frame, frame2); break; case VJ_EFFECT_BLEND_ADDAVG: - overlaymagicalpha_add_distorted(frame, frame2, width, height); + overlaymagicalpha_add_distorted(frame, frame2); break; case VJ_EFFECT_BLEND_ADDTEST2: - overlaymagicalpha_addtest(frame, frame2, width, height); + overlaymagicalpha_addtest(frame, frame2); break; case VJ_EFFECT_BLEND_ADDTEST3: - overlaymagicalpha_addtest2(frame, frame2, width, height); + overlaymagicalpha_addtest2(frame, frame2); break; case VJ_EFFECT_BLEND_ADDTEST4: - overlaymagicalpha_addtest4(frame, frame2, width, height); + overlaymagicalpha_addtest4(frame, frame2); break; case VJ_EFFECT_BLEND_MULSUB: - overlaymagicalpha_mulsub(frame, frame2, width, height); + overlaymagicalpha_mulsub(frame, frame2); break; case VJ_EFFECT_BLEND_SOFTBURN: - overlaymagicalpha_softburn(frame, frame2, width, height); + overlaymagicalpha_softburn(frame, frame2); break; case VJ_EFFECT_BLEND_INVERSEBURN: - overlaymagicalpha_inverseburn(frame, frame2, width, height); + overlaymagicalpha_inverseburn(frame, frame2); break; case VJ_EFFECT_BLEND_COLORDODGE: - overlaymagicalpha_colordodge(frame, frame2, width, height); + overlaymagicalpha_colordodge(frame, frame2); break; case VJ_EFFECT_BLEND_ADDDISTORT: - overlaymagicalpha_adddistorted(frame, frame2, width, height); + overlaymagicalpha_adddistorted(frame, frame2); break; case VJ_EFFECT_BLEND_SUBDISTORT: - overlaymagicalpha_subdistorted(frame, frame2, width, height); + overlaymagicalpha_subdistorted(frame, frame2); break; case VJ_EFFECT_BLEND_ADDTEST5: - overlaymagicalpha_try(frame, frame2, width, height); + overlaymagicalpha_try(frame, frame2); break; case VJ_EFFECT_BLEND_NEGDIV: - overlaymagicalpha_divide(frame,frame2,width,height); + overlaymagicalpha_divide(frame,frame2); break; } diff --git a/veejay-current/veejay-server/libvje/effects/magicoverlaysalpha.h b/veejay-current/veejay-server/libvje/effects/magicoverlaysalpha.h index 13a43cc3..d1b93a83 100644 --- a/veejay-current/veejay-server/libvje/effects/magicoverlaysalpha.h +++ b/veejay-current/veejay-server/libvje/effects/magicoverlaysalpha.h @@ -20,12 +20,6 @@ #ifndef MAGICOVERLAYSALPHA_H #define MAGICOVERLAYSALPHA_H -#include -#include -#include - vj_effect *overlaymagicalpha_init(int w, int h); - -void overlaymagicalpha_apply( VJFrame *frame, VJFrame *frame2, int width,int height, int n, int mode); - +void overlaymagicalpha_apply( VJFrame *frame, VJFrame *frame2, int n, int mode); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index 478c6081..c87d9291 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -522,7 +522,7 @@ extern void alphaselect2_apply( VJFrame *frame, int tola, int r, int g,int b, in extern void alphablend_apply( VJFrame *frame, VJFrame *frame2); extern void lumakeyalpha_apply( VJFrame *frame, VJFrame *frame2, int type, int opacity ); extern void chromamagickalpha_apply( VJFrame *frame, VJFrame *frame2, int type, int opacity ); -extern void overlaymagicalpha_apply( VJFrame *frame, VJFrame *frame2, int width, int height, int type, int mode ); +extern void overlaymagicalpha_apply( VJFrame *frame, VJFrame *frame2, int type, int mode ); extern void alphanegate_apply( VJFrame *frame, int width, int height, int value ); extern void gaussblur_apply(VJFrame *frame, int radius, int strength, int quality ); extern void levelcorrection_apply(VJFrame *frame, int min, int max, int bmin, int bmax); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index 9168f885..219e54bc 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -637,7 +637,7 @@ static void vj_effman_apply_video_effect( VJFrame **frames, vjp_kf *todo_info,in chromamagickalpha_apply(frames[0],frames[1],arg[0],arg[1]); break; case VJ_VIDEO_EFFECT_MAGICOVERLAYALPHA: - overlaymagicalpha_apply(frames[0],frames[1],frames[0]->width,frames[0]->height,arg[0],arg[1]); + overlaymagicalpha_apply(frames[0],frames[1],arg[0],arg[1]); break; case VJ_VIDEO_EFFECT_MASKTRANSITION: masktransition_apply(frames[0],frames[1],frames[0]->width,frames[0]->height,arg[0],arg[1]); From 91b9f9cbada56efb4a5c4c41b7d82694f163ae71 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 11:24:45 +0200 Subject: [PATCH 063/170] Libvje / refactor : alphanegate * w,h * clean headers --- veejay-current/veejay-server/libvje/effects/alphanegate.c | 8 +++----- veejay-current/veejay-server/libvje/effects/alphanegate.h | 6 +----- veejay-current/veejay-server/libvje/internal.h | 2 +- veejay-current/veejay-server/libvje/vj-effman.c | 2 +- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/alphanegate.c b/veejay-current/veejay-server/libvje/effects/alphanegate.c index 4a39b677..826b9d74 100644 --- a/veejay-current/veejay-server/libvje/effects/alphanegate.c +++ b/veejay-current/veejay-server/libvje/effects/alphanegate.c @@ -17,11 +17,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include + #include "common.h" +#include #include "alphanegate.h" vj_effect *alphanegate_init(int w, int h) @@ -49,7 +47,7 @@ vj_effect *alphanegate_init(int w, int h) } -void alphanegate_apply( VJFrame *frame, int width, int height, int val) +void alphanegate_apply( VJFrame *frame, int val) { const unsigned int len = frame->len; uint8_t *A = frame->data[3]; diff --git a/veejay-current/veejay-server/libvje/effects/alphanegate.h b/veejay-current/veejay-server/libvje/effects/alphanegate.h index 436fd0ab..9630817e 100644 --- a/veejay-current/veejay-server/libvje/effects/alphanegate.h +++ b/veejay-current/veejay-server/libvje/effects/alphanegate.h @@ -20,10 +20,6 @@ #ifndef ALPHANEGATE_H #define ALPHANEGATE_H -#include -#include -#include - vj_effect *alphanegate_init(int w, int h); -void alphanegate_apply( VJFrame *frame, int width, int height, int val); +void alphanegate_apply( VJFrame *frame, int val); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index c87d9291..a05010fd 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -523,7 +523,7 @@ extern void alphablend_apply( VJFrame *frame, VJFrame *frame2); extern void lumakeyalpha_apply( VJFrame *frame, VJFrame *frame2, int type, int opacity ); extern void chromamagickalpha_apply( VJFrame *frame, VJFrame *frame2, int type, int opacity ); extern void overlaymagicalpha_apply( VJFrame *frame, VJFrame *frame2, int type, int mode ); -extern void alphanegate_apply( VJFrame *frame, int width, int height, int value ); +extern void alphanegate_apply( VJFrame *frame, int value ); extern void gaussblur_apply(VJFrame *frame, int radius, int strength, int quality ); extern void levelcorrection_apply(VJFrame *frame, int min, int max, int bmin, int bmax); extern void masktransition_apply( VJFrame *frame, VJFrame *frame2, int width,int height, int time_index, int duration); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index 219e54bc..185a3aca 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -405,7 +405,7 @@ static void vj_effman_apply_image_effect( pixelate_apply(frames[0],arg[0]); break; case VJ_IMAGE_EFFECT_ALPHANEGATE: - alphanegate_apply(frames[0],frames[0]->width,frames[0]->height,arg[0]); + alphanegate_apply(frames[0],arg[0]); break; case VJ_IMAGE_EFFECT_CHOKEMATTE: gaussblur_apply(frames[0], arg[0],arg[1],arg[2] ); From 2007e511c9897ad05037eab3b7b4e7650ec88785 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 11:28:38 +0200 Subject: [PATCH 064/170] Libvje / refactor : gaussblur * clean headers --- .../veejay-server/libvje/effects/gaussblur.c | 17 +++++++---------- .../veejay-server/libvje/effects/gaussblur.h | 4 ---- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/gaussblur.c b/veejay-current/veejay-server/libvje/effects/gaussblur.c index bf8b8dc5..cffc139b 100644 --- a/veejay-current/veejay-server/libvje/effects/gaussblur.c +++ b/veejay-current/veejay-server/libvje/effects/gaussblur.c @@ -18,16 +18,11 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include "gaussblur.h" -#include -#include #include "common.h" -#include +#include #include #include +#include "gaussblur.h" vj_effect *gaussblur_init(int w,int h) { @@ -165,14 +160,16 @@ static void gaussblur(uint8_t *dst, const int dst_linesize,const uint8_t *src, c void gaussblur_apply(VJFrame *frame, int radius, int strength, int quality ) { uint8_t *A = frame->data[3]; - const unsigned int len = frame->len; + const unsigned int width = frame->width; + const unsigned int height = frame->height; + const unsigned int len = frame->len; if( last_radius != radius || last_strength != strength || last_quality != quality ) { if( gaussfilter->filter_context ) { sws_freeContext( gaussfilter->filter_context ); } - if( gaussfilter_init( frame->width,frame->height, radius, strength, quality ) == 0 ) + if( gaussfilter_init( width, height, radius, strength, quality ) == 0 ) return; last_radius = radius; @@ -182,6 +179,6 @@ void gaussblur_apply(VJFrame *frame, int radius, int strength, int quality ) veejay_memcpy( temp, A, len ); - gaussblur( A, frame->width, temp, frame->width, frame->width,frame->height,gaussfilter->filter_context ); + gaussblur( A, width, temp, width, width, height, gaussfilter->filter_context ); } diff --git a/veejay-current/veejay-server/libvje/effects/gaussblur.h b/veejay-current/veejay-server/libvje/effects/gaussblur.h index a1c3049a..11d87989 100644 --- a/veejay-current/veejay-server/libvje/effects/gaussblur.h +++ b/veejay-current/veejay-server/libvje/effects/gaussblur.h @@ -20,10 +20,6 @@ #ifndef AGAUSSB_H #define AGAUSSB_H -#include -#include -#include - void gaussblur_apply(VJFrame *frame, int radius, int strength, int quality ); void gaussblur_free(); int gaussblur_malloc(int w, int h); From afddf40d596bd03d87f0e40e0bf0579d775c687e Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 11:29:43 +0200 Subject: [PATCH 065/170] Libvje / refactor : levelcorrection * clean headers --- .../veejay-server/libvje/effects/levelcorrection.c | 6 +----- .../veejay-server/libvje/effects/levelcorrection.h | 3 --- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/levelcorrection.c b/veejay-current/veejay-server/libvje/effects/levelcorrection.c index 4a6213cf..77188353 100644 --- a/veejay-current/veejay-server/libvje/effects/levelcorrection.c +++ b/veejay-current/veejay-server/libvje/effects/levelcorrection.c @@ -18,13 +18,9 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include +#include "common.h" #include #include "levelcorrection.h" -#include -#include -#include "common.h" vj_effect *levelcorrection_init(int w,int h) { diff --git a/veejay-current/veejay-server/libvje/effects/levelcorrection.h b/veejay-current/veejay-server/libvje/effects/levelcorrection.h index cc48f214..c1979dd5 100644 --- a/veejay-current/veejay-server/libvje/effects/levelcorrection.h +++ b/veejay-current/veejay-server/libvje/effects/levelcorrection.h @@ -20,9 +20,6 @@ #ifndef ALEVELCORRECTION_H #define ALEVELCORRECTION_H -#include -#include -#include void levelcorrection_apply(VJFrame *frame, int min, int max, int bmin, int bmax); vj_effect *levelcorrection_init(int w,int h); #endif From 3eb0e46f2f9d91107e828e50aa03d9ba7d1db027 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 11:31:29 +0200 Subject: [PATCH 066/170] Libvje / refactor : masktransition * w,h * clean headers --- .../veejay-server/libvje/effects/masktransition.c | 12 ++++-------- .../veejay-server/libvje/effects/masktransition.h | 8 ++------ veejay-current/veejay-server/libvje/internal.h | 2 +- veejay-current/veejay-server/libvje/vj-effman.c | 2 +- 4 files changed, 8 insertions(+), 16 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/masktransition.c b/veejay-current/veejay-server/libvje/effects/masktransition.c index 94ad5b9e..fe38cac9 100644 --- a/veejay-current/veejay-server/libvje/effects/masktransition.c +++ b/veejay-current/veejay-server/libvje/effects/masktransition.c @@ -18,13 +18,10 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include -#include "masktransition.h" -#include #include "common.h" +#include +#include +#include "masktransition.h" vj_effect *masktransition_init(int width, int height) { @@ -143,8 +140,7 @@ void alpha_transition_apply( VJFrame *frame, uint8_t *B[4], int time_index ) } } -void masktransition_apply( VJFrame *frame, VJFrame *frame2, int width, - int height, int time_index, int duration ) +void masktransition_apply( VJFrame *frame, VJFrame *frame2, int time_index, int duration ) { alpha_blend_transition( frame->data[0],frame->data[1],frame->data[2],frame->data[3], diff --git a/veejay-current/veejay-server/libvje/effects/masktransition.h b/veejay-current/veejay-server/libvje/effects/masktransition.h index 50838b0f..4c761ae2 100644 --- a/veejay-current/veejay-server/libvje/effects/masktransition.h +++ b/veejay-current/veejay-server/libvje/effects/masktransition.h @@ -20,11 +20,7 @@ #ifndef MASKTRANSITION_H #define MASKTRANSITION_H -#include -#include -#include - -void masktransition_apply( VJFrame *frame, VJFrame *frame2, int width,int height, int index, int duration); -void alpha_transition_apply( VJFrame *frame, uint8_t *B[4], int time_index ); +void masktransition_apply( VJFrame *frame, VJFrame *frame2, int index, int duration); +void alpha_transition_apply( VJFrame *frame, uint8_t *B[4], int time_index ); vj_effect *masktransition_init(int w, int h); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index a05010fd..46db67f4 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -526,7 +526,7 @@ extern void overlaymagicalpha_apply( VJFrame *frame, VJFrame *frame2, int type, extern void alphanegate_apply( VJFrame *frame, int value ); extern void gaussblur_apply(VJFrame *frame, int radius, int strength, int quality ); extern void levelcorrection_apply(VJFrame *frame, int min, int max, int bmin, int bmax); -extern void masktransition_apply( VJFrame *frame, VJFrame *frame2, int width,int height, int time_index, int duration); +extern void masktransition_apply( VJFrame *frame, VJFrame *frame2, int time_index, int duration); extern void alphadampen_apply( VJFrame *frame, int b1); extern void passthrough_apply( VJFrame *frame, VJFrame *frame2); extern void alphatransition_apply( VJFrame *frame, VJFrame *frame2, int time_index, int duration, int direction, int threshold); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index 185a3aca..f866e150 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -640,7 +640,7 @@ static void vj_effman_apply_video_effect( VJFrame **frames, vjp_kf *todo_info,in overlaymagicalpha_apply(frames[0],frames[1],arg[0],arg[1]); break; case VJ_VIDEO_EFFECT_MASKTRANSITION: - masktransition_apply(frames[0],frames[1],frames[0]->width,frames[0]->height,arg[0],arg[1]); + masktransition_apply(frames[0],frames[1],arg[0],arg[1]); break; case VJ_VIDEO_EFFECT_PASSTHROUGH: passthrough_apply(frames[0],frames[1]); From a045fe331a46d74b1e96b90d0c9170670528bcd4 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 11:32:51 +0200 Subject: [PATCH 067/170] Libvje / refactor : alphadampen * clean headers --- .../veejay-server/libvje/effects/alphadampen.c | 15 +++++++-------- .../veejay-server/libvje/effects/alphadampen.h | 4 ---- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/alphadampen.c b/veejay-current/veejay-server/libvje/effects/alphadampen.c index 24f695f6..826ad296 100644 --- a/veejay-current/veejay-server/libvje/effects/alphadampen.c +++ b/veejay-current/veejay-server/libvje/effects/alphadampen.c @@ -17,9 +17,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include + +#include "common.h" #include #include "alphadampen.h" @@ -46,13 +45,13 @@ vj_effect *alphadampen_init(int w, int h) void alphadampen_apply( VJFrame *frame, int b1) { - size_t i; - const size_t len = frame->len; - uint8_t tmp; - uint8_t *A = frame->data[3]; + size_t i; + const unsigned int len = frame->len; + uint8_t tmp; + uint8_t *A = frame->data[3]; const int base = (const int) b1; - for( i = 0 ; i < len ; i ++ ) + for( i = 0 ; i < len ; i ++ ) { tmp = A[i]; A[i] = (tmp / base) * base; // loose fractional part diff --git a/veejay-current/veejay-server/libvje/effects/alphadampen.h b/veejay-current/veejay-server/libvje/effects/alphadampen.h index 84ddb999..cde3cede 100644 --- a/veejay-current/veejay-server/libvje/effects/alphadampen.h +++ b/veejay-current/veejay-server/libvje/effects/alphadampen.h @@ -20,10 +20,6 @@ #ifndef ALPHA_DAMPEN_H #define ALPHA_DAMPEN_H -#include -#include -#include - vj_effect *alphadampen_init(int w, int h); void alphadampen_apply( VJFrame *frame, int b1); #endif From aca6035c63a138488198d0040fb7cef328de4bc9 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 11:33:59 +0200 Subject: [PATCH 068/170] Libvje / refactor : passthrough * clean headers --- veejay-current/veejay-server/libvje/effects/passthrough.c | 4 +--- veejay-current/veejay-server/libvje/effects/passthrough.h | 5 ----- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/passthrough.c b/veejay-current/veejay-server/libvje/effects/passthrough.c index 76b91d13..7b28147b 100644 --- a/veejay-current/veejay-server/libvje/effects/passthrough.c +++ b/veejay-current/veejay-server/libvje/effects/passthrough.c @@ -18,9 +18,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include +#include "common.h" #include #include "passthrough.h" diff --git a/veejay-current/veejay-server/libvje/effects/passthrough.h b/veejay-current/veejay-server/libvje/effects/passthrough.h index c8a28076..464f8d61 100644 --- a/veejay-current/veejay-server/libvje/effects/passthrough.h +++ b/veejay-current/veejay-server/libvje/effects/passthrough.h @@ -20,11 +20,6 @@ #ifndef PASSTHROUGHB_H #define PASSTHROUGHB_H -#include -#include -#include - vj_effect *passthrough_init(int w, int h); void passthrough_apply( VJFrame *frame, VJFrame *frame2); - #endif From 25b57cac9f0f52ec482c420184fe7117aca75958 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 11:34:58 +0200 Subject: [PATCH 069/170] Libvje / refactor : alphatransition * clean headers --- .../veejay-server/libvje/effects/alphatransition.c | 9 +++------ .../veejay-server/libvje/effects/alphatransition.h | 4 ---- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/alphatransition.c b/veejay-current/veejay-server/libvje/effects/alphatransition.c index d40cf2a5..4f022cb8 100644 --- a/veejay-current/veejay-server/libvje/effects/alphatransition.c +++ b/veejay-current/veejay-server/libvje/effects/alphatransition.c @@ -18,13 +18,10 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include -#include "alphatransition.h" -#include #include "common.h" +#include +#include +#include "alphatransition.h" /* almost the same as masktransition.c, but adding threshold and direction parameters */ diff --git a/veejay-current/veejay-server/libvje/effects/alphatransition.h b/veejay-current/veejay-server/libvje/effects/alphatransition.h index f79aae1b..4437cab5 100644 --- a/veejay-current/veejay-server/libvje/effects/alphatransition.h +++ b/veejay-current/veejay-server/libvje/effects/alphatransition.h @@ -20,10 +20,6 @@ #ifndef ALPHATRANSITION_H #define ALPHATRANSITION_H -#include -#include -#include - void alphatransition_apply( VJFrame *frame, VJFrame *frame2, int index, int duration, int dir, int threshold); vj_effect *alphatransition_init(int w, int h); #endif From b2e93e67bb0ea25e0f643a9a5a8bf1afb1ab0905 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 11:35:56 +0200 Subject: [PATCH 070/170] Libvje / refactor : randnoise * clean headers --- veejay-current/veejay-server/libvje/effects/randnoise.c | 5 +---- veejay-current/veejay-server/libvje/effects/randnoise.h | 4 ---- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/randnoise.c b/veejay-current/veejay-server/libvje/effects/randnoise.c index 2bde41e0..2f31c9f8 100644 --- a/veejay-current/veejay-server/libvje/effects/randnoise.c +++ b/veejay-current/veejay-server/libvje/effects/randnoise.c @@ -22,11 +22,8 @@ * Add pseudo random noise to image */ -#include -#include -#include -#include #include "common.h" +#include #include "randnoise.h" vj_effect *randnoise_init(int w, int h) diff --git a/veejay-current/veejay-server/libvje/effects/randnoise.h b/veejay-current/veejay-server/libvje/effects/randnoise.h index 63214d09..5c1cdb08 100644 --- a/veejay-current/veejay-server/libvje/effects/randnoise.h +++ b/veejay-current/veejay-server/libvje/effects/randnoise.h @@ -20,10 +20,6 @@ #ifndef RANDNOISE_H #define RANDNOISE_H -#include -#include -#include - vj_effect *randnoise_init(int w, int h); void randnoise_apply( VJFrame *frame, int min, int max); #endif From 753033f079a192e33dd597f6f44088f9c5b1e39f Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 14:33:12 +0200 Subject: [PATCH 071/170] Libvje / refactor : tripplicity * w,h * clean headers --- .../veejay-server/libvje/effects/tripplicity.c | 11 +++++------ .../veejay-server/libvje/effects/tripplicity.h | 7 +------ veejay-current/veejay-server/libvje/internal.h | 2 +- veejay-current/veejay-server/libvje/vj-effman.c | 3 +-- 4 files changed, 8 insertions(+), 15 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/tripplicity.c b/veejay-current/veejay-server/libvje/effects/tripplicity.c index a96097f2..2a0db4c9 100644 --- a/veejay-current/veejay-server/libvje/effects/tripplicity.c +++ b/veejay-current/veejay-server/libvje/effects/tripplicity.c @@ -23,10 +23,11 @@ Result will vary over different color spaces. */ -#include -#include + +#include "common.h" #include #include "tripplicity.h" + vj_effect *tripplicity_init(int w, int h) { vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); @@ -56,12 +57,11 @@ vj_effect *tripplicity_init(int w, int h) -void tripplicity_apply( VJFrame *frame, VJFrame *frame2, int width, - int height, int opacityL, int opacityCb, int opacityCr) +void tripplicity_apply( VJFrame *frame, VJFrame *frame2, int opacityL, int opacityCb, int opacityCr) { unsigned int i; const unsigned int len = frame->len; - const unsigned int uv_len = (frame->ssm ? frame->len : frame->uv_len); + const unsigned int uv_len = (frame->ssm ? len : frame->uv_len); uint8_t *Y = frame->data[0]; uint8_t *Cb= frame->data[1]; uint8_t *Cr= frame->data[2]; @@ -75,7 +75,6 @@ void tripplicity_apply( VJFrame *frame, VJFrame *frame2, int width, const uint8_t opCr1= (opacityCr > 255) ? 255: opacityCr; const uint8_t opCr0= 255 - opCr1; - for (i = 0; i < len; i++) { Y[i] = (op0 * Y[i] + op1 * Y2[i]) >> 8; diff --git a/veejay-current/veejay-server/libvje/effects/tripplicity.h b/veejay-current/veejay-server/libvje/effects/tripplicity.h index 3a8245a9..2d22afdf 100644 --- a/veejay-current/veejay-server/libvje/effects/tripplicity.h +++ b/veejay-current/veejay-server/libvje/effects/tripplicity.h @@ -20,11 +20,6 @@ #ifndef TRCITY_H #define TRCITY_H -#include -#include -#include - vj_effect *tripplicity_init(); -void tripplicity_apply( VJFrame *frame, VJFrame *frame2, int width, - int height, int opacityL, int opacityCb, int opacityCr); +void tripplicity_apply( VJFrame *frame, VJFrame *frame2, int opacityL, int opacityCb, int opacityCr); #endif diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index 46db67f4..7b642ccd 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -304,7 +304,7 @@ enum { #define VJ_NUM_BLEND_EFFECTS VJ_EFFECT_BLEND_ADDTEST7 -extern void tripplicity_apply(VJFrame *frame1,VJFrame *frame2, int w, int h, int a, int b, int c ); +extern void tripplicity_apply(VJFrame *frame1,VJFrame *frame2, int a, int b, int c ); extern void dices_apply(void * data, VJFrame *frame, int cube_bits); extern void dither_apply( VJFrame *frame, int size, int n); extern void emboss_apply( VJFrame *frame, int n); diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index f866e150..b6b19f8a 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -447,8 +447,7 @@ static void vj_effman_apply_video_effect( VJFrame **frames, vjp_kf *todo_info,in videoplay_apply(frames[0],frames[1],arg[0],arg[1],arg[2]); break; case VJ_VIDEO_EFFECT_TRIPPLICITY: - tripplicity_apply(frames[0],frames[1], - frames[0]->width,frames[0]->height, arg[0],arg[1],arg[2]); + tripplicity_apply(frames[0],frames[1], arg[0],arg[1],arg[2]); break; case VJ_VIDEO_EFFECT_COMPLEXTHRESHOLD: complexthreshold_apply(frames[0], frames[1], arg[0], arg[1], arg[2], arg[3], From b4bb3579e205436d4f291c5c874407fd5a3e1e45 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 14:37:40 +0200 Subject: [PATCH 072/170] Libvje / refactor : dices (fix) * w,h <--- const unsigned * clean headers --- veejay-current/veejay-server/libvje/effects/dices.c | 11 ++++------- veejay-current/veejay-server/libvje/effects/dices.h | 4 ---- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/dices.c b/veejay-current/veejay-server/libvje/effects/dices.c index 9425b3fb..cec20269 100644 --- a/veejay-current/veejay-server/libvje/effects/dices.c +++ b/veejay-current/veejay-server/libvje/effects/dices.c @@ -26,11 +26,8 @@ * the GNU Public License. * */ -#include -#include -#include -#include -#include + +#include "common.h" #include #include "dices.h" @@ -125,8 +122,8 @@ void dice_create_map(int w, int h) void dices_apply( void *data, VJFrame *frame, int cube_bits) { int i = 0, map_x, map_y, map_i = 0, base, dx, dy, di=0; - int width, height; - width = frame->width; height = frame->height; + const unsigned int width = frame->width; + const unsigned int height = frame->height; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; diff --git a/veejay-current/veejay-server/libvje/effects/dices.h b/veejay-current/veejay-server/libvje/effects/dices.h index 021926f7..48cb161b 100644 --- a/veejay-current/veejay-server/libvje/effects/dices.h +++ b/veejay-current/veejay-server/libvje/effects/dices.h @@ -20,10 +20,6 @@ #ifndef DICES_H #define DICES_H -#include -#include -#include - vj_effect *dices_init(int width, int height); int dices_malloc(int w, int h); void dices_free(); From 65f144e80428d91e558a73ddc516cbde6ac7e3a4 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 14:38:12 +0200 Subject: [PATCH 073/170] Libvje / refactor : dither (fix) * w,h <--- const unsign * clean headers --- veejay-current/veejay-server/libvje/effects/dither.c | 10 ++++------ veejay-current/veejay-server/libvje/effects/dither.h | 4 ---- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/dither.c b/veejay-current/veejay-server/libvje/effects/dither.c index 56fcabb2..43511fd1 100644 --- a/veejay-current/veejay-server/libvje/effects/dither.c +++ b/veejay-current/veejay-server/libvje/effects/dither.c @@ -17,12 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include + +#include "common.h" #include #include "dither.h" -#include "common.h" vj_effect *dither_init(int w, int h) { @@ -60,8 +58,8 @@ void dither_apply(VJFrame *frame, int size, int random_on) long int dith[size][size]; long int i, j, d, v, l, m; uint8_t *Y = frame->data[0]; - int width, height; - width=frame->width; height = frame->height; + const unsigned int width = frame->width; + const unsigned int height = frame->height; if( last_size != size || random_on ) { diff --git a/veejay-current/veejay-server/libvje/effects/dither.h b/veejay-current/veejay-server/libvje/effects/dither.h index 6625c55e..15c13cee 100644 --- a/veejay-current/veejay-server/libvje/effects/dither.h +++ b/veejay-current/veejay-server/libvje/effects/dither.h @@ -20,10 +20,6 @@ #ifndef DITHER_H #define DITHER_H -#include -#include -#include - vj_effect *dither_init(); void dither_apply(VJFrame *frame, int size, int n); #endif From a4a6e36862f0cf3d7e16764685b166b65364fee2 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 14:41:48 +0200 Subject: [PATCH 074/170] Libvje / refactor : emboss (fix) * w,h <-- unsigned * frame->len * clean headers --- .../veejay-server/libvje/effects/emboss.c | 29 +++++++++---------- .../veejay-server/libvje/effects/emboss.h | 4 --- 2 files changed, 13 insertions(+), 20 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/emboss.c b/veejay-current/veejay-server/libvje/effects/emboss.c index eae02d88..af593f35 100644 --- a/veejay-current/veejay-server/libvje/effects/emboss.c +++ b/veejay-current/veejay-server/libvje/effects/emboss.c @@ -17,13 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include + +#include "common.h" #include #include "emboss.h" -#include -#include -#include "common.h" vj_effect *emboss_init(int w, int h) { @@ -86,7 +83,7 @@ static void xtreme_emboss_framedata(VJFrame *frame, int width, int height) { unsigned int r, c; uint8_t *Y = frame->data[0]; - int len = ( width * height ) - width; + int len = ( frame->len ) - width; for (r = width; r < len; r += width) { for (c = 1; c < (width-1); c++) @@ -107,7 +104,7 @@ static void xtreme_emboss_framedata(VJFrame *frame, int width, int height) static void another_try_edge(VJFrame *frame, int w, int h) { uint8_t p; - const unsigned int len=(w*h)-w; + const unsigned int len=frame->len-w; unsigned int r,c; uint8_t *Y = frame->data[0]; for(r=w; r < len; r+= w) @@ -132,7 +129,7 @@ static void another_try_edge(VJFrame *frame, int w, int h) static void lines_white_balance_framedata(VJFrame *frame, int width, int height) { unsigned int r, c; - const unsigned int len = (width * height) - width; + const unsigned int len = frame->len - width; uint8_t val; uint8_t *Y = frame->data[0]; for (r = width; r < len; r += width) @@ -157,7 +154,7 @@ static void emboss_test_framedata(VJFrame *frame, int width, int height) { int a, b, c; int i; - const int len = width * height; + const int len = frame->len; uint8_t *Y = frame->data[0]; for (i = 0; i < len; i++) { @@ -178,7 +175,7 @@ static void gray_emboss_framedata(VJFrame *frame, int width, int height) int r, c; uint8_t val; uint8_t *Y = frame->data[0]; - for (r = 0; r < (width * height); r += width) + for (r = 0; r < frame->len; r += width) { for (c = 0; c < width; c++) { @@ -206,7 +203,7 @@ static void aggressive_emboss_framedata(VJFrame *frame, int width, int height) int r, c; uint8_t val; uint8_t *Y = frame->data[0]; - const int len = width * height; + const int len = frame->len; for (r = 0; r < len; r += width) { for (c = 0; c < width; c++) @@ -234,7 +231,7 @@ static void dark_emboss_framedata(VJFrame *frame, int width, int height) { int r, c; uint8_t *Y = frame->data[0]; - for (r = 0; r < (width * height); r += width) + for (r = 0; r < frame->len; r += width) { for (c = 0; c < width; c++) { @@ -260,7 +257,7 @@ static void grayish_mood_framedata(VJFrame *frame, int width, int height) { int r, c; uint8_t *Y = frame->data[0]; - for (r = 0; r < (width * height); r += width) + for (r = 0; r < frame->len; r += width) { for (c = 0; c < width; c++) { @@ -285,7 +282,7 @@ static void grayish_mood_framedata(VJFrame *frame, int width, int height) static void blur_dark_framedata(VJFrame *frame, int width, int height) { int r, c; - int len = (width*height) - width; + int len = frame->len - width; /* incomplete */ uint8_t *Y = frame->data[0]; for (r = width; r < len; r += width) @@ -307,8 +304,8 @@ static void blur_dark_framedata(VJFrame *frame, int width, int height) void emboss_apply(VJFrame *frame, int n) { - int width, height; - width=frame->width; height = frame->height; + const unsigned int width = frame->width; + const unsigned int height = frame->height; switch (n) { diff --git a/veejay-current/veejay-server/libvje/effects/emboss.h b/veejay-current/veejay-server/libvje/effects/emboss.h index abd695a0..ddbce0af 100644 --- a/veejay-current/veejay-server/libvje/effects/emboss.h +++ b/veejay-current/veejay-server/libvje/effects/emboss.h @@ -20,10 +20,6 @@ #ifndef EMBOSS_H #define EMBOSS_H -#include -#include -#include - vj_effect *emboss_init(); void emboss_apply(VJFrame *frame, int n); #endif From 876d082b202086238a750b56f7b603899242de95 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 14:43:49 +0200 Subject: [PATCH 075/170] Libvje / refactor : fibdown (fix) * remove unsigned var * clean headers --- .../veejay-server/libvje/effects/fibdownscale.c | 8 ++------ .../veejay-server/libvje/effects/fibdownscale.h | 3 --- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/fibdownscale.c b/veejay-current/veejay-server/libvje/effects/fibdownscale.c index c3cd5cee..741db7af 100644 --- a/veejay-current/veejay-server/libvje/effects/fibdownscale.c +++ b/veejay-current/veejay-server/libvje/effects/fibdownscale.c @@ -17,12 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include + +#include "common.h" #include #include "fibdownscale.h" -#include "common.h" vj_effect *fibdownscale_init(int w, int h) { @@ -114,8 +112,6 @@ static void fibrectangle1_apply(VJFrame *frame, VJFrame *frame2) void fibdownscale_apply(VJFrame *frame, VJFrame *frame2, int n) { - int width, height; - width = frame->width; height = frame->height; if (n == 0) fibdownscale1_apply(frame, frame2); if (n == 1) diff --git a/veejay-current/veejay-server/libvje/effects/fibdownscale.h b/veejay-current/veejay-server/libvje/effects/fibdownscale.h index 50f24aa7..d8953227 100644 --- a/veejay-current/veejay-server/libvje/effects/fibdownscale.h +++ b/veejay-current/veejay-server/libvje/effects/fibdownscale.h @@ -20,9 +20,6 @@ #ifndef FIBDOWNSCALE_H #define FIBDOWNSCALE_H -#include -#include -#include vj_effect *fibdownscale_init(); void fibdownscale_apply(VJFrame *frame, VJFrame *frame2, int n); #endif From c2a8f3aafd6aaaf49fc4ec2179bd5fcbf7e6800f Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 14:45:40 +0200 Subject: [PATCH 076/170] Libvje / refactor : flip (fix) * clean headers --- veejay-current/veejay-server/libvje/effects/flip.c | 5 ++--- veejay-current/veejay-server/libvje/effects/flip.h | 4 ---- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/flip.c b/veejay-current/veejay-server/libvje/effects/flip.c index 316160a6..2a26fa57 100644 --- a/veejay-current/veejay-server/libvje/effects/flip.c +++ b/veejay-current/veejay-server/libvje/effects/flip.c @@ -17,10 +17,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include + #include "common.h" +#include #include "flip.h" vj_effect *flip_init(int w, int h) diff --git a/veejay-current/veejay-server/libvje/effects/flip.h b/veejay-current/veejay-server/libvje/effects/flip.h index 88a71661..f83e122a 100644 --- a/veejay-current/veejay-server/libvje/effects/flip.h +++ b/veejay-current/veejay-server/libvje/effects/flip.h @@ -20,10 +20,6 @@ #ifndef FLIP_H #define FLIP_H -#include -#include -#include - vj_effect *flip_init(); void flip_apply(VJFrame *frame, int n); #endif From f3228a0c8e057ab05b0fb19ec8272d21df7f33cb Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 14:46:44 +0200 Subject: [PATCH 077/170] Libvje / refactor : killchroma (fix) * clean headers --- veejay-current/veejay-server/libvje/effects/killchroma.c | 7 +------ veejay-current/veejay-server/libvje/effects/killchroma.h | 3 --- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/killchroma.c b/veejay-current/veejay-server/libvje/effects/killchroma.c index abf8dbe4..05abf960 100644 --- a/veejay-current/veejay-server/libvje/effects/killchroma.c +++ b/veejay-current/veejay-server/libvje/effects/killchroma.c @@ -17,14 +17,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include "killchroma.h" #include "common.h" -#include -#include -#include #include +#include "killchroma.h" vj_effect *killchroma_init(int w, int h) { diff --git a/veejay-current/veejay-server/libvje/effects/killchroma.h b/veejay-current/veejay-server/libvje/effects/killchroma.h index 9b113167..04b49c61 100644 --- a/veejay-current/veejay-server/libvje/effects/killchroma.h +++ b/veejay-current/veejay-server/libvje/effects/killchroma.h @@ -20,9 +20,6 @@ #ifndef KILLCHROMA_H #define KILLCHROMA_H -#include -#include -#include vj_effect *killchroma_init(); void killchroma_apply(VJFrame *v, int n); #endif From b235572d38c1fa40628ce90a6a192a47883b8413 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 14:47:58 +0200 Subject: [PATCH 078/170] Libvje / refactor : lumamagick (fix) * clean headers --- veejay-current/veejay-server/libvje/effects/lumamagick.c | 5 +---- veejay-current/veejay-server/libvje/effects/lumamagick.h | 5 ----- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/lumamagick.c b/veejay-current/veejay-server/libvje/effects/lumamagick.c index f2033b19..99db30dd 100644 --- a/veejay-current/veejay-server/libvje/effects/lumamagick.c +++ b/veejay-current/veejay-server/libvje/effects/lumamagick.c @@ -19,13 +19,10 @@ */ /* 7 ,14, 24, 25, 26 */ -#include -#include -#include +#include "common.h" #include #include #include "lumamagick.h" -#include "common.h" /* 04/01/03: added transparency parameters for frame a and frame b in each function */ vj_effect *lumamagick_init(int width, int height) diff --git a/veejay-current/veejay-server/libvje/effects/lumamagick.h b/veejay-current/veejay-server/libvje/effects/lumamagick.h index 1dd14c4a..c69aad76 100644 --- a/veejay-current/veejay-server/libvje/effects/lumamagick.h +++ b/veejay-current/veejay-server/libvje/effects/lumamagick.h @@ -20,11 +20,6 @@ #ifndef LUMAMAGIC_H #define LUMAMAGIC_H -#include -#include -#include - vj_effect *lumamagick_init(); void lumamagic_apply(VJFrame *frame, VJFrame *frame2, int n, int op_a, int op_b); - #endif From 0793968fd41068fe0dc3dcdbea4e3fc7de87a01a Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 14:50:06 +0200 Subject: [PATCH 079/170] Libvje / refactor : magicoverlay (fix) * clean headers --- .../veejay-server/libvje/effects/magicoverlays.c | 9 +++------ .../veejay-server/libvje/effects/magicoverlays.h | 4 ---- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/magicoverlays.c b/veejay-current/veejay-server/libvje/effects/magicoverlays.c index 8a9be50c..eec2ca73 100644 --- a/veejay-current/veejay-server/libvje/effects/magicoverlays.c +++ b/veejay-current/veejay-server/libvje/effects/magicoverlays.c @@ -17,14 +17,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include + +#include "common.h" #include -#include "magicoverlays.h" #include -#include "common.h" -#include +#include "magicoverlays.h" vj_effect *overlaymagic_init(int w, int h) { diff --git a/veejay-current/veejay-server/libvje/effects/magicoverlays.h b/veejay-current/veejay-server/libvje/effects/magicoverlays.h index 974edea4..d99009fd 100644 --- a/veejay-current/veejay-server/libvje/effects/magicoverlays.h +++ b/veejay-current/veejay-server/libvje/effects/magicoverlays.h @@ -20,10 +20,6 @@ #ifndef MAGICOVERLAYS_H #define MAGICOVERLAYS_H -#include -#include -#include - vj_effect *overlaymagic_init(int w, int h); void overlaymagic_apply(VJFrame *frame, VJFrame *frame2, int n, int mode); void overlaymagic_adddistorted(VJFrame *frame, VJFrame *frame2 ); From 18e94d8e9858b6243b6b2c3e172e37b45a97630c Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 14:53:25 +0200 Subject: [PATCH 080/170] Libvje / refactor : mirror (fix) * w, h * clean headers --- .../veejay-server/libvje/effects/mirrors.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/mirrors.c b/veejay-current/veejay-server/libvje/effects/mirrors.c index 91a7c45c..d4df20ee 100644 --- a/veejay-current/veejay-server/libvje/effects/mirrors.c +++ b/veejay-current/veejay-server/libvje/effects/mirrors.c @@ -17,13 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include + +#include "common.h" #include #include "mirrors.h" -#include "common.h" vj_effect *mirrors_init(int width,int height) { @@ -138,13 +135,15 @@ static int N__ = 0; void mirrors_apply(VJFrame *frame, int type, int factor ) { + const unsigned int width = frame->width; + const unsigned int height = frame->height; int interpolate = 1; int motion = 0; int tmp1 = 0; int tmp2 = factor; if( motionmap_active() ) { - int hi = (int)((float)(frame->width * 0.33)); + int hi = (int)((float)(width * 0.33)); motionmap_scale_to( hi,hi,0,0,&tmp1,&tmp2,&n__,&N__); motion = 1; @@ -158,16 +157,16 @@ void mirrors_apply(VJFrame *frame, int type, int factor ) switch (type) { case 0: - _mirrors_v(frame->data, frame->width, frame->height, tmp2, 0); + _mirrors_v(frame->data, width, height, tmp2, 0); break; case 1: - _mirrors_v(frame->data,frame->width, frame->height,tmp2,1); + _mirrors_v(frame->data,width, height,tmp2,1); break; case 2: - _mirrors_h(frame->data,frame->width, frame->height,tmp2,0); + _mirrors_h(frame->data,width, height,tmp2,0); break; case 3: - _mirrors_h(frame->data,frame->width, frame->height,tmp2,1); + _mirrors_h(frame->data,width, height,tmp2,1); break; } From 89eba0eefadc97ad9190b6d072e10dc489e47630 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 14:54:45 +0200 Subject: [PATCH 081/170] Libvje / refacor : mirrors2 * clean headers --- veejay-current/veejay-server/libvje/effects/mirrors2.c | 5 ++--- veejay-current/veejay-server/libvje/effects/mirrors2.h | 6 ------ 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/mirrors2.c b/veejay-current/veejay-server/libvje/effects/mirrors2.c index 738f0a08..8f489dd3 100644 --- a/veejay-current/veejay-server/libvje/effects/mirrors2.c +++ b/veejay-current/veejay-server/libvje/effects/mirrors2.c @@ -17,9 +17,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include + +#include "common.h" #include #include "mirrors2.h" diff --git a/veejay-current/veejay-server/libvje/effects/mirrors2.h b/veejay-current/veejay-server/libvje/effects/mirrors2.h index d27d2727..777c84f4 100644 --- a/veejay-current/veejay-server/libvje/effects/mirrors2.h +++ b/veejay-current/veejay-server/libvje/effects/mirrors2.h @@ -20,13 +20,7 @@ #ifndef MIRRORS2_H #define MIRRORS2_H -#include -#include -#include - vj_effect *mirrors2_init(); - void mirrors2_apply( VJFrame *frame, int type); - void mirrors2_free(); #endif From 0a3246ac0c95e6f2593544e4c3ea789b21742580 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 14:55:49 +0200 Subject: [PATCH 082/170] Libvje / refactor : negation (fix) * clean headers --- veejay-current/veejay-server/libvje/effects/negation.c | 9 +++------ veejay-current/veejay-server/libvje/effects/negation.h | 4 ---- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/negation.c b/veejay-current/veejay-server/libvje/effects/negation.c index 964569be..4bb124d0 100644 --- a/veejay-current/veejay-server/libvje/effects/negation.c +++ b/veejay-current/veejay-server/libvje/effects/negation.c @@ -17,12 +17,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include -#include + #include "common.h" +#include #include "negation.h" vj_effect *negation_init(int w, int h) @@ -50,7 +47,7 @@ void negation_apply( VJFrame *frame, int val) { int i; const unsigned int len = frame->len; - const unsigned int uv_len = (frame->ssm ? frame->len : frame->uv_len ); + const unsigned int uv_len = (frame->ssm ? len : frame->uv_len ); uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; diff --git a/veejay-current/veejay-server/libvje/effects/negation.h b/veejay-current/veejay-server/libvje/effects/negation.h index 6c3c98ed..88f8cae4 100644 --- a/veejay-current/veejay-server/libvje/effects/negation.h +++ b/veejay-current/veejay-server/libvje/effects/negation.h @@ -20,10 +20,6 @@ #ifndef NEGATION_H #define NEGATION_H -#include -#include -#include - vj_effect *negation_init(int w, int h); void negation_apply( VJFrame *frame, int val); #endif From 77439a30e4880ca01c236320f4212ad15b0a2788 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 14:58:39 +0200 Subject: [PATCH 083/170] Libvje / refactor : median (fix) * w,h, len : const unsigne * clean headers --- .../veejay-server/libvje/effects/median.c | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/median.c b/veejay-current/veejay-server/libvje/effects/median.c index 7fe04a05..589300a3 100644 --- a/veejay-current/veejay-server/libvje/effects/median.c +++ b/veejay-current/veejay-server/libvje/effects/median.c @@ -17,14 +17,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include -#include + +#include "common.h" #include -#include "median.h" #include +#include "median.h" + vj_effect *medianfilter_init(int w, int h) { vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); @@ -46,6 +44,9 @@ vj_effect *medianfilter_init(int w, int h) void medianfilter_apply( VJFrame *frame, int val) { + const unsigned int width = frame->width; + const unsigned int height = frame->height; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -53,15 +54,15 @@ void medianfilter_apply( VJFrame *frame, int val) if( val == 0 ) return; - uint8_t *buffer = (uint8_t*) vj_malloc(sizeof(uint8_t)*frame->width*frame->height*3); - veejay_memset( buffer,0, frame->width*frame->height*3); - ctmf( Y, buffer, frame->width,frame->height,frame->width,frame->width,val,1,1024*1024*8); - ctmf( Cb,buffer + (frame->width*frame->height), frame->width,frame->height/2,frame->width,frame->width,val,1,512*1024); - ctmf( Cr,buffer + (frame->width*frame->height*2), frame->width,frame->height/2,frame->width,frame->width,val,1,512*1024); + uint8_t *buffer = (uint8_t*) vj_malloc(sizeof(uint8_t)*len*3); + veejay_memset( buffer,0, len*3); + ctmf( Y, buffer, width,height,width,width,val,1,1024*1024*8); + ctmf( Cb,buffer + (len), width,height/2,width,width,val,1,512*1024); + ctmf( Cr,buffer + (len*2), width,height/2,width,width,val,1,512*1024); - veejay_memcpy( Y, buffer, frame->width*frame->height); - veejay_memcpy( Cb,buffer + (frame->width*frame->height), frame->width*frame->height); - veejay_memcpy( Cr,buffer + (frame->width*frame->height*2), frame->width*frame->height); + veejay_memcpy( Y, buffer, len); + veejay_memcpy( Cb,buffer + (len), len); + veejay_memcpy( Cr,buffer + (len*2), len); free(buffer); From 22e2a72ac770c312e9bcd5aedd59018350c2c9d3 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 14:59:49 +0200 Subject: [PATCH 084/170] Libvje / refactor : negatechannel (fix) * frame->len * clean headers --- .../veejay-server/libvje/effects/negatechannel.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/negatechannel.c b/veejay-current/veejay-server/libvje/effects/negatechannel.c index a318cb88..8652e362 100644 --- a/veejay-current/veejay-server/libvje/effects/negatechannel.c +++ b/veejay-current/veejay-server/libvje/effects/negatechannel.c @@ -17,13 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include + +#include "common.h" #include #include "negatechannel.h" -#include "common.h" vj_effect *negatechannel_init(int w, int h) { @@ -56,8 +53,8 @@ vj_effect *negatechannel_init(int w, int h) void negatechannel_apply( VJFrame *frame, int chan, int val) { int i; - const int len = (frame->width * frame->height); - const int uv_len = (frame->ssm ? frame->len : frame->uv_len); + const int len = frame->len; + const int uv_len = (frame->ssm ? len : frame->uv_len); uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; From f1332584a3e969d3bc508ad3630f2a683eb483cf Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 15:00:53 +0200 Subject: [PATCH 085/170] Libvje / refactor : colormap (fix) * clean headers --- veejay-current/veejay-server/libvje/effects/colormap.c | 6 ++---- veejay-current/veejay-server/libvje/effects/colormap.h | 4 ---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/colormap.c b/veejay-current/veejay-server/libvje/effects/colormap.c index cc704d4c..b6e484d6 100644 --- a/veejay-current/veejay-server/libvje/effects/colormap.c +++ b/veejay-current/veejay-server/libvje/effects/colormap.c @@ -17,11 +17,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include + +#include "common.h" #include -#include #include "colormap.h" vj_effect *colormap_init(int w, int h) diff --git a/veejay-current/veejay-server/libvje/effects/colormap.h b/veejay-current/veejay-server/libvje/effects/colormap.h index ab1a2b39..76358b04 100644 --- a/veejay-current/veejay-server/libvje/effects/colormap.h +++ b/veejay-current/veejay-server/libvje/effects/colormap.h @@ -20,10 +20,6 @@ #ifndef COLORMAP_H #define COLORMAP_H -#include -#include -#include - vj_effect *colormap_init(int w, int h); void colormap_apply( VJFrame *frame, int vala , int valb, int valc); #endif From 562504c49d936d34cf8322f7580258e0b5af5096 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 15:01:54 +0200 Subject: [PATCH 086/170] Libvje / refactor : opacity (fix) * clean headers --- veejay-current/veejay-server/libvje/effects/opacity.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/opacity.c b/veejay-current/veejay-server/libvje/effects/opacity.c index 762411b3..5da2678b 100644 --- a/veejay-current/veejay-server/libvje/effects/opacity.c +++ b/veejay-current/veejay-server/libvje/effects/opacity.c @@ -34,15 +34,11 @@ * */ -#include -#include -#include -#include -#include + +#include "common.h" #include #include #include "opacity.h" -#include "common.h" vj_effect *opacity_init(int w, int h) { From 2aede11f603bbfeaba947cf456d87f0ef247fa94 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 15:03:24 +0200 Subject: [PATCH 087/170] Libvje / refactor : opacityadv (fix) * frame->len * clean header --- .../veejay-server/libvje/effects/opacityadv.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/opacityadv.c b/veejay-current/veejay-server/libvje/effects/opacityadv.c index 45d608c1..ff57349d 100644 --- a/veejay-current/veejay-server/libvje/effects/opacityadv.c +++ b/veejay-current/veejay-server/libvje/effects/opacityadv.c @@ -17,10 +17,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include + +#include "common.h" #include #include "opacityadv.h" @@ -53,7 +51,9 @@ void opacityadv_apply( VJFrame *frame, VJFrame *frame2, int opacity, int threshold, int threshold2) { - unsigned int x, y, len = frame->width * frame->height; + unsigned int x, y; + const unsigned int width = frame->width; + const unsigned len = frame->len; uint8_t a1, a2; unsigned int op0, op1; uint8_t *Y = frame->data[0]; @@ -62,7 +62,6 @@ void opacityadv_apply( VJFrame *frame, VJFrame *frame2, int opacity, uint8_t *Y2 = frame2->data[0]; uint8_t *Cb2= frame2->data[1]; uint8_t *Cr2= frame2->data[2]; - const int width = frame->width; op1 = (opacity > 255) ? 255 : opacity; op0 = 255 - op1; From 31875ce8459132618d407522e3b91c8354de43ad Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 15:04:34 +0200 Subject: [PATCH 088/170] Libvje / refactor : posterize (fix) * frame->len * clean headers --- veejay-current/veejay-server/libvje/effects/posterize.c | 9 ++++----- veejay-current/veejay-server/libvje/effects/posterize.h | 4 ---- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/posterize.c b/veejay-current/veejay-server/libvje/effects/posterize.c index 124ae23c..d0191789 100644 --- a/veejay-current/veejay-server/libvje/effects/posterize.c +++ b/veejay-current/veejay-server/libvje/effects/posterize.c @@ -17,12 +17,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include + +#include "common.h" #include #include "posterize.h" -#include "common.h" + vj_effect *posterize_init(int w, int h) { vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); @@ -75,5 +74,5 @@ static void _posterize_y_simple(uint8_t *src[3], int len, int value, int thresho void posterize_apply(VJFrame *frame, int factor, int t1,int t2) { - _posterize_y_simple( frame->data, (frame->width*frame->height), factor, t1,t2); + _posterize_y_simple( frame->data, frame->len, factor, t1,t2); } diff --git a/veejay-current/veejay-server/libvje/effects/posterize.h b/veejay-current/veejay-server/libvje/effects/posterize.h index 7a1955a9..4fe450f7 100644 --- a/veejay-current/veejay-server/libvje/effects/posterize.h +++ b/veejay-current/veejay-server/libvje/effects/posterize.h @@ -20,10 +20,6 @@ #ifndef POSTERIZE_H #define POSTERIZE_H -#include -#include -#include - vj_effect *posterize_init(); void posterize_apply(VJFrame *frame, int factor,int t1,int t2); void posterize_free(); From fff3626b735617355c0f6fbff621afc954066bc9 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 15:06:32 +0200 Subject: [PATCH 089/170] Libvje / refactor : revtv (fix) * clean headers --- veejay-current/veejay-server/libvje/effects/revtv.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/revtv.c b/veejay-current/veejay-server/libvje/effects/revtv.c index 598ff958..59fc9838 100644 --- a/veejay-current/veejay-server/libvje/effects/revtv.c +++ b/veejay-current/veejay-server/libvje/effects/revtv.c @@ -17,12 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include + +#include "common.h" #include #include "revtv.h" -#include "common.h" vj_effect *revtv_init(int max_width, int max_height) { @@ -65,8 +63,8 @@ void revtv_apply(VJFrame *frame, int linespace, int vscale, int color, int color int yval; int uv_width = frame->uv_width; int uv_height = frame->uv_height; - const int height = frame->height; - const int width = frame->width; + const unsigned int height = frame->height; + const unsigned int width = frame->width; int colorCb = bl_pix_get_color_cb(color); int colorCr = bl_pix_get_color_cr(color_num); From de8f9f1e44b6086048b28dfebae99da825986b77 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 15:07:27 +0200 Subject: [PATCH 090/170] Libvje / refactor : softblur (fix) * clean headers --- veejay-current/veejay-server/libvje/effects/softblur.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/softblur.c b/veejay-current/veejay-server/libvje/effects/softblur.c index cfad609a..6c313f33 100644 --- a/veejay-current/veejay-server/libvje/effects/softblur.c +++ b/veejay-current/veejay-server/libvje/effects/softblur.c @@ -17,12 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include + +#include "common.h" #include #include "softblur.h" -#include "common.h" vj_effect *softblur_init(int w,int h) { From 59f5aaabdc34d2a1650db8aaaeda1f8b727274ca Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 15:08:46 +0200 Subject: [PATCH 091/170] Libvje / refactor : split (fix) * clean headers --- veejay-current/veejay-server/libvje/effects/split.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/split.c b/veejay-current/veejay-server/libvje/effects/split.c index 3d3cd63d..06c54469 100644 --- a/veejay-current/veejay-server/libvje/effects/split.c +++ b/veejay-current/veejay-server/libvje/effects/split.c @@ -15,12 +15,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include + +#include "common.h" #include #include "split.h" -#include "common.h" + static uint8_t *split_buf[4] = { NULL,NULL,NULL, NULL }; vj_effect *split_init(int width,int height) From aec539c6f000a2bb81b104405028ce655f8dbade Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 15:09:47 +0200 Subject: [PATCH 092/170] Libvje / refactor : widthmirror (fix) * clean headers --- .../veejay-server/libvje/effects/widthmirror.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/widthmirror.c b/veejay-current/veejay-server/libvje/effects/widthmirror.c index 4475a187..ca4dd7f1 100644 --- a/veejay-current/veejay-server/libvje/effects/widthmirror.c +++ b/veejay-current/veejay-server/libvje/effects/widthmirror.c @@ -17,9 +17,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include + +#include "common.h" #include #include "widthmirror.h" @@ -46,8 +45,8 @@ vj_effect *widthmirror_init(int max_width,int h) void widthmirror_apply(VJFrame *frame, int width_div) { unsigned int r, c; - const int width = frame->width; - const int len = frame->len; + const unsigned int width = frame->width; + const unsigned int len = frame->len; const int uv_len = frame->uv_len; const int uv_width = frame->uv_width; const int uv_width_div = width_div; From c8cb80334767f980321294221503b28bd0b91ddc Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 15:17:18 +0200 Subject: [PATCH 093/170] Libvje / refactor : transblend (fix) * clean headers --- .../veejay-server/libvje/transitions/transblend.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/veejay-current/veejay-server/libvje/transitions/transblend.c b/veejay-current/veejay-server/libvje/transitions/transblend.c index eefe84f2..50d4a19e 100644 --- a/veejay-current/veejay-server/libvje/transitions/transblend.c +++ b/veejay-current/veejay-server/libvje/transitions/transblend.c @@ -17,11 +17,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include + #include +#include #include "transblend.h" vj_effect *transblend_init(int width, int height) @@ -69,8 +67,8 @@ void transblend_apply( VJFrame *frame, VJFrame *frame2, int type, int x, y; int p, q; int uv_width = frame->uv_width; - const int width = frame->width; - const int height = frame->height; + const unsigned int width = frame->width; + const unsigned int height = frame->height; int uvy1, uvy2, uvx1, uvx2; uint8_t *Y, *Cb, *Cr, *Y2, *Cb2, *Cr2; From 79ac108364a2d9c1b4a0add5d4cf5f1f0a326162 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 15:18:26 +0200 Subject: [PATCH 094/170] Libvje / refactor : borders (fix) * clean headers --- veejay-current/veejay-server/libvje/effects/borders.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/borders.c b/veejay-current/veejay-server/libvje/effects/borders.c index c52259b0..d823e0e7 100644 --- a/veejay-current/veejay-server/libvje/effects/borders.c +++ b/veejay-current/veejay-server/libvje/effects/borders.c @@ -17,12 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include + +#include "common.h" #include #include "borders.h" -#include "common.h" vj_effect *borders_init(int width,int height) { From 4a115e88545bf80398e21a2e7de2e3dc6d75c485 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 15:19:28 +0200 Subject: [PATCH 095/170] Libvje / refactor : frameborder (fix) * clean headers --- .../veejay-server/libvje/effects/frameborder.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/frameborder.c b/veejay-current/veejay-server/libvje/effects/frameborder.c index c2310b9f..d129cd92 100644 --- a/veejay-current/veejay-server/libvje/effects/frameborder.c +++ b/veejay-current/veejay-server/libvje/effects/frameborder.c @@ -17,13 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include -#include -#include "frameborder.h" + #include "common.h" +#include +#include "frameborder.h" vj_effect *frameborder_init(int width, int height) { From 2103bfbdefc7a301a8c46b6b7ab22e77ae20b10f Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 15:21:29 +0200 Subject: [PATCH 096/170] Libvje / refactor : noisepencil (fix) * clean headers --- .../veejay-server/libvje/effects/noisepencil.c | 18 ++++++++---------- .../veejay-server/libvje/effects/noisepencil.h | 7 +------ 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/noisepencil.c b/veejay-current/veejay-server/libvje/effects/noisepencil.c index 90ab228f..a0e8bcba 100644 --- a/veejay-current/veejay-server/libvje/effects/noisepencil.c +++ b/veejay-current/veejay-server/libvje/effects/noisepencil.c @@ -18,13 +18,9 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include +#include "common.h" #include #include "noisepencil.h" -#include "common.h" static uint8_t *Yb_frame = NULL; @@ -314,21 +310,23 @@ static void noisepencil_5_apply(uint8_t *src[3], int width, int height, int coee /* with min_t -> max_t select the threshold to 'noise ' */ void noisepencil_apply(VJFrame *frame, int type, int coeef, int min_t, int max_t) { + const unsigned int width = frame->width; + const unsigned int height = frame->height; switch(type) { case 0: - noisepencil_1_apply(frame->data,frame->width,frame->height,coeef,min_t,max_t); + noisepencil_1_apply(frame->data,width, height, coeef,min_t,max_t); break; case 1: - noisepencil_2_apply(frame->data,frame->width,frame->height,coeef,min_t,max_t); + noisepencil_2_apply(frame->data, width, height, coeef,min_t,max_t); break; case 2: - noisepencil_3_apply(frame->data,frame->width,frame->height,coeef,min_t,max_t); + noisepencil_3_apply(frame->data, width, height, coeef,min_t,max_t); break; case 3: - noisepencil_4_apply(frame->data,frame->width,frame->height,coeef,min_t,max_t); + noisepencil_4_apply(frame->data, width, height, coeef,min_t,max_t); break; case 4: - noisepencil_5_apply(frame->data,frame->width,frame->height,coeef,min_t,max_t); + noisepencil_5_apply(frame->data, width, height, coeef,min_t,max_t); break; } } diff --git a/veejay-current/veejay-server/libvje/effects/noisepencil.h b/veejay-current/veejay-server/libvje/effects/noisepencil.h index 8a9f266c..32fb95d6 100644 --- a/veejay-current/veejay-server/libvje/effects/noisepencil.h +++ b/veejay-current/veejay-server/libvje/effects/noisepencil.h @@ -19,14 +19,9 @@ */ #ifndef NOISEPENCIL_H -#define NOISEPENCIL_H -#include -#include -#include - +#define NOISEPENCIL_H vj_effect *noisepencil_init (int w, int h); void noisepencil_free(); int noisepencil_malloc(int w, int h); void noisepencil_apply( VJFrame *frame, int t, int n, int a, int b); - #endif From c699be2bf9d7b74db8dee0f75e7c7863eca3ce76 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 15:22:32 +0200 Subject: [PATCH 097/170] Libvje / refactor : rawman (fix) * frame->len * clean headers --- veejay-current/veejay-server/libvje/effects/rawman.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/rawman.c b/veejay-current/veejay-server/libvje/effects/rawman.c index 8cd5df8b..8f4f8ecd 100644 --- a/veejay-current/veejay-server/libvje/effects/rawman.c +++ b/veejay-current/veejay-server/libvje/effects/rawman.c @@ -17,12 +17,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include + #include "common.h" +#include #include "rawman.h" + vj_effect *rawman_init(int w,int h) { vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); @@ -54,7 +53,7 @@ vj_effect *rawman_init(int w,int h) void rawman_apply(VJFrame *frame, unsigned int mode, unsigned int YY) { - unsigned int len = frame->width * frame->height; + const unsigned int len = frame->len; unsigned int i; uint8_t *Y = frame->data[0]; From 4f6599ad9f459eb499684f8022dcd1c4ab0a1304 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 15:23:23 +0200 Subject: [PATCH 098/170] Libvje / refactor : rawval (fix) * clean headers --- veejay-current/veejay-server/libvje/effects/rawval.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/rawval.c b/veejay-current/veejay-server/libvje/effects/rawval.c index f33529b7..032b3011 100644 --- a/veejay-current/veejay-server/libvje/effects/rawval.c +++ b/veejay-current/veejay-server/libvje/effects/rawval.c @@ -17,13 +17,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include + +#include "common.h" #include #include "rawval.h" -#include -#include + vj_effect *rawval_init(int w,int h) { vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); From 6ddd1dd8dfca58236de684aa3e973e75b9bdd15a Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 15:24:24 +0200 Subject: [PATCH 099/170] Libvje / refactor : smuck (fix) * clean headers --- veejay-current/veejay-server/libvje/effects/smuck.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/smuck.c b/veejay-current/veejay-server/libvje/effects/smuck.c index fc8122f7..a8fa2368 100644 --- a/veejay-current/veejay-server/libvje/effects/smuck.c +++ b/veejay-current/veejay-server/libvje/effects/smuck.c @@ -17,12 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include + +#include "common.h" #include #include "smuck.h" -#include "common.h" static int smuck_rand_val; @@ -56,8 +54,8 @@ static inline unsigned int smuck_fastrand() */ void smuck_apply( VJFrame *frame, VJFrame *frame2, int n) { - const int width = frame->width; - const int height = frame->height; + const unsigned int width = frame->width; + const unsigned int height = frame->height; unsigned int yd, xd, x, y; // different table ... const unsigned int smuck[18] = From 1969191f5b88046523d7d65cdad1bae8fe724c7d Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 15:27:34 +0200 Subject: [PATCH 100/170] Libvje / refactor : fadecolor (fix) * clean headers --- .../veejay-server/libvje/transitions/fadecolor.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/veejay-current/veejay-server/libvje/transitions/fadecolor.c b/veejay-current/veejay-server/libvje/transitions/fadecolor.c index ab504434..c23ea1a0 100644 --- a/veejay-current/veejay-server/libvje/transitions/fadecolor.c +++ b/veejay-current/veejay-server/libvje/transitions/fadecolor.c @@ -17,9 +17,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include + +#include #include #include #include "fadecolor.h" @@ -56,7 +55,7 @@ vj_effect *fadecolor_init(int w,int h) void colorfade_apply(VJFrame *frame, int opacity, int color) { unsigned int i, op0, op1; - unsigned int len = frame->width * frame->height; + const unsigned int len = frame->len; uint8_t colorCb = 128, colorCr = 128; uint8_t colorY=0; const int uv_len = frame->uv_len; From 07b8699237068e4bfaebb46607df8f71d3baf885 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 15:28:46 +0200 Subject: [PATCH 101/170] Libvje / refactor : slidingdoor (fix) * clean headers --- .../veejay-server/libvje/transitions/slidingdoor.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/veejay-current/veejay-server/libvje/transitions/slidingdoor.c b/veejay-current/veejay-server/libvje/transitions/slidingdoor.c index 9d895ce4..b0ec5e79 100644 --- a/veejay-current/veejay-server/libvje/transitions/slidingdoor.c +++ b/veejay-current/veejay-server/libvje/transitions/slidingdoor.c @@ -17,11 +17,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include + #include +#include #include "slidingdoor.h" vj_effect *slidingdoor_init(int width, int height) @@ -61,7 +59,7 @@ vj_effect *slidingdoor_init(int width, int height) void slidingdoor_apply( VJFrame *frame, VJFrame *frame2, int mode) { unsigned int i; - const int len = frame->len; + const unsigned int len = frame->len; const uint8_t *Y2 = frame2->data[0]; const uint8_t *Cb2= frame2->data[1]; const uint8_t *Cr2= frame2->data[2]; From 7534bd579936817ac6db6f9adbd152c354448323 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 15:30:22 +0200 Subject: [PATCH 102/170] Libvje / refactor : transop (fix) * clean headers --- veejay-current/veejay-server/libvje/transitions/transop.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/veejay-current/veejay-server/libvje/transitions/transop.c b/veejay-current/veejay-server/libvje/transitions/transop.c index 38ed2b5f..025efe81 100644 --- a/veejay-current/veejay-server/libvje/transitions/transop.c +++ b/veejay-current/veejay-server/libvje/transitions/transop.c @@ -17,9 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include +#include #include #include "transop.h" @@ -77,8 +75,8 @@ void transop_apply( VJFrame *frame, VJFrame *frame2, int view_width = twidth; int view_height = theight; - const int width = frame->width; - const int height = frame->height; + const unsigned int width = frame->width; + const unsigned int height = frame->height; int sy = y1; int sx = x1; From 6da1d2c740737728a41065313e820c0fb91e73a1 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 15:32:35 +0200 Subject: [PATCH 103/170] Libvje / refactor : lumakey (fix) * clean headers --- veejay-current/veejay-server/libvje/effects/lumakey.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/lumakey.c b/veejay-current/veejay-server/libvje/effects/lumakey.c index 411de91b..960d052f 100644 --- a/veejay-current/veejay-server/libvje/effects/lumakey.c +++ b/veejay-current/veejay-server/libvje/effects/lumakey.c @@ -17,12 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include + +#include "common.h" #include #include "lumakey.h" -#include "common.h" vj_effect *lumakey_init(int width, int height) { From ffd8c511253ed2023ae8e3e7c86fa51e1ee0bde3 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 15:33:35 +0200 Subject: [PATCH 104/170] Libvje / refactor : slicer (fix) * clean headers --- .../veejay-server/libvje/effects/slicer.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/slicer.c b/veejay-current/veejay-server/libvje/effects/slicer.c index 3268e9a8..36ec6666 100644 --- a/veejay-current/veejay-server/libvje/effects/slicer.c +++ b/veejay-current/veejay-server/libvje/effects/slicer.c @@ -17,15 +17,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ - -#include -#include -#include -#include -#include -#include + #include "common.h" +#include #include "slicer.h" + static int *slice_xshift = NULL; static int *slice_yshift = NULL; static int last_period = -1; @@ -119,8 +115,8 @@ vj_effect *slicer_init(int w, int h) void slicer_apply( VJFrame *frame, VJFrame *frame2, int val1, int val2,int shatter, int period, int mode) { int x,y,p,q; - const int width = frame->width; - const int height = frame->height; + const unsigned int width = frame->width; + const unsigned int height = frame->height; const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb= frame->data[1]; From 6b4a94a86ffe0384e471e44522b026dae146c590 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 15:35:04 +0200 Subject: [PATCH 105/170] Libvje / refactor : transcarot (fix) * clean headers --- .../veejay-server/libvje/transitions/transcarot.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/veejay-current/veejay-server/libvje/transitions/transcarot.c b/veejay-current/veejay-server/libvje/transitions/transcarot.c index 7562ab91..6725d7c4 100644 --- a/veejay-current/veejay-server/libvje/transitions/transcarot.c +++ b/veejay-current/veejay-server/libvje/transitions/transcarot.c @@ -17,9 +17,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include + +#include #include #include "transcarot.h" @@ -147,8 +146,8 @@ static void transcarot2_apply( VJFrame *frame, VJFrame *frame2, int point_size, int reverse = 0; int i; unsigned int op0, op1; - const int width = frame->width; - const int height = frame->height; + const unsigned int width = frame->width; + const unsigned int height = frame->height; unsigned int len = frame->len; unsigned int uv_width = frame->uv_width; int uv_dy, uv_dye, uv_row_start, uv_row_length; From 59d1cfb85f292bc8eebea315e597e83c40e62737 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 15:36:35 +0200 Subject: [PATCH 106/170] Libvje / refactor : transline (fix) * clean headers --- veejay-current/veejay-server/libvje/transitions/transline.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/veejay-current/veejay-server/libvje/transitions/transline.c b/veejay-current/veejay-server/libvje/transitions/transline.c index 9216a9c4..a2f7df6d 100644 --- a/veejay-current/veejay-server/libvje/transitions/transline.c +++ b/veejay-current/veejay-server/libvje/transitions/transline.c @@ -17,9 +17,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include + +#include #include #include "transline.h" From 4c1f7d50c2e9a9263fe5e83f402d862cc26286a8 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 15:37:45 +0200 Subject: [PATCH 107/170] Libvje / refactor : transform (fix) * clean headers --- .../veejay-server/libvje/effects/transform.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/transform.c b/veejay-current/veejay-server/libvje/effects/transform.c index 20152cbd..56330fbd 100644 --- a/veejay-current/veejay-server/libvje/effects/transform.c +++ b/veejay-current/veejay-server/libvje/effects/transform.c @@ -17,12 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include + +#include "common.h" #include #include "transform.h" -#include "common.h" vj_effect *transform_init(int width,int height) { @@ -52,8 +50,8 @@ void transform_apply(VJFrame *frame, VJFrame *frame2, const int size) unsigned int ty, tx, y, x; const unsigned int uv_height = frame->uv_height; const unsigned int uv_width = frame->uv_width; - const int width = frame->width; - const int height = frame->height; + const unsigned int width = frame->width; + const unsigned int height = frame->height; uint8_t *Y = frame->data[0]; uint8_t *Cb= frame->data[1]; uint8_t *Cr= frame->data[2]; From 49a2df2299ba932777d4bf4b737e3bd7e1bf1ae9 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 15:38:33 +0200 Subject: [PATCH 108/170] Libvje / refactor : coloradjust (fix) * clean headers --- veejay-current/veejay-server/libvje/effects/coloradjust.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/coloradjust.c b/veejay-current/veejay-server/libvje/effects/coloradjust.c index a33451f8..a994887f 100644 --- a/veejay-current/veejay-server/libvje/effects/coloradjust.c +++ b/veejay-current/veejay-server/libvje/effects/coloradjust.c @@ -17,13 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include + +#include "common.h" #include #include "coloradjust.h" -#include "common.h" vj_effect *coloradjust_init(int w, int h) { From d72a7ad46f6fd9154052680de1cdae7866fad0bb Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 15:39:48 +0200 Subject: [PATCH 109/170] Libvje / refactor : rgbkey (fix) * clean headers --- veejay-current/veejay-server/libvje/effects/rgbkey.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/rgbkey.c b/veejay-current/veejay-server/libvje/effects/rgbkey.c index 76898d7f..f1a5a986 100644 --- a/veejay-current/veejay-server/libvje/effects/rgbkey.c +++ b/veejay-current/veejay-server/libvje/effects/rgbkey.c @@ -18,16 +18,11 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include +#include "common.h" #include -#include #include #include #include "rgbkey.h" -#include "common.h" extern int yuv_sws_get_cpu_flags(); From f64cb56f33e44a91b99838a4e1f2f39f7ef06c39 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 15:41:41 +0200 Subject: [PATCH 110/170] Libvje / refactor : gamma (fix) * clean headers --- veejay-current/veejay-server/libvje/effects/gamma.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/gamma.c b/veejay-current/veejay-server/libvje/effects/gamma.c index 747ee35e..4213fae4 100644 --- a/veejay-current/veejay-server/libvje/effects/gamma.c +++ b/veejay-current/veejay-server/libvje/effects/gamma.c @@ -17,10 +17,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include + +#include "common.h" #include #include "gamma.h" @@ -62,7 +60,8 @@ static void gamma_setup(int width, int height, void gamma_apply(VJFrame *frame, int gamma_value) { - unsigned int i, len = frame->len; + unsigned int i; + const unsigned len = frame->len; uint8_t *Y = frame->data[0]; if (gamma_value != gamma_flag) { From 09fdbc54ac12e74380162998c871d1e741fea5a9 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 15:42:44 +0200 Subject: [PATCH 111/170] LIbvje / refacgtor : solarize (fix) * clean headers --- .../veejay-server/libvje/effects/solarize.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/solarize.c b/veejay-current/veejay-server/libvje/effects/solarize.c index 736b4d53..75a3ff8e 100644 --- a/veejay-current/veejay-server/libvje/effects/solarize.c +++ b/veejay-current/veejay-server/libvje/effects/solarize.c @@ -1,3 +1,4 @@ + /* * Linux VeeJay * @@ -17,12 +18,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include + +#include "common.h" #include #include "solarize.h" -#include + vj_effect *solarize_init(int w,int h) { vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); @@ -46,7 +46,8 @@ vj_effect *solarize_init(int w,int h) void solarize_apply( VJFrame *frame, int threshold) { - int i, len= frame->len; + unsigned int i; + const unsigned int len= frame->len; uint8_t val; uint8_t *Y = frame->data[0]; uint8_t *Cb= frame->data[1]; From 61a258f19e3cfc3e4a8f7b76c4c41a23e27b761d Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 15:44:24 +0200 Subject: [PATCH 112/170] Libvje / refactor : dummy (fix) * clean headers --- veejay-current/veejay-server/libvje/effects/dummy.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/dummy.c b/veejay-current/veejay-server/libvje/effects/dummy.c index 12b66bd7..77638265 100644 --- a/veejay-current/veejay-server/libvje/effects/dummy.c +++ b/veejay-current/veejay-server/libvje/effects/dummy.c @@ -17,12 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include + +#include "common.h" #include #include "dummy.h" -#include "common.h" vj_effect *dummy_init(int w, int h) { @@ -65,7 +63,7 @@ void dummy_apply( VJFrame *frame, int color) void dummy_rgb_apply( VJFrame *frame, int r,int g, int b) { - const int len = frame->len; + const unsigned int len = frame->len; const int uv_len = frame->uv_len; int colorCb=128, colorCr=128, colorY=0; From 4baf17764da9bb0c9939d5c0975f45ee7fa6de4e Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 15:45:37 +0200 Subject: [PATCH 113/170] Libvje / refactor : rotozoom (fix) * clean headers --- .../veejay-server/libvje/effects/rotozoom.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/rotozoom.c b/veejay-current/veejay-server/libvje/effects/rotozoom.c index 55a5e217..175f46ce 100644 --- a/veejay-current/veejay-server/libvje/effects/rotozoom.c +++ b/veejay-current/veejay-server/libvje/effects/rotozoom.c @@ -19,14 +19,9 @@ */ /* distortion effects */ -#include -#include -#include -#include -#include +#include "common.h" #include #include "rotozoom.h" -#include "common.h" static int *test_roto[9]; static int *test_roto2[9]; @@ -226,9 +221,9 @@ static void rotozoom1_apply(VJFrame *frame, uint8_t *data[3], int w, int h, void rotozoom_apply( VJFrame *frame, int mode, int rotate, int zoom, int autom) { - int width = frame->width; - int height = frame->height; - const int len = frame->len; + const unsigned int width = frame->width; + const unsigned int height = frame->height; + const unsigned int len = frame->len; int strides[4] = {len ,len ,len ,0}; switch (autom) { /* alas must do memcpy */ case 0: From d5ce9919645b9bf0b71ffd9f45d31c6726913e00 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 15:46:35 +0200 Subject: [PATCH 114/170] Libvje / refactor : whiteframe (fix) * clean headers --- veejay-current/veejay-server/libvje/effects/whiteframe.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/whiteframe.c b/veejay-current/veejay-server/libvje/effects/whiteframe.c index 7b882548..f526cfda 100644 --- a/veejay-current/veejay-server/libvje/effects/whiteframe.c +++ b/veejay-current/veejay-server/libvje/effects/whiteframe.c @@ -17,12 +17,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include + +#include "common.h" #include #include "whiteframe.h" -#include "common.h" + vj_effect *whiteframe_init(int w,int h) { vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); @@ -43,7 +42,7 @@ vj_effect *whiteframe_init(int w,int h) void whiteframe_apply( VJFrame *frame, VJFrame *frame2) { unsigned int i; - const int len = frame->len; + const unsigned int len = frame->len; const int uv_len = frame->uv_len; uint8_t p; uint8_t *Y = frame->data[0]; From 1f286f11cfc13a111b8247731470f8464b8693ae Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 15:48:38 +0200 Subject: [PATCH 115/170] Libvje / refactor : contourextract (fix) * clean headers --- .../veejay-server/libvje/effects/contourextract.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/contourextract.c b/veejay-current/veejay-server/libvje/effects/contourextract.c index eca2a3e5..bf772e86 100644 --- a/veejay-current/veejay-server/libvje/effects/contourextract.c +++ b/veejay-current/veejay-server/libvje/effects/contourextract.c @@ -18,15 +18,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include + +#include "common.h" #include #include #include #include -#include "common.h" #include "softblur.h" #include "diff.h" #include "contourextract.h" @@ -208,9 +205,9 @@ void contourextract_apply(void *ed, VJFrame *frame, int threshold, int reverse, int mode, int take_bg, int feather, int min_blob_weight) { unsigned int i; - const int width = frame->width; - const int height = frame->height; - const int len = frame->len; + const unsigned int width = frame->width; + const unsigned int height = frame->height; + const unsigned int len = frame->len; const int uv_len = frame->uv_len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; From e727118eb7c5f5bbd80e1164b3acfc00ca9c1a68 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 15:49:58 +0200 Subject: [PATCH 116/170] Libvje / refactor : diff (fix) * clean headers --- .../veejay-server/libvje/effects/diff.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/diff.c b/veejay-current/veejay-server/libvje/effects/diff.c index 5c35271c..e31ffa5b 100644 --- a/veejay-current/veejay-server/libvje/effects/diff.c +++ b/veejay-current/veejay-server/libvje/effects/diff.c @@ -17,19 +17,14 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include -#include -#include -#include -#include -#include + +#include "common.h" #include +#include +#include #include "softblur.h" #include "diff.h" -#include "common.h" + static uint8_t *static_bg = NULL; static uint32_t *dt_map = NULL; From 769978d1f75aeee56f3696b23aed99e580795aa9 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 15:51:00 +0200 Subject: [PATCH 117/170] Libvje / refactor : chromamagick (fix) * clean headers --- veejay-current/veejay-server/libvje/effects/chromamagick.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/chromamagick.c b/veejay-current/veejay-server/libvje/effects/chromamagick.c index 39220ee5..03d930e1 100644 --- a/veejay-current/veejay-server/libvje/effects/chromamagick.c +++ b/veejay-current/veejay-server/libvje/effects/chromamagick.c @@ -23,13 +23,9 @@ threshold value or substraction value depending on the mode of this effect */ -#include -#include -#include +#include "common.h" #include #include "chromamagick.h" -#include -#include "common.h" vj_effect *chromamagick_init(int w, int h) { From 78468760e004527f603958a3174aabb9e1ac2d22 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 15:52:24 +0200 Subject: [PATCH 118/170] Libvje / refactor : fadecolorrgb * clean headers --- .../veejay-server/libvje/transitions/fadecolorrgb.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/veejay-current/veejay-server/libvje/transitions/fadecolorrgb.c b/veejay-current/veejay-server/libvje/transitions/fadecolorrgb.c index 874aef83..cfbc731e 100644 --- a/veejay-current/veejay-server/libvje/transitions/fadecolorrgb.c +++ b/veejay-current/veejay-server/libvje/transitions/fadecolorrgb.c @@ -17,9 +17,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include + +#include #include #include "fadecolorrgb.h" @@ -65,7 +64,7 @@ vj_effect *fadecolorrgb_init(int w,int h) void colorfadergb_apply( VJFrame *frame, int opacity, int r, int g, int b) { unsigned int i, op0, op1; - const int len = frame->len; + const unsigned int len = frame->len; unsigned int colorCb = 128, colorCr = 128; unsigned int colorY; const int uv_len = frame->uv_len; From 9bcd733c3740d3fb29f8d2c539b585dd768dac10 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 15:53:42 +0200 Subject: [PATCH 119/170] Libvje / refactor : lumablend (fix) * clean headers --- .../veejay-server/libvje/effects/lumablend.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/lumablend.c b/veejay-current/veejay-server/libvje/effects/lumablend.c index 33ba3ed0..779d6822 100644 --- a/veejay-current/veejay-server/libvje/effects/lumablend.c +++ b/veejay-current/veejay-server/libvje/effects/lumablend.c @@ -18,12 +18,9 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include +#include "common.h" #include #include -#include "common.h" #include "lumablend.h" vj_effect *lumablend_init(int w, int h) @@ -67,8 +64,8 @@ vj_effect *lumablend_init(int w, int h) static void opacity_by_threshold(VJFrame *frame, VJFrame *frame2, int threshold, int threshold2, int opacity) { - const int width = frame->width; - const int len = frame->len; + const unsigned int width = frame->width; + const unsigned int len = frame->len; uint8_t **yuv1 = frame->data; uint8_t **yuv2 = frame2->data; unsigned int x, y; @@ -95,8 +92,8 @@ static void opacity_by_threshold(VJFrame *frame, VJFrame *frame2, static void opacity_by_threshold_(VJFrame *frame, VJFrame *frame2, int threshold, int threshold2, int opacity) { - const int width = frame->width; - const int len = frame->len; + const unsigned int width = frame->width; + const unsigned int len = frame->len; uint8_t **yuv1 = frame->data; uint8_t **yuv2 = frame2->data; unsigned int x, y; @@ -121,8 +118,8 @@ static void opacity_by_threshold_(VJFrame *frame, VJFrame *frame2, static void opacity_by_threshold_blur(VJFrame *frame, VJFrame *frame2, int threshold, int threshold2, int opacity) { - const int width = frame->width; - const int len = frame->len - width; + const unsigned int width = frame->width; + const unsigned int len = frame->len - width; uint8_t **yuv1 = frame->data; uint8_t **yuv2 = frame2->data; unsigned int x, y; From 4f92905de43a277f66fcccb826d7caac149af6be Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 15:55:00 +0200 Subject: [PATCH 120/170] Libvje / refactor : rgbkeysmooth (fix) * clean headers --- veejay-current/veejay-server/libvje/effects/rgbkeysmooth.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/rgbkeysmooth.c b/veejay-current/veejay-server/libvje/effects/rgbkeysmooth.c index 7a851d21..3ad04759 100644 --- a/veejay-current/veejay-server/libvje/effects/rgbkeysmooth.c +++ b/veejay-current/veejay-server/libvje/effects/rgbkeysmooth.c @@ -17,13 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include + +#include "common.h" #include #include "rgbkeysmooth.h" -#include "common.h" vj_effect *rgbkeysmooth_init(int w,int h) { From 3c96b3d9d544d540f9399fbcbd395b07d2172ea8 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 15:55:58 +0200 Subject: [PATCH 121/170] Libvje / refactor : scratcher (fix) * clean headers --- .../veejay-server/libvje/effects/scratcher.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/scratcher.c b/veejay-current/veejay-server/libvje/effects/scratcher.c index adbc3276..25dfcb70 100644 --- a/veejay-current/veejay-server/libvje/effects/scratcher.c +++ b/veejay-current/veejay-server/libvje/effects/scratcher.c @@ -18,15 +18,10 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include -#include -#include -#include "scratcher.h" #include "common.h" -#include "opacity.h" +#include +#include "opacity.h" +#include "scratcher.h" static uint8_t *frame[4] = { NULL,NULL,NULL,NULL }; static int nframe = 0; From 675c81e4dc0f8ff76fa029a9690315ba0b19976a Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 15:57:36 +0200 Subject: [PATCH 122/170] Libvje / refactor : colorshift (fix) * clean headers * unsigned & frame->len --- .../veejay-server/libvje/effects/colorshift.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/colorshift.c b/veejay-current/veejay-server/libvje/effects/colorshift.c index 67ea64e0..e0cef921 100644 --- a/veejay-current/veejay-server/libvje/effects/colorshift.c +++ b/veejay-current/veejay-server/libvje/effects/colorshift.c @@ -17,13 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include + +#include "common.h" #include #include "colorshift.h" -#include "common.h" vj_effect *colorshift_init(int w, int h) { @@ -101,7 +98,7 @@ static void softmask2_applycbcr(VJFrame *frame, int paramt) static void softmask2_applyycbcr(VJFrame *frame, int paramt) { const unsigned int len = frame->len; - const unsigned int uv_len = (frame->ssm ? frame->len : frame->uv_len); + const unsigned int uv_len = (frame->ssm ? len : frame->uv_len); uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; @@ -168,11 +165,11 @@ static void softmask_applycbcr(VJFrame *frame, int paramt) static void softmask_applyycbcr(VJFrame *frame, int paramt) { - const int len = frame->len; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; - const unsigned int uv_len = (frame->ssm ? frame->len : frame->uv_len); + const unsigned int uv_len = (frame->ssm ? len : frame->uv_len); unsigned int x; for (x = 0; x < len; x++) From 49ce0fea6bbba3cc1b6644d3092de3d2c922e009 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 15:58:46 +0200 Subject: [PATCH 123/170] Libvje / refactor : reflection (fix) * clean headers --- .../veejay-server/libvje/effects/reflection.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/reflection.c b/veejay-current/veejay-server/libvje/effects/reflection.c index 5fc1ad5b..045d6a1d 100644 --- a/veejay-current/veejay-server/libvje/effects/reflection.c +++ b/veejay-current/veejay-server/libvje/effects/reflection.c @@ -41,14 +41,9 @@ /* orignal code for RGB, define INTENSITY( r + b + g / 3 ), this effect works in YCbCr space now. */ -#include -#include -#include -#include -#include -#include -#include "reflection.h" #include "common.h" +#include +#include "reflection.h" static short reflect_aSin[2048]; static int reflection_map[2048][256]; @@ -120,8 +115,8 @@ void reflection_apply(VJFrame *frame, int index1, int index2, int move) { unsigned int normalx, normaly, x, y; unsigned int lightx, lighty, temp; - const int width = frame->width; - const int height = frame->height; + const unsigned int width = frame->width; + const unsigned int height = frame->height; int uv_height = frame->uv_height; int uv_width = frame->uv_width; uint8_t *row = frame->data[0] + width + 1; From 5de1dfe7614845cde0eb8067233c840231fc7076 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 16:00:09 +0200 Subject: [PATCH 124/170] Libvje / refactor : distort (fix) * clean headers --- .../veejay-server/libvje/effects/distort.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/distort.c b/veejay-current/veejay-server/libvje/effects/distort.c index 39ebd69d..f615b899 100644 --- a/veejay-current/veejay-server/libvje/effects/distort.c +++ b/veejay-current/veejay-server/libvje/effects/distort.c @@ -43,15 +43,10 @@ along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include -#include -#include -#include -#include -#include #include "common.h" -#include "distort.h" +#include #include "widthmirror.h" +#include "distort.h" static int plasma_table[512]; static int plasma_pos1 = 0; @@ -153,9 +148,9 @@ void distortion_apply(VJFrame *frame, int inc_val1, int inc_val2, int inc_val3, uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; - const int height = (const int) frame->height; - const int width = (const int) frame->width; - const int len = frame->len; + const unsigned int height = frame->height; + const unsigned int width = frame->width; + const unsigned int len = frame->len; int strides[4] = { len,len,len, 0 }; From 4f8fe5727ad112c9d67950e182104f64bff1e56a Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 16:01:36 +0200 Subject: [PATCH 125/170] Libvje / refactor : magicscratcher (fix) * clean headers --- .../veejay-server/libvje/effects/magicscratcher.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/magicscratcher.c b/veejay-current/veejay-server/libvje/effects/magicscratcher.c index d22831d6..c22f94ef 100644 --- a/veejay-current/veejay-server/libvje/effects/magicscratcher.c +++ b/veejay-current/veejay-server/libvje/effects/magicscratcher.c @@ -17,13 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include + +#include "common.h" #include #include "magicscratcher.h" -#include "common.h" static uint8_t *mframe = NULL; static int m_frame = 0; @@ -104,8 +101,8 @@ static void store_mframe(uint8_t * yuv1[3], int w, int h, int n, int no_reverse) void magicscratcher_apply(VJFrame *frame, int mode, int n, int no_reverse) { - const int width = frame->width; - const int height = frame->height; + const unsigned int width = frame->width; + const unsigned int height = frame->height; unsigned int x, len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb= frame->data[1]; From 905e1f8cd186542c1ce960838ef5e91bab5c39cf Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 16:02:50 +0200 Subject: [PATCH 126/170] Libvje / refactor : wipe (fix) * clean headers --- .../veejay-server/libvje/transitions/wipe.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/veejay-current/veejay-server/libvje/transitions/wipe.c b/veejay-current/veejay-server/libvje/transitions/wipe.c index 8c4d28d2..727b3e0b 100644 --- a/veejay-current/veejay-server/libvje/transitions/wipe.c +++ b/veejay-current/veejay-server/libvje/transitions/wipe.c @@ -16,13 +16,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include -#include -#include -#include + +#include #include -#include "wipe.h" #include "transop.h" +#include "wipe.h" vj_effect *wipe_init(int w,int h) { @@ -54,8 +52,8 @@ static int g_wipe_height = 0; void wipe_apply( VJFrame *frame, VJFrame *frame2, int opacity, int inc) { - const int width = frame->width; - const int height = frame->height; + const unsigned int width = frame->width; + const unsigned int height = frame->height; /* w, h increasen */ transop_apply(frame, frame2, g_wipe_width, g_wipe_height, 0, 0, 0, 0, opacity); From 6dd43a52acf31d8e03f1c6ba53125323a4330f8e Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 16:03:57 +0200 Subject: [PATCH 127/170] Libvje / refactor : chromascratcher (fix) * clean headers --- .../veejay-server/libvje/effects/chromascratcher.c | 13 ++++++------- .../veejay-server/libvje/effects/chromascratcher.h | 5 ----- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/chromascratcher.c b/veejay-current/veejay-server/libvje/effects/chromascratcher.c index 8fed6507..b5c1baf2 100644 --- a/veejay-current/veejay-server/libvje/effects/chromascratcher.c +++ b/veejay-current/veejay-server/libvje/effects/chromascratcher.c @@ -17,13 +17,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include + #include "common.h" +#include #include "chromascratcher.h" #include "chromamagick.h" + #define RUP8(num)(((num)+8)&~8) static uint8_t *cframe[4] = {NULL,NULL,NULL,NULL}; static int cnframe = 0; @@ -139,9 +138,9 @@ void chromascratcher_apply(VJFrame *frame, int mode, int opacity, int n, int no_reverse) { unsigned int i; - const int width = frame->width; - const int height = frame->height; - const int len = frame->len; + const unsigned int width = frame->width; + const unsigned int height = frame->height; + const unsigned int len = frame->len; const unsigned int op_a = (opacity > 255) ? 255 : opacity; const unsigned int op_b = 255 - op_a; const int offset = len * cnframe; diff --git a/veejay-current/veejay-server/libvje/effects/chromascratcher.h b/veejay-current/veejay-server/libvje/effects/chromascratcher.h index df656a0d..00767f24 100644 --- a/veejay-current/veejay-server/libvje/effects/chromascratcher.h +++ b/veejay-current/veejay-server/libvje/effects/chromascratcher.h @@ -20,11 +20,6 @@ #ifndef CHROMASCRATCHER_H #define CHROMASCRATCHER_H -#include -#include -#include -#include - vj_effect *chromascratcher_init(int w, int h); int chromascratcher_malloc(int w, int h); void chromascratcher_free(); From 321d14948b5d4d98ca43e656c6c100c35d7d3373 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 16:05:05 +0200 Subject: [PATCH 128/170] Libvje / refactor : tracer (fix) * clean headers --- veejay-current/veejay-server/libvje/effects/tracer.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/tracer.c b/veejay-current/veejay-server/libvje/effects/tracer.c index 41ce475d..160ec1ab 100644 --- a/veejay-current/veejay-server/libvje/effects/tracer.c +++ b/veejay-current/veejay-server/libvje/effects/tracer.c @@ -17,13 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include + +#include "common.h" #include #include "tracer.h" -#include "common.h" static uint8_t *trace_buffer[4] = { NULL,NULL,NULL,NULL}; static int trace_counter = 0; @@ -68,7 +65,8 @@ void tracer_free() { void tracer_apply(VJFrame *frame, VJFrame *frame2, int opacity, int n) { - unsigned int x, len = frame->len; + unsigned int x; + const unsigned int len = frame->len; unsigned int op1 = (opacity > 255) ? 255 : opacity; unsigned int op0 = 255 - op1; unsigned int uv_len = frame->uv_len; From 59d68cd6151a0ee96d4fa02b62e5b05ae3e9b191 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 16:05:59 +0200 Subject: [PATCH 129/170] Libvje / refactor : mtracer (fix) * clean headers --- veejay-current/veejay-server/libvje/effects/mtracer.c | 7 ++----- veejay-current/veejay-server/libvje/effects/mtracer.h | 5 ----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/mtracer.c b/veejay-current/veejay-server/libvje/effects/mtracer.c index 198dbce6..751c9bfa 100644 --- a/veejay-current/veejay-server/libvje/effects/mtracer.c +++ b/veejay-current/veejay-server/libvje/effects/mtracer.c @@ -17,15 +17,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include + +#include "common.h" #include #include "mtracer.h" -#include "common.h" #include "magicoverlays.h" - static uint8_t *mtrace_buffer[4] = { NULL,NULL,NULL,NULL }; static int mtrace_counter = 0; diff --git a/veejay-current/veejay-server/libvje/effects/mtracer.h b/veejay-current/veejay-server/libvje/effects/mtracer.h index 1412324f..ebe6f686 100644 --- a/veejay-current/veejay-server/libvje/effects/mtracer.h +++ b/veejay-current/veejay-server/libvje/effects/mtracer.h @@ -20,11 +20,6 @@ #ifndef MTRACER_H #define MTRACER_H -#include -#include -#include -#include - vj_effect *mtracer_init(int w, int h); int mtracer_malloc(int w, int h); void mtracer_free(); From 4cf716bfb02d7b39575622944cb9a44b4ab7d8fd Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 16:06:59 +0200 Subject: [PATCH 130/170] Libvje / refactor : keyselect (fix) * clean headers --- .../veejay-server/libvje/effects/keyselect.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/keyselect.c b/veejay-current/veejay-server/libvje/effects/keyselect.c index 898d5ae4..ab6ca868 100644 --- a/veejay-current/veejay-server/libvje/effects/keyselect.c +++ b/veejay-current/veejay-server/libvje/effects/keyselect.c @@ -17,13 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include + +#include "common.h" #include #include "keyselect.h" -#include "common.h" vj_effect *keyselect_init(int w, int h) { @@ -141,8 +138,8 @@ void keyselect_apply( VJFrame *frame, VJFrame *frame2, int i_angle, { uint8_t *fg_y, *fg_cb, *fg_cr; uint8_t *bg_y, *bg_cb, *bg_cr; - const int width = frame->width; - const int height = frame->height; + const unsigned int width = frame->width; + const unsigned int height = frame->height; int accept_angle_tg, accept_angle_ctg, one_over_kc; int kfgy_scale, kg; int cb, cr; From dfd9708dd5fadd294f43a7c81510f1ee4b0ac6ec Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 16:08:02 +0200 Subject: [PATCH 131/170] Libvje / refactor : greyselect (fix) * clean headers --- veejay-current/veejay-server/libvje/effects/greyselect.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/greyselect.c b/veejay-current/veejay-server/libvje/effects/greyselect.c index 8b66ffcb..9c3bca20 100644 --- a/veejay-current/veejay-server/libvje/effects/greyselect.c +++ b/veejay-current/veejay-server/libvje/effects/greyselect.c @@ -17,12 +17,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include -#include + #include "common.h" +#include #include "greyselect.h" vj_effect *greyselect_init(int w, int h) @@ -66,7 +63,7 @@ vj_effect *greyselect_init(int w, int h) void greyselect_apply( VJFrame *frame, int i_angle, int r, int g, int b, int swap) { - const int len = frame->len; + const unsigned int len = frame->len; uint8_t *fg_cb, *fg_cr; int accept_angle_tg; int cb, cr; From ec2f77666864881a9b688700a405b2534c020015 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 16:08:58 +0200 Subject: [PATCH 132/170] Libvje / refactor : isolate (fix) * clean headers --- veejay-current/veejay-server/libvje/effects/isolate.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/isolate.c b/veejay-current/veejay-server/libvje/effects/isolate.c index 47ee759b..12d92b2d 100644 --- a/veejay-current/veejay-server/libvje/effects/isolate.c +++ b/veejay-current/veejay-server/libvje/effects/isolate.c @@ -17,12 +17,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include -#include + #include "common.h" +#include #include "isolate.h" vj_effect *isolate_init(int w, int h) @@ -66,7 +63,7 @@ vj_effect *isolate_init(int w, int h) void isolate_apply( VJFrame *frame, int i_angle, int r, int g, int b, int opacity) { - const int len = frame->len; + const unsigned int len = frame->len; uint8_t *fg_cb, *fg_cr; int accept_angle_tg; int cb, cr; From 575ca5a395b6d1ca2e7a3b11db025bb4fd38fae1 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 16:09:51 +0200 Subject: [PATCH 133/170] Libvje / refactor : bwselect (fix) * clean headers --- .../veejay-server/libvje/effects/bwselect.c | 12 ++++++------ .../veejay-server/libvje/effects/bwselect.h | 4 ---- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/bwselect.c b/veejay-current/veejay-server/libvje/effects/bwselect.c index 3fd121f5..193543d8 100644 --- a/veejay-current/veejay-server/libvje/effects/bwselect.c +++ b/veejay-current/veejay-server/libvje/effects/bwselect.c @@ -18,11 +18,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include + +#include "common.h" #include #include "bwselect.h" -#include "common.h" + vj_effect *bwselect_init(int w, int h) { vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); @@ -79,9 +79,9 @@ static void gamma_setup(double gamma_value) void bwselect_apply(VJFrame *frame, int min_threshold, int max_threshold, int gamma, int mode) { int r,c; - const int width = frame->width; - const int height = frame->height; - const int len = frame->len; + const unsigned int width = frame->width; + const unsigned int height = frame->height; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; diff --git a/veejay-current/veejay-server/libvje/effects/bwselect.h b/veejay-current/veejay-server/libvje/effects/bwselect.h index b16d61cf..dae64cbe 100644 --- a/veejay-current/veejay-server/libvje/effects/bwselect.h +++ b/veejay-current/veejay-server/libvje/effects/bwselect.h @@ -20,10 +20,6 @@ #ifndef BWSELECT_H #define BWSELECT_H -#include -#include -#include - vj_effect *bwselect_init(); void bwselect_apply(VJFrame *frame, int min_threshold,int max_threshold, int mode, int gamma); #endif From 979c8cff2805963a6a72d84704765bc59027bf06 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 16:11:06 +0200 Subject: [PATCH 134/170] Libvje / refactor : bwotsu (fix) * clean headers * unsigned --- .../veejay-server/libvje/effects/bwotsu.c | 15 +++++++-------- .../veejay-server/libvje/effects/bwotsu.h | 4 ---- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/bwotsu.c b/veejay-current/veejay-server/libvje/effects/bwotsu.c index d6cb246b..d16db502 100644 --- a/veejay-current/veejay-server/libvje/effects/bwotsu.c +++ b/veejay-current/veejay-server/libvje/effects/bwotsu.c @@ -17,12 +17,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include -#include "bwotsu.h" + #include "common.h" +#include +#include "bwotsu.h" + vj_effect *bwotsu_init(int w, int h) { vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); @@ -87,7 +86,7 @@ void bwotsu_apply(VJFrame *frame, int mode, int skew, int invert) { uint32_t Histogram[256]; unsigned int i; - const int len = frame->len; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *A = frame->data[3]; @@ -129,8 +128,8 @@ void bwotsu_apply(VJFrame *frame, int mode, int skew, int invert) else Y[i] = h; } - veejay_memset( frame->data[1], 128, (frame->ssm ? frame->len : frame->uv_len) ); - veejay_memset( frame->data[2], 128, (frame->ssm ? frame->len : frame->uv_len) ); + veejay_memset( frame->data[1], 128, (frame->ssm ? len : frame->uv_len) ); + veejay_memset( frame->data[2], 128, (frame->ssm ? len : frame->uv_len) ); break; case 1: diff --git a/veejay-current/veejay-server/libvje/effects/bwotsu.h b/veejay-current/veejay-server/libvje/effects/bwotsu.h index 6bbe7f64..a4d19fd9 100644 --- a/veejay-current/veejay-server/libvje/effects/bwotsu.h +++ b/veejay-current/veejay-server/libvje/effects/bwotsu.h @@ -20,10 +20,6 @@ #ifndef BWOTSU_H #define BWOTSU_H -#include -#include -#include - vj_effect *bwotsu_init(); void bwotsu_apply(VJFrame *frame, int mode, int skew, int invert ); #endif From a0d6f9fef72494a5c6d9b7c30ff64b9b072a6f84 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 16:12:01 +0200 Subject: [PATCH 135/170] Libvje / refactor : meanfilter (fix) * clean headers --- veejay-current/veejay-server/libvje/effects/meanfilter.c | 6 ++---- veejay-current/veejay-server/libvje/effects/meanfilter.h | 4 ---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/meanfilter.c b/veejay-current/veejay-server/libvje/effects/meanfilter.c index e36a9a96..4fdf4311 100644 --- a/veejay-current/veejay-server/libvje/effects/meanfilter.c +++ b/veejay-current/veejay-server/libvje/effects/meanfilter.c @@ -17,11 +17,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include + #include "common.h" +#include #include "meanfilter.h" static uint8_t *mean = NULL; diff --git a/veejay-current/veejay-server/libvje/effects/meanfilter.h b/veejay-current/veejay-server/libvje/effects/meanfilter.h index a20b6f4e..019cb473 100644 --- a/veejay-current/veejay-server/libvje/effects/meanfilter.h +++ b/veejay-current/veejay-server/libvje/effects/meanfilter.h @@ -20,10 +20,6 @@ #ifndef MEANFILTER_H #define MEANFILTER_H -#include -#include -#include - vj_effect *meanfilter_init(int w, int h); void meanfilter_apply( VJFrame *frame ); int meanfilter_malloc(int w, int h); From d274613e9014c73fb0a7fc6a315c3c2e01cd9305 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sat, 30 Jul 2016 16:12:59 +0200 Subject: [PATCH 136/170] Libvje / refactor : complexinvert (fix) * clean headers --- .../veejay-server/libvje/effects/complexinvert.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/complexinvert.c b/veejay-current/veejay-server/libvje/effects/complexinvert.c index 8b6d57c7..7483eee2 100644 --- a/veejay-current/veejay-server/libvje/effects/complexinvert.c +++ b/veejay-current/veejay-server/libvje/effects/complexinvert.c @@ -17,12 +17,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include -#include + #include "common.h" +#include #include "complexinvert.h" vj_effect *complexinvert_init(int w, int h) From fe019d7c8f6b291aabe1bcc57bf1aae9feedb3a4 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sun, 31 Jul 2016 13:54:02 +0200 Subject: [PATCH 137/170] Libvje / refactor : complexsaturate (fix) * clen headers --- .../veejay-server/libvje/effects/complexsaturate.c | 8 +++----- .../veejay-server/libvje/effects/complexsaturate.h | 4 ---- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/complexsaturate.c b/veejay-current/veejay-server/libvje/effects/complexsaturate.c index 5903415a..755f0668 100644 --- a/veejay-current/veejay-server/libvje/effects/complexsaturate.c +++ b/veejay-current/veejay-server/libvje/effects/complexsaturate.c @@ -17,12 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include -#include "complexsaturate.h" + #include "common.h" +#include +#include "complexsaturate.h" vj_effect *complexsaturation_init(int w, int h) { diff --git a/veejay-current/veejay-server/libvje/effects/complexsaturate.h b/veejay-current/veejay-server/libvje/effects/complexsaturate.h index f24ec631..9bc28fb9 100644 --- a/veejay-current/veejay-server/libvje/effects/complexsaturate.h +++ b/veejay-current/veejay-server/libvje/effects/complexsaturate.h @@ -20,10 +20,6 @@ #ifndef COMPLEXSATURATE_H #define COMPLEXSATURATE_H -#include -#include -#include - vj_effect *complexsaturation_init(); void complexsaturation_apply(VJFrame *frame, int i_angle, int red, int green, int blue, From 5f76f7c56252fe33e34654a646076975f1dd48cc Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sun, 31 Jul 2016 13:55:21 +0200 Subject: [PATCH 138/170] Libvje / refactor : complexthreshold (fix) * clean headers --- .../veejay-server/libvje/effects/complexthreshold.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/complexthreshold.c b/veejay-current/veejay-server/libvje/effects/complexthreshold.c index a923635e..781fde19 100644 --- a/veejay-current/veejay-server/libvje/effects/complexthreshold.c +++ b/veejay-current/veejay-server/libvje/effects/complexthreshold.c @@ -17,12 +17,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include -#include + #include "common.h" +#include #include "complexthreshold.h" //FIXME: rewrite this FX @@ -108,8 +105,8 @@ void complexthreshold_apply(VJFrame *frame, VJFrame *frame2, int i_angle, unsigned int pos; int matrix[5]; int val, tmp1; - const int len = frame->len; - const int width = frame->width; + const unsigned int len = frame->len; + const unsigned int width = frame->width; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; From 542ad049f4dde33f0e91b496a630f7eed2876335 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sun, 31 Jul 2016 13:56:37 +0200 Subject: [PATCH 139/170] Libvje / refactor : complexsync (fix) * clean headers * w, len : unsigned --- .../veejay-server/libvje/effects/complexsync.c | 10 ++++------ .../veejay-server/libvje/effects/complexsync.h | 5 ----- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/complexsync.c b/veejay-current/veejay-server/libvje/effects/complexsync.c index 931bc07b..e7e3887b 100644 --- a/veejay-current/veejay-server/libvje/effects/complexsync.c +++ b/veejay-current/veejay-server/libvje/effects/complexsync.c @@ -17,12 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include + #include "common.h" +#include #include "complexsync.h" -#include static uint8_t *c_outofsync_buffer[4] = { NULL,NULL,NULL, NULL }; @@ -71,8 +69,8 @@ void complexsync_free() { void complexsync_apply(VJFrame *frame, VJFrame *frame2, int val) { - const int len = frame->len; - const int width = frame->width; + const unsigned int len = frame->len; + const unsigned int width = frame->width; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; diff --git a/veejay-current/veejay-server/libvje/effects/complexsync.h b/veejay-current/veejay-server/libvje/effects/complexsync.h index bdb36ae1..9f32057b 100644 --- a/veejay-current/veejay-server/libvje/effects/complexsync.h +++ b/veejay-current/veejay-server/libvje/effects/complexsync.h @@ -20,11 +20,6 @@ #ifndef COMPLEXSYNC_H #define COMPLEXSYNC_H -#include -#include -#include -#include - vj_effect *complexsync_init(int width, int height); int complexsync_malloc(int w, int h); void complexsync_free(); From 16bed0b6d325be8ee7935ad8fa6e1098d3a95a28 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sun, 31 Jul 2016 14:02:45 +0200 Subject: [PATCH 140/170] Libvje / refactor : enhancedmask (fix) * len & len2 (len-witdh-1) * clean headers --- .../veejay-server/libvje/effects/enhancemask.c | 18 ++++++++---------- .../veejay-server/libvje/effects/enhancemask.h | 7 ------- 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/enhancemask.c b/veejay-current/veejay-server/libvje/effects/enhancemask.c index 3170028b..64c109f5 100644 --- a/veejay-current/veejay-server/libvje/effects/enhancemask.c +++ b/veejay-current/veejay-server/libvje/effects/enhancemask.c @@ -17,13 +17,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include -#include "enhancemask.h" #include "common.h" +#include +#include "enhancemask.h" + vj_effect *enhancemask_init(int width, int height) { vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); @@ -52,9 +50,9 @@ void enhancemask_apply(VJFrame *frame, int *s ) //int s[9]= { 1, 0, -1, 2, 0, -2, 1 , 0 , -1}; unsigned int r; - const int width = frame->width; - const int height = frame->height; - const unsigned int len = (frame->len)-width-1; + const unsigned int width = frame->width; + const unsigned int len = frame->len; + const unsigned int len2 = len-width-1; uint8_t *Y = frame->data[0]; /* int sum=0; @@ -84,7 +82,7 @@ void enhancemask_apply(VJFrame *frame, int *s ) // unsigned int op0,op1; // op0 = (s[1] > 255) ? 255 : s[1]; // op1 = 255 - op1; - for(r=0; r < len; r++) { + for(r=0; r < len2; r++) { m = ( Y[r] + Y[r+1] + Y[r+width] + Y[r+width+1] + 2) >> 2; d = Y[r] - m; d *= s[0]; @@ -94,7 +92,7 @@ void enhancemask_apply(VJFrame *frame, int *s ) // Y[r] = (m * op0 + a * op1) / 255; Y[r] = m; } - for(r=len; r < (width*height); r++) { + for(r=len2; r < len; r++) { m = (Y[r] + Y[r+1] + Y[r-width] + Y[r-width+1] + 2) >> 2; d = Y[r]-m; d *= s[0]; diff --git a/veejay-current/veejay-server/libvje/effects/enhancemask.h b/veejay-current/veejay-server/libvje/effects/enhancemask.h index 05915bb1..d03de9a8 100644 --- a/veejay-current/veejay-server/libvje/effects/enhancemask.h +++ b/veejay-current/veejay-server/libvje/effects/enhancemask.h @@ -20,14 +20,7 @@ #ifndef ENHANCEMASK_H #define ENHANCEMASK_H -#include -#include -#include - vj_effect *enhancemask_init(int w, int h); - - void enhancemask_apply(VJFrame *frame, int *t); - void enhancemask_free(); #endif From 366fff2f2e5d3a5645ac704db437f2fbdfd77d3a Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sun, 31 Jul 2016 14:03:54 +0200 Subject: [PATCH 141/170] Libvje / refactor : contrast (fix) * clean headers --- veejay-current/veejay-server/libvje/effects/contrast.c | 7 +++---- veejay-current/veejay-server/libvje/effects/contrast.h | 7 ------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/contrast.c b/veejay-current/veejay-server/libvje/effects/contrast.c index d325c6d8..f7c82704 100644 --- a/veejay-current/veejay-server/libvje/effects/contrast.c +++ b/veejay-current/veejay-server/libvje/effects/contrast.c @@ -17,12 +17,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include + +#include "common.h" #include #include "contrast.h" -#include "common.h" + vj_effect *contrast_init(int w, int h) { vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect)); diff --git a/veejay-current/veejay-server/libvje/effects/contrast.h b/veejay-current/veejay-server/libvje/effects/contrast.h index f9131933..68525735 100644 --- a/veejay-current/veejay-server/libvje/effects/contrast.h +++ b/veejay-current/veejay-server/libvje/effects/contrast.h @@ -20,14 +20,7 @@ #ifndef CONTRAST_H #define CONTRAST_H -#include -#include -#include - vj_effect *contrast_init(); - - void contrast_apply(VJFrame *frame, int *t); - void contrast_free(); #endif From 81491a0ed575d4aa769399c9bc4f9d4d8dc73d05 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sun, 31 Jul 2016 14:05:22 +0200 Subject: [PATCH 142/170] Libvje / refactor : noiseadd (fix) * w, len unsigned * clean headers --- .../veejay-server/libvje/effects/noiseadd.c | 19 ++++++++----------- .../veejay-server/libvje/effects/noiseadd.h | 5 ----- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/noiseadd.c b/veejay-current/veejay-server/libvje/effects/noiseadd.c index 0cc6c37e..6a8f38f5 100644 --- a/veejay-current/veejay-server/libvje/effects/noiseadd.c +++ b/veejay-current/veejay-server/libvje/effects/noiseadd.c @@ -17,13 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include + +#include "common.h" #include #include "noiseadd.h" -#include "common.h" static uint8_t *Yb_frame; @@ -74,8 +71,8 @@ static void noiseblur1x3_maskapply(VJFrame* frame, int coeef ) { int r, c; double k = (coeef/100.0); uint8_t d; - const int width = frame->width; - const int len = frame->len; + const unsigned int width = frame->width; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; for (r = 0; r < len; r += width) { @@ -101,8 +98,8 @@ static void noiseblur3x3_maskapply(VJFrame* frame, int coeef ) { int r, c; const double k = (coeef/1000.0); uint8_t d; - const int width = frame->width; - const int len = (frame->len)-width; + const unsigned int width = frame->width; + const unsigned int len = (frame->len)-width; uint8_t *Y = frame->data[0]; for (r = width; r < len; r += width) { @@ -134,8 +131,8 @@ static void noiseneg3x3_maskapply(VJFrame *frame, int coeef ) { int r, c; const double k = (coeef/1000.0); uint8_t d; - const int width = frame->width; - const int len = (frame->len)-width; + const unsigned int width = frame->width; + const unsigned int len = (frame->len)-width; uint8_t *Y = frame->data[0]; diff --git a/veejay-current/veejay-server/libvje/effects/noiseadd.h b/veejay-current/veejay-server/libvje/effects/noiseadd.h index 57bf9014..c0db8fdd 100644 --- a/veejay-current/veejay-server/libvje/effects/noiseadd.h +++ b/veejay-current/veejay-server/libvje/effects/noiseadd.h @@ -20,13 +20,8 @@ #ifndef NOISEADD_H #define NOISEADD_H -#include -#include -#include - vj_effect *noiseadd_init(int w, int h); void noiseadd_free(); int noiseadd_malloc(int w, int h); void noiseadd_apply( VJFrame *frame, int t, int n); - #endif From 29c147a5b4ea956d54407dd4416ec47d893a2004 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sun, 31 Jul 2016 14:06:42 +0200 Subject: [PATCH 143/170] Libvje / refactor : motionblur (fix) * len , unsigned * clean headers --- veejay-current/veejay-server/libvje/effects/motionblur.c | 8 +++----- veejay-current/veejay-server/libvje/effects/motionblur.h | 6 ------ 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/motionblur.c b/veejay-current/veejay-server/libvje/effects/motionblur.c index 75a6ea1a..d646550d 100644 --- a/veejay-current/veejay-server/libvje/effects/motionblur.c +++ b/veejay-current/veejay-server/libvje/effects/motionblur.c @@ -17,12 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include + +#include "common.h" #include #include "motionblur.h" -#include static uint8_t *previous_frame[3] = { NULL,NULL,NULL }; vj_effect *motionblur_init(int width, int height) @@ -62,7 +60,7 @@ void motionblur_free() { void motionblur_apply( VJFrame *frame, int n) { - const int len = frame->len; + const unsigned int len = frame->len; const int uv_len = frame->uv_len; unsigned int i; diff --git a/veejay-current/veejay-server/libvje/effects/motionblur.h b/veejay-current/veejay-server/libvje/effects/motionblur.h index 41dc48ac..fdcfdba9 100644 --- a/veejay-current/veejay-server/libvje/effects/motionblur.h +++ b/veejay-current/veejay-server/libvje/effects/motionblur.h @@ -20,14 +20,8 @@ #ifndef MOTIONBLUR_H #define MOTIONBLUR_H -#include -#include -#include -#include - vj_effect *motionblur_init(int w, int h); int motionblur_malloc(int w, int h); void motionblur_free(); void motionblur_apply( VJFrame *frame, int n); - #endif From 514c11aa00175112c78499903a0bcaff6c42b14a Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sun, 31 Jul 2016 14:07:53 +0200 Subject: [PATCH 144/170] LIbvje / refactor : sinoids (fix) * unsigned * clean headers --- .../veejay-server/libvje/effects/sinoids.c | 17 +++++++---------- .../veejay-server/libvje/effects/sinoids.h | 5 ----- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/sinoids.c b/veejay-current/veejay-server/libvje/effects/sinoids.c index afee3e92..444ba9ea 100644 --- a/veejay-current/veejay-server/libvje/effects/sinoids.c +++ b/veejay-current/veejay-server/libvje/effects/sinoids.c @@ -18,14 +18,9 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ - -#include -#include -#include -#include -#include -#include "sinoids.h" #include "common.h" +#include +#include "sinoids.h" static int *sinoids_X = NULL; static uint8_t *sinoid_frame[3] = { NULL,NULL,NULL }; @@ -105,9 +100,11 @@ static void sinoids_recalc(int width, int z) { } static int current_sinoids = 100; -void sinoids_apply(VJFrame *frame, int m, int s) { - const int len = frame->len; - const int width = frame->width; + +void sinoids_apply(VJFrame *frame, int m, int s) +{ + const unsigned int len = frame->len; + const unsigned int width = frame->width; unsigned int r,c; uint8_t *Y = frame->data[0]; uint8_t *Cb= frame->data[1]; diff --git a/veejay-current/veejay-server/libvje/effects/sinoids.h b/veejay-current/veejay-server/libvje/effects/sinoids.h index f9af98d7..a0b36873 100644 --- a/veejay-current/veejay-server/libvje/effects/sinoids.h +++ b/veejay-current/veejay-server/libvje/effects/sinoids.h @@ -20,13 +20,8 @@ #ifndef SINOIDS_H #define SINOIDS_H -#include -#include -#include - vj_effect *sinoids_init(int w, int h); void sinoids_free(); int sinoids_malloc(int w, int h); void sinoids_apply(VJFrame *frame, int a,int b); - #endif From 4eb1db1a8403941f62b0b139769a3028de4578bc Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sun, 31 Jul 2016 14:09:11 +0200 Subject: [PATCH 145/170] Libvje / refactor : dupmagic (fix) * clean headers --- veejay-current/veejay-server/libvje/effects/dupmagic.c | 9 ++++----- veejay-current/veejay-server/libvje/effects/dupmagic.h | 4 ---- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/dupmagic.c b/veejay-current/veejay-server/libvje/effects/dupmagic.c index 43adf787..3de1ec6f 100644 --- a/veejay-current/veejay-server/libvje/effects/dupmagic.c +++ b/veejay-current/veejay-server/libvje/effects/dupmagic.c @@ -17,12 +17,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include "dupmagic.h" -#include "magicoverlays.h" + #include "common.h" +#include +#include "magicoverlays.h" +#include "dupmagic.h" vj_effect *dupmagic_init(int w, int h) { diff --git a/veejay-current/veejay-server/libvje/effects/dupmagic.h b/veejay-current/veejay-server/libvje/effects/dupmagic.h index c0a5e9ce..d5fb3d4b 100644 --- a/veejay-current/veejay-server/libvje/effects/dupmagic.h +++ b/veejay-current/veejay-server/libvje/effects/dupmagic.h @@ -20,10 +20,6 @@ #ifndef DUPMAGIC_H #define DUPMAGIC_H -#include -#include -#include - vj_effect *dupmagic_init(); void dupmagic_apply(VJFrame *frame, VJFrame *frame2,int n); #endif From ba13bfa6d452e329d7e2827359edce113f242066 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sun, 31 Jul 2016 14:10:34 +0200 Subject: [PATCH 146/170] Libvje / refactor : simplemask (fix) * unsigned * clean headers --- veejay-current/veejay-server/libvje/effects/mask.c | 12 +++++------- veejay-current/veejay-server/libvje/effects/mask.h | 4 ---- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/mask.c b/veejay-current/veejay-server/libvje/effects/mask.c index 9146145b..064215b4 100644 --- a/veejay-current/veejay-server/libvje/effects/mask.c +++ b/veejay-current/veejay-server/libvje/effects/mask.c @@ -17,12 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include + +#include "common.h" #include #include "mask.h" -#include "common.h" vj_effect *simplemask_init(int w, int h ) { @@ -100,9 +98,9 @@ static void mask_replace_white_fill(uint8_t *yuv1[3], uint8_t *yuv2[3], void simplemask_apply( VJFrame *frame, VJFrame *frame2, int threshold, int invert) { - const int width = frame->width; - const int height = frame->height; - const int len = frame->len; + const unsigned int width = frame->width; + const unsigned int height = frame->height; + const unsigned int len = frame->len; switch(invert) { case 0 : mask_replace_black(frame->data,frame2->data,width,height,len,threshold); break; diff --git a/veejay-current/veejay-server/libvje/effects/mask.h b/veejay-current/veejay-server/libvje/effects/mask.h index b1875240..f9db542f 100644 --- a/veejay-current/veejay-server/libvje/effects/mask.h +++ b/veejay-current/veejay-server/libvje/effects/mask.h @@ -20,10 +20,6 @@ #ifndef SIMPLEMASK_H #define SIMPLEMASK_H -#include -#include -#include - vj_effect *simplemask_init(); void simplemask_apply( VJFrame *frame, VJFrame *frame2, int threshold, int invert); void mask_free(); From fce52e877d79ebba20bdd53d9d725e53b2e2ee54 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sun, 31 Jul 2016 14:13:46 +0200 Subject: [PATCH 147/170] Libvje / refactor : vbar (fix) * unsigned * clean headers --- .../veejay-server/libvje/transitions/vbar.c | 17 ++++++++--------- .../veejay-server/libvje/transitions/vbar.h | 4 ---- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/veejay-current/veejay-server/libvje/transitions/vbar.c b/veejay-current/veejay-server/libvje/transitions/vbar.c index d9e6fd73..d0b0e8d9 100644 --- a/veejay-current/veejay-server/libvje/transitions/vbar.c +++ b/veejay-current/veejay-server/libvje/transitions/vbar.c @@ -17,11 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include + +#include #include -#include "vbar.h" +#include "vbar.h" vj_effect *vbar_init(int width, int height) { @@ -65,11 +64,11 @@ static int bar_top_auto = 0; static int bar_bot_auto = 0; static int bar_top_vert = 0; static int bar_bot_vert = 0; -void vbar_apply(VJFrame *frame, VJFrame *frame2, int divider, int top_y, int bot_y, int top_x, int bot_x) { - - const int width = frame->width; - const int height = frame->height; - const uint32_t len = frame->len; +void vbar_apply(VJFrame *frame, VJFrame *frame2, int divider, int top_y, int bot_y, int top_x, int bot_x) +{ + const unsigned int width = frame->width; + const unsigned int height = frame->height; + const unsigned int len = frame->len; //int top_width = width; /* frame in frame destination area */ int top_width = width/divider; int bottom_width = width - top_width; diff --git a/veejay-current/veejay-server/libvje/transitions/vbar.h b/veejay-current/veejay-server/libvje/transitions/vbar.h index ddb6ab60..bdbabb65 100644 --- a/veejay-current/veejay-server/libvje/transitions/vbar.h +++ b/veejay-current/veejay-server/libvje/transitions/vbar.h @@ -20,10 +20,6 @@ #ifndef VBAR_H #define VBAR_H -#include -#include -#include - vj_effect *vbar_init(int width, int height); void vbar_apply( VJFrame *frame, VJFrame *frame2, int d, int x1, int x2, int t1, int b1); #endif From fe48edc73f19220ad5882808115fbc5a2c14e526 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sun, 31 Jul 2016 14:16:39 +0200 Subject: [PATCH 148/170] Libvje / refactor : bar (fix) * unsigned * clean headers * remove duplicated stuff! --- .../veejay-server/libvje/transitions/3bar.c | 17 +++++---- .../veejay-server/libvje/transitions/3bar.h | 35 ------------------- 2 files changed, 8 insertions(+), 44 deletions(-) diff --git a/veejay-current/veejay-server/libvje/transitions/3bar.c b/veejay-current/veejay-server/libvje/transitions/3bar.c index 8dffa553..f2361008 100644 --- a/veejay-current/veejay-server/libvje/transitions/3bar.c +++ b/veejay-current/veejay-server/libvje/transitions/3bar.c @@ -17,9 +17,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include + +#include #include #include "3bar.h" @@ -68,13 +67,13 @@ static int bar_bot_vert = 0; void bar_apply(VJFrame *frame, VJFrame *frame2, int divider, int top_y, int bot_y, int top_x, int bot_x ) { - const int width = frame->width; - const int height = frame->height; - int top_width = width; /* frame in frame destination area */ - int top_height = height/(divider); + const unsigned int width = frame->width; + const unsigned int height = frame->height; + unsigned int top_width = width; /* frame in frame destination area */ + unsigned int top_height = height/(divider); - int bottom_width = width; /* frame in frame destionation area */ - int bottom_height = (height - top_height); + unsigned int bottom_width = width; /* frame in frame destionation area */ + unsigned int bottom_height = (height - top_height); int y,x; int yy=0; int y2 = bar_top_auto + top_y; /* destination */ diff --git a/veejay-current/veejay-server/libvje/transitions/3bar.h b/veejay-current/veejay-server/libvje/transitions/3bar.h index 9d68c7a3..cc76bc0f 100644 --- a/veejay-current/veejay-server/libvje/transitions/3bar.h +++ b/veejay-current/veejay-server/libvje/transitions/3bar.h @@ -20,42 +20,7 @@ #ifndef BAR_H #define BAR_H -#include -#include -#include - vj_effect *bar_init(int width, int height); void bar_apply(VJFrame *frame, VJFrame *frame2, int d, int x1, int x2, int t1, int b1); #endif -/* - * Linux VeeJay - * - * Copyright(C)2002 Niels Elburg - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License , or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. - */ - -#ifndef BAR_H -#define BAR_H -#include "../vj-effect.h" -#include -#include - -vj_effect *bar_init(int width, int height); -void bar_apply(uint8_t * yuv1[3], uint8_t * yuv2[3], - int width, int height, int d, int x1, int x2, int t1, int b1); -void bar_free(); -#endif From fda26a7efb162eac9e0c6bd14b93ef2d57be44d8 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sun, 31 Jul 2016 14:17:45 +0200 Subject: [PATCH 149/170] Libvje / refactor : average (fix) * clean headers * unsigned --- veejay-current/veejay-server/libvje/effects/average.c | 8 +++----- veejay-current/veejay-server/libvje/effects/average.h | 4 ---- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/average.c b/veejay-current/veejay-server/libvje/effects/average.c index 57d203ab..f0e5c6b9 100644 --- a/veejay-current/veejay-server/libvje/effects/average.c +++ b/veejay-current/veejay-server/libvje/effects/average.c @@ -17,12 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include + +#include "common.h" #include #include "average.h" -#include "common.h" static double *running_sum[4] = { NULL, NULL, NULL, NULL }; static int last_params[2] = { 0,0 }; @@ -79,7 +77,7 @@ void average_free() void average_apply(VJFrame *frame, int max_sum, int mode) { unsigned int i; - const int len = frame->len; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; diff --git a/veejay-current/veejay-server/libvje/effects/average.h b/veejay-current/veejay-server/libvje/effects/average.h index b5ef7fce..0f1fe3f8 100644 --- a/veejay-current/veejay-server/libvje/effects/average.h +++ b/veejay-current/veejay-server/libvje/effects/average.h @@ -20,10 +20,6 @@ #ifndef AVERAGE_H #define AVERAGE_H -#include -#include -#include - vj_effect *average_init(); void average_apply(VJFrame *src, int sum, int mode); void average_free(); From 4bc2dd686a0ee5816a2ec9f9069481a729ccb4d2 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sun, 31 Jul 2016 14:19:12 +0200 Subject: [PATCH 150/170] Libvje / refactor : ripple (fix) * clean headers * unsigned --- veejay-current/veejay-server/libvje/effects/ripple.c | 12 ++++-------- veejay-current/veejay-server/libvje/effects/ripple.h | 5 ----- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/ripple.c b/veejay-current/veejay-server/libvje/effects/ripple.c index 2967fbca..53c49cc3 100644 --- a/veejay-current/veejay-server/libvje/effects/ripple.c +++ b/veejay-current/veejay-server/libvje/effects/ripple.c @@ -28,12 +28,8 @@ */ -#include -#include -#include -#include -#include #include "common.h" +#include #include "ripple.h" #define RIPPLE_DEGREES 360 @@ -116,9 +112,9 @@ void ripple_free() { void ripple_apply(VJFrame *frame, int _w, int _a , int _att ) { - const int width = frame->width; - const int height = frame->height; - const int len = frame->len; + const unsigned int width = frame->width; + const unsigned int height = frame->height; + const unsigned int len = frame->len; double wp2 = width * 0.5; double hp2 = height * 0.5; int x,y,dx,dy,a=0,sx=0,sy=0,angle=0; diff --git a/veejay-current/veejay-server/libvje/effects/ripple.h b/veejay-current/veejay-server/libvje/effects/ripple.h index b68f1f9e..961a0dfb 100644 --- a/veejay-current/veejay-server/libvje/effects/ripple.h +++ b/veejay-current/veejay-server/libvje/effects/ripple.h @@ -20,11 +20,6 @@ #ifndef RIPPLE_H #define RIPPLE_H -#include -#include -#include -#include - vj_effect *ripple_init(int w, int h); void ripple_free(); int ripple_malloc(int w, int h); From bf122ad8f307fafd38cfd889f1e7b6f29ee43f4e Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sun, 31 Jul 2016 14:20:41 +0200 Subject: [PATCH 151/170] Libvje / refactor : bathroom (fix) * clean headers * unsigned --- .../veejay-server/libvje/effects/bathroom.c | 31 +++++++++---------- .../veejay-server/libvje/effects/bathroom.h | 4 --- 2 files changed, 14 insertions(+), 21 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/bathroom.c b/veejay-current/veejay-server/libvje/effects/bathroom.c index 914869e7..25421f36 100644 --- a/veejay-current/veejay-server/libvje/effects/bathroom.c +++ b/veejay-current/veejay-server/libvje/effects/bathroom.c @@ -24,13 +24,10 @@ to set the distance and mode */ -#include -#include -#include -#include +#include "common.h" #include #include "bathroom.h" -#include "common.h" + static uint8_t *bathroom_frame[4] = { NULL,NULL,NULL,NULL }; vj_effect *bathroom_init(int width,int height) @@ -97,9 +94,9 @@ void bathroom_free() { static void bathroom_verti_apply(VJFrame *frame, int val, int x0, int x1) { - const int width = frame->width; - const int height = frame->height; - const int len = frame->len; + const unsigned int width = frame->width; + const unsigned int height = frame->height; + const unsigned int len = frame->len; unsigned int y_val = val; unsigned int x,y; uint8_t *Y = frame->data[0]; @@ -125,9 +122,9 @@ static void bathroom_verti_apply(VJFrame *frame, int val, int x0, int x1) static void bathroom_alpha_verti_apply(VJFrame *frame, int val, int x0, int x1) { - const int width = frame->width; - const int height = frame->height; - const int len = frame->len; + const unsigned int width = frame->width; + const unsigned int height = frame->height; + const unsigned int len = frame->len; unsigned int y_val = val; unsigned int x,y; uint8_t *Y = frame->data[0]; @@ -156,9 +153,9 @@ static void bathroom_alpha_verti_apply(VJFrame *frame, int val, int x0, int x1) static void bathroom_hori_apply(VJFrame *frame, int val, int x0, int x1) { - const int width = frame->width; - const int height = frame->height; - const int len = frame->len; + const unsigned int width = frame->width; + const unsigned int height = frame->height; + const unsigned int len = frame->len; unsigned int y_val = val; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; @@ -183,9 +180,9 @@ static void bathroom_hori_apply(VJFrame *frame, int val, int x0, int x1) static void bathroom_alpha_hori_apply(VJFrame *frame, int val, int x0, int x1) { - const int width = frame->width; - const int height = frame->height; - const int len = frame->len; + const unsigned int width = frame->width; + const unsigned int height = frame->height; + const unsigned int len = frame->len; unsigned int y_val = val; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; diff --git a/veejay-current/veejay-server/libvje/effects/bathroom.h b/veejay-current/veejay-server/libvje/effects/bathroom.h index 17a776cf..7b6d2f22 100644 --- a/veejay-current/veejay-server/libvje/effects/bathroom.h +++ b/veejay-current/veejay-server/libvje/effects/bathroom.h @@ -20,10 +20,6 @@ #ifndef BATHROOM_H #define BATHROOM_H -#include -#include -#include - vj_effect *bathroom_init(int w, int h); int bathroom_malloc(int w, int h); void bathroom_free(); From e5341a9fd58584175c9c1dff1189be5162c309fc Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sun, 31 Jul 2016 14:22:01 +0200 Subject: [PATCH 152/170] Libvje / refactor : slice (fix) * unsigned * clean headers --- .../veejay-server/libvje/effects/slice.c | 16 +++++++--------- .../veejay-server/libvje/effects/slice.h | 5 ----- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/slice.c b/veejay-current/veejay-server/libvje/effects/slice.c index 172ea1b6..4233d4df 100644 --- a/veejay-current/veejay-server/libvje/effects/slice.c +++ b/veejay-current/veejay-server/libvje/effects/slice.c @@ -17,12 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include "slice.h" -#include + #include "common.h" +#include +#include "slice.h" static uint8_t *slice_frame[4] = { NULL,NULL,NULL,NULL }; static int *slice_xshift = NULL; @@ -117,13 +115,13 @@ int current_period = 0; void slice_apply(VJFrame *frame, int val, int re_init) { unsigned int x,y,dx,dy; - const int width = frame->width; - const int height = frame->height; - const int len = frame->len; + const unsigned int width = frame->width; + const unsigned int height = frame->height; + const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb= frame->data[1]; uint8_t *Cr= frame->data[2]; - uint8_t *A = frame->data[3]; + uint8_t *A = frame->data[3]; int interpolate = 1; int tmp1 = val; diff --git a/veejay-current/veejay-server/libvje/effects/slice.h b/veejay-current/veejay-server/libvje/effects/slice.h index c9c57741..2c4159a4 100644 --- a/veejay-current/veejay-server/libvje/effects/slice.h +++ b/veejay-current/veejay-server/libvje/effects/slice.h @@ -20,11 +20,6 @@ #ifndef SLICE_H #define SLICE_H -#include -#include -#include -#include - vj_effect *slice_init(int width, int height); int slice_malloc(int width, int height); void slice_free(); From 714d6ab6120b0a417c01359c07f6ae9c94dc4909 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sun, 31 Jul 2016 14:23:07 +0200 Subject: [PATCH 153/170] Libvje / refactor : zoom (fix) * clean headers * unsigned --- .../veejay-server/libvje/effects/zoom.c | 15 ++++++--------- .../veejay-server/libvje/effects/zoom.h | 4 ---- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/zoom.c b/veejay-current/veejay-server/libvje/effects/zoom.c index 72a0157d..818265cc 100644 --- a/veejay-current/veejay-server/libvje/effects/zoom.c +++ b/veejay-current/veejay-server/libvje/effects/zoom.c @@ -17,13 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include -#include -#include + #include "common.h" +#include +#include #include "zoom.h" vj_effect *zoom_init(int width , int height) @@ -101,9 +98,9 @@ void zoom_free() { void zoom_apply( VJFrame *frame, int x, int y, int factor, int dir, int alpha) { - const int width = frame->width; - const int height = frame->height; - const int len = frame->len; + const unsigned int width = frame->width; + const unsigned int height = frame->height; + const unsigned int len = frame->len; if( zoom_[0] != x || zoom_[1] != y || zoom_[2] != factor || !zoom_vp_ || dir != zoom_[3]) { diff --git a/veejay-current/veejay-server/libvje/effects/zoom.h b/veejay-current/veejay-server/libvje/effects/zoom.h index f72c3ea8..f584560d 100644 --- a/veejay-current/veejay-server/libvje/effects/zoom.h +++ b/veejay-current/veejay-server/libvje/effects/zoom.h @@ -21,10 +21,6 @@ #ifndef ZOOM_H #define ZOOM_H -#include -#include -#include - vj_effect *zoom_init(int width, int height); int zoom_malloc(int w, int h); void zoom_free(); From 908030342107a5a1146815a3499700c8a3f36069 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sun, 31 Jul 2016 14:24:09 +0200 Subject: [PATCH 154/170] Libvje / refactor : perspective (fix) * clean headers * unsigned --- .../veejay-server/libvje/effects/perspective.c | 15 ++++++--------- .../veejay-server/libvje/effects/perspective.h | 4 ---- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/perspective.c b/veejay-current/veejay-server/libvje/effects/perspective.c index bb53a1a3..5fc532cb 100644 --- a/veejay-current/veejay-server/libvje/effects/perspective.c +++ b/veejay-current/veejay-server/libvje/effects/perspective.c @@ -17,13 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include -#include -#include + #include "common.h" +#include +#include #include "perspective.h" vj_effect *perspective_init(int width , int height) @@ -100,9 +97,9 @@ void perspective_free() { void perspective_apply( VJFrame *frame, int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4, int reverse) { - const int width = frame->width; - const int height = frame->height; - const int len = frame->len; + const unsigned int width = frame->width; + const unsigned int height = frame->height; + const unsigned int len = frame->len; if( x1 != perspective_[0] || y1 != perspective_[1] || x2 != perspective_[2] || y2 != perspective_[3] || x3 != perspective_[4] || y3 != perspective_[5] || x4 != perspective_[6] || y4 != perspective_[7] || reverse != perspective_[8] ) diff --git a/veejay-current/veejay-server/libvje/effects/perspective.h b/veejay-current/veejay-server/libvje/effects/perspective.h index a43a3e42..cca61b2c 100644 --- a/veejay-current/veejay-server/libvje/effects/perspective.h +++ b/veejay-current/veejay-server/libvje/effects/perspective.h @@ -20,10 +20,6 @@ #ifndef PERSPECTIVE_H #define PERSPECTIVE_H -#include -#include -#include - vj_effect *perspective_init(int width, int height); int perspective_malloc(int w, int h); void perspective_free(); From b278aa6af3ef9b38f1cbe2e8bbb7f69aee8ef067 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sun, 31 Jul 2016 14:25:01 +0200 Subject: [PATCH 155/170] Libvje / refactor : deinterlace (fix) * clean headers * unsigned --- .../veejay-server/libvje/effects/deinterlace.c | 9 ++++----- .../veejay-server/libvje/effects/deinterlace.h | 4 ---- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/deinterlace.c b/veejay-current/veejay-server/libvje/effects/deinterlace.c index 6e6b3035..59f20e90 100644 --- a/veejay-current/veejay-server/libvje/effects/deinterlace.c +++ b/veejay-current/veejay-server/libvje/effects/deinterlace.c @@ -17,10 +17,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include + #include "common.h" +#include #include "deinterlace.h" vj_effect *deinterlace_init(int w, int h) @@ -46,8 +45,8 @@ void deinterlace_apply(VJFrame *frame, int val) { const unsigned int uv_width = frame->uv_width; const unsigned int uv_height = frame->uv_height; - const int width = frame->width; - const int height = frame->height; + const unsigned int width = frame->width; + const unsigned int height = frame->height; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; diff --git a/veejay-current/veejay-server/libvje/effects/deinterlace.h b/veejay-current/veejay-server/libvje/effects/deinterlace.h index d5e1b9a4..21717f24 100644 --- a/veejay-current/veejay-server/libvje/effects/deinterlace.h +++ b/veejay-current/veejay-server/libvje/effects/deinterlace.h @@ -20,10 +20,6 @@ #ifndef DEINTERLACE_H #define DEINTERLACE_H -#include -#include -#include - vj_effect *deinterlace_init(); void deinterlace_apply(VJFrame *frame, int val); void deinterlace_free(); From c4aa8b5623308252b68a1115edfae1e5bafd18d3 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sun, 31 Jul 2016 14:26:27 +0200 Subject: [PATCH 156/170] Libvje / refactor : crosspixel (fix) * clean headers * unsigned --- .../veejay-server/libvje/effects/crosspixel.c | 16 +++++++--------- .../veejay-server/libvje/effects/crosspixel.h | 5 ----- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/crosspixel.c b/veejay-current/veejay-server/libvje/effects/crosspixel.c index f66b0d73..53a12bcd 100644 --- a/veejay-current/veejay-server/libvje/effects/crosspixel.c +++ b/veejay-current/veejay-server/libvje/effects/crosspixel.c @@ -17,12 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include + +#include "common.h" #include #include "crosspixel.h" -#include "common.h" -#include static uint8_t *cross_pixels[4] = { NULL,NULL,NULL, NULL}; @@ -78,15 +76,15 @@ void crosspixel_apply(VJFrame *frame, int t,int v) { const unsigned int vv = v * 2; // only even numbers const unsigned int u_vv = vv >> frame->shift_h; // sfhit = / 2, shift_v = 2 - const int width = frame->width; - const int height = frame->height; - const int len = frame->len; + const unsigned int width = frame->width; + const unsigned int height = frame->height; + const unsigned int len = frame->len; const int uv_len = frame->uv_len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; - const int uv_width = frame->uv_width; - const int uv_height = frame->uv_height; + const unsigned int uv_width = frame->uv_width; + const unsigned int uv_height = frame->uv_height; unsigned int p = 0; int strides[4] = { len, uv_len, uv_len ,0}; diff --git a/veejay-current/veejay-server/libvje/effects/crosspixel.h b/veejay-current/veejay-server/libvje/effects/crosspixel.h index 2f3ff6d8..ccd4c92f 100644 --- a/veejay-current/veejay-server/libvje/effects/crosspixel.h +++ b/veejay-current/veejay-server/libvje/effects/crosspixel.h @@ -20,11 +20,6 @@ #ifndef CROSSPIXEL_H #define CROSSPIXEL_H -#include -#include -#include -#include - vj_effect *crosspixel_init(int w, int h); int crosspixel_malloc(int w, int h); void crosspixel_free(); From dc4e5b3f8c75dc6c74a48183f38798408463a8d7 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sun, 31 Jul 2016 14:27:27 +0200 Subject: [PATCH 157/170] Libvje / refactor : color (fix) * clean headers --- veejay-current/veejay-server/libvje/effects/color.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/color.c b/veejay-current/veejay-server/libvje/effects/color.c index 6230fa5d..603ccc7a 100644 --- a/veejay-current/veejay-server/libvje/effects/color.c +++ b/veejay-current/veejay-server/libvje/effects/color.c @@ -17,9 +17,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include + +#include "common.h" #include #include "color.h" From 7f5b18aaadc4576dd41aa9d26529c9082b5d2df6 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sun, 31 Jul 2016 14:33:21 +0200 Subject: [PATCH 158/170] Libvje / refactor : water (fix) * clean headers * const unsigned * clean warning "defined but not used" (declaration to commented) --- .../veejay-server/libvje/effects/water.c | 27 +++++++++---------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/water.c b/veejay-current/veejay-server/libvje/effects/water.c index 8b23ec4e..90435633 100644 --- a/veejay-current/veejay-server/libvje/effects/water.c +++ b/veejay-current/veejay-server/libvje/effects/water.c @@ -22,12 +22,8 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include -#include #include "common.h" +#include #include "softblur.h" #include "water.h" @@ -142,9 +138,7 @@ vj_effect *water_init(int width, int height) #define HIS_DEFAULT 2 static uint32_t histogram_[HIS_LEN]; -static int n__ = 0; -static uint32_t keyv_ = 0; -static uint32_t keyp_ = 0; + int water_malloc(void **d, int width, int height) { *d = (void*) vj_calloc(sizeof(water_t)); @@ -221,6 +215,9 @@ static void drawmotionframe( VJFrame *f , water_t *w ) /* globalactivity not used */ /* +static int n__ = 0; +static uint32_t keyv_ = 0; +static uint32_t keyp_ = 0; static int globalactivity(VJFrame *f2, water_t *w, int in) { int len = (f2->width * f2->height)/4; @@ -276,7 +273,7 @@ static int globalactivity(VJFrame *f2, water_t *w, int in) static void motiondetect(VJFrame *f, VJFrame *f2, int threshold, water_t *w) { - const int len = f->len; + const unsigned int len = f->len; uint8_t *bg = w->diff_img + len; uint8_t *in = f2->data[0]; if(!w->have_img) @@ -302,7 +299,7 @@ static void motiondetect(VJFrame *f, VJFrame *f2, int threshold, water_t *w) int *p = w->map1 + w->map_w + 1; int *q = w->map2 + w->map_w + 1; - int width = f->width; + const unsigned int width = f->width; int x,y,h; uint8_t *d = w->diff_img + width + 2; for( y = w->map_h - 2; y > 0 ; y -- ) { @@ -325,7 +322,7 @@ static void motiondetect(VJFrame *f, VJFrame *f2, int threshold, water_t *w) static void motiondetect2(VJFrame *f, VJFrame *f2, int threshold, water_t *w) { - const int len = f->len; + const unsigned int len = f->len; uint8_t *bg = w->diff_img + len; uint8_t *in = f2->data[0]; if(!w->have_img) @@ -351,7 +348,7 @@ static void motiondetect2(VJFrame *f, VJFrame *f2, int threshold, water_t *w) int *p = w->map1 + w->map_w + 1; int *q = w->map2 + w->map_w + 1; - int width = f->width; + const unsigned int width = f->width; int x,y,h; uint8_t *d = w->diff_img + width + 2; for( y = w->map_h - 2; y > 0 ; y -- ) { @@ -374,7 +371,7 @@ static void motiondetect2(VJFrame *f, VJFrame *f2, int threshold, water_t *w) static void motiondetect3(VJFrame *f, VJFrame *f2, int threshold, water_t *w) { - const int len= f->len; + const unsigned int len= f->len; uint8_t *bg = w->diff_img + len; uint8_t *in = f2->data[0]; if(!w->have_img) @@ -400,7 +397,7 @@ static void motiondetect3(VJFrame *f, VJFrame *f2, int threshold, water_t *w) int *p = w->map1 + w->map_w + 1; int *q = w->map2 + w->map_w + 1; - int width = f->width; + const unsigned int width = f->width; int x,y,h; uint8_t *d = w->diff_img + width + 2; for( y = w->map_h - 2; y > 0 ; y -- ) { @@ -506,7 +503,7 @@ void water_apply(void *user_data, VJFrame *frame, VJFrame *frame2, int fresh_rat int *p, *q, *r; signed char *vp; uint8_t *src,*dest; - const int len = frame->len; + const unsigned int len = frame->len; water_t *w = (water_t*) user_data; if(w->last_fresh_rate != fresh_rate) From 62cd7ad94b7d63824a592b6b71678afc40f7efc8 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sun, 31 Jul 2016 14:35:27 +0200 Subject: [PATCH 159/170] Libvje / refactor : pencilsketch (fix) * clean headers --- .../veejay-server/libvje/effects/pencilsketch.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/pencilsketch.c b/veejay-current/veejay-server/libvje/effects/pencilsketch.c index b71bc41e..06d49f97 100644 --- a/veejay-current/veejay-server/libvje/effects/pencilsketch.c +++ b/veejay-current/veejay-server/libvje/effects/pencilsketch.c @@ -17,11 +17,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include + #include "common.h" +#include #include "pencilsketch.h" extern int vj_task_available(); @@ -159,7 +157,7 @@ void pencilsketch_apply(VJFrame *frame, int type, int threshold_min, unsigned int i; unsigned int len = frame->len; const unsigned int width = frame->width; - const unsigned int uv_len = (frame->ssm ?frame->len : frame->uv_len); + const unsigned int uv_len = (frame->ssm ?len : frame->uv_len); int m,d; uint8_t y,yb; uint8_t *Y = frame->data[0]; From 421a5b912b56649de512c2f7d72f3b1e1193d643 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sun, 31 Jul 2016 14:36:49 +0200 Subject: [PATCH 160/170] Libvje / refactor : pixelate (fix) * clean headers --- veejay-current/veejay-server/libvje/effects/pixelate.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/pixelate.c b/veejay-current/veejay-server/libvje/effects/pixelate.c index 19124852..c8f8a26d 100644 --- a/veejay-current/veejay-server/libvje/effects/pixelate.c +++ b/veejay-current/veejay-server/libvje/effects/pixelate.c @@ -17,10 +17,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include + +#include "common.h" #include #include "pixelate.h" @@ -62,9 +60,9 @@ vj_effect *pixelate_init(int width, int height) void pixelate_apply( VJFrame *frame, int vv ) { unsigned int i,j ; - unsigned int len = frame->len; + const unsigned int len = frame->len; const unsigned int v = values[vv]; - const unsigned int uv_len = (frame->ssm ? frame->len : frame->uv_len); + const unsigned int uv_len = (frame->ssm ? len : frame->uv_len); unsigned int u_v = v >> (frame->ssm ? frame->shift_h: 1 ); if( u_v == 0 ) u_v = 1; From 6148de7b8689a8dbd2ee730ce935a8c01e169de0 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sun, 31 Jul 2016 14:38:10 +0200 Subject: [PATCH 161/170] LIbvje : refactor : bgpush (fix) * clean headers --- veejay-current/veejay-server/libvje/effects/bgpush.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/bgpush.c b/veejay-current/veejay-server/libvje/effects/bgpush.c index f600eddc..0773c9bd 100644 --- a/veejay-current/veejay-server/libvje/effects/bgpush.c +++ b/veejay-current/veejay-server/libvje/effects/bgpush.c @@ -17,13 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include + +#include "common.h" #include #include -#include "common.h" #include "bgpush.h" static uint8_t *frame_data = NULL; From 015a49bfd92f637426df5928fbc7d5f31ede31d6 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sun, 31 Jul 2016 14:38:57 +0200 Subject: [PATCH 162/170] Libvje / refactor : magicmirror (fix) * clean headers --- veejay-current/veejay-server/libvje/effects/magicmirror.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/magicmirror.c b/veejay-current/veejay-server/libvje/effects/magicmirror.c index 3c733e5b..ebb5302b 100644 --- a/veejay-current/veejay-server/libvje/effects/magicmirror.c +++ b/veejay-current/veejay-server/libvje/effects/magicmirror.c @@ -17,11 +17,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include + #include "common.h" +#include #include "motionmap.h" #include "magicmirror.h" From bf3c968e75cfcdd29161f0978f985a245dd7d618 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sun, 31 Jul 2016 14:39:56 +0200 Subject: [PATCH 163/170] Libvje / refactor : lumamask (fix) * clean headers --- veejay-current/veejay-server/libvje/effects/lumamask.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/lumamask.c b/veejay-current/veejay-server/libvje/effects/lumamask.c index c3ebf037..cbe9e12a 100644 --- a/veejay-current/veejay-server/libvje/effects/lumamask.c +++ b/veejay-current/veejay-server/libvje/effects/lumamask.c @@ -28,11 +28,9 @@ */ -#include -#include -#include -#include + #include "common.h" +#include #include "lumamask.h" static uint8_t *buf[4] = { NULL,NULL,NULL,NULL }; From 480c99ddc831a1578b3fbf0f7d5dd53772405a16 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sun, 31 Jul 2016 14:48:28 +0200 Subject: [PATCH 164/170] Libvje / refactor : raster (fix) * clean headers --- veejay-current/veejay-server/libvje/effects/raster.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/raster.c b/veejay-current/veejay-server/libvje/effects/raster.c index 201bba60..1e1e1e76 100644 --- a/veejay-current/veejay-server/libvje/effects/raster.c +++ b/veejay-current/veejay-server/libvje/effects/raster.c @@ -17,11 +17,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include + #include "common.h" +#include #include "raster.h" vj_effect *raster_init(int w, int h) From a9b2dead544e8552cf1e89b03442e6f1962e74d8 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sun, 31 Jul 2016 14:49:46 +0200 Subject: [PATCH 165/170] Libvje / refactor : smear (fix) * clean headers --- veejay-current/veejay-server/libvje/effects/smear.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/smear.c b/veejay-current/veejay-server/libvje/effects/smear.c index fd752d86..27c85bec 100644 --- a/veejay-current/veejay-server/libvje/effects/smear.c +++ b/veejay-current/veejay-server/libvje/effects/smear.c @@ -18,11 +18,8 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA. */ -#include -#include -#include -#include #include "common.h" +#include #include "smear.h" vj_effect *smear_init(int w, int h) From 0d27ed23db32a753f28fa0af584a724e374baf35 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Sun, 31 Jul 2016 15:07:05 +0200 Subject: [PATCH 166/170] Libvje / 'unused-variable' warning --- veejay-current/veejay-server/libvje/effects/alphaselect.c | 3 +-- veejay-current/veejay-server/libvje/effects/bwselect.c | 1 - veejay-current/veejay-server/libvje/effects/distort.c | 2 +- veejay-current/veejay-server/libvje/effects/greyselect.c | 3 +-- veejay-current/veejay-server/libvje/effects/isolate.c | 3 +-- veejay-current/veejay-server/libvje/transitions/transcarot.c | 1 - 6 files changed, 4 insertions(+), 9 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/alphaselect.c b/veejay-current/veejay-server/libvje/effects/alphaselect.c index edc2cb9a..06f3e25b 100644 --- a/veejay-current/veejay-server/libvje/effects/alphaselect.c +++ b/veejay-current/veejay-server/libvje/effects/alphaselect.c @@ -78,7 +78,7 @@ void alphaselect_apply( VJFrame *frame, int i_angle, int r, int g, int b, int sw uint8_t *fg_cb, *fg_cr; int accept_angle_tg; int cb, cr; - float kg1, tmp, aa = 255.0f, bb = 255.0f, _y = 0; + float kg1, tmp, aa = 255.0f, bb = 255.0f; float angle = (float) i_angle / 100.0f; unsigned int pos; uint8_t val; @@ -90,7 +90,6 @@ void alphaselect_apply( VJFrame *frame, int i_angle, int r, int g, int b, int sw int iy=0,iu=128,iv=128; _rgb2yuv(r,g,b,iy,iu,iv); - _y = (float) iy; aa = (float) iu; bb = (float) iv; diff --git a/veejay-current/veejay-server/libvje/effects/bwselect.c b/veejay-current/veejay-server/libvje/effects/bwselect.c index 193543d8..7567169e 100644 --- a/veejay-current/veejay-server/libvje/effects/bwselect.c +++ b/veejay-current/veejay-server/libvje/effects/bwselect.c @@ -80,7 +80,6 @@ void bwselect_apply(VJFrame *frame, int min_threshold, int max_threshold, int ga { int r,c; const unsigned int width = frame->width; - const unsigned int height = frame->height; const unsigned int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; diff --git a/veejay-current/veejay-server/libvje/effects/distort.c b/veejay-current/veejay-server/libvje/effects/distort.c index f615b899..5634fa86 100644 --- a/veejay-current/veejay-server/libvje/effects/distort.c +++ b/veejay-current/veejay-server/libvje/effects/distort.c @@ -141,7 +141,7 @@ void distortion_free() void distortion_apply(VJFrame *frame, int inc_val1, int inc_val2, int inc_val3, int inc_val4, int inc_val5, int inc_val6 ) { - int x, y, i, j,yi; + int x, i, j; int tpos1 = 0, tpos2 = 0, tpos3 = 0, tpos4 = 0; const int z = 511; uint8_t *Y = frame->data[0]; diff --git a/veejay-current/veejay-server/libvje/effects/greyselect.c b/veejay-current/veejay-server/libvje/effects/greyselect.c index 9c3bca20..e7b439b2 100644 --- a/veejay-current/veejay-server/libvje/effects/greyselect.c +++ b/veejay-current/veejay-server/libvje/effects/greyselect.c @@ -67,7 +67,7 @@ void greyselect_apply( VJFrame *frame, int i_angle, int r, int g, int b, int swa uint8_t *fg_cb, *fg_cr; int accept_angle_tg; int cb, cr; - float kg1, tmp, aa = 255.0f, bb = 255.0f, _y = 0; + float kg1, tmp, aa = 255.0f, bb = 255.0f; float angle = (float) i_angle / 100.0f; unsigned int pos; uint8_t val; @@ -75,7 +75,6 @@ void greyselect_apply( VJFrame *frame, int i_angle, int r, int g, int b, int swa uint8_t *Cr = frame->data[2]; int iy=0,iu=128,iv=128; _rgb2yuv(r,g,b,iy,iu,iv); - _y = (float) iy; aa = (float) iu; bb = (float) iv; diff --git a/veejay-current/veejay-server/libvje/effects/isolate.c b/veejay-current/veejay-server/libvje/effects/isolate.c index 12d92b2d..e5012e67 100644 --- a/veejay-current/veejay-server/libvje/effects/isolate.c +++ b/veejay-current/veejay-server/libvje/effects/isolate.c @@ -67,7 +67,7 @@ void isolate_apply( VJFrame *frame, int i_angle, int r, int g, int b, int opacit uint8_t *fg_cb, *fg_cr; int accept_angle_tg; int cb, cr; - float kg1, tmp, aa = 255, bb = 255, _y = 0; + float kg1, tmp, aa = 255, bb = 255; float angle = (float) i_angle / 100.0f; unsigned int pos; uint8_t val; @@ -76,7 +76,6 @@ void isolate_apply( VJFrame *frame, int i_angle, int r, int g, int b, int opacit uint8_t *Cr = frame->data[2]; int iy=0,iu=0,iv=0; _rgb2yuv(r,g,b,iy,iu,iv); - _y = (float) iy; aa = (float) iu; bb = (float) iv; tmp = sqrt(((aa * aa) + (bb * bb))); diff --git a/veejay-current/veejay-server/libvje/transitions/transcarot.c b/veejay-current/veejay-server/libvje/transitions/transcarot.c index 6725d7c4..3fddac2c 100644 --- a/veejay-current/veejay-server/libvje/transitions/transcarot.c +++ b/veejay-current/veejay-server/libvje/transitions/transcarot.c @@ -147,7 +147,6 @@ static void transcarot2_apply( VJFrame *frame, VJFrame *frame2, int point_size, int i; unsigned int op0, op1; const unsigned int width = frame->width; - const unsigned int height = frame->height; unsigned int len = frame->len; unsigned int uv_width = frame->uv_width; int uv_dy, uv_dye, uv_row_start, uv_row_length; From b210cba16671e9079ef7546a971a0ad9d5b15c06 Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Mon, 1 Aug 2016 19:31:52 +0200 Subject: [PATCH 167/170] Libvje / refactor : unsigned len -> signed len; --- .../libvje/effects/alphadampen.c | 2 +- .../veejay-server/libvje/effects/alphafill.c | 2 +- .../libvje/effects/alphaflatten.c | 2 +- .../libvje/effects/alphanegate.c | 2 +- .../libvje/effects/alphaselect.c | 2 +- .../libvje/effects/alphaselect2.c | 2 +- .../veejay-server/libvje/effects/average.c | 2 +- .../veejay-server/libvje/effects/baltantv.c | 2 +- .../veejay-server/libvje/effects/bathroom.c | 8 +- .../veejay-server/libvje/effects/bgsubtract.c | 11 +- .../veejay-server/libvje/effects/blob.c | 2 +- .../veejay-server/libvje/effects/boids.c | 2 +- .../veejay-server/libvje/effects/bwotsu.c | 2 +- .../veejay-server/libvje/effects/bwselect.c | 10 +- .../veejay-server/libvje/effects/cali.c | 2 +- .../veejay-server/libvje/effects/cartonize.c | 2 +- .../veejay-server/libvje/effects/chameleon.c | 2 +- .../libvje/effects/chromamagickalpha.c | 54 +++---- .../libvje/effects/chromapalette.c | 2 +- .../libvje/effects/chromascratcher.c | 2 +- .../veejay-server/libvje/effects/colflash.c | 4 +- .../libvje/effects/colmorphology.c | 2 +- .../veejay-server/libvje/effects/colormap.c | 2 +- .../veejay-server/libvje/effects/colorshift.c | 24 ++-- .../libvje/effects/complexsync.c | 2 +- .../libvje/effects/complexthreshold.c | 2 +- .../libvje/effects/constantblend.c | 2 +- .../libvje/effects/contourextract.c | 2 +- .../veejay-server/libvje/effects/contrast.c | 2 +- .../veejay-server/libvje/effects/crosspixel.c | 2 +- .../veejay-server/libvje/effects/cutstop.c | 2 +- .../veejay-server/libvje/effects/diffmap.c | 2 +- .../veejay-server/libvje/effects/dissolve.c | 2 +- .../veejay-server/libvje/effects/distort.c | 2 +- .../veejay-server/libvje/effects/dummy.c | 2 +- .../veejay-server/libvje/effects/emboss.c | 13 +- .../libvje/effects/enhancemask.c | 4 +- .../libvje/effects/feathermask.c | 2 +- .../veejay-server/libvje/effects/fisheye.c | 2 +- .../veejay-server/libvje/effects/flare.c | 2 +- .../veejay-server/libvje/effects/gamma.c | 2 +- .../veejay-server/libvje/effects/gaussblur.c | 2 +- .../veejay-server/libvje/effects/ghost.c | 2 +- .../veejay-server/libvje/effects/greyselect.c | 2 +- .../veejay-server/libvje/effects/iris.c | 2 +- .../veejay-server/libvje/effects/isolate.c | 2 +- .../libvje/effects/levelcorrection.c | 2 +- .../veejay-server/libvje/effects/lumablend.c | 6 +- .../libvje/effects/lumakeyalpha.c | 2 +- .../veejay-server/libvje/effects/lumamagick.c | 88 ++++++------ .../veejay-server/libvje/effects/lumamask.c | 2 +- .../libvje/effects/magicalphaoverlays.c | 66 ++++----- .../libvje/effects/magicmirror.c | 2 +- .../libvje/effects/magicoverlays.c | 132 +++++++++--------- .../libvje/effects/magicoverlaysalpha.c | 66 ++++----- .../libvje/effects/magicscratcher.c | 7 +- .../veejay-server/libvje/effects/mask.c | 2 +- .../veejay-server/libvje/effects/maskstop.c | 2 +- .../veejay-server/libvje/effects/median.c | 2 +- .../veejay-server/libvje/effects/mixtoalpha.c | 2 +- .../veejay-server/libvje/effects/morphology.c | 2 +- .../veejay-server/libvje/effects/motionblur.c | 2 +- .../veejay-server/libvje/effects/motionmap.c | 2 +- .../veejay-server/libvje/effects/negation.c | 4 +- .../veejay-server/libvje/effects/neighbours.c | 2 +- .../libvje/effects/neighbours2.c | 2 +- .../libvje/effects/neighbours3.c | 2 +- .../libvje/effects/neighbours4.c | 2 +- .../libvje/effects/neighbours5.c | 2 +- .../veejay-server/libvje/effects/nervous.c | 2 +- .../veejay-server/libvje/effects/noiseadd.c | 6 +- .../veejay-server/libvje/effects/opacityadv.c | 2 +- .../libvje/effects/opacitythreshold.c | 3 +- .../libvje/effects/pencilsketch.c | 4 +- .../libvje/effects/perspective.c | 2 +- .../veejay-server/libvje/effects/pixelate.c | 4 +- .../veejay-server/libvje/effects/porterduff.c | 29 ++-- .../veejay-server/libvje/effects/radcor.c | 2 +- .../veejay-server/libvje/effects/radialblur.c | 4 +- .../libvje/effects/radioactive.c | 2 +- .../veejay-server/libvje/effects/randnoise.c | 2 +- .../veejay-server/libvje/effects/rawman.c | 2 +- .../veejay-server/libvje/effects/rawval.c | 2 +- .../veejay-server/libvje/effects/rgbkey.c | 2 +- .../veejay-server/libvje/effects/ripple.c | 2 +- .../veejay-server/libvje/effects/rotozoom.c | 2 +- .../veejay-server/libvje/effects/scratcher.c | 2 +- .../veejay-server/libvje/effects/sinoids.c | 2 +- .../veejay-server/libvje/effects/slice.c | 2 +- .../veejay-server/libvje/effects/slicer.c | 2 +- .../veejay-server/libvje/effects/solarize.c | 2 +- .../veejay-server/libvje/effects/split.c | 33 ++--- .../veejay-server/libvje/effects/swirl.c | 2 +- .../veejay-server/libvje/effects/threshold.c | 2 +- .../libvje/effects/timedistort.c | 2 +- .../veejay-server/libvje/effects/toalpha.c | 2 +- .../veejay-server/libvje/effects/tracer.c | 2 +- .../libvje/effects/travelmatte.c | 2 +- .../libvje/effects/tripplicity.c | 4 +- .../veejay-server/libvje/effects/water.c | 8 +- .../libvje/effects/waterrippletv.c | 2 +- .../veejay-server/libvje/effects/whiteframe.c | 2 +- .../libvje/effects/widthmirror.c | 2 +- .../veejay-server/libvje/effects/zoom.c | 2 +- .../libvje/transitions/fadecolor.c | 2 +- .../libvje/transitions/fadecolorrgb.c | 2 +- .../libvje/transitions/slidingdoor.c | 2 +- .../libvje/transitions/transcarot.c | 2 +- .../veejay-server/libvje/transitions/vbar.c | 2 +- 109 files changed, 385 insertions(+), 377 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/alphadampen.c b/veejay-current/veejay-server/libvje/effects/alphadampen.c index 826ad296..fca8ed7b 100644 --- a/veejay-current/veejay-server/libvje/effects/alphadampen.c +++ b/veejay-current/veejay-server/libvje/effects/alphadampen.c @@ -46,7 +46,7 @@ vj_effect *alphadampen_init(int w, int h) void alphadampen_apply( VJFrame *frame, int b1) { size_t i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t tmp; uint8_t *A = frame->data[3]; diff --git a/veejay-current/veejay-server/libvje/effects/alphafill.c b/veejay-current/veejay-server/libvje/effects/alphafill.c index b7a95a49..e9cb7b5c 100644 --- a/veejay-current/veejay-server/libvje/effects/alphafill.c +++ b/veejay-current/veejay-server/libvje/effects/alphafill.c @@ -45,7 +45,7 @@ vj_effect *alphafill_init(int w, int h) void alphafill_apply( VJFrame *frame, int val) { - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *a = frame->data[3]; veejay_memset(a, val, len ); } diff --git a/veejay-current/veejay-server/libvje/effects/alphaflatten.c b/veejay-current/veejay-server/libvje/effects/alphaflatten.c index c261bc85..9c235ea0 100644 --- a/veejay-current/veejay-server/libvje/effects/alphaflatten.c +++ b/veejay-current/veejay-server/libvje/effects/alphaflatten.c @@ -50,7 +50,7 @@ vj_effect *alphaflatten_init(int w, int h) void alphaflatten_apply( VJFrame *frame, int mode) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *o0 = frame->data[0]; uint8_t *o1 = frame->data[1]; diff --git a/veejay-current/veejay-server/libvje/effects/alphanegate.c b/veejay-current/veejay-server/libvje/effects/alphanegate.c index 826b9d74..2e68b564 100644 --- a/veejay-current/veejay-server/libvje/effects/alphanegate.c +++ b/veejay-current/veejay-server/libvje/effects/alphanegate.c @@ -49,7 +49,7 @@ vj_effect *alphanegate_init(int w, int h) void alphanegate_apply( VJFrame *frame, int val) { - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *A = frame->data[3]; unsigned int i; diff --git a/veejay-current/veejay-server/libvje/effects/alphaselect.c b/veejay-current/veejay-server/libvje/effects/alphaselect.c index 06f3e25b..988d3e76 100644 --- a/veejay-current/veejay-server/libvje/effects/alphaselect.c +++ b/veejay-current/veejay-server/libvje/effects/alphaselect.c @@ -82,7 +82,7 @@ void alphaselect_apply( VJFrame *frame, int i_angle, int r, int g, int b, int sw float angle = (float) i_angle / 100.0f; unsigned int pos; uint8_t val; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; diff --git a/veejay-current/veejay-server/libvje/effects/alphaselect2.c b/veejay-current/veejay-server/libvje/effects/alphaselect2.c index 8139d03c..09bf0f24 100644 --- a/veejay-current/veejay-server/libvje/effects/alphaselect2.c +++ b/veejay-current/veejay-server/libvje/effects/alphaselect2.c @@ -89,7 +89,7 @@ void alphaselect2_apply( VJFrame *frame,int tola, int r, int g, int b, int tolb,int alpha) { unsigned int pos; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; diff --git a/veejay-current/veejay-server/libvje/effects/average.c b/veejay-current/veejay-server/libvje/effects/average.c index f0e5c6b9..eb52f839 100644 --- a/veejay-current/veejay-server/libvje/effects/average.c +++ b/veejay-current/veejay-server/libvje/effects/average.c @@ -77,7 +77,7 @@ void average_free() void average_apply(VJFrame *frame, int max_sum, int mode) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; diff --git a/veejay-current/veejay-server/libvje/effects/baltantv.c b/veejay-current/veejay-server/libvje/effects/baltantv.c index 38d5b21e..5307b329 100644 --- a/veejay-current/veejay-server/libvje/effects/baltantv.c +++ b/veejay-current/veejay-server/libvje/effects/baltantv.c @@ -85,7 +85,7 @@ void baltantv_free() void baltantv_apply( VJFrame *frame, int stride, int mode) { unsigned int i,cf; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *pDst = planetable_ + (plane_ * len); diff --git a/veejay-current/veejay-server/libvje/effects/bathroom.c b/veejay-current/veejay-server/libvje/effects/bathroom.c index 25421f36..3f850b47 100644 --- a/veejay-current/veejay-server/libvje/effects/bathroom.c +++ b/veejay-current/veejay-server/libvje/effects/bathroom.c @@ -96,7 +96,7 @@ static void bathroom_verti_apply(VJFrame *frame, int val, int x0, int x1) { const unsigned int width = frame->width; const unsigned int height = frame->height; - const unsigned int len = frame->len; + const int len = frame->len; unsigned int y_val = val; unsigned int x,y; uint8_t *Y = frame->data[0]; @@ -124,7 +124,7 @@ static void bathroom_alpha_verti_apply(VJFrame *frame, int val, int x0, int x1) { const unsigned int width = frame->width; const unsigned int height = frame->height; - const unsigned int len = frame->len; + const int len = frame->len; unsigned int y_val = val; unsigned int x,y; uint8_t *Y = frame->data[0]; @@ -155,7 +155,7 @@ static void bathroom_hori_apply(VJFrame *frame, int val, int x0, int x1) { const unsigned int width = frame->width; const unsigned int height = frame->height; - const unsigned int len = frame->len; + const int len = frame->len; unsigned int y_val = val; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; @@ -182,7 +182,7 @@ static void bathroom_alpha_hori_apply(VJFrame *frame, int val, int x0, int x1) { const unsigned int width = frame->width; const unsigned int height = frame->height; - const unsigned int len = frame->len; + const int len = frame->len; unsigned int y_val = val; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; diff --git a/veejay-current/veejay-server/libvje/effects/bgsubtract.c b/veejay-current/veejay-server/libvje/effects/bgsubtract.c index 68e414f7..6d2ba55c 100644 --- a/veejay-current/veejay-server/libvje/effects/bgsubtract.c +++ b/veejay-current/veejay-server/libvje/effects/bgsubtract.c @@ -192,7 +192,8 @@ static void bgsubtract_show_bg( VJFrame *frame ) void bgsubtract_apply(VJFrame *frame,int threshold, int method, int enabled, int alpha ) { - const unsigned int uv_len = (frame->ssm ? frame->len : frame->uv_len ); + const int len = frame->len; + const int uv_len = (frame->ssm ? len : frame->uv_len ); if( auto_hist ) vje_histogram_auto_eq( frame ); @@ -203,12 +204,12 @@ void bgsubtract_apply(VJFrame *frame,int threshold, int method, int enabled, int bgsubtract_show_bg( frame ); break; case 1: - bgsubtract_cma_frame( frame->len, frame->data[0], bg_frame__[0] ); + bgsubtract_cma_frame( len, frame->data[0], bg_frame__[0] ); bgsubtract_show_bg( frame ); bg_n ++; break; case 2: - bgsubtract_avg_frame( frame->len, frame->data[0], bg_frame__[0] ); + bgsubtract_avg_frame( len, frame->data[0], bg_frame__[0] ); bgsubtract_show_bg( frame ); break; default: @@ -219,10 +220,10 @@ void bgsubtract_apply(VJFrame *frame,int threshold, int method, int enabled, int if( alpha == 0 ) { veejay_memset( frame->data[1], 128, uv_len ); veejay_memset( frame->data[2], 128, uv_len ); - vje_diff_plane( bg_frame__[0], frame->data[0], frame->data[0], threshold, frame->len ); + vje_diff_plane( bg_frame__[0], frame->data[0], frame->data[0], threshold, len ); } else { - vje_diff_plane( bg_frame__[0], frame->data[0], frame->data[3], threshold, frame->len ); + vje_diff_plane( bg_frame__[0], frame->data[0], frame->data[3], threshold, len ); } } } diff --git a/veejay-current/veejay-server/libvje/effects/blob.c b/veejay-current/veejay-server/libvje/effects/blob.c index ad59903b..8da5aad4 100644 --- a/veejay-current/veejay-server/libvje/effects/blob.c +++ b/veejay-current/veejay-server/libvje/effects/blob.c @@ -214,7 +214,7 @@ void blob_apply(VJFrame *frame, int radius, int num, int speed, int shape) { const unsigned int width = frame->width; const unsigned int height = frame->height; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *srcY = frame->data[0]; uint8_t *srcCb= frame->data[1]; uint8_t *srcCr= frame->data[2]; diff --git a/veejay-current/veejay-server/libvje/effects/boids.c b/veejay-current/veejay-server/libvje/effects/boids.c index 50dd1f41..4a741315 100644 --- a/veejay-current/veejay-server/libvje/effects/boids.c +++ b/veejay-current/veejay-server/libvje/effects/boids.c @@ -333,7 +333,7 @@ void boids_apply(VJFrame *frame, int radius, int num, int shape, int m1, int m2, { const unsigned int width = frame->width; const unsigned int height = frame->height; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *srcY = frame->data[0]; uint8_t *srcCb= frame->data[1]; uint8_t *srcCr= frame->data[2]; diff --git a/veejay-current/veejay-server/libvje/effects/bwotsu.c b/veejay-current/veejay-server/libvje/effects/bwotsu.c index d16db502..b03acb24 100644 --- a/veejay-current/veejay-server/libvje/effects/bwotsu.c +++ b/veejay-current/veejay-server/libvje/effects/bwotsu.c @@ -86,7 +86,7 @@ void bwotsu_apply(VJFrame *frame, int mode, int skew, int invert) { uint32_t Histogram[256]; unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *A = frame->data[3]; diff --git a/veejay-current/veejay-server/libvje/effects/bwselect.c b/veejay-current/veejay-server/libvje/effects/bwselect.c index 7567169e..4ddc972d 100644 --- a/veejay-current/veejay-server/libvje/effects/bwselect.c +++ b/veejay-current/veejay-server/libvje/effects/bwselect.c @@ -80,7 +80,7 @@ void bwselect_apply(VJFrame *frame, int min_threshold, int max_threshold, int ga { int r,c; const unsigned int width = frame->width; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -99,8 +99,8 @@ void bwselect_apply(VJFrame *frame, int min_threshold, int max_threshold, int ga } } } - veejay_memset(Cb, 128, (frame->ssm ? frame->len : frame->uv_len)); - veejay_memset(Cr, 128, (frame->ssm ? frame->len : frame->uv_len)); + veejay_memset(Cb, 128, (frame->ssm ? len : frame->uv_len)); + veejay_memset(Cr, 128, (frame->ssm ? len : frame->uv_len)); } else { uint8_t *aA = frame->data[3]; @@ -136,8 +136,8 @@ void bwselect_apply(VJFrame *frame, int min_threshold, int max_threshold, int ga } } } - veejay_memset(Cb, 128, (frame->ssm ? frame->len : frame->uv_len)); - veejay_memset(Cr, 128, (frame->ssm ? frame->len : frame->uv_len)); + veejay_memset(Cb, 128, (frame->ssm ? len : frame->uv_len)); + veejay_memset(Cr, 128, (frame->ssm ? len : frame->uv_len)); } else { uint8_t *aA = frame->data[3]; diff --git a/veejay-current/veejay-server/libvje/effects/cali.c b/veejay-current/veejay-server/libvje/effects/cali.c index 5df00941..72361796 100644 --- a/veejay-current/veejay-server/libvje/effects/cali.c +++ b/veejay-current/veejay-server/libvje/effects/cali.c @@ -124,7 +124,7 @@ void cali_apply(void *ed, VJFrame *frame,int mode, int full) uint8_t *V = frame->data[2]; const int chroma = 127; const int uv_len = frame->uv_len; - const unsigned int len = frame->len; + const int len = frame->len; int p,i; if( mode == 1 ) { diff --git a/veejay-current/veejay-server/libvje/effects/cartonize.c b/veejay-current/veejay-server/libvje/effects/cartonize.c index c7483420..ca36347c 100644 --- a/veejay-current/veejay-server/libvje/effects/cartonize.c +++ b/veejay-current/veejay-server/libvje/effects/cartonize.c @@ -53,7 +53,7 @@ vj_effect *cartonize_init(int w, int h) void cartonize_apply( VJFrame *frame, int b1, int b2, int b3) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; int uv_len = (frame->ssm ? len : frame->uv_len); uint8_t tmp; int p; diff --git a/veejay-current/veejay-server/libvje/effects/chameleon.c b/veejay-current/veejay-server/libvje/effects/chameleon.c index 683279d5..0db0f4fa 100644 --- a/veejay-current/veejay-server/libvje/effects/chameleon.c +++ b/veejay-current/veejay-server/libvje/effects/chameleon.c @@ -237,7 +237,7 @@ static void drawDisappearing(VJFrame *src, VJFrame *dest) void chameleon_apply( VJFrame *frame, int mode) { - const unsigned int len = frame->len; + const int len = frame->len; VJFrame source; int strides[4] = { len, len, len, 0 }; vj_frame_copy( frame->data, tmpimage, strides ); diff --git a/veejay-current/veejay-server/libvje/effects/chromamagickalpha.c b/veejay-current/veejay-server/libvje/effects/chromamagickalpha.c index 4669d554..6f84fd4b 100644 --- a/veejay-current/veejay-server/libvje/effects/chromamagickalpha.c +++ b/veejay-current/veejay-server/libvje/effects/chromamagickalpha.c @@ -69,7 +69,7 @@ vj_effect *chromamagickalpha_init(int w, int h) static void chromamagicalpha_selectmin(VJFrame *frame, VJFrame *frame2, int op_a) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -97,7 +97,7 @@ static void chromamagicalpha_addsubselectlum(VJFrame *frame, VJFrame *frame2, in { unsigned int i; int c, a, b; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -134,7 +134,7 @@ static void chromamagicalpha_addsubselectlum(VJFrame *frame, VJFrame *frame2, in static void chromamagicalpha_selectmax(VJFrame *frame, VJFrame *frame2, int op_a) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -163,7 +163,7 @@ static void chromamagicalpha_selectmax(VJFrame *frame, VJFrame *frame2, int op_a static void chromamagicalpha_selectdiff(VJFrame *frame, VJFrame *frame2, int op_a) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -192,7 +192,7 @@ static void chromamagicalpha_selectdiff(VJFrame *frame, VJFrame *frame2, int op_ static void chromamagicalpha_diffreplace(VJFrame *frame, VJFrame *frame2, int threshold) { /* op_a = threshold */ - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -240,7 +240,7 @@ static void chromamagicalpha_diffreplace(VJFrame *frame, VJFrame *frame2, int th static void chromamagicalpha_selectdiffneg(VJFrame *frame, VJFrame *frame2, int op_a) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -269,7 +269,7 @@ static void chromamagicalpha_selectdiffneg(VJFrame *frame, VJFrame *frame2, int static void chromamagicalpha_selectunfreeze(VJFrame *frame, VJFrame *frame2, int op_a) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -299,7 +299,7 @@ static void chromamagicalpha_selectunfreeze(VJFrame *frame, VJFrame *frame2, int static void chromamagicalpha_addlum(VJFrame *frame, VJFrame *frame2, int op_a) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -327,7 +327,7 @@ static void chromamagicalpha_addlum(VJFrame *frame, VJFrame *frame2, int op_a) static void chromamagicalpha_exclusive(VJFrame *frame, VJFrame *frame2, int op_a) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -365,7 +365,7 @@ static void chromamagicalpha_exclusive(VJFrame *frame, VJFrame *frame2, int op_a static void chromamagicalpha_diffnegate(VJFrame *frame, VJFrame *frame2, int op_a) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -408,7 +408,7 @@ static void chromamagicalpha_diffnegate(VJFrame *frame, VJFrame *frame2, int op_ static void chromamagicalpha_additive(VJFrame *frame, VJFrame *frame2, int op_a) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -444,7 +444,7 @@ static void chromamagicalpha_additive(VJFrame *frame, VJFrame *frame2, int op_a) static void chromamagicalpha_basecolor(VJFrame *frame, VJFrame *frame2, int op_a) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -484,7 +484,7 @@ static void chromamagicalpha_basecolor(VJFrame *frame, VJFrame *frame2, int op_a static void chromamagicalpha_freeze(VJFrame *frame, VJFrame *frame2, int op_a) { - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -538,7 +538,7 @@ static void chromamagicalpha_freeze(VJFrame *frame, VJFrame *frame2, int op_a) static void chromamagicalpha_unfreeze( VJFrame *frame, VJFrame *frame2, int op_a ) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -575,7 +575,7 @@ static void chromamagicalpha_unfreeze( VJFrame *frame, VJFrame *frame2, int op_a static void chromamagicalpha_hardlight( VJFrame *frame, VJFrame *frame2, int op_a) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -620,7 +620,7 @@ static void chromamagicalpha_hardlight( VJFrame *frame, VJFrame *frame2, int op_ static void chromamagicalpha_multiply( VJFrame *frame, VJFrame *frame2,int op_a ) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -659,7 +659,7 @@ static void chromamagicalpha_multiply( VJFrame *frame, VJFrame *frame2,int op_a static void chromamagicalpha_divide(VJFrame *frame, VJFrame *frame2, int op_a ) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -696,7 +696,7 @@ static void chromamagicalpha_divide(VJFrame *frame, VJFrame *frame2, int op_a ) static void chromamagicalpha_substract(VJFrame *frame, VJFrame *frame2, int op_a) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -734,7 +734,7 @@ static void chromamagicalpha_substract(VJFrame *frame, VJFrame *frame2, int op_a static void chromamagicalpha_add(VJFrame *frame, VJFrame *frame2, int op_a) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -770,7 +770,7 @@ static void chromamagicalpha_add(VJFrame *frame, VJFrame *frame2, int op_a) static void chromamagicalpha_screen(VJFrame *frame, VJFrame *frame2, int op_a) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -804,7 +804,7 @@ static void chromamagicalpha_screen(VJFrame *frame, VJFrame *frame2, int op_a) static void chromamagicalpha_difference(VJFrame *frame, VJFrame *frame2, int op_a) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -843,7 +843,7 @@ static void chromamagicalpha_difference(VJFrame *frame, VJFrame *frame2, int op_ static void chromamagicalpha_softlightmode(VJFrame *frame,VJFrame *frame2, int op_a) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -883,7 +883,7 @@ static void chromamagicalpha_softlightmode(VJFrame *frame,VJFrame *frame2, int o static void chromamagicalpha_dodge(VJFrame *frame, VJFrame *frame2, int op_a) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -924,7 +924,7 @@ static void chromamagicalpha_dodge(VJFrame *frame, VJFrame *frame2, int op_a) { static void chromamagicalpha_darken(VJFrame *frame, VJFrame *frame2, int op_a) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -954,7 +954,7 @@ static void chromamagicalpha_lighten(VJFrame *frame, VJFrame *frame2, int op_a) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -983,7 +983,7 @@ static void chromamagicalpha_lighten(VJFrame *frame, VJFrame *frame2, int op_a) static void chromamagicalpha_reflect(VJFrame *frame, VJFrame *frame2, int op_a) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -1030,7 +1030,7 @@ static void chromamagicalpha_reflect(VJFrame *frame, VJFrame *frame2, int op_a) static void chromamagicalpha_modadd(VJFrame *frame, VJFrame *frame2, int op_a) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; diff --git a/veejay-current/veejay-server/libvje/effects/chromapalette.c b/veejay-current/veejay-server/libvje/effects/chromapalette.c index 98ac9103..5134a36d 100644 --- a/veejay-current/veejay-server/libvje/effects/chromapalette.c +++ b/veejay-current/veejay-server/libvje/effects/chromapalette.c @@ -82,7 +82,7 @@ static inline int _chroma_key( uint8_t fg_cb, uint8_t fg_cr, uint8_t cb, uint8_t void chromapalette_apply(VJFrame *frame, int angle, int r, int g, int b, int color_cb, int color_cr ) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; diff --git a/veejay-current/veejay-server/libvje/effects/chromascratcher.c b/veejay-current/veejay-server/libvje/effects/chromascratcher.c index b5c1baf2..46745599 100644 --- a/veejay-current/veejay-server/libvje/effects/chromascratcher.c +++ b/veejay-current/veejay-server/libvje/effects/chromascratcher.c @@ -140,7 +140,7 @@ void chromascratcher_apply(VJFrame *frame, int mode, int opacity, int n, unsigned int i; const unsigned int width = frame->width; const unsigned int height = frame->height; - const unsigned int len = frame->len; + const int len = frame->len; const unsigned int op_a = (opacity > 255) ? 255 : opacity; const unsigned int op_b = 255 - op_a; const int offset = len * cnframe; diff --git a/veejay-current/veejay-server/libvje/effects/colflash.c b/veejay-current/veejay-server/libvje/effects/colflash.c index 12234c17..bcb54fee 100644 --- a/veejay-current/veejay-server/libvje/effects/colflash.c +++ b/veejay-current/veejay-server/libvje/effects/colflash.c @@ -61,8 +61,8 @@ static int color_delay_ = 0; static int delay_ = 0; void colflash_apply( VJFrame *frame, int f,int r, int g, int b, int d) { - const unsigned int len = frame->len; - const unsigned int uv_len = (frame->ssm ? frame->len : frame->uv_len); + const int len = frame->len; + const int uv_len = (frame->ssm ? len : frame->uv_len); uint8_t *Y = frame->data[0]; uint8_t *Cb= frame->data[1]; diff --git a/veejay-current/veejay-server/libvje/effects/colmorphology.c b/veejay-current/veejay-server/libvje/effects/colmorphology.c index baf1a91e..3789ea11 100644 --- a/veejay-current/veejay-server/libvje/effects/colmorphology.c +++ b/veejay-current/veejay-server/libvje/effects/colmorphology.c @@ -95,7 +95,7 @@ void colmorphology_apply( VJFrame *frame, int threshold, int type, int passes ) { unsigned int i,x,y; const unsigned int width = frame->width; - unsigned int len = frame->len; + int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t kernels[8][9] ={ { 1,1,1, 1,1,1 ,1,1,1 },//0 diff --git a/veejay-current/veejay-server/libvje/effects/colormap.c b/veejay-current/veejay-server/libvje/effects/colormap.c index b6e484d6..b89a320f 100644 --- a/veejay-current/veejay-server/libvje/effects/colormap.c +++ b/veejay-current/veejay-server/libvje/effects/colormap.c @@ -53,7 +53,7 @@ vj_effect *colormap_init(int w, int h) void colormap_apply( VJFrame *frame, int r, int g, int b) { unsigned int i; - const unsigned int uv_len = (frame->ssm ? frame->len : frame->uv_len ); + const int uv_len = (frame->ssm ? frame->len : frame->uv_len ); uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; diff --git a/veejay-current/veejay-server/libvje/effects/colorshift.c b/veejay-current/veejay-server/libvje/effects/colorshift.c index e0cef921..bb59886f 100644 --- a/veejay-current/veejay-server/libvje/effects/colorshift.c +++ b/veejay-current/veejay-server/libvje/effects/colorshift.c @@ -58,7 +58,7 @@ vj_effect *colorshift_init(int w, int h) /* bitwise and test */ static void softmask2_apply(VJFrame *frame, int paramt) { - const unsigned int len = frame->len; + const int len = frame->len; unsigned int x; uint8_t *Y = frame->data[0]; for (x = 0; x < len; x++) @@ -67,7 +67,7 @@ static void softmask2_apply(VJFrame *frame, int paramt) static void softmask2_applycb(VJFrame *frame, int paramt) { - const unsigned int len = (frame->ssm ? frame->len : frame->uv_len); + const int len = (frame->ssm ? frame->len : frame->uv_len); uint8_t *Cb = frame->data[1]; unsigned int x; for (x = 0; x < len; x++) @@ -77,7 +77,7 @@ static void softmask2_applycb(VJFrame *frame, int paramt) static void softmask2_applycr(VJFrame *frame, int paramt) { uint8_t *Cr = frame->data[2]; - const unsigned int len = (frame->ssm ? frame->len : frame->uv_len); + const int len = (frame->ssm ? frame->len : frame->uv_len); unsigned int x; for (x = 0; x < len; x++) Cr[x] &= paramt; @@ -85,7 +85,7 @@ static void softmask2_applycr(VJFrame *frame, int paramt) static void softmask2_applycbcr(VJFrame *frame, int paramt) { - const unsigned int len = (frame->ssm ? frame->len : frame->uv_len); + const int len = (frame->ssm ? frame->len : frame->uv_len); unsigned int x; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -97,8 +97,8 @@ static void softmask2_applycbcr(VJFrame *frame, int paramt) static void softmask2_applyycbcr(VJFrame *frame, int paramt) { - const unsigned int len = frame->len; - const unsigned int uv_len = (frame->ssm ? len : frame->uv_len); + const int len = frame->len; + const int uv_len = (frame->ssm ? len : frame->uv_len); uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; @@ -117,7 +117,7 @@ static void softmask2_applyycbcr(VJFrame *frame, int paramt) static void softmask_apply(VJFrame *frame, int paramt) { - const unsigned int len = frame->len; + const int len = frame->len; unsigned int x; uint8_t *Y = frame->data[0]; @@ -129,7 +129,7 @@ static void softmask_apply(VJFrame *frame, int paramt) static void softmask_applycb(VJFrame *frame, int paramt) { - const unsigned int len = (frame->ssm ? frame->len : frame->uv_len); + const int len = (frame->ssm ? frame->len : frame->uv_len); uint8_t *Cb = frame->data[1]; unsigned int x; @@ -140,7 +140,7 @@ static void softmask_applycb(VJFrame *frame, int paramt) static void softmask_applycr(VJFrame *frame, int paramt) { - const unsigned int len = (frame->ssm ? frame->len : frame->uv_len); + const int len = (frame->ssm ? frame->len : frame->uv_len); uint8_t *Cr = frame->data[2]; unsigned int x; @@ -151,7 +151,7 @@ static void softmask_applycr(VJFrame *frame, int paramt) static void softmask_applycbcr(VJFrame *frame, int paramt) { - const unsigned int len = (frame->ssm ? frame->len : frame->uv_len); + const int len = (frame->ssm ? frame->len : frame->uv_len); unsigned int x; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; @@ -165,11 +165,11 @@ static void softmask_applycbcr(VJFrame *frame, int paramt) static void softmask_applyycbcr(VJFrame *frame, int paramt) { - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; - const unsigned int uv_len = (frame->ssm ? len : frame->uv_len); + const int uv_len = (frame->ssm ? len : frame->uv_len); unsigned int x; for (x = 0; x < len; x++) diff --git a/veejay-current/veejay-server/libvje/effects/complexsync.c b/veejay-current/veejay-server/libvje/effects/complexsync.c index e7e3887b..f6a5a466 100644 --- a/veejay-current/veejay-server/libvje/effects/complexsync.c +++ b/veejay-current/veejay-server/libvje/effects/complexsync.c @@ -69,7 +69,7 @@ void complexsync_free() { void complexsync_apply(VJFrame *frame, VJFrame *frame2, int val) { - const unsigned int len = frame->len; + const int len = frame->len; const unsigned int width = frame->width; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; diff --git a/veejay-current/veejay-server/libvje/effects/complexthreshold.c b/veejay-current/veejay-server/libvje/effects/complexthreshold.c index 781fde19..a21325c1 100644 --- a/veejay-current/veejay-server/libvje/effects/complexthreshold.c +++ b/veejay-current/veejay-server/libvje/effects/complexthreshold.c @@ -105,7 +105,7 @@ void complexthreshold_apply(VJFrame *frame, VJFrame *frame2, int i_angle, unsigned int pos; int matrix[5]; int val, tmp1; - const unsigned int len = frame->len; + const int len = frame->len; const unsigned int width = frame->width; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; diff --git a/veejay-current/veejay-server/libvje/effects/constantblend.c b/veejay-current/veejay-server/libvje/effects/constantblend.c index e8759181..e4b3c25c 100644 --- a/veejay-current/veejay-server/libvje/effects/constantblend.c +++ b/veejay-current/veejay-server/libvje/effects/constantblend.c @@ -69,7 +69,7 @@ vj_effect *constantblend_init(int w, int h) void constantblend_apply( VJFrame *frame, int type, int scale, int valY ) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; const uint8_t y = (uint8_t) valY; const float s = ((float) scale / 100.0 ); diff --git a/veejay-current/veejay-server/libvje/effects/contourextract.c b/veejay-current/veejay-server/libvje/effects/contourextract.c index bf772e86..4f5e35d5 100644 --- a/veejay-current/veejay-server/libvje/effects/contourextract.c +++ b/veejay-current/veejay-server/libvje/effects/contourextract.c @@ -207,7 +207,7 @@ void contourextract_apply(void *ed, VJFrame *frame, int threshold, int reverse, unsigned int i; const unsigned int width = frame->width; const unsigned int height = frame->height; - const unsigned int len = frame->len; + const int len = frame->len; const int uv_len = frame->uv_len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; diff --git a/veejay-current/veejay-server/libvje/effects/contrast.c b/veejay-current/veejay-server/libvje/effects/contrast.c index f7c82704..a96bb61c 100644 --- a/veejay-current/veejay-server/libvje/effects/contrast.c +++ b/veejay-current/veejay-server/libvje/effects/contrast.c @@ -59,7 +59,7 @@ static void contrast_cb_apply(VJFrame *frame, int *s) { unsigned int r; register int cb; register int cr; - const unsigned int uv_len = (frame->ssm ? frame->len: frame->uv_len); + const int uv_len = (frame->ssm ? frame->len: frame->uv_len); uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; diff --git a/veejay-current/veejay-server/libvje/effects/crosspixel.c b/veejay-current/veejay-server/libvje/effects/crosspixel.c index 53a12bcd..d3b277dc 100644 --- a/veejay-current/veejay-server/libvje/effects/crosspixel.c +++ b/veejay-current/veejay-server/libvje/effects/crosspixel.c @@ -78,7 +78,7 @@ void crosspixel_apply(VJFrame *frame, int t,int v) { const unsigned int width = frame->width; const unsigned int height = frame->height; - const unsigned int len = frame->len; + const int len = frame->len; const int uv_len = frame->uv_len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; diff --git a/veejay-current/veejay-server/libvje/effects/cutstop.c b/veejay-current/veejay-server/libvje/effects/cutstop.c index 4a83267f..bc5fa377 100644 --- a/veejay-current/veejay-server/libvje/effects/cutstop.c +++ b/veejay-current/veejay-server/libvje/effects/cutstop.c @@ -89,7 +89,7 @@ void cutstop_free() { void cutstop_apply( VJFrame *frame, int threshold, int freq, int cutmode, int holdmode) { int i=0; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Yb = vvcutstop_buffer[0]; uint8_t *Ub = vvcutstop_buffer[1]; diff --git a/veejay-current/veejay-server/libvje/effects/diffmap.c b/veejay-current/veejay-server/libvje/effects/diffmap.c index 5ed89534..4d333111 100644 --- a/veejay-current/veejay-server/libvje/effects/diffmap.c +++ b/veejay-current/veejay-server/libvje/effects/diffmap.c @@ -80,7 +80,7 @@ void differencemap_apply( VJFrame *frame, VJFrame *frame2, int threshold, int re unsigned int x,y; const unsigned int width = frame->width; const unsigned int height = frame->height; - unsigned int len = frame->len; + int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; diff --git a/veejay-current/veejay-server/libvje/effects/dissolve.c b/veejay-current/veejay-server/libvje/effects/dissolve.c index 1bd00505..1cb2b78d 100644 --- a/veejay-current/veejay-server/libvje/effects/dissolve.c +++ b/veejay-current/veejay-server/libvje/effects/dissolve.c @@ -46,7 +46,7 @@ vj_effect *dissolve_init(int w, int h) void dissolve_apply(VJFrame *frame, VJFrame *frame2, int opacity) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; const int op1 = (opacity > 255) ? 255 : opacity; const int op0 = 255 - op1; diff --git a/veejay-current/veejay-server/libvje/effects/distort.c b/veejay-current/veejay-server/libvje/effects/distort.c index 5634fa86..3b2f5a0f 100644 --- a/veejay-current/veejay-server/libvje/effects/distort.c +++ b/veejay-current/veejay-server/libvje/effects/distort.c @@ -150,7 +150,7 @@ void distortion_apply(VJFrame *frame, int inc_val1, int inc_val2, int inc_val3, const unsigned int height = frame->height; const unsigned int width = frame->width; - const unsigned int len = frame->len; + const int len = frame->len; int strides[4] = { len,len,len, 0 }; diff --git a/veejay-current/veejay-server/libvje/effects/dummy.c b/veejay-current/veejay-server/libvje/effects/dummy.c index 77638265..1c05e4d4 100644 --- a/veejay-current/veejay-server/libvje/effects/dummy.c +++ b/veejay-current/veejay-server/libvje/effects/dummy.c @@ -63,7 +63,7 @@ void dummy_apply( VJFrame *frame, int color) void dummy_rgb_apply( VJFrame *frame, int r,int g, int b) { - const unsigned int len = frame->len; + const int len = frame->len; const int uv_len = frame->uv_len; int colorCb=128, colorCr=128, colorY=0; diff --git a/veejay-current/veejay-server/libvje/effects/emboss.c b/veejay-current/veejay-server/libvje/effects/emboss.c index af593f35..7670e5a9 100644 --- a/veejay-current/veejay-server/libvje/effects/emboss.c +++ b/veejay-current/veejay-server/libvje/effects/emboss.c @@ -104,7 +104,7 @@ static void xtreme_emboss_framedata(VJFrame *frame, int width, int height) static void another_try_edge(VJFrame *frame, int w, int h) { uint8_t p; - const unsigned int len=frame->len-w; + const int len=frame->len-w; unsigned int r,c; uint8_t *Y = frame->data[0]; for(r=w; r < len; r+= w) @@ -129,7 +129,7 @@ static void another_try_edge(VJFrame *frame, int w, int h) static void lines_white_balance_framedata(VJFrame *frame, int width, int height) { unsigned int r, c; - const unsigned int len = frame->len - width; + const int len = frame->len - width; uint8_t val; uint8_t *Y = frame->data[0]; for (r = width; r < len; r += width) @@ -175,7 +175,8 @@ static void gray_emboss_framedata(VJFrame *frame, int width, int height) int r, c; uint8_t val; uint8_t *Y = frame->data[0]; - for (r = 0; r < frame->len; r += width) + const int len = frame->len; + for (r = 0; r < len; r += width) { for (c = 0; c < width; c++) { @@ -231,7 +232,8 @@ static void dark_emboss_framedata(VJFrame *frame, int width, int height) { int r, c; uint8_t *Y = frame->data[0]; - for (r = 0; r < frame->len; r += width) + const int len = frame->len; + for (r = 0; r < len; r += width) { for (c = 0; c < width; c++) { @@ -257,7 +259,8 @@ static void grayish_mood_framedata(VJFrame *frame, int width, int height) { int r, c; uint8_t *Y = frame->data[0]; - for (r = 0; r < frame->len; r += width) + const int len = frame->len; + for (r = 0; r < len; r += width) { for (c = 0; c < width; c++) { diff --git a/veejay-current/veejay-server/libvje/effects/enhancemask.c b/veejay-current/veejay-server/libvje/effects/enhancemask.c index 64c109f5..21b57a66 100644 --- a/veejay-current/veejay-server/libvje/effects/enhancemask.c +++ b/veejay-current/veejay-server/libvje/effects/enhancemask.c @@ -51,8 +51,8 @@ void enhancemask_apply(VJFrame *frame, int *s ) //int s[9]= { 1, 0, -1, 2, 0, -2, 1 , 0 , -1}; unsigned int r; const unsigned int width = frame->width; - const unsigned int len = frame->len; - const unsigned int len2 = len-width-1; + const int len = frame->len; + const int len2 = len-width-1; uint8_t *Y = frame->data[0]; /* int sum=0; diff --git a/veejay-current/veejay-server/libvje/effects/feathermask.c b/veejay-current/veejay-server/libvje/effects/feathermask.c index 9bf431ae..55041101 100644 --- a/veejay-current/veejay-server/libvje/effects/feathermask.c +++ b/veejay-current/veejay-server/libvje/effects/feathermask.c @@ -54,7 +54,7 @@ void feathermask_free() static void feathermask1_apply( VJFrame *frame, uint8_t *alpha, unsigned int width, unsigned int height) { int r, c; - const unsigned int len = frame->len - width; + const int len = frame->len - width; uint8_t *aA = frame->data[3]; for(r=width; r < len; r+=width) { diff --git a/veejay-current/veejay-server/libvje/effects/fisheye.c b/veejay-current/veejay-server/libvje/effects/fisheye.c index 8ef7608b..91d374b8 100644 --- a/veejay-current/veejay-server/libvje/effects/fisheye.c +++ b/veejay-current/veejay-server/libvje/effects/fisheye.c @@ -121,7 +121,7 @@ void fisheye_apply(VJFrame *frame, int v, int alpha ) double (*pf)(double a, double b, double c); const unsigned int width = frame->width; const unsigned int height = frame->height; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; diff --git a/veejay-current/veejay-server/libvje/effects/flare.c b/veejay-current/veejay-server/libvje/effects/flare.c index 5b4b71a9..e357e17b 100644 --- a/veejay-current/veejay-server/libvje/effects/flare.c +++ b/veejay-current/veejay-server/libvje/effects/flare.c @@ -265,7 +265,7 @@ void flare_apply(VJFrame *frame, int type, int op_a, int radius) int plane = 0; const unsigned int width = frame->width; const unsigned int height = frame->height; - const unsigned int len = frame->len; + const int len = frame->len; /* clone frame */ VJFrame frame2; diff --git a/veejay-current/veejay-server/libvje/effects/gamma.c b/veejay-current/veejay-server/libvje/effects/gamma.c index 4213fae4..9d836873 100644 --- a/veejay-current/veejay-server/libvje/effects/gamma.c +++ b/veejay-current/veejay-server/libvje/effects/gamma.c @@ -61,7 +61,7 @@ static void gamma_setup(int width, int height, void gamma_apply(VJFrame *frame, int gamma_value) { unsigned int i; - const unsigned len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; if (gamma_value != gamma_flag) { diff --git a/veejay-current/veejay-server/libvje/effects/gaussblur.c b/veejay-current/veejay-server/libvje/effects/gaussblur.c index cffc139b..e218a61b 100644 --- a/veejay-current/veejay-server/libvje/effects/gaussblur.c +++ b/veejay-current/veejay-server/libvje/effects/gaussblur.c @@ -162,7 +162,7 @@ void gaussblur_apply(VJFrame *frame, int radius, int strength, int quality ) uint8_t *A = frame->data[3]; const unsigned int width = frame->width; const unsigned int height = frame->height; - const unsigned int len = frame->len; + const int len = frame->len; if( last_radius != radius || last_strength != strength || last_quality != quality ) { diff --git a/veejay-current/veejay-server/libvje/effects/ghost.c b/veejay-current/veejay-server/libvje/effects/ghost.c index 4380da5b..58bb551e 100644 --- a/veejay-current/veejay-server/libvje/effects/ghost.c +++ b/veejay-current/veejay-server/libvje/effects/ghost.c @@ -79,7 +79,7 @@ void ghost_apply(VJFrame *frame, int opacity) register int q,z=0; int x,y,i; const unsigned int width = frame->width; - const unsigned int len = frame->len; + const int len = frame->len; const unsigned int op_a = opacity; const unsigned int op_b = 255 - op_a; uint8_t *srcY = frame->data[0]; diff --git a/veejay-current/veejay-server/libvje/effects/greyselect.c b/veejay-current/veejay-server/libvje/effects/greyselect.c index e7b439b2..3764fde2 100644 --- a/veejay-current/veejay-server/libvje/effects/greyselect.c +++ b/veejay-current/veejay-server/libvje/effects/greyselect.c @@ -63,7 +63,7 @@ vj_effect *greyselect_init(int w, int h) void greyselect_apply( VJFrame *frame, int i_angle, int r, int g, int b, int swap) { - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *fg_cb, *fg_cr; int accept_angle_tg; int cb, cr; diff --git a/veejay-current/veejay-server/libvje/effects/iris.c b/veejay-current/veejay-server/libvje/effects/iris.c index c0dd096b..e4d3e8a2 100644 --- a/veejay-current/veejay-server/libvje/effects/iris.c +++ b/veejay-current/veejay-server/libvje/effects/iris.c @@ -56,7 +56,7 @@ void iris_apply( VJFrame *frame, VJFrame *frame2, int val, int shape) int i,j,k=0; const unsigned int width = frame->width; const unsigned int height = frame->height; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y0 = frame->data[0]; uint8_t *Cb0 = frame->data[1]; diff --git a/veejay-current/veejay-server/libvje/effects/isolate.c b/veejay-current/veejay-server/libvje/effects/isolate.c index e5012e67..81b0b51f 100644 --- a/veejay-current/veejay-server/libvje/effects/isolate.c +++ b/veejay-current/veejay-server/libvje/effects/isolate.c @@ -63,7 +63,7 @@ vj_effect *isolate_init(int w, int h) void isolate_apply( VJFrame *frame, int i_angle, int r, int g, int b, int opacity) { - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *fg_cb, *fg_cr; int accept_angle_tg; int cb, cr; diff --git a/veejay-current/veejay-server/libvje/effects/levelcorrection.c b/veejay-current/veejay-server/libvje/effects/levelcorrection.c index 77188353..46e0cda5 100644 --- a/veejay-current/veejay-server/libvje/effects/levelcorrection.c +++ b/veejay-current/veejay-server/libvje/effects/levelcorrection.c @@ -64,7 +64,7 @@ void levelcorrection_apply(VJFrame *frame, int min, int max, int bmin,int bmax) { unsigned int pos; uint8_t *A = frame->data[3]; - const unsigned int len = frame->len; + const int len = frame->len; /* level correction tables */ uint8_t __lookup_table[256]; diff --git a/veejay-current/veejay-server/libvje/effects/lumablend.c b/veejay-current/veejay-server/libvje/effects/lumablend.c index 779d6822..350de770 100644 --- a/veejay-current/veejay-server/libvje/effects/lumablend.c +++ b/veejay-current/veejay-server/libvje/effects/lumablend.c @@ -65,7 +65,7 @@ static void opacity_by_threshold(VJFrame *frame, VJFrame *frame2, int threshold, int threshold2, int opacity) { const unsigned int width = frame->width; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t **yuv1 = frame->data; uint8_t **yuv2 = frame2->data; unsigned int x, y; @@ -93,7 +93,7 @@ static void opacity_by_threshold_(VJFrame *frame, VJFrame *frame2, int threshold, int threshold2, int opacity) { const unsigned int width = frame->width; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t **yuv1 = frame->data; uint8_t **yuv2 = frame2->data; unsigned int x, y; @@ -119,7 +119,7 @@ static void opacity_by_threshold_blur(VJFrame *frame, VJFrame *frame2, int threshold, int threshold2, int opacity) { const unsigned int width = frame->width; - const unsigned int len = frame->len - width; + const int len = frame->len - width; uint8_t **yuv1 = frame->data; uint8_t **yuv2 = frame2->data; unsigned int x, y; diff --git a/veejay-current/veejay-server/libvje/effects/lumakeyalpha.c b/veejay-current/veejay-server/libvje/effects/lumakeyalpha.c index 3e87640c..cf2ff35a 100644 --- a/veejay-current/veejay-server/libvje/effects/lumakeyalpha.c +++ b/veejay-current/veejay-server/libvje/effects/lumakeyalpha.c @@ -56,7 +56,7 @@ vj_effect *lumakeyalpha_init(int width, int height) void lumakeyalpha_apply( VJFrame *frame, VJFrame *frame2, int type, int opacity ) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; unsigned int op1 = (opacity > 255) ? 255 : opacity; unsigned int op0 = 255 - op1; diff --git a/veejay-current/veejay-server/libvje/effects/lumamagick.c b/veejay-current/veejay-server/libvje/effects/lumamagick.c index 99db30dd..20aa7fa4 100644 --- a/veejay-current/veejay-server/libvje/effects/lumamagick.c +++ b/veejay-current/veejay-server/libvje/effects/lumamagick.c @@ -74,8 +74,8 @@ vj_effect *lumamagick_init(int width, int height) static void lumamagick_adddistorted(VJFrame *frame, VJFrame *frame2, int op_a, int op_b) { unsigned int i; - const unsigned int len = frame->len; - const unsigned int uv_len = (frame->ssm ? frame->len : frame->uv_len); + const int len = frame->len; + const int uv_len = (frame->ssm ? len : frame->uv_len); uint8_t *Y = frame->data[0]; uint8_t *Cb= frame->data[1]; uint8_t *Cr= frame->data[2]; @@ -114,8 +114,8 @@ static void lumamagick_add_distorted(VJFrame *frame, VJFrame *frame2, int op_a, uint8_t y1, y2, y3, cb, cr, cs; const double opacity_a = op_a * 0.01; const double opacity_b = op_b * 0.01; - const unsigned int len = frame->len; - const unsigned int uv_len = (frame->ssm ? frame->len : frame->uv_len); + const int len = frame->len; + const int uv_len = (frame->ssm ? len : frame->uv_len); uint8_t *Y = frame->data[0]; uint8_t *Cb= frame->data[1]; uint8_t *Cr= frame->data[2]; @@ -155,8 +155,8 @@ static void lumamagick_subdistorted(VJFrame *frame, VJFrame *frame2, int op_a, i uint8_t y1, y2, cb, cr; const double opacity_a = op_a * 0.01; const double opacity_b = op_b * 0.01; - const unsigned int len = frame->len; - const unsigned int uv_len = (frame->ssm ? frame->len : frame->uv_len); + const int len = frame->len; + const int uv_len = (frame->ssm ? len : frame->uv_len); uint8_t *Y = frame->data[0]; uint8_t *Cb= frame->data[1]; uint8_t *Cr= frame->data[2]; @@ -190,8 +190,8 @@ static void lumamagick_sub_distorted(VJFrame *frame, VJFrame *frame2, int op_a, const double opacity_a = op_a * 0.01; const double opacity_b = op_b * 0.01; uint8_t y1, y2, cb, cr, y3, cs; - const unsigned int len = frame->len; - const unsigned int uv_len = (frame->ssm ? frame->len : frame->uv_len); + const int len = frame->len; + const int uv_len = (frame->ssm ? len : frame->uv_len); uint8_t *Y = frame->data[0]; uint8_t *Cb= frame->data[1]; uint8_t *Cr= frame->data[2]; @@ -231,7 +231,7 @@ static void lumamagick_multiply(VJFrame *frame, VJFrame *frame2, int op_a, int o uint8_t y1, y2; const double opacity_a = op_a * 0.01; const double opacity_b = op_b * 0.01; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -247,7 +247,7 @@ static void lumamagick_multiply(VJFrame *frame, VJFrame *frame2, int op_a, int o static void lumamagick_divide(VJFrame *frame, VJFrame *frame2 , int op_a, int op_b) { unsigned int i; - const unsigned int len = frame->width * frame->height; + const int len = frame->len; int b, c; const double opacity_a = op_a * 0.01; const double opacity_b = op_b * 0.01; @@ -290,7 +290,7 @@ static void lumamagick_additive(VJFrame *frame, VJFrame *frame2, int op_a, int o int a=0; const double opacity_a = op_a * 0.01; const double opacity_b = op_b * 0.01; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -307,7 +307,7 @@ static void lumamagick_substractive(VJFrame *frame, VJFrame *frame2, int op_a, i int a; const double opacity_a = op_a * 0.01; const double opacity_b = op_b * 0.01; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -324,7 +324,7 @@ static void lumamagick_softburn(VJFrame *frame, VJFrame *frame2, int op_a, int o int a, b, c; const double opacity_a = op_a * 0.01; const double opacity_b = op_b * 0.01; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -355,7 +355,7 @@ static void lumamagick_inverseburn(VJFrame *frame, VJFrame *frame2, int op_a, in int a, b, c; const double opacity_a = op_a * 0.01; const double opacity_b = op_b * 0.01; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -377,7 +377,7 @@ static void lumamagick_colordodge(VJFrame *frame, VJFrame *frame2, int op_a, int int a, b, c,d; const double opacity_a = op_a * 0.01; const double opacity_b = op_b * 0.01; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -404,7 +404,7 @@ static void lumamagick_mulsub(VJFrame *frame, VJFrame *frame2 , int op_a, int op int a, b, c; const double opacity_a = op_a * 0.01; const double opacity_b = op_b * 0.01; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -425,7 +425,7 @@ static void lumamagick_lighten(VJFrame *frame, VJFrame *frame2, int op_a, int op int a, b, c; const double opacity_a = op_a * 0.01; const double opacity_b = op_b * 0.01; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -447,7 +447,7 @@ static void lumamagick_difference(VJFrame *frame, VJFrame *frame2, int op_a, int int a, b; const double opacity_a = op_a * 0.01; const double opacity_b = op_b * 0.01; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -465,7 +465,7 @@ static void lumamagick_diffnegate(VJFrame *frame, VJFrame *frame2, int op_a, int int a, b; const double opacity_a = op_a * 0.01; const double opacity_b = op_b * 0.01; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -483,7 +483,7 @@ static void lumamagick_exclusive(VJFrame *frame, VJFrame *frame2, int op_a, int int a, b, c; const double opacity_a = op_a * 0.01; const double opacity_b = op_b * 0.01; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -504,7 +504,7 @@ static void lumamagick_basecolor(VJFrame *frame, VJFrame *frame2, int op_a, int int a, b, c, d; const double opacity_a = op_a * 0.01; const double opacity_b = op_b * 0.01; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -524,7 +524,7 @@ static void lumamagick_freeze(VJFrame *frame, VJFrame *frame2 , int op_a, int op int a, b, c; const double opacity_a = op_a * 0.01; const double opacity_b = op_b * 0.01; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -548,7 +548,7 @@ static void lumamagick_unfreeze(VJFrame *frame, VJFrame *frame2, int op_a, int o int a, b, c; const double opacity_a = op_a * 0.01; const double opacity_b = op_b * 0.01; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -569,7 +569,7 @@ static void lumamagick_unfreeze(VJFrame *frame, VJFrame *frame2, int op_a, int o static void lumamagick_hardlight(VJFrame *frame, VJFrame *frame2, int op_a, int op_b) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -593,7 +593,7 @@ static void lumamagick_hardlight(VJFrame *frame, VJFrame *frame2, int op_a, int static void lumamagick_relativeaddlum(VJFrame *frame, VJFrame *frame2, int op_a, int op_b) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; int a, b, c, d; @@ -616,7 +616,7 @@ static void lumamagick_relativesublum(VJFrame *frame, VJFrame *frame2, int op_a, int a, b; const double opacity_a = op_a * 0.01; const double opacity_b = op_b * 0.01; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -634,8 +634,8 @@ static void lumamagick_relativeadd(VJFrame *frame, VJFrame *frame2, int op_a, in int a, b, c, d; const double opacity_a = op_a * 0.01; const double opacity_b = op_b * 0.01; - const unsigned int len = frame->len; - const unsigned int uv_len = (frame->ssm ? frame->len : frame->uv_len); + const int len = frame->len; + const int uv_len = (frame->ssm ? len : frame->uv_len); uint8_t *Y = frame->data[0]; uint8_t *Cb= frame->data[1]; @@ -674,8 +674,8 @@ static void lumamagick_relativesub(VJFrame *frame, VJFrame *frame2, int op_a, in int a, b; const double opacity_a = op_a * 0.01; const double opacity_b = op_b * 0.01; - const unsigned int len = frame->len; - const unsigned int uv_len = (frame->ssm ? frame->len : frame->uv_len); + const int len = frame->len; + const int uv_len = (frame->ssm ? len : frame->uv_len); uint8_t *Y = frame->data[0]; uint8_t *Cb= frame->data[1]; uint8_t *Cr= frame->data[2]; @@ -706,7 +706,7 @@ static void lumamagick_minsubselect(VJFrame *frame, VJFrame *frame2, int op_a, i int a, b; const double opacity_a = op_a * 0.01; const double opacity_b = op_b * 0.01; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -727,7 +727,7 @@ static void lumamagick_maxsubselect(VJFrame *frame, VJFrame *frame2, int op_a, i int a, b; const double opacity_a = op_a * 0.01; const double opacity_b = op_b * 0.01; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -748,7 +748,7 @@ static void lumamagick_addsubselect(VJFrame *frame, VJFrame *frame2, int op_a, i int c, a, b; const double opacity_a = op_a * 0.01; const double opacity_b = op_b * 0.01; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -771,7 +771,7 @@ static void lumamagick_maxselect(VJFrame *frame, VJFrame *frame2, int op_a, int int a, b; const double opacity_a = op_a * 0.01; const double opacity_b = op_b * 0.01; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -790,7 +790,7 @@ static void lumamagick_minselect(VJFrame *frame, VJFrame *frame2, int op_a, int int a, b; const double opacity_a = op_a * 0.01; const double opacity_b = op_b * 0.01; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -809,7 +809,7 @@ static void lumamagick_addtest(VJFrame *frame, VJFrame *frame2, int op_a, int op int c, a, b; const double opacity_a = op_a * 0.01; const double opacity_b = op_b * 0.01; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -828,8 +828,8 @@ static void lumamagick_addtest2(VJFrame *frame, VJFrame *frame2, int op_a, int o int c, a, b; const double opacity_a = op_a * 0.01; const double opacity_b = op_b * 0.01; - const unsigned int len = frame->len; - const unsigned int uv_len = (frame->ssm ? frame->len : frame->uv_len); + const int len = frame->len; + const int uv_len = (frame->ssm ? len : frame->uv_len); uint8_t *Y = frame->data[0]; uint8_t *Cb= frame->data[1]; uint8_t *Cr= frame->data[2]; @@ -864,7 +864,7 @@ static void lumamagick_addtest4(VJFrame *frame, VJFrame *frame2, int op_a, int o int c, a, b; double opacity_a = op_a * 0.01; double opacity_b = op_b * 0.01; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -888,8 +888,8 @@ void lumamagick_selectmin(VJFrame *frame, VJFrame *frame2, int op_a, int op_b) int a, b; const double opacity_a = op_a * 0.01; const double opacity_b = op_b * 0.01; - const unsigned int len = frame->len; - const unsigned int uv_len = frame->uv_len; + const int len = frame->len; + const int uv_len = frame->uv_len; uint8_t *Y = frame->data[0]; uint8_t *Cb= frame->data[1]; uint8_t *Cr= frame->data[2]; @@ -926,8 +926,8 @@ static void lumamagick_addtest3(VJFrame *frame, VJFrame *frame2, int op_a, int o int c, a, b; const double opacity_a = op_a * 0.01; const double opacity_b = op_b * 0.01; - const unsigned int len = frame->len; - const unsigned int uv_len = (frame->ssm ? frame->len : frame->uv_len); + const int len = frame->len; + const int uv_len = (frame->ssm ? len : frame->uv_len); uint8_t *Y = frame->data[0]; uint8_t *Cb= frame->data[1]; uint8_t *Cr= frame->data[2]; @@ -981,7 +981,7 @@ static void lumamagick_addlum(VJFrame *frame, VJFrame *frame2, int op_a, int op_ int c, a, b; const double opacity_a = op_a * 0.01; const double opacity_b = op_b * 0.01; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; diff --git a/veejay-current/veejay-server/libvje/effects/lumamask.c b/veejay-current/veejay-server/libvje/effects/lumamask.c index cbe9e12a..22e05083 100644 --- a/veejay-current/veejay-server/libvje/effects/lumamask.c +++ b/veejay-current/veejay-server/libvje/effects/lumamask.c @@ -95,7 +95,7 @@ void lumamask_apply( VJFrame *frame, VJFrame *frame2, int v_scale, int h_scale, int motion = 0; const unsigned int width = frame->width; const unsigned int height = frame->height; - const unsigned int len = frame->len; + const int len = frame->len; if( motionmap_active() ) { diff --git a/veejay-current/veejay-server/libvje/effects/magicalphaoverlays.c b/veejay-current/veejay-server/libvje/effects/magicalphaoverlays.c index 8bd5e045..de936ed5 100644 --- a/veejay-current/veejay-server/libvje/effects/magicalphaoverlays.c +++ b/veejay-current/veejay-server/libvje/effects/magicalphaoverlays.c @@ -64,7 +64,7 @@ vj_effect *overlayalphamagic_init(int w, int h) static void overlayalphamagic_adddistorted(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -83,7 +83,7 @@ static void overlayalphamagic_add_distorted(VJFrame *frame, VJFrame *frame2) { unsigned int i; uint8_t y1, y2; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -98,7 +98,7 @@ static void overlayalphamagic_add_distorted(VJFrame *frame, VJFrame *frame2) static void overlayalphamagic_subdistorted(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -115,7 +115,7 @@ static void overlayalphamagic_subdistorted(VJFrame *frame, VJFrame *frame2) { unsigned int i ; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -130,7 +130,7 @@ static void overlayalphamagic_subdistorted(VJFrame *frame, VJFrame *frame2) static void overlayalphamagic_multiply(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; for (i = 0; i < len; i++) @@ -140,7 +140,7 @@ static void overlayalphamagic_multiply(VJFrame *frame, VJFrame *frame2) static void overlayalphamagic_simpledivide(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; for (i = 0; i < len; i++) { @@ -153,7 +153,7 @@ static void overlayalphamagic_divide(VJFrame *frame, VJFrame *frame2) { unsigned int i; int a, b, c; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; for (i = 0; i < len; i++) { @@ -183,7 +183,7 @@ static void overlayalphamagic_substractive(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -194,7 +194,7 @@ static void overlayalphamagic_substractive(VJFrame *frame, VJFrame *frame2) static void overlayalphamagic_softburn(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -221,7 +221,7 @@ static void overlayalphamagic_softburn(VJFrame *frame, VJFrame *frame2) static void overlayalphamagic_inverseburn(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -240,7 +240,7 @@ static void overlayalphamagic_inverseburn(VJFrame *frame, VJFrame *frame2) static void overlayalphamagic_colordodge(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -262,7 +262,7 @@ static void overlayalphamagic_colordodge(VJFrame *frame, VJFrame *frame2) static void overlayalphamagic_mulsub(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -278,7 +278,7 @@ static void overlayalphamagic_mulsub(VJFrame *frame, VJFrame *frame2) static void overlayalphamagic_lighten(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -297,7 +297,7 @@ static void overlayalphamagic_lighten(VJFrame *frame, VJFrame *frame2) static void overlayalphamagic_difference(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -312,7 +312,7 @@ static void overlayalphamagic_difference(VJFrame *frame, VJFrame *frame2) static void overlayalphamagic_diffnegate(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; int a, b; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -327,7 +327,7 @@ static void overlayalphamagic_diffnegate(VJFrame *frame, VJFrame *frame2) static void overlayalphamagic_exclusive(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -342,7 +342,7 @@ static void overlayalphamagic_basecolor(VJFrame *frame, VJFrame *frame2) { unsigned int i; int a, b, c, d; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -358,7 +358,7 @@ static void overlayalphamagic_basecolor(VJFrame *frame, VJFrame *frame2) static void overlayalphamagic_freeze(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -374,7 +374,7 @@ static void overlayalphamagic_freeze(VJFrame *frame, VJFrame *frame2) static void overlayalphamagic_unfreeze(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -390,7 +390,7 @@ static void overlayalphamagic_unfreeze(VJFrame *frame, VJFrame *frame2) /*static void overlayalphamagic_hardlight(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -411,7 +411,7 @@ static void overlayalphamagic_relativeaddlum(VJFrame *frame, VJFrame *frame2) { unsigned int i; int a, b, c, d; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -427,7 +427,7 @@ static void overlayalphamagic_relativeaddlum(VJFrame *frame, VJFrame *frame2) static void overlayalphamagic_relativesublum(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -442,7 +442,7 @@ static void overlayalphamagic_relativesublum(VJFrame *frame, VJFrame *frame2) static void overlayalphamagic_relativeadd(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -459,7 +459,7 @@ static void overlayalphamagic_relativeadd(VJFrame *frame, VJFrame *frame2) static void overlayalphamagic_relativesub(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -475,7 +475,7 @@ static void overlayalphamagic_relativesub(VJFrame *frame, VJFrame *frame2) static void overlayalphamagic_minsubselect(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -493,7 +493,7 @@ static void overlayalphamagic_minsubselect(VJFrame *frame, VJFrame *frame2) static void overlayalphamagic_maxsubselect(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -511,7 +511,7 @@ static void overlayalphamagic_maxsubselect(VJFrame *frame, VJFrame *frame2) static void overlayalphamagic_addsubselect(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; int c, a, b; @@ -530,7 +530,7 @@ static void overlayalphamagic_addsubselect(VJFrame *frame, VJFrame *frame2) static void overlayalphamagic_maxselect(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -546,7 +546,7 @@ static void overlayalphamagic_maxselect(VJFrame *frame, VJFrame *frame2) static void overlayalphamagic_minselect(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -562,7 +562,7 @@ static void overlayalphamagic_minselect(VJFrame *frame, VJFrame *frame2) static void overlayalphamagic_addtest(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -578,7 +578,7 @@ static void overlayalphamagic_addtest(VJFrame *frame, VJFrame *frame2) static void overlayalphamagic_addtest2(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; @@ -594,7 +594,7 @@ static void overlayalphamagic_addtest2(VJFrame *frame, VJFrame *frame2) static void overlayalphamagic_addtest4(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; int a, b; @@ -612,7 +612,7 @@ static void overlayalphamagic_addtest4(VJFrame *frame, VJFrame *frame2) static void overlayalphamagic_try (VJFrame *frame, VJFrame *frame2, int width, int height) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; int a, b, p, q; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; diff --git a/veejay-current/veejay-server/libvje/effects/magicmirror.c b/veejay-current/veejay-server/libvje/effects/magicmirror.c index ebb5302b..c063508c 100644 --- a/veejay-current/veejay-server/libvje/effects/magicmirror.c +++ b/veejay-current/veejay-server/libvje/effects/magicmirror.c @@ -125,7 +125,7 @@ void magicmirror_apply( VJFrame *frame, int vx, int vy, int d, int n, int alpha { const unsigned int width = frame->width; const unsigned int height = frame->height; - const unsigned int len = frame->len; + const int len = frame->len; double c1 = (double)vx; double c2 = (double)vy; int motion = 0; diff --git a/veejay-current/veejay-server/libvje/effects/magicoverlays.c b/veejay-current/veejay-server/libvje/effects/magicoverlays.c index eec2ca73..64b31e0b 100644 --- a/veejay-current/veejay-server/libvje/effects/magicoverlays.c +++ b/veejay-current/veejay-server/libvje/effects/magicoverlays.c @@ -64,8 +64,8 @@ vj_effect *overlaymagic_init(int w, int h) /* FIXME rename methods in lumamagick and chromamagick */ void overlaymagic_adddistorted(VJFrame *frame, VJFrame *frame2 ) { - unsigned int i; - unsigned int len = frame->width * frame->height; + int i; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -82,9 +82,9 @@ void overlaymagic_adddistorted(VJFrame *frame, VJFrame *frame2 ) void overlaymagic_add_distorted(VJFrame *frame, VJFrame *frame2 ) { - unsigned int i; + int i; uint8_t y1, y2; - unsigned int len = frame->width * frame->height; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -98,8 +98,8 @@ void overlaymagic_add_distorted(VJFrame *frame, VJFrame *frame2 ) void overlaymagic_subdistorted(VJFrame *frame, VJFrame *frame2 ) { - unsigned int i; - unsigned int len = frame->width * frame->height; + int i; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -116,7 +116,7 @@ void overlaymagic_subdistorted(VJFrame *frame, VJFrame *frame2 ) void overlaymagic_sub_distorted(VJFrame *frame, VJFrame *frame2 ) { unsigned int i ; - unsigned int len = frame->width * frame->height; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -131,8 +131,8 @@ void overlaymagic_sub_distorted(VJFrame *frame, VJFrame *frame2 ) void overlaymagic_multiply(VJFrame *frame, VJFrame *frame2 ) { - unsigned int i; - unsigned int len = frame->width * frame->height; + int i; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -142,8 +142,8 @@ void overlaymagic_multiply(VJFrame *frame, VJFrame *frame2 ) void overlaymagic_simpledivide(VJFrame *frame, VJFrame *frame2 ) { - unsigned int i; - unsigned int len = frame->width * frame->height; + int i; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -156,9 +156,9 @@ void overlaymagic_simpledivide(VJFrame *frame, VJFrame *frame2 ) void overlaymagic_divide(VJFrame *frame, VJFrame *frame2 ) { - unsigned int i; + int i; int a, b, c; - unsigned int len = frame->width * frame->height; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -175,7 +175,7 @@ void overlaymagic_divide(VJFrame *frame, VJFrame *frame2 ) void overlaymagic_additive(VJFrame *frame, VJFrame *frame2 ) { - unsigned int len = frame->width * frame->height; + int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -190,8 +190,8 @@ void overlaymagic_additive(VJFrame *frame, VJFrame *frame2 ) void overlaymagic_substractive(VJFrame *frame, VJFrame *frame2 ) { - unsigned int i; - unsigned int len = frame->width * frame->height; + int i; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -201,8 +201,8 @@ void overlaymagic_substractive(VJFrame *frame, VJFrame *frame2 ) void overlaymagic_softburn(VJFrame *frame, VJFrame *frame2 ) { - unsigned int i; - unsigned int len = frame->width * frame->height; + int i; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -232,8 +232,8 @@ void overlaymagic_softburn(VJFrame *frame, VJFrame *frame2 ) void overlaymagic_inverseburn(VJFrame *frame, VJFrame *frame2 ) { - unsigned int i; - unsigned int len = frame->width * frame->height; + int i; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; int a, b, c; @@ -252,8 +252,8 @@ void overlaymagic_inverseburn(VJFrame *frame, VJFrame *frame2 ) void overlaymagic_colordodge(VJFrame *frame, VJFrame *frame2 ) { - unsigned int i; - unsigned int len = frame->width * frame->height; + int i; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -276,8 +276,8 @@ void overlaymagic_colordodge(VJFrame *frame, VJFrame *frame2 ) void overlaymagic_mulsub(VJFrame *frame, VJFrame *frame2 ) { - unsigned int i; - unsigned int len = frame->width * frame->height; + int i; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; int a, b; @@ -293,8 +293,8 @@ void overlaymagic_mulsub(VJFrame *frame, VJFrame *frame2 ) void overlaymagic_lighten(VJFrame *frame, VJFrame *frame2 ) { - unsigned int i; - unsigned int len = frame->width * frame->height; + int i; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; int a, b, c; @@ -313,8 +313,8 @@ void overlaymagic_lighten(VJFrame *frame, VJFrame *frame2 ) void overlaymagic_difference(VJFrame *frame, VJFrame *frame2 ) { - unsigned int i; - unsigned int len = frame->width * frame->height; + int i; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -329,8 +329,8 @@ void overlaymagic_difference(VJFrame *frame, VJFrame *frame2 ) void overlaymagic_diffnegate(VJFrame *frame, VJFrame *frame2 ) { - unsigned int i; - unsigned int len = frame->width * frame->height; + int i; + const int len = frame->len; int a, b; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -345,8 +345,8 @@ void overlaymagic_diffnegate(VJFrame *frame, VJFrame *frame2 ) void overlaymagic_exclusive(VJFrame *frame, VJFrame *frame2 ) { - unsigned int i; - unsigned int len = frame->width * frame->height; + int i; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -360,9 +360,9 @@ void overlaymagic_exclusive(VJFrame *frame, VJFrame *frame2 ) void overlaymagic_basecolor(VJFrame *frame, VJFrame *frame2 ) { - unsigned int i; + int i; int a, b, c, d; - unsigned int len = frame->width * frame->height; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -378,8 +378,8 @@ void overlaymagic_basecolor(VJFrame *frame, VJFrame *frame2 ) void overlaymagic_freeze(VJFrame *frame, VJFrame *frame2 ) { - unsigned int i; - unsigned int len = frame->width * frame->height; + int i; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -395,8 +395,8 @@ void overlaymagic_freeze(VJFrame *frame, VJFrame *frame2 ) void overlaymagic_unfreeze(VJFrame *frame, VJFrame *frame2 ) { - unsigned int i; - unsigned int len = frame->width * frame->height; + int i; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -412,8 +412,8 @@ void overlaymagic_unfreeze(VJFrame *frame, VJFrame *frame2 ) void overlaymagic_hardlight(VJFrame *frame, VJFrame *frame2 ) { - unsigned int i; - unsigned int len = frame->width * frame->height; + int i; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -433,9 +433,9 @@ void overlaymagic_hardlight(VJFrame *frame, VJFrame *frame2 ) void overlaymagic_relativeaddlum(VJFrame *frame, VJFrame *frame2 ) { - unsigned int i; + int i; int a, b, c, d; - unsigned int len = frame->width * frame->height; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -451,8 +451,8 @@ void overlaymagic_relativeaddlum(VJFrame *frame, VJFrame *frame2 ) void overlaymagic_relativesublum(VJFrame *frame, VJFrame *frame2 ) { - unsigned int i; - unsigned int len = frame->width * frame->height; + int i; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -467,8 +467,8 @@ void overlaymagic_relativesublum(VJFrame *frame, VJFrame *frame2 ) void overlaymagic_relativeadd(VJFrame *frame, VJFrame *frame2 ) { - unsigned int i; - unsigned int len = frame->width * frame->height; + int i; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -485,8 +485,8 @@ void overlaymagic_relativeadd(VJFrame *frame, VJFrame *frame2 ) void overlaymagic_relativesub(VJFrame *frame, VJFrame *frame2 ) { - unsigned int i; - unsigned int len = frame->width * frame->height; + int i; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -501,8 +501,8 @@ void overlaymagic_relativesub(VJFrame *frame, VJFrame *frame2 ) void overlaymagic_minsubselect(VJFrame *frame, VJFrame *frame2 ) { - unsigned int i; - unsigned int len = frame->width * frame->height; + int i; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -520,8 +520,8 @@ void overlaymagic_minsubselect(VJFrame *frame, VJFrame *frame2 ) void overlaymagic_maxsubselect(VJFrame *frame, VJFrame *frame2 ) { - unsigned int i; - unsigned int len = frame->width * frame->height; + int i; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -539,8 +539,8 @@ void overlaymagic_maxsubselect(VJFrame *frame, VJFrame *frame2 ) void overlaymagic_addsubselect(VJFrame *frame, VJFrame *frame2 ) { - unsigned int i; - unsigned int len = frame->width * frame->height; + int i; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; int c, a, b; @@ -559,8 +559,8 @@ void overlaymagic_addsubselect(VJFrame *frame, VJFrame *frame2 ) void overlaymagic_maxselect(VJFrame *frame, VJFrame *frame2 ) { - unsigned int i; - unsigned int len = frame->width * frame->height; + int i; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -576,8 +576,8 @@ void overlaymagic_maxselect(VJFrame *frame, VJFrame *frame2 ) void overlaymagic_minselect(VJFrame *frame, VJFrame *frame2 ) { - unsigned int i; - unsigned int len = frame->width * frame->height; + int i; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -593,8 +593,8 @@ void overlaymagic_minselect(VJFrame *frame, VJFrame *frame2 ) void overlaymagic_addtest(VJFrame *frame, VJFrame *frame2 ) { - unsigned int i; - unsigned int len = frame->width * frame->height; + int i; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -610,8 +610,8 @@ void overlaymagic_addtest(VJFrame *frame, VJFrame *frame2 ) void overlaymagic_addtest2(VJFrame *frame, VJFrame *frame2 ) { - unsigned int i; - unsigned int len = frame->width * frame->height; + int i; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -627,8 +627,8 @@ void overlaymagic_addtest2(VJFrame *frame, VJFrame *frame2 ) void overlaymagic_addtest4(VJFrame *frame, VJFrame *frame2 ) { - unsigned int i; - unsigned int len = frame->width * frame->height; + int i; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; int a, b; @@ -647,8 +647,8 @@ void overlaymagic_addtest4(VJFrame *frame, VJFrame *frame2 ) void overlaymagic_try (VJFrame *frame, VJFrame *frame2) { - unsigned int i; - unsigned int len = frame->width * frame->height; + int i; + const int len = frame->len; int a, b, p, q; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; diff --git a/veejay-current/veejay-server/libvje/effects/magicoverlaysalpha.c b/veejay-current/veejay-server/libvje/effects/magicoverlaysalpha.c index ec65ad8d..a91dad7b 100644 --- a/veejay-current/veejay-server/libvje/effects/magicoverlaysalpha.c +++ b/veejay-current/veejay-server/libvje/effects/magicoverlaysalpha.c @@ -63,7 +63,7 @@ vj_effect *overlaymagicalpha_init(int w, int h) static void overlaymagicalpha_adddistorted(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -87,7 +87,7 @@ static void overlaymagicalpha_add_distorted(VJFrame *frame, VJFrame *frame2) unsigned int i; uint8_t y1, y2; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -106,7 +106,7 @@ static void overlaymagicalpha_add_distorted(VJFrame *frame, VJFrame *frame2) static void overlaymagicalpha_subdistorted(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -127,7 +127,7 @@ static void overlaymagicalpha_subdistorted(VJFrame *frame, VJFrame *frame2) { unsigned int i ; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -147,7 +147,7 @@ static void overlaymagicalpha_subdistorted(VJFrame *frame, VJFrame *frame2) static void overlaymagicalpha_multiply(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -163,7 +163,7 @@ static void overlaymagicalpha_multiply(VJFrame *frame, VJFrame *frame2) static void overlaymagicalpha_simpledivide(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -182,7 +182,7 @@ static void overlaymagicalpha_divide(VJFrame *frame, VJFrame *frame2) { unsigned int i; int a, b, c; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -223,7 +223,7 @@ static void overlaymagicalpha_additive(VJFrame *frame, VJFrame *frame2) static void overlaymagicalpha_substractive(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -240,7 +240,7 @@ static void overlaymagicalpha_substractive(VJFrame *frame, VJFrame *frame2) static void overlaymagicalpha_softburn(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -272,7 +272,7 @@ static void overlaymagicalpha_softburn(VJFrame *frame, VJFrame *frame2) static void overlaymagicalpha_inverseburn(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -296,7 +296,7 @@ static void overlaymagicalpha_inverseburn(VJFrame *frame, VJFrame *frame2) static void overlaymagicalpha_colordodge(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -323,7 +323,7 @@ static void overlaymagicalpha_colordodge(VJFrame *frame, VJFrame *frame2) static void overlaymagicalpha_mulsub(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -343,7 +343,7 @@ static void overlaymagicalpha_mulsub(VJFrame *frame, VJFrame *frame2) static void overlaymagicalpha_lighten(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -367,7 +367,7 @@ static void overlaymagicalpha_lighten(VJFrame *frame, VJFrame *frame2) static void overlaymagicalpha_difference(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -387,7 +387,7 @@ static void overlaymagicalpha_difference(VJFrame *frame, VJFrame *frame2) static void overlaymagicalpha_diffnegate(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; int a, b; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; @@ -407,7 +407,7 @@ static void overlaymagicalpha_diffnegate(VJFrame *frame, VJFrame *frame2) static void overlaymagicalpha_exclusive(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -427,7 +427,7 @@ static void overlaymagicalpha_basecolor(VJFrame *frame, VJFrame *frame2) { unsigned int i; int a, b, c, d; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -447,7 +447,7 @@ static void overlaymagicalpha_basecolor(VJFrame *frame, VJFrame *frame2) static void overlaymagicalpha_freeze(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -468,7 +468,7 @@ static void overlaymagicalpha_freeze(VJFrame *frame, VJFrame *frame2) static void overlaymagicalpha_unfreeze(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -490,7 +490,7 @@ static void overlaymagicalpha_unfreeze(VJFrame *frame, VJFrame *frame2) static void overlaymagicalpha_hardlight(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -517,7 +517,7 @@ static void overlaymagicalpha_relativeaddlum(VJFrame *frame, VJFrame *frame2) { unsigned int i; int a, b, c, d; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -538,7 +538,7 @@ static void overlaymagicalpha_relativeaddlum(VJFrame *frame, VJFrame *frame2) static void overlaymagicalpha_relativesublum(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -558,7 +558,7 @@ static void overlaymagicalpha_relativesublum(VJFrame *frame, VJFrame *frame2) static void overlaymagicalpha_relativeadd(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -580,7 +580,7 @@ static void overlaymagicalpha_relativeadd(VJFrame *frame, VJFrame *frame2) static void overlaymagicalpha_relativesub(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -601,7 +601,7 @@ static void overlaymagicalpha_relativesub(VJFrame *frame, VJFrame *frame2) static void overlaymagicalpha_minsubselect(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -624,7 +624,7 @@ static void overlaymagicalpha_minsubselect(VJFrame *frame, VJFrame *frame2) static void overlaymagicalpha_maxsubselect(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -647,7 +647,7 @@ static void overlaymagicalpha_maxsubselect(VJFrame *frame, VJFrame *frame2) static void overlaymagicalpha_addsubselect(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -671,7 +671,7 @@ static void overlaymagicalpha_addsubselect(VJFrame *frame, VJFrame *frame2) static void overlaymagicalpha_maxselect(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -692,7 +692,7 @@ static void overlaymagicalpha_maxselect(VJFrame *frame, VJFrame *frame2) static void overlaymagicalpha_minselect(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -713,7 +713,7 @@ static void overlaymagicalpha_minselect(VJFrame *frame, VJFrame *frame2) static void overlaymagicalpha_addtest(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -734,7 +734,7 @@ static void overlaymagicalpha_addtest(VJFrame *frame, VJFrame *frame2) static void overlaymagicalpha_addtest2(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -755,7 +755,7 @@ static void overlaymagicalpha_addtest2(VJFrame *frame, VJFrame *frame2) static void overlaymagicalpha_addtest4(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3]; @@ -780,7 +780,7 @@ static void overlaymagicalpha_addtest4(VJFrame *frame, VJFrame *frame2) static void overlaymagicalpha_try(VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; int a, b, p, q; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; diff --git a/veejay-current/veejay-server/libvje/effects/magicscratcher.c b/veejay-current/veejay-server/libvje/effects/magicscratcher.c index c22f94ef..4f02b708 100644 --- a/veejay-current/veejay-server/libvje/effects/magicscratcher.c +++ b/veejay-current/veejay-server/libvje/effects/magicscratcher.c @@ -103,7 +103,8 @@ void magicscratcher_apply(VJFrame *frame, int mode, int n, int no_reverse) { const unsigned int width = frame->width; const unsigned int height = frame->height; - unsigned int x, len = frame->len; + unsigned int x; + int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb= frame->data[1]; uint8_t *Cr= frame->data[2]; @@ -166,8 +167,8 @@ void magicscratcher_apply(VJFrame *frame, int mode, int n, int no_reverse) Y[x] = func_y( mframe[offset + x], Y[x]); } - veejay_memset( Cb, 128, (frame->ssm ? frame->len : frame->uv_len)); - veejay_memset( Cr, 128, (frame->ssm ? frame->len : frame->uv_len)); + veejay_memset( Cb, 128, (frame->ssm ? len : frame->uv_len)); + veejay_memset( Cr, 128, (frame->ssm ? len : frame->uv_len)); m_rerun = m_frame; diff --git a/veejay-current/veejay-server/libvje/effects/mask.c b/veejay-current/veejay-server/libvje/effects/mask.c index 064215b4..752f514a 100644 --- a/veejay-current/veejay-server/libvje/effects/mask.c +++ b/veejay-current/veejay-server/libvje/effects/mask.c @@ -100,7 +100,7 @@ void simplemask_apply( VJFrame *frame, VJFrame *frame2, int threshold, int inver { const unsigned int width = frame->width; const unsigned int height = frame->height; - const unsigned int len = frame->len; + const int len = frame->len; switch(invert) { case 0 : mask_replace_black(frame->data,frame2->data,width,height,len,threshold); break; diff --git a/veejay-current/veejay-server/libvje/effects/maskstop.c b/veejay-current/veejay-server/libvje/effects/maskstop.c index 14583583..c35d29f0 100644 --- a/veejay-current/veejay-server/libvje/effects/maskstop.c +++ b/veejay-current/veejay-server/libvje/effects/maskstop.c @@ -90,7 +90,7 @@ void maskstop_free() { void maskstop_apply( VJFrame *frame, int negmask, int swapmask, int framefreq, int maskfreq) { int i=0; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Yframe = vvmaskstop_buffer[0]; uint8_t *Uframe = vvmaskstop_buffer[1]; diff --git a/veejay-current/veejay-server/libvje/effects/median.c b/veejay-current/veejay-server/libvje/effects/median.c index 589300a3..211ba516 100644 --- a/veejay-current/veejay-server/libvje/effects/median.c +++ b/veejay-current/veejay-server/libvje/effects/median.c @@ -46,7 +46,7 @@ void medianfilter_apply( VJFrame *frame, int val) { const unsigned int width = frame->width; const unsigned int height = frame->height; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; diff --git a/veejay-current/veejay-server/libvje/effects/mixtoalpha.c b/veejay-current/veejay-server/libvje/effects/mixtoalpha.c index 96ba8b4b..04ef256f 100644 --- a/veejay-current/veejay-server/libvje/effects/mixtoalpha.c +++ b/veejay-current/veejay-server/libvje/effects/mixtoalpha.c @@ -54,7 +54,7 @@ vj_effect *mixtoalpha_init(int w, int h) void mixtoalpha_apply( VJFrame *frame, VJFrame *frame2, int mode, int scale) { - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *a = frame->data[3]; const uint8_t *Y = frame2->data[0]; uint8_t __lookup_table[256]; diff --git a/veejay-current/veejay-server/libvje/effects/morphology.c b/veejay-current/veejay-server/libvje/effects/morphology.c index 25b5d158..27e1d7fb 100644 --- a/veejay-current/veejay-server/libvje/effects/morphology.c +++ b/veejay-current/veejay-server/libvje/effects/morphology.c @@ -147,7 +147,7 @@ void morphology_apply( VJFrame *frame, int threshold, int convolution_kernel, in int len = frame->len; int width = frame->width; - const unsigned int uv_len = (frame->ssm ? frame->len : frame->uv_len); + const int uv_len = (frame->ssm ? len : frame->uv_len); uint8_t *I = frame->data[0]; diff --git a/veejay-current/veejay-server/libvje/effects/motionblur.c b/veejay-current/veejay-server/libvje/effects/motionblur.c index d646550d..3ba9ccdc 100644 --- a/veejay-current/veejay-server/libvje/effects/motionblur.c +++ b/veejay-current/veejay-server/libvje/effects/motionblur.c @@ -60,7 +60,7 @@ void motionblur_free() { void motionblur_apply( VJFrame *frame, int n) { - const unsigned int len = frame->len; + const int len = frame->len; const int uv_len = frame->uv_len; unsigned int i; diff --git a/veejay-current/veejay-server/libvje/effects/motionmap.c b/veejay-current/veejay-server/libvje/effects/motionmap.c index 073c4bd5..12251169 100644 --- a/veejay-current/veejay-server/libvje/effects/motionmap.c +++ b/veejay-current/veejay-server/libvje/effects/motionmap.c @@ -370,7 +370,7 @@ void motionmap_apply( VJFrame *frame, int threshold, int limit1, int draw, int h unsigned int i; const unsigned int width = frame->width; const unsigned int height = frame->height; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; const int limit = limit1 * 10; diff --git a/veejay-current/veejay-server/libvje/effects/negation.c b/veejay-current/veejay-server/libvje/effects/negation.c index 4bb124d0..b949aad9 100644 --- a/veejay-current/veejay-server/libvje/effects/negation.c +++ b/veejay-current/veejay-server/libvje/effects/negation.c @@ -46,8 +46,8 @@ vj_effect *negation_init(int w, int h) void negation_apply( VJFrame *frame, int val) { int i; - const unsigned int len = frame->len; - const unsigned int uv_len = (frame->ssm ? len : frame->uv_len ); + const int len = frame->len; + const int uv_len = (frame->ssm ? len : frame->uv_len ); uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; diff --git a/veejay-current/veejay-server/libvje/effects/neighbours.c b/veejay-current/veejay-server/libvje/effects/neighbours.c index a945fc41..e3fb7eb2 100644 --- a/veejay-current/veejay-server/libvje/effects/neighbours.c +++ b/veejay-current/veejay-server/libvje/effects/neighbours.c @@ -231,7 +231,7 @@ void neighbours_apply( VJFrame *frame, int brush_size, int intensity_level, int const unsigned int width = frame->width; const unsigned int height = frame->height; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *dstY = frame->data[0]; uint8_t *dstCb = frame->data[1]; uint8_t *dstCr = frame->data[2]; diff --git a/veejay-current/veejay-server/libvje/effects/neighbours2.c b/veejay-current/veejay-server/libvje/effects/neighbours2.c index 2840568d..4d7e5cff 100644 --- a/veejay-current/veejay-server/libvje/effects/neighbours2.c +++ b/veejay-current/veejay-server/libvje/effects/neighbours2.c @@ -231,7 +231,7 @@ void neighbours2_apply( VJFrame *frame, int brush_size, int intensity_level, int const unsigned int width = frame->width; const unsigned int height = frame->height; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *dstY = frame->data[0]; uint8_t *dstCb = frame->data[1]; uint8_t *dstCr = frame->data[2]; diff --git a/veejay-current/veejay-server/libvje/effects/neighbours3.c b/veejay-current/veejay-server/libvje/effects/neighbours3.c index ce74509d..5ba48dd1 100644 --- a/veejay-current/veejay-server/libvje/effects/neighbours3.c +++ b/veejay-current/veejay-server/libvje/effects/neighbours3.c @@ -232,7 +232,7 @@ void neighbours3_apply( VJFrame *frame, int brush_size, int intensity_level, int const unsigned int width = frame->width; const unsigned int height = frame->height; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *dstY = frame->data[0]; uint8_t *dstCb = frame->data[1]; uint8_t *dstCr = frame->data[2]; diff --git a/veejay-current/veejay-server/libvje/effects/neighbours4.c b/veejay-current/veejay-server/libvje/effects/neighbours4.c index 29a0b824..e475f449 100644 --- a/veejay-current/veejay-server/libvje/effects/neighbours4.c +++ b/veejay-current/veejay-server/libvje/effects/neighbours4.c @@ -272,7 +272,7 @@ void neighbours4_apply( VJFrame *frame, int radius, int brush_size, const unsigned int width = frame->width; const unsigned int height = frame->height; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *dstY = frame->data[0]; uint8_t *dstCb = frame->data[1]; uint8_t *dstCr = frame->data[2]; diff --git a/veejay-current/veejay-server/libvje/effects/neighbours5.c b/veejay-current/veejay-server/libvje/effects/neighbours5.c index 8f6b7f75..238eb3d7 100644 --- a/veejay-current/veejay-server/libvje/effects/neighbours5.c +++ b/veejay-current/veejay-server/libvje/effects/neighbours5.c @@ -233,7 +233,7 @@ void neighbours5_apply( VJFrame *frame, int brush_size, int intensity_level, int const unsigned int width = frame->width; const unsigned int height = frame->height; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *dstY = frame->data[0]; uint8_t *dstCb = frame->data[1]; uint8_t *dstCr = frame->data[2]; diff --git a/veejay-current/veejay-server/libvje/effects/nervous.c b/veejay-current/veejay-server/libvje/effects/nervous.c index 03457d40..fe62f278 100644 --- a/veejay-current/veejay-server/libvje/effects/nervous.c +++ b/veejay-current/veejay-server/libvje/effects/nervous.c @@ -85,7 +85,7 @@ void nervous_free(void) void nervous_apply( VJFrame *frame, int delay) { - const unsigned int len = frame->len; + const int len = frame->len; int uv_len = (frame->ssm == 1 ? frame->len : frame->uv_len); uint8_t *NY = nervous_buf[0] + (len * frames_elapsed ); uint8_t *NCb= nervous_buf[1] + (uv_len * frames_elapsed ); diff --git a/veejay-current/veejay-server/libvje/effects/noiseadd.c b/veejay-current/veejay-server/libvje/effects/noiseadd.c index 6a8f38f5..2b52685c 100644 --- a/veejay-current/veejay-server/libvje/effects/noiseadd.c +++ b/veejay-current/veejay-server/libvje/effects/noiseadd.c @@ -72,7 +72,7 @@ static void noiseblur1x3_maskapply(VJFrame* frame, int coeef ) { double k = (coeef/100.0); uint8_t d; const unsigned int width = frame->width; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; for (r = 0; r < len; r += width) { @@ -99,7 +99,7 @@ static void noiseblur3x3_maskapply(VJFrame* frame, int coeef ) { const double k = (coeef/1000.0); uint8_t d; const unsigned int width = frame->width; - const unsigned int len = (frame->len)-width; + const int len = (frame->len)-width; uint8_t *Y = frame->data[0]; for (r = width; r < len; r += width) { @@ -132,7 +132,7 @@ static void noiseneg3x3_maskapply(VJFrame *frame, int coeef ) { const double k = (coeef/1000.0); uint8_t d; const unsigned int width = frame->width; - const unsigned int len = (frame->len)-width; + const int len = (frame->len)-width; uint8_t *Y = frame->data[0]; diff --git a/veejay-current/veejay-server/libvje/effects/opacityadv.c b/veejay-current/veejay-server/libvje/effects/opacityadv.c index ff57349d..16b78400 100644 --- a/veejay-current/veejay-server/libvje/effects/opacityadv.c +++ b/veejay-current/veejay-server/libvje/effects/opacityadv.c @@ -53,7 +53,7 @@ void opacityadv_apply( VJFrame *frame, VJFrame *frame2, int opacity, unsigned int x, y; const unsigned int width = frame->width; - const unsigned len = frame->len; + const int len = frame->len; uint8_t a1, a2; unsigned int op0, op1; uint8_t *Y = frame->data[0]; diff --git a/veejay-current/veejay-server/libvje/effects/opacitythreshold.c b/veejay-current/veejay-server/libvje/effects/opacitythreshold.c index 294fb838..d2cea6f9 100644 --- a/veejay-current/veejay-server/libvje/effects/opacitythreshold.c +++ b/veejay-current/veejay-server/libvje/effects/opacitythreshold.c @@ -50,7 +50,8 @@ vj_effect *opacitythreshold_init(int w, int h) void opacitythreshold_apply( VJFrame *frame, VJFrame *frame2, int opacity,int threshold, int t2) { const int width = frame->width; - unsigned int x, y, len = frame->len-width; + unsigned int x, y; + const int len = frame->len-width; uint8_t a1, a2; unsigned int op0, op1; uint8_t *Y = frame->data[0]; diff --git a/veejay-current/veejay-server/libvje/effects/pencilsketch.c b/veejay-current/veejay-server/libvje/effects/pencilsketch.c index 06d49f97..9489ae7a 100644 --- a/veejay-current/veejay-server/libvje/effects/pencilsketch.c +++ b/veejay-current/veejay-server/libvje/effects/pencilsketch.c @@ -155,9 +155,9 @@ void pencilsketch_apply(VJFrame *frame, int type, int threshold_min, int threshold_max, int mode) { unsigned int i; - unsigned int len = frame->len; + int len = frame->len; const unsigned int width = frame->width; - const unsigned int uv_len = (frame->ssm ?len : frame->uv_len); + const int uv_len = (frame->ssm ? len : frame->uv_len); int m,d; uint8_t y,yb; uint8_t *Y = frame->data[0]; diff --git a/veejay-current/veejay-server/libvje/effects/perspective.c b/veejay-current/veejay-server/libvje/effects/perspective.c index 5fc532cb..1873a392 100644 --- a/veejay-current/veejay-server/libvje/effects/perspective.c +++ b/veejay-current/veejay-server/libvje/effects/perspective.c @@ -99,7 +99,7 @@ void perspective_apply( VJFrame *frame, int x1, int y1, int x2, int y2, { const unsigned int width = frame->width; const unsigned int height = frame->height; - const unsigned int len = frame->len; + const int len = frame->len; if( x1 != perspective_[0] || y1 != perspective_[1] || x2 != perspective_[2] || y2 != perspective_[3] || x3 != perspective_[4] || y3 != perspective_[5] || x4 != perspective_[6] || y4 != perspective_[7] || reverse != perspective_[8] ) diff --git a/veejay-current/veejay-server/libvje/effects/pixelate.c b/veejay-current/veejay-server/libvje/effects/pixelate.c index c8f8a26d..441fa653 100644 --- a/veejay-current/veejay-server/libvje/effects/pixelate.c +++ b/veejay-current/veejay-server/libvje/effects/pixelate.c @@ -60,9 +60,9 @@ vj_effect *pixelate_init(int width, int height) void pixelate_apply( VJFrame *frame, int vv ) { unsigned int i,j ; - const unsigned int len = frame->len; + const int len = frame->len; const unsigned int v = values[vv]; - const unsigned int uv_len = (frame->ssm ? len : frame->uv_len); + const int uv_len = (frame->ssm ? len : frame->uv_len); unsigned int u_v = v >> (frame->ssm ? frame->shift_h: 1 ); if( u_v == 0 ) u_v = 1; diff --git a/veejay-current/veejay-server/libvje/effects/porterduff.c b/veejay-current/veejay-server/libvje/effects/porterduff.c index 330c6ebb..7f3a3b42 100644 --- a/veejay-current/veejay-server/libvje/effects/porterduff.c +++ b/veejay-current/veejay-server/libvje/effects/porterduff.c @@ -358,49 +358,50 @@ static void divide( uint8_t *A, uint8_t *B, int n_pixels ) void porterduff_apply(VJFrame *frame, VJFrame *frame2, int mode) { + const int len = frame->len; switch( mode ) { case 0: - porterduff_dst( frame->data[0],frame2->data[0],frame->len ); + porterduff_dst( frame->data[0],frame2->data[0],len ); break; case 1: - porterduff_atop( frame->data[0],frame2->data[0], frame->len ); + porterduff_atop( frame->data[0],frame2->data[0], len ); break; case 2: - porterduff_dst_in( frame->data[0],frame2->data[0], frame->len ); + porterduff_dst_in( frame->data[0],frame2->data[0], len ); break; case 3: - porterduff_dst_over( frame->data[0],frame2->data[0],frame->len ); + porterduff_dst_over( frame->data[0],frame2->data[0],len ); break; case 4: - porterduff_dst_out( frame->data[0],frame2->data[0],frame->len ); + porterduff_dst_out( frame->data[0],frame2->data[0],len ); break; case 5: - porterduff_src_over( frame->data[0],frame2->data[0],frame->len ); + porterduff_src_over( frame->data[0],frame2->data[0],len ); break; case 6: - porterduff_src_atop( frame->data[0],frame2->data[0],frame->len ); + porterduff_src_atop( frame->data[0],frame2->data[0],len ); break; case 7: - porterduff_src_in( frame->data[0],frame2->data[0],frame->len ); + porterduff_src_in( frame->data[0],frame2->data[0],len ); break; case 8: - porterduff_src_out( frame->data[0],frame2->data[0],frame->len); + porterduff_src_out( frame->data[0],frame2->data[0],len); break; case 9: - svg_multiply( frame->data[0], frame2->data[0], frame->len ); + svg_multiply( frame->data[0], frame2->data[0], len ); break; case 10: - xor( frame->data[0], frame2->data[0], frame->len); + xor( frame->data[0], frame2->data[0], len); break; case 11: - add( frame->data[0], frame2->data[0], frame->len ); + add( frame->data[0], frame2->data[0], len ); break; case 12: - subtract(frame->data[0],frame2->data[0],frame->len); + subtract(frame->data[0],frame2->data[0],len); break; case 13: - divide(frame->data[0],frame2->data[0],frame->len); + divide(frame->data[0],frame2->data[0],len); break; } } diff --git a/veejay-current/veejay-server/libvje/effects/radcor.c b/veejay-current/veejay-server/libvje/effects/radcor.c index 322c1488..339ec84f 100644 --- a/veejay-current/veejay-server/libvje/effects/radcor.c +++ b/veejay-current/veejay-server/libvje/effects/radcor.c @@ -95,7 +95,7 @@ void radcor_apply( VJFrame *frame, int alpaX, int alpaY, int dir, int alpha) int i2,j2; const unsigned int width = frame->width; const unsigned int height = frame->height; - const unsigned int len = frame->len; + const int len = frame->len; double x,y,x2,x3,y2,y3,r; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; diff --git a/veejay-current/veejay-server/libvje/effects/radialblur.c b/veejay-current/veejay-server/libvje/effects/radialblur.c index 51a1a7d4..5806b6ca 100644 --- a/veejay-current/veejay-server/libvje/effects/radialblur.c +++ b/veejay-current/veejay-server/libvje/effects/radialblur.c @@ -107,8 +107,8 @@ void radialblur_apply(VJFrame *frame, int radius, int power, int direction) { const unsigned int width = frame->width; const unsigned int height = frame->height; - const unsigned int len = frame->len; - const unsigned int uv_len = frame->uv_len; + const int len = frame->len; + const int uv_len = frame->uv_len; uint8_t *Y = frame->data[0]; uint8_t *Cb= frame->data[1]; diff --git a/veejay-current/veejay-server/libvje/effects/radioactive.c b/veejay-current/veejay-server/libvje/effects/radioactive.c index 38b58b26..052a300a 100644 --- a/veejay-current/veejay-server/libvje/effects/radioactive.c +++ b/veejay-current/veejay-server/libvje/effects/radioactive.c @@ -230,7 +230,7 @@ void radioactivetv_apply( VJFrame *frame, VJFrame *blue, int mode, int snapRatio unsigned int x, y; const unsigned int width = frame->width; const unsigned int height = frame->height; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *diff = diffbuf; uint8_t *prev = diff + len; diff --git a/veejay-current/veejay-server/libvje/effects/randnoise.c b/veejay-current/veejay-server/libvje/effects/randnoise.c index 2f31c9f8..0d064fa7 100644 --- a/veejay-current/veejay-server/libvje/effects/randnoise.c +++ b/veejay-current/veejay-server/libvje/effects/randnoise.c @@ -57,7 +57,7 @@ static __thread unsigned long x = 123456789, y = 362436069, z = 521288629; void randnoise_apply( VJFrame *frame, int min, int max) { int i; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; unsigned long t; diff --git a/veejay-current/veejay-server/libvje/effects/rawman.c b/veejay-current/veejay-server/libvje/effects/rawman.c index 8f4f8ecd..adad501d 100644 --- a/veejay-current/veejay-server/libvje/effects/rawman.c +++ b/veejay-current/veejay-server/libvje/effects/rawman.c @@ -53,7 +53,7 @@ vj_effect *rawman_init(int w,int h) void rawman_apply(VJFrame *frame, unsigned int mode, unsigned int YY) { - const unsigned int len = frame->len; + const int len = frame->len; unsigned int i; uint8_t *Y = frame->data[0]; diff --git a/veejay-current/veejay-server/libvje/effects/rawval.c b/veejay-current/veejay-server/libvje/effects/rawval.c index 032b3011..933e51e6 100644 --- a/veejay-current/veejay-server/libvje/effects/rawval.c +++ b/veejay-current/veejay-server/libvje/effects/rawval.c @@ -55,7 +55,7 @@ void rawval_apply( VJFrame *frame, const int color_cb, const int color_cr, const int new_color_cb, const int new_color_cr) { unsigned int i; - const unsigned int uv_len = (frame->ssm ? frame->len : frame->uv_len); + const int uv_len = (frame->ssm ? frame->len : frame->uv_len); uint8_t *Cb= frame->data[1]; uint8_t *Cr= frame->data[2]; diff --git a/veejay-current/veejay-server/libvje/effects/rgbkey.c b/veejay-current/veejay-server/libvje/effects/rgbkey.c index f1a5a986..1bee6a9a 100644 --- a/veejay-current/veejay-server/libvje/effects/rgbkey.c +++ b/veejay-current/veejay-server/libvje/effects/rgbkey.c @@ -204,7 +204,7 @@ void rgbkey_apply(VJFrame *frame, VJFrame *frame2, int tola, int r, int g,int b, uint8_t *Cr2= frame2->data[2]; uint8_t *A = frame->data[3]; uint8_t *B = frame2->data[3]; - const unsigned int len = frame->len; + const int len = frame->len; int iy=0,iu=128,iv=128; uint8_t *T = temp[0]; uint8_t op0,op1; diff --git a/veejay-current/veejay-server/libvje/effects/ripple.c b/veejay-current/veejay-server/libvje/effects/ripple.c index 53c49cc3..6f8418d0 100644 --- a/veejay-current/veejay-server/libvje/effects/ripple.c +++ b/veejay-current/veejay-server/libvje/effects/ripple.c @@ -114,7 +114,7 @@ void ripple_apply(VJFrame *frame, int _w, int _a , int _att ) { const unsigned int width = frame->width; const unsigned int height = frame->height; - const unsigned int len = frame->len; + const int len = frame->len; double wp2 = width * 0.5; double hp2 = height * 0.5; int x,y,dx,dy,a=0,sx=0,sy=0,angle=0; diff --git a/veejay-current/veejay-server/libvje/effects/rotozoom.c b/veejay-current/veejay-server/libvje/effects/rotozoom.c index 175f46ce..3262f43a 100644 --- a/veejay-current/veejay-server/libvje/effects/rotozoom.c +++ b/veejay-current/veejay-server/libvje/effects/rotozoom.c @@ -223,7 +223,7 @@ void rotozoom_apply( VJFrame *frame, int mode, int rotate, int zoom, int autom) { const unsigned int width = frame->width; const unsigned int height = frame->height; - const unsigned int len = frame->len; + const int len = frame->len; int strides[4] = {len ,len ,len ,0}; switch (autom) { /* alas must do memcpy */ case 0: diff --git a/veejay-current/veejay-server/libvje/effects/scratcher.c b/veejay-current/veejay-server/libvje/effects/scratcher.c index 25dfcb70..abc9b060 100644 --- a/veejay-current/veejay-server/libvje/effects/scratcher.c +++ b/veejay-current/veejay-server/libvje/effects/scratcher.c @@ -126,7 +126,7 @@ static void store_frame(VJFrame *src, int n, int no_reverse) void scratcher_apply(VJFrame *src,int opacity, int n, int no_reverse) { - const unsigned int len = src->len; + const int len = src->len; const int offset = len * nframe; const int uv_len = src->uv_len; const int uv_offset = uv_len * nframe; diff --git a/veejay-current/veejay-server/libvje/effects/sinoids.c b/veejay-current/veejay-server/libvje/effects/sinoids.c index 444ba9ea..5226b855 100644 --- a/veejay-current/veejay-server/libvje/effects/sinoids.c +++ b/veejay-current/veejay-server/libvje/effects/sinoids.c @@ -103,7 +103,7 @@ static int current_sinoids = 100; void sinoids_apply(VJFrame *frame, int m, int s) { - const unsigned int len = frame->len; + const int len = frame->len; const unsigned int width = frame->width; unsigned int r,c; uint8_t *Y = frame->data[0]; diff --git a/veejay-current/veejay-server/libvje/effects/slice.c b/veejay-current/veejay-server/libvje/effects/slice.c index 4233d4df..87ed67d3 100644 --- a/veejay-current/veejay-server/libvje/effects/slice.c +++ b/veejay-current/veejay-server/libvje/effects/slice.c @@ -117,7 +117,7 @@ void slice_apply(VJFrame *frame, int val, int re_init) { unsigned int x,y,dx,dy; const unsigned int width = frame->width; const unsigned int height = frame->height; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb= frame->data[1]; uint8_t *Cr= frame->data[2]; diff --git a/veejay-current/veejay-server/libvje/effects/slicer.c b/veejay-current/veejay-server/libvje/effects/slicer.c index 36ec6666..12cf51bf 100644 --- a/veejay-current/veejay-server/libvje/effects/slicer.c +++ b/veejay-current/veejay-server/libvje/effects/slicer.c @@ -117,7 +117,7 @@ void slicer_apply( VJFrame *frame, VJFrame *frame2, int val1, int val2,int shatt int x,y,p,q; const unsigned int width = frame->width; const unsigned int height = frame->height; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb= frame->data[1]; uint8_t *Cr= frame->data[2]; diff --git a/veejay-current/veejay-server/libvje/effects/solarize.c b/veejay-current/veejay-server/libvje/effects/solarize.c index 75a3ff8e..740579ef 100644 --- a/veejay-current/veejay-server/libvje/effects/solarize.c +++ b/veejay-current/veejay-server/libvje/effects/solarize.c @@ -47,7 +47,7 @@ vj_effect *solarize_init(int w,int h) void solarize_apply( VJFrame *frame, int threshold) { unsigned int i; - const unsigned int len= frame->len; + const int len= frame->len; uint8_t val; uint8_t *Y = frame->data[0]; uint8_t *Cb= frame->data[1]; diff --git a/veejay-current/veejay-server/libvje/effects/split.c b/veejay-current/veejay-server/libvje/effects/split.c index 06c54469..65592a93 100644 --- a/veejay-current/veejay-server/libvje/effects/split.c +++ b/veejay-current/veejay-server/libvje/effects/split.c @@ -65,8 +65,8 @@ void split_free() { static void split_fib_downscale(VJFrame *frame, int width, int height) { - unsigned int i, len = frame->len/2; - unsigned int f; + int i, len = frame->len/2; + int f; unsigned int x, y; int uv_width; const int ilen = frame->len; @@ -104,7 +104,7 @@ static void split_fib_downscale(VJFrame *frame, int width, int height) static void split_fib_downscaleb(VJFrame *frame, int width, int height) { - unsigned int len = frame->len / 2; + int len = frame->len / 2; unsigned int uv_len = frame->uv_len /2; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; @@ -124,11 +124,11 @@ static void split_fib_downscaleb(VJFrame *frame, int width, int height) static void dosquarefib(VJFrame *frame, int width, int height) { - unsigned int i, len = frame->len / 2; - unsigned int f; - unsigned int x, y, y1, y2; - unsigned int uv_len = frame->uv_len; - unsigned int uv_width = frame->uv_width; + int i, len = frame->len / 2; + int f; + int x, y, y1, y2; + int uv_len = frame->uv_len; + int uv_width = frame->uv_width; const unsigned int uv_height = frame->uv_height; unsigned int w3 = width >> 2; const unsigned int u_w3 = w3 >> frame->shift_h; @@ -204,7 +204,7 @@ static void dosquarefib(VJFrame *frame, int width, int height) static void split_push_downscale_uh(VJFrame *frame, int width, int height) { - unsigned int len = frame->len/2; + int len = frame->len/2; int strides[4] = { len,len,len ,0}; vj_frame_copy( frame->data, split_buf,strides ); @@ -593,7 +593,8 @@ static void split_v_first_half(VJFrame *frame, VJFrame *frame2, int width, static void split_v_second_halfs(VJFrame *frame, VJFrame *frame2, int width, int height) { - unsigned int r, c; + int r; + unsigned int c; const int lw = width / 2; const int len = frame->len; const int uv_height = frame->uv_height; @@ -638,8 +639,8 @@ static void split_h_first_half(VJFrame *frame, VJFrame *frame2, int width, static void split_h_second_half(VJFrame *frame, VJFrame *frame2, int width, int height) { - const unsigned int len = frame->len / 2; - const unsigned int uv_len = frame->uv_len / 2; + const int len = frame->len / 2; + const int uv_len = frame->uv_len / 2; int strides[4] = { len, uv_len, uv_len, 0 }; vj_frame_copy( frame2->data,frame->data, strides ); } @@ -647,8 +648,8 @@ static void split_h_second_half(VJFrame *frame, VJFrame *frame2, int width, static void split_h_first_halfs(VJFrame *frame, VJFrame *frame2, int width, int height) { - const unsigned int len = frame->len / 2; - const unsigned int uv_len = frame->uv_len / 2; + const int len = frame->len / 2; + const int uv_len = frame->uv_len / 2; int strides[4] = { len,uv_len,uv_len, 0 }; vj_frame_copy( frame2->data, frame->data, strides ); } @@ -656,8 +657,8 @@ static void split_h_first_halfs(VJFrame *frame, VJFrame *frame2, int width, static void split_h_second_halfs(VJFrame *frame, VJFrame *frame2, int width, int height) { - const unsigned int len = frame->len / 2; - const unsigned int uv_len = frame->uv_len / 2; + const int len = frame->len / 2; + const int uv_len = frame->uv_len / 2; int strides[4] = { len, uv_len, uv_len, 0 }; vj_frame_copy( frame2->data, frame->data, strides ); } diff --git a/veejay-current/veejay-server/libvje/effects/swirl.c b/veejay-current/veejay-server/libvje/effects/swirl.c index 38d08b97..188a5b6a 100644 --- a/veejay-current/veejay-server/libvje/effects/swirl.c +++ b/veejay-current/veejay-server/libvje/effects/swirl.c @@ -109,7 +109,7 @@ void swirl_apply(VJFrame *frame, int v) int i; const unsigned int width = frame->width; const unsigned int height = frame->height; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb= frame->data[1]; uint8_t *Cr= frame->data[2]; diff --git a/veejay-current/veejay-server/libvje/effects/threshold.c b/veejay-current/veejay-server/libvje/effects/threshold.c index f13ad9aa..c2f09a4b 100644 --- a/veejay-current/veejay-server/libvje/effects/threshold.c +++ b/veejay-current/veejay-server/libvje/effects/threshold.c @@ -77,7 +77,7 @@ void threshold_apply( VJFrame *frame, VJFrame *frame2, int threshold, int revers unsigned int y,x; const unsigned int width = frame->width; const unsigned int height = frame->height; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; diff --git a/veejay-current/veejay-server/libvje/effects/timedistort.c b/veejay-current/veejay-server/libvje/effects/timedistort.c index b3bac9a2..a9c4734e 100644 --- a/veejay-current/veejay-server/libvje/effects/timedistort.c +++ b/veejay-current/veejay-server/libvje/effects/timedistort.c @@ -131,7 +131,7 @@ void timedistort_apply( VJFrame *frame, int val) unsigned int i; const unsigned int width = frame->width; const unsigned int height = frame->height; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; diff --git a/veejay-current/veejay-server/libvje/effects/toalpha.c b/veejay-current/veejay-server/libvje/effects/toalpha.c index 3307c509..a16663a7 100644 --- a/veejay-current/veejay-server/libvje/effects/toalpha.c +++ b/veejay-current/veejay-server/libvje/effects/toalpha.c @@ -56,7 +56,7 @@ vj_effect *toalpha_init(int w, int h) void toalpha_apply( VJFrame *frame, int mode) { - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *a = frame->data[3]; uint8_t *Y = frame->data[0]; diff --git a/veejay-current/veejay-server/libvje/effects/tracer.c b/veejay-current/veejay-server/libvje/effects/tracer.c index 160ec1ab..28554a5f 100644 --- a/veejay-current/veejay-server/libvje/effects/tracer.c +++ b/veejay-current/veejay-server/libvje/effects/tracer.c @@ -66,7 +66,7 @@ void tracer_free() { void tracer_apply(VJFrame *frame, VJFrame *frame2, int opacity, int n) { unsigned int x; - const unsigned int len = frame->len; + const int len = frame->len; unsigned int op1 = (opacity > 255) ? 255 : opacity; unsigned int op0 = 255 - op1; unsigned int uv_len = frame->uv_len; diff --git a/veejay-current/veejay-server/libvje/effects/travelmatte.c b/veejay-current/veejay-server/libvje/effects/travelmatte.c index 0ec25a7e..eb33478d 100644 --- a/veejay-current/veejay-server/libvje/effects/travelmatte.c +++ b/veejay-current/veejay-server/libvje/effects/travelmatte.c @@ -45,7 +45,7 @@ vj_effect *travelmatte_init(int w, int h) void travelmatte_apply( VJFrame *frame, VJFrame *frame2, int mode) { - const unsigned int len = frame->len; + const int len = frame->len; uint8_t *a0 = frame->data[0]; uint8_t *a1 = frame->data[1]; diff --git a/veejay-current/veejay-server/libvje/effects/tripplicity.c b/veejay-current/veejay-server/libvje/effects/tripplicity.c index 2a0db4c9..25dabc99 100644 --- a/veejay-current/veejay-server/libvje/effects/tripplicity.c +++ b/veejay-current/veejay-server/libvje/effects/tripplicity.c @@ -60,8 +60,8 @@ vj_effect *tripplicity_init(int w, int h) void tripplicity_apply( VJFrame *frame, VJFrame *frame2, int opacityL, int opacityCb, int opacityCr) { unsigned int i; - const unsigned int len = frame->len; - const unsigned int uv_len = (frame->ssm ? len : frame->uv_len); + const int len = frame->len; + const int uv_len = (frame->ssm ? len : frame->uv_len); uint8_t *Y = frame->data[0]; uint8_t *Cb= frame->data[1]; uint8_t *Cr= frame->data[2]; diff --git a/veejay-current/veejay-server/libvje/effects/water.c b/veejay-current/veejay-server/libvje/effects/water.c index 90435633..13e9f34a 100644 --- a/veejay-current/veejay-server/libvje/effects/water.c +++ b/veejay-current/veejay-server/libvje/effects/water.c @@ -273,7 +273,7 @@ static int globalactivity(VJFrame *f2, water_t *w, int in) static void motiondetect(VJFrame *f, VJFrame *f2, int threshold, water_t *w) { - const unsigned int len = f->len; + const int len = f->len; uint8_t *bg = w->diff_img + len; uint8_t *in = f2->data[0]; if(!w->have_img) @@ -322,7 +322,7 @@ static void motiondetect(VJFrame *f, VJFrame *f2, int threshold, water_t *w) static void motiondetect2(VJFrame *f, VJFrame *f2, int threshold, water_t *w) { - const unsigned int len = f->len; + const int len = f->len; uint8_t *bg = w->diff_img + len; uint8_t *in = f2->data[0]; if(!w->have_img) @@ -371,7 +371,7 @@ static void motiondetect2(VJFrame *f, VJFrame *f2, int threshold, water_t *w) static void motiondetect3(VJFrame *f, VJFrame *f2, int threshold, water_t *w) { - const unsigned int len= f->len; + const int len= f->len; uint8_t *bg = w->diff_img + len; uint8_t *in = f2->data[0]; if(!w->have_img) @@ -503,7 +503,7 @@ void water_apply(void *user_data, VJFrame *frame, VJFrame *frame2, int fresh_rat int *p, *q, *r; signed char *vp; uint8_t *src,*dest; - const unsigned int len = frame->len; + const int len = frame->len; water_t *w = (water_t*) user_data; if(w->last_fresh_rate != fresh_rate) diff --git a/veejay-current/veejay-server/libvje/effects/waterrippletv.c b/veejay-current/veejay-server/libvje/effects/waterrippletv.c index 724d484e..9c54eead 100644 --- a/veejay-current/veejay-server/libvje/effects/waterrippletv.c +++ b/veejay-current/veejay-server/libvje/effects/waterrippletv.c @@ -221,7 +221,7 @@ void waterrippletv_apply(VJFrame *frame, int fresh_rate, int loopnum, int decay) int *p, *q, *r; signed char *vp; uint8_t *src,*dest; - const unsigned int len = frame->len; + const int len = frame->len; if(last_fresh_rate != fresh_rate || tick > fresh_rate) { diff --git a/veejay-current/veejay-server/libvje/effects/whiteframe.c b/veejay-current/veejay-server/libvje/effects/whiteframe.c index f526cfda..9196eb55 100644 --- a/veejay-current/veejay-server/libvje/effects/whiteframe.c +++ b/veejay-current/veejay-server/libvje/effects/whiteframe.c @@ -42,7 +42,7 @@ vj_effect *whiteframe_init(int w,int h) void whiteframe_apply( VJFrame *frame, VJFrame *frame2) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; const int uv_len = frame->uv_len; uint8_t p; uint8_t *Y = frame->data[0]; diff --git a/veejay-current/veejay-server/libvje/effects/widthmirror.c b/veejay-current/veejay-server/libvje/effects/widthmirror.c index ca4dd7f1..5b0f186a 100644 --- a/veejay-current/veejay-server/libvje/effects/widthmirror.c +++ b/veejay-current/veejay-server/libvje/effects/widthmirror.c @@ -46,7 +46,7 @@ void widthmirror_apply(VJFrame *frame, int width_div) { unsigned int r, c; const unsigned int width = frame->width; - const unsigned int len = frame->len; + const int len = frame->len; const int uv_len = frame->uv_len; const int uv_width = frame->uv_width; const int uv_width_div = width_div; diff --git a/veejay-current/veejay-server/libvje/effects/zoom.c b/veejay-current/veejay-server/libvje/effects/zoom.c index 818265cc..b7a03846 100644 --- a/veejay-current/veejay-server/libvje/effects/zoom.c +++ b/veejay-current/veejay-server/libvje/effects/zoom.c @@ -100,7 +100,7 @@ void zoom_apply( VJFrame *frame, int x, int y, int factor, int dir, int alpha) { const unsigned int width = frame->width; const unsigned int height = frame->height; - const unsigned int len = frame->len; + const int len = frame->len; if( zoom_[0] != x || zoom_[1] != y || zoom_[2] != factor || !zoom_vp_ || dir != zoom_[3]) { diff --git a/veejay-current/veejay-server/libvje/transitions/fadecolor.c b/veejay-current/veejay-server/libvje/transitions/fadecolor.c index c23ea1a0..11fb6e63 100644 --- a/veejay-current/veejay-server/libvje/transitions/fadecolor.c +++ b/veejay-current/veejay-server/libvje/transitions/fadecolor.c @@ -55,7 +55,7 @@ vj_effect *fadecolor_init(int w,int h) void colorfade_apply(VJFrame *frame, int opacity, int color) { unsigned int i, op0, op1; - const unsigned int len = frame->len; + const int len = frame->len; uint8_t colorCb = 128, colorCr = 128; uint8_t colorY=0; const int uv_len = frame->uv_len; diff --git a/veejay-current/veejay-server/libvje/transitions/fadecolorrgb.c b/veejay-current/veejay-server/libvje/transitions/fadecolorrgb.c index cfbc731e..231bf33e 100644 --- a/veejay-current/veejay-server/libvje/transitions/fadecolorrgb.c +++ b/veejay-current/veejay-server/libvje/transitions/fadecolorrgb.c @@ -64,7 +64,7 @@ vj_effect *fadecolorrgb_init(int w,int h) void colorfadergb_apply( VJFrame *frame, int opacity, int r, int g, int b) { unsigned int i, op0, op1; - const unsigned int len = frame->len; + const int len = frame->len; unsigned int colorCb = 128, colorCr = 128; unsigned int colorY; const int uv_len = frame->uv_len; diff --git a/veejay-current/veejay-server/libvje/transitions/slidingdoor.c b/veejay-current/veejay-server/libvje/transitions/slidingdoor.c index b0ec5e79..48c7b329 100644 --- a/veejay-current/veejay-server/libvje/transitions/slidingdoor.c +++ b/veejay-current/veejay-server/libvje/transitions/slidingdoor.c @@ -59,7 +59,7 @@ vj_effect *slidingdoor_init(int width, int height) void slidingdoor_apply( VJFrame *frame, VJFrame *frame2, int mode) { unsigned int i; - const unsigned int len = frame->len; + const int len = frame->len; const uint8_t *Y2 = frame2->data[0]; const uint8_t *Cb2= frame2->data[1]; const uint8_t *Cr2= frame2->data[2]; diff --git a/veejay-current/veejay-server/libvje/transitions/transcarot.c b/veejay-current/veejay-server/libvje/transitions/transcarot.c index 3fddac2c..92a35028 100644 --- a/veejay-current/veejay-server/libvje/transitions/transcarot.c +++ b/veejay-current/veejay-server/libvje/transitions/transcarot.c @@ -147,7 +147,7 @@ static void transcarot2_apply( VJFrame *frame, VJFrame *frame2, int point_size, int i; unsigned int op0, op1; const unsigned int width = frame->width; - unsigned int len = frame->len; + const int len = frame->len; unsigned int uv_width = frame->uv_width; int uv_dy, uv_dye, uv_row_start, uv_row_length; uint8_t *Y = frame->data[0]; diff --git a/veejay-current/veejay-server/libvje/transitions/vbar.c b/veejay-current/veejay-server/libvje/transitions/vbar.c index d0b0e8d9..7f0166ff 100644 --- a/veejay-current/veejay-server/libvje/transitions/vbar.c +++ b/veejay-current/veejay-server/libvje/transitions/vbar.c @@ -68,7 +68,7 @@ void vbar_apply(VJFrame *frame, VJFrame *frame2, int divider, int top_y, int bot { const unsigned int width = frame->width; const unsigned int height = frame->height; - const unsigned int len = frame->len; + const int len = frame->len; //int top_width = width; /* frame in frame destination area */ int top_width = width/divider; int bottom_width = width - top_width; From dc5e61f1c37b6a52692558aca2a8cff59fa9921f Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Mon, 1 Aug 2016 19:36:53 +0200 Subject: [PATCH 168/170] Libvje / refactor : frame->len outside the loop --- .../veejay-server/libvje/effects/alpha2img.c | 7 ++++--- .../veejay-server/libvje/effects/alphablend.c | 5 +++-- veejay-current/veejay-server/libvje/effects/autoeq.c | 10 ++++++---- veejay-current/veejay-server/libvje/effects/colflash.c | 2 +- .../veejay-server/libvje/effects/complexinvert.c | 3 ++- .../veejay-server/libvje/effects/complexsaturate.c | 4 ++-- .../veejay-server/libvje/effects/feathermask.c | 3 ++- .../veejay-server/libvje/effects/killchroma.c | 7 ++++--- veejay-current/veejay-server/libvje/effects/mtracer.c | 5 +++-- veejay-current/veejay-server/libvje/effects/nervous.c | 2 +- 10 files changed, 28 insertions(+), 20 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/alpha2img.c b/veejay-current/veejay-server/libvje/effects/alpha2img.c index d8bbfd1a..1dfb5c9a 100644 --- a/veejay-current/veejay-server/libvje/effects/alpha2img.c +++ b/veejay-current/veejay-server/libvje/effects/alpha2img.c @@ -42,8 +42,9 @@ void alpha2img_apply( VJFrame *frame) uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; uint8_t *a = frame->data[3]; + const int len = frame->len; - veejay_memcpy( Y, a, frame->len ); - veejay_memset( Cb,128, (frame->ssm ? frame->len : frame->uv_len) ); - veejay_memset( Cr,128, (frame->ssm ? frame->len : frame->uv_len) ); + veejay_memcpy( Y, a, len ); + veejay_memset( Cb,128, (frame->ssm ? len : frame->uv_len) ); + veejay_memset( Cr,128, (frame->ssm ? len : frame->uv_len) ); } diff --git a/veejay-current/veejay-server/libvje/effects/alphablend.c b/veejay-current/veejay-server/libvje/effects/alphablend.c index fd0c2142..28eab605 100644 --- a/veejay-current/veejay-server/libvje/effects/alphablend.c +++ b/veejay-current/veejay-server/libvje/effects/alphablend.c @@ -49,8 +49,9 @@ static inline int blend_plane( uint8_t *dst, uint8_t *A, uint8_t *B, uint8_t *aA void alphablend_apply( VJFrame *frame, VJFrame *frame2) { - size_t uv_len = (frame->ssm ? frame->len : frame->uv_len ); - blend_plane( frame->data[0], frame->data[0], frame2->data[0], frame2->data[3], frame->len ); + const int len = frame->len; + const int uv_len = (frame->ssm ? len : frame->uv_len ); + blend_plane( frame->data[0], frame->data[0], frame2->data[0], frame2->data[3], len ); blend_plane( frame->data[1], frame->data[1], frame2->data[1], frame2->data[3], uv_len ); blend_plane( frame->data[2], frame->data[2], frame2->data[2], frame2->data[3], uv_len ); } diff --git a/veejay-current/veejay-server/libvje/effects/autoeq.c b/veejay-current/veejay-server/libvje/effects/autoeq.c index c510a461..8877abe2 100644 --- a/veejay-current/veejay-server/libvje/effects/autoeq.c +++ b/veejay-current/veejay-server/libvje/effects/autoeq.c @@ -73,17 +73,19 @@ void autoeq_free() void autoeq_apply( VJFrame *frame, int val, int intensity, int strength) { + const int len = frame->len; + const int uv_len = frame->uv_len; if( val == 0 ) { VJFrame tmp; veejay_memcpy( &tmp, frame, sizeof(VJFrame)); - tmp.data[0] = (uint8_t*) vj_malloc( sizeof(uint8_t) * frame->len ); - vj_frame_copy1( frame->data[0], tmp.data[0], frame->len ); + tmp.data[0] = (uint8_t*) vj_malloc( sizeof(uint8_t) * len ); + vj_frame_copy1( frame->data[0], tmp.data[0], len ); veejay_histogram_draw( histogram_,&tmp, frame, intensity, strength ); - vj_frame_clear1( frame->data[1], 128, frame->uv_len ); - vj_frame_clear1( frame->data[2], 128, frame->uv_len ); + vj_frame_clear1( frame->data[1], 128, uv_len ); + vj_frame_clear1( frame->data[2], 128, uv_len ); free(tmp.data[0]); } diff --git a/veejay-current/veejay-server/libvje/effects/colflash.c b/veejay-current/veejay-server/libvje/effects/colflash.c index bcb54fee..cc72016a 100644 --- a/veejay-current/veejay-server/libvje/effects/colflash.c +++ b/veejay-current/veejay-server/libvje/effects/colflash.c @@ -61,7 +61,7 @@ static int color_delay_ = 0; static int delay_ = 0; void colflash_apply( VJFrame *frame, int f,int r, int g, int b, int d) { - const int len = frame->len; + const int len = frame->len; const int uv_len = (frame->ssm ? len : frame->uv_len); uint8_t *Y = frame->data[0]; diff --git a/veejay-current/veejay-server/libvje/effects/complexinvert.c b/veejay-current/veejay-server/libvje/effects/complexinvert.c index 7483eee2..378d341f 100644 --- a/veejay-current/veejay-server/libvje/effects/complexinvert.c +++ b/veejay-current/veejay-server/libvje/effects/complexinvert.c @@ -77,6 +77,7 @@ void complexinvert_apply(VJFrame *frame, int i_angle, int r, int g, int b, uint8_t *Y = frame->data[0]; uint8_t *Cb= frame->data[1]; uint8_t *Cr= frame->data[2]; + const int len = frame->len; int iy=pixel_Y_lo_,iu=128,iv=128; _rgb2yuv( r,g,b, iy,iu,iv ); _y = (float) iy; @@ -105,7 +106,7 @@ void complexinvert_apply(VJFrame *frame, int i_angle, int r, int g, int b, bg_cb = frame->data[1]; bg_cr = frame->data[2]; - for (pos = 0; pos < frame->len; pos++) + for (pos = 0; pos < len; pos++) { short xx, yy; diff --git a/veejay-current/veejay-server/libvje/effects/complexsaturate.c b/veejay-current/veejay-server/libvje/effects/complexsaturate.c index 755f0668..8d523995 100644 --- a/veejay-current/veejay-server/libvje/effects/complexsaturate.c +++ b/veejay-current/veejay-server/libvje/effects/complexsaturate.c @@ -73,7 +73,7 @@ void complexsaturation_apply(VJFrame *frame, int i_angle, int r, int g, int b, { // double degrees = adjust_degrees * 0.01; // double dsat = adjust_v * 0.01; - + const int len = frame->len; float hue = (adjust_degrees/180.0)*M_PI; float sat = (adjust_v / 100.0f); @@ -121,7 +121,7 @@ void complexsaturation_apply(VJFrame *frame, int i_angle, int r, int g, int b, bg_cr = frame->data[2]; const int s = (int) rint( sin(hue) * (1<<16) * sat ); const int c = (int) rint( cos(hue) * (1<<16) * sat ); - for (pos = 0; pos < frame->len; pos++) + for (pos = 0; pos < len; pos++) { short xx, yy; diff --git a/veejay-current/veejay-server/libvje/effects/feathermask.c b/veejay-current/veejay-server/libvje/effects/feathermask.c index 55041101..73343d29 100644 --- a/veejay-current/veejay-server/libvje/effects/feathermask.c +++ b/veejay-current/veejay-server/libvje/effects/feathermask.c @@ -77,7 +77,8 @@ void feathermask_apply(VJFrame *frame) { const unsigned int width = frame->width; const unsigned int height = frame->height; - vj_frame_copy1( frame->data[3],mask, frame->len ); + const int len = frame->len; + vj_frame_copy1( frame->data[3],mask, len ); feathermask1_apply(frame, mask, width, height); } diff --git a/veejay-current/veejay-server/libvje/effects/killchroma.c b/veejay-current/veejay-server/libvje/effects/killchroma.c index 05abf960..d90daa3d 100644 --- a/veejay-current/veejay-server/libvje/effects/killchroma.c +++ b/veejay-current/veejay-server/libvje/effects/killchroma.c @@ -48,13 +48,14 @@ vj_effect *killchroma_init(int w, int h) void killchroma_apply(VJFrame *frame, int n) { + const int len = frame->len; if(n==0) { - veejay_memset( frame->data[1], 128, (frame->ssm ? frame->len : frame->uv_len) ); - veejay_memset( frame->data[2], 128, (frame->ssm ? frame->len : frame->uv_len) ); + veejay_memset( frame->data[1], 128, (frame->ssm ? len : frame->uv_len) ); + veejay_memset( frame->data[2], 128, (frame->ssm ? len : frame->uv_len) ); } else { - veejay_memset( frame->data[n], 128, (frame->ssm ? frame->len : frame->uv_len ) ); + veejay_memset( frame->data[n], 128, (frame->ssm ? len : frame->uv_len ) ); } } diff --git a/veejay-current/veejay-server/libvje/effects/mtracer.c b/veejay-current/veejay-server/libvje/effects/mtracer.c index 751c9bfa..5e9a4f64 100644 --- a/veejay-current/veejay-server/libvje/effects/mtracer.c +++ b/veejay-current/veejay-server/libvje/effects/mtracer.c @@ -77,12 +77,13 @@ int mtracer_malloc(int w, int h) void mtracer_apply( VJFrame *frame, VJFrame *frame2, int mode, int n) { + const int len = frame->len; VJFrame m; veejay_memcpy( &m, frame, sizeof(VJFrame )); if (mtrace_counter == 0) { overlaymagic_apply(frame, frame2, mode,0); - vj_frame_copy1( mtrace_buffer[0], frame->data[0], frame->len ); + vj_frame_copy1( mtrace_buffer[0], frame->data[0], len ); } else { overlaymagic_apply(frame, frame2, mode,0); m.data[0] = mtrace_buffer[0]; @@ -90,7 +91,7 @@ void mtracer_apply( VJFrame *frame, VJFrame *frame2, int mode, int n) m.data[2] = frame->data[2]; m.data[3] = frame->data[3]; overlaymagic_apply( &m, frame2, mode, 0 ); - vj_frame_copy1( mtrace_buffer[0],frame->data[0], frame->len ); + vj_frame_copy1( mtrace_buffer[0],frame->data[0], len ); } mtrace_counter++; diff --git a/veejay-current/veejay-server/libvje/effects/nervous.c b/veejay-current/veejay-server/libvje/effects/nervous.c index fe62f278..f881adea 100644 --- a/veejay-current/veejay-server/libvje/effects/nervous.c +++ b/veejay-current/veejay-server/libvje/effects/nervous.c @@ -86,7 +86,7 @@ void nervous_free(void) void nervous_apply( VJFrame *frame, int delay) { const int len = frame->len; - int uv_len = (frame->ssm == 1 ? frame->len : frame->uv_len); + int uv_len = (frame->ssm == 1 ? len : frame->uv_len); uint8_t *NY = nervous_buf[0] + (len * frames_elapsed ); uint8_t *NCb= nervous_buf[1] + (uv_len * frames_elapsed ); uint8_t *NCr= nervous_buf[2] + (uv_len * frames_elapsed ); From 31f2a0a862e798e28aa9664fca8b8d50b1b6529d Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Mon, 1 Aug 2016 19:37:17 +0200 Subject: [PATCH 169/170] Libvje / refactor : diff (fix) * w, h : unsigned --- veejay-current/veejay-server/libvje/effects/diff.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/diff.c b/veejay-current/veejay-server/libvje/effects/diff.c index e31ffa5b..99a452e3 100644 --- a/veejay-current/veejay-server/libvje/effects/diff.c +++ b/veejay-current/veejay-server/libvje/effects/diff.c @@ -131,8 +131,8 @@ void diff_apply(void *ed, VJFrame *frame, VJFrame *frame2, int threshold, { unsigned int i; const int len = frame->len; - const int width = frame->width; - const int height = frame->height; + const unsigned int width = frame->width; + const unsigned int height = frame->height; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; uint8_t *Cr = frame->data[2]; From 4a3f445a2334c944b71fa726f276df57c09d3fcc Mon Sep 17 00:00:00 2001 From: "[d.j.a.y] Jerome Blanchi" Date: Mon, 1 Aug 2016 20:07:05 +0200 Subject: [PATCH 170/170] Libvje / refactor : unsigned (fix) --- veejay-current/veejay-server/libvje/effects/fibdownscale.c | 4 ++-- veejay-current/veejay-server/libvje/effects/flare.c | 2 +- veejay-current/veejay-server/libvje/effects/lumamagick.c | 2 +- .../veejay-server/libvje/effects/magicalphaoverlays.c | 2 +- .../veejay-server/libvje/effects/magicoverlaysalpha.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/veejay-current/veejay-server/libvje/effects/fibdownscale.c b/veejay-current/veejay-server/libvje/effects/fibdownscale.c index 741db7af..2e70b0a5 100644 --- a/veejay-current/veejay-server/libvje/effects/fibdownscale.c +++ b/veejay-current/veejay-server/libvje/effects/fibdownscale.c @@ -51,8 +51,8 @@ vj_effect *fibdownscale_init(int w, int h) static void fibdownscale1_apply(VJFrame *frame, VJFrame *frame2) { unsigned i, f1; - unsigned int len = frame->len >> 1; - unsigned int uv_len = (frame->ssm ? frame->len : frame->uv_len) >> 1; + const int len = frame->len >> 1; + const int uv_len = (frame->ssm ? frame->len : frame->uv_len) >> 1; uint8_t *Y = frame->data[0]; uint8_t *Cb = frame->data[1]; diff --git a/veejay-current/veejay-server/libvje/effects/flare.c b/veejay-current/veejay-server/libvje/effects/flare.c index e357e17b..2d07b73f 100644 --- a/veejay-current/veejay-server/libvje/effects/flare.c +++ b/veejay-current/veejay-server/libvje/effects/flare.c @@ -219,7 +219,7 @@ static void flare_darken(VJFrame *frame, VJFrame *frame2, int w, int h, int op_a static void flare_simple( VJFrame *frame, VJFrame *frame2, int w, int h, int op_a ) { unsigned int i; - unsigned int len = w* h; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; diff --git a/veejay-current/veejay-server/libvje/effects/lumamagick.c b/veejay-current/veejay-server/libvje/effects/lumamagick.c index 20aa7fa4..895c7b1f 100644 --- a/veejay-current/veejay-server/libvje/effects/lumamagick.c +++ b/veejay-current/veejay-server/libvje/effects/lumamagick.c @@ -266,7 +266,7 @@ static void lumamagick_divide(VJFrame *frame, VJFrame *frame2 , int op_a, int op static void lumamagick_negdiv(VJFrame *frame, VJFrame *frame2, int op_a ,int op_b ) { unsigned int i; - unsigned int len = frame->width * frame->height; + const int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; int b, c; diff --git a/veejay-current/veejay-server/libvje/effects/magicalphaoverlays.c b/veejay-current/veejay-server/libvje/effects/magicalphaoverlays.c index de936ed5..5232d3f7 100644 --- a/veejay-current/veejay-server/libvje/effects/magicalphaoverlays.c +++ b/veejay-current/veejay-server/libvje/effects/magicalphaoverlays.c @@ -168,7 +168,7 @@ static void overlayalphamagic_divide(VJFrame *frame, VJFrame *frame2) static void overlayalphamagic_additive(VJFrame *frame, VJFrame *frame2) { - unsigned int len = frame->len; + int len = frame->len; uint8_t *A = frame->data[3]; uint8_t *A2 = frame2->data[3]; diff --git a/veejay-current/veejay-server/libvje/effects/magicoverlaysalpha.c b/veejay-current/veejay-server/libvje/effects/magicoverlaysalpha.c index a91dad7b..ca69b8a2 100644 --- a/veejay-current/veejay-server/libvje/effects/magicoverlaysalpha.c +++ b/veejay-current/veejay-server/libvje/effects/magicoverlaysalpha.c @@ -204,7 +204,7 @@ static void overlaymagicalpha_divide(VJFrame *frame, VJFrame *frame2) static void overlaymagicalpha_additive(VJFrame *frame, VJFrame *frame2) { - unsigned int len = frame->len; + int len = frame->len; uint8_t *Y = frame->data[0]; uint8_t *Y2 = frame2->data[0]; uint8_t *aA = frame->data[3];