Merge pull request #127 from d-j-a-y/djay_libvje

libvje / refactor : function calls done !
This commit is contained in:
Niels
2016-08-01 22:58:10 +02:00
committed by GitHub
276 changed files with 1574 additions and 2521 deletions

View File

@@ -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 <config.h>
#include <stdint.h>
#include <stdio.h>
#include <libvjmem/vjmem.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#include "alpha2img.h"
vj_effect *alpha2img_init(int w, int h)
@@ -38,14 +36,15 @@ 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];
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) );
}

View File

@@ -20,10 +20,6 @@
#ifndef ALPHA2IMG_H
#define ALPHA2IMG_H
#include <libvje/vje.h>
#include <sys/types.h>
#include <stdint.h>
vj_effect *alpha2img_init(int w, int h);
void alpha2img_apply( VJFrame *frame, int width, int height);
void alpha2img_apply( VJFrame *frame);
#endif

View File

@@ -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 <config.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#include "alphablend.h"
#include "common.h"
vj_effect *alphablend_init(int w, int h)
{
@@ -51,10 +47,11 @@ 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 );
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 );
}

View File

@@ -20,11 +20,6 @@
#ifndef ALPHABLEND_H
#define ALPHABLEND_H
#include <libvje/vje.h>
#include <sys/types.h>
#include <stdint.h>
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

View File

@@ -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 <config.h>
#include <stdint.h>
#include <stdio.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#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 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

View File

@@ -20,10 +20,6 @@
#ifndef ALPHA_DAMPEN_H
#define ALPHA_DAMPEN_H
#include <libvje/vje.h>
#include <sys/types.h>
#include <stdint.h>
vj_effect *alphadampen_init(int w, int h);
void alphadampen_apply( VJFrame *frame, int b1);
#endif

View File

@@ -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 <config.h>
#include <stdint.h>
#include <stdio.h>
#include <libvjmem/vjmem.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#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 int len = frame->len;
uint8_t *a = frame->data[3];
veejay_memset(a, val, len );
}

View File

@@ -20,10 +20,6 @@
#ifndef ALPHAFILL_H
#define ALPHAFILL_H
#include <libvje/vje.h>
#include <sys/types.h>
#include <stdint.h>
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

View File

@@ -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 <config.h>
#include <stdint.h>
#include <stdio.h>
#include <libvjmem/vjmem.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#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 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 );
}
}

View File

@@ -20,10 +20,6 @@
#ifndef ALPHAFLATTEN_H
#define ALPHAFLATTEN_H
#include <libvje/vje.h>
#include <sys/types.h>
#include <stdint.h>
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

View File

@@ -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 <config.h>
#include <stdint.h>
#include <stdio.h>
#include <libvjmem/vjmem.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#include "alphanegate.h"
vj_effect *alphanegate_init(int w, int h)
@@ -49,9 +47,9 @@ 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;
const int len = frame->len;
uint8_t *A = frame->data[3];
unsigned int i;

View File

@@ -20,10 +20,6 @@
#ifndef ALPHANEGATE_H
#define ALPHANEGATE_H
#include <libvje/vje.h>
#include <sys/types.h>
#include <stdint.h>
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

View File

@@ -22,11 +22,8 @@
* derived from greyselect.c
*/
#include <stdint.h>
#include <stdio.h>
#include <libvjmem/vjmem.h>
#include <math.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#include "alphaselect.h"
vj_effect *alphaselect_init(int w, int h)
@@ -76,17 +73,16 @@ 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;
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;
const int len = frame->len;
uint8_t *Y = frame->data[0];
uint8_t *Cb = frame->data[1];
uint8_t *Cr = frame->data[2];
@@ -94,7 +90,6 @@ void alphaselect_apply( VJFrame *frame, int width,
int iy=0,iu=128,iv=128;
_rgb2yuv(r,g,b,iy,iu,iv);
_y = (float) iy;
aa = (float) iu;
bb = (float) iv;
@@ -113,7 +108,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 +128,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 +148,3 @@ void alphaselect_apply( VJFrame *frame, int width,
}
}
}

View File

@@ -20,13 +20,7 @@
#ifndef ALPHASELECT_H
#define ALPHASELECT_H
#include <libvje/vje.h>
#include <sys/types.h>
#include <stdint.h>
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

View File

@@ -22,11 +22,8 @@
* originally from http://gc-films.com/chromakey.html
*/
#include <stdint.h>
#include <stdio.h>
#include <libvjmem/vjmem.h>
#include <math.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#include "alphaselect2.h"
vj_effect *alphaselect2_init(int w, int h)
@@ -92,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];

View File

@@ -20,10 +20,6 @@
#ifndef ALPHASELECT2_H
#define ALPHASELECT2_H
#include <libvje/vje.h>
#include <sys/types.h>
#include <stdint.h>
vj_effect *alphaselect2_init();
void alphaselect2_apply( VJFrame *frame, int tola,int red,int green,int blue, int tolb,int use_alpha);
#endif

View File

@@ -18,13 +18,10 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA.
*/
#include <config.h>
#include <stdint.h>
#include <stdio.h>
#include <libvjmem/vjmem.h>
#include "alphatransition.h"
#include <veejay/vj-task.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#include <veejay/vj-task.h>
#include "alphatransition.h"
/* almost the same as masktransition.c, but adding threshold and direction parameters */

View File

@@ -20,10 +20,6 @@
#ifndef ALPHATRANSITION_H
#define ALPHATRANSITION_H
#include <libvje/vje.h>
#include <sys/types.h>
#include <stdint.h>
void alphatransition_apply( VJFrame *frame, VJFrame *frame2, int index, int duration, int dir, int threshold);
vj_effect *alphatransition_init(int w, int h);
#endif

View File

@@ -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 <config.h>
#include <stdint.h>
#include <stdio.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#include "autoeq.h"
#include <stdlib.h>
#include "common.h"
vj_effect *autoeq_init(int w, int h)
{
vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect));
@@ -73,19 +71,21 @@ 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)
{
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]);
}

View File

@@ -20,12 +20,8 @@
#ifndef AUTOEQ_H
#define AUTOEQ_H
#include <libvje/vje.h>
#include <sys/types.h>
#include <stdint.h>
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

View File

@@ -18,11 +18,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA.
*/
#include <config.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <libvje/vje.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#include <veejay/vj-task.h>
#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 )
{
}

View File

@@ -20,14 +20,10 @@
#ifndef AVERAGEBLEND_H
#define AVERAGEBLEND_H
#include <libvje/vje.h>
#include <sys/types.h>
#include <stdint.h>
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

View File

@@ -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 <config.h>
#include <stdint.h>
#include <stdio.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#include "average.h"
#include "common.h"
static double *running_sum[4] = { NULL, NULL, NULL, NULL };
static int last_params[2] = { 0,0 };

View File

@@ -20,10 +20,6 @@
#ifndef AVERAGE_H
#define AVERAGE_H
#include <libvje/vje.h>
#include <sys/types.h>
#include <stdint.h>
vj_effect *average_init();
void average_apply(VJFrame *src, int sum, int mode);
void average_free();

View File

@@ -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 <config.h>
#include <stdint.h>
#include <stdio.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#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 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 )

View File

@@ -20,12 +20,8 @@
#ifndef BALTAN_TVH
#define BALTAN_TVH
#include <libvje/vje.h>
#include <sys/types.h>
#include <stdint.h>
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

View File

@@ -24,13 +24,10 @@
to set the distance and mode
*/
#include <config.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#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,8 +94,8 @@ 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 unsigned int width = frame->width;
const unsigned int height = frame->height;
const int len = frame->len;
unsigned int y_val = val;
unsigned int x,y;
@@ -125,8 +122,8 @@ 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 unsigned int width = frame->width;
const unsigned int height = frame->height;
const int len = frame->len;
unsigned int y_val = val;
unsigned int x,y;
@@ -156,8 +153,8 @@ 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 unsigned int width = frame->width;
const unsigned int height = frame->height;
const int len = frame->len;
unsigned int y_val = val;
uint8_t *Y = frame->data[0];
@@ -183,8 +180,8 @@ 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 unsigned int width = frame->width;
const unsigned int height = frame->height;
const int len = frame->len;
unsigned int y_val = val;
uint8_t *Y = frame->data[0];

View File

@@ -20,10 +20,6 @@
#ifndef BATHROOM_H
#define BATHROOM_H
#include <libvje/vje.h>
#include <sys/types.h>
#include <stdint.h>
vj_effect *bathroom_init(int w, int h);
int bathroom_malloc(int w, int h);
void bathroom_free();

View File

@@ -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 <config.h>
#include <stdint.h>
#include <stdio.h>
#include <libvje/vje.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#include <libsubsample/subsample.h>
#include "common.h"
#include "bgpush.h"
static uint8_t *frame_data = NULL;

View File

@@ -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 <stdint.h>
#include <stdio.h>
#include <libvjmem/vjmem.h>
#include "bgsubtract.h"
#include "common.h"
#include <math.h>
#include <libyuv/yuvconv.h>
#include <libvjmem/vjmem.h>
#include <libvjmsg/vj-msg.h>
#include "softblur.h"
#include <libsubsample/subsample.h>
#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,10 @@ 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 int len = frame->len;
const int uv_len = (frame->ssm ? len : frame->uv_len );
if( auto_hist )
vje_histogram_auto_eq( frame );
@@ -206,12 +204,12 @@ void bgsubtract_apply(VJFrame *frame,int width, int height, int threshold, int m
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:
@@ -222,10 +220,10 @@ void bgsubtract_apply(VJFrame *frame,int width, int height, int threshold, int m
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 );
}
}
}

View File

@@ -20,15 +20,11 @@
#ifndef BGSUBTRACT_H
#define BGSUBTRACT_H
#include <libvje/vje.h>
#include <sys/types.h>
#include <stdint.h>
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

View File

@@ -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 <stdint.h>
#include <stdio.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#include <config.h>
#include "binaryoverlays.h"
#include <libvje/effects/common.h>
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;
}
}

View File

@@ -20,14 +20,7 @@
#ifndef BINARYOVERLAYS_H
#define BINARYOVERLAYS_H
#include <libvje/vje.h>
#include <sys/types.h>
#include <stdint.h>
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

View File

@@ -48,11 +48,8 @@
*/
#include <config.h>
#include <stdint.h>
#include <stdio.h>
#include <libvjmem/vjmem.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#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 int len = frame->len;
uint8_t *srcY = frame->data[0];
uint8_t *srcCb= frame->data[1];
uint8_t *srcCr= frame->data[2];

View File

@@ -20,13 +20,8 @@
#ifndef BLOB_H
#define BLOB_H
#include <libvje/vje.h>
#include <sys/types.h>
#include <stdint.h>
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

View File

@@ -56,15 +56,10 @@
*/
#include <config.h>
#include <stdint.h>
#include <math.h>
#include <stdio.h>
#include <libvjmem/vjmem.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#include "boids.h"
typedef struct
{
short x; // x
@@ -333,9 +328,11 @@ 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 unsigned int width = frame->width;
const unsigned int height = frame->height;
const int len = frame->len;
uint8_t *srcY = frame->data[0];
uint8_t *srcCb= frame->data[1];

View File

@@ -20,13 +20,9 @@
#ifndef BOIDS_H
#define BOIDS_H
#include <libvje/vje.h>
#include <sys/types.h>
#include <stdint.h>
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

View File

@@ -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 <stdint.h>
#include <stdio.h>
#include <libvje/vje.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#include "borders.h"
#include "common.h"
vj_effect *borders_init(int width,int height)
{

View File

@@ -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 <stdint.h>
#include <stdio.h>
#include <libvjmem/vjmem.h>
#include <math.h>
#include "bwotsu.h"
#include "common.h"
#include <libvjmem/vjmem.h>
#include "bwotsu.h"
vj_effect *bwotsu_init(int w, int h)
{
vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect));
@@ -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:

View File

@@ -20,10 +20,6 @@
#ifndef BWOTSU_H
#define BWOTSU_H
#include <libvje/vje.h>
#include <sys/types.h>
#include <stdint.h>
vj_effect *bwotsu_init();
void bwotsu_apply(VJFrame *frame, int mode, int skew, int invert );
#endif

View File

@@ -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 <stdint.h>
#include <stdio.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#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,8 +79,7 @@ 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 unsigned int width = frame->width;
const int len = frame->len;
uint8_t *Y = frame->data[0];
uint8_t *Cb = frame->data[1];
@@ -100,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];
@@ -137,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];

View File

@@ -20,10 +20,6 @@
#ifndef BWSELECT_H
#define BWSELECT_H
#include <libvje/vje.h>
#include <sys/types.h>
#include <stdint.h>
vj_effect *bwselect_init();
void bwselect_apply(VJFrame *frame, int min_threshold,int max_threshold, int mode, int gamma);
#endif

View File

@@ -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 <stdint.h>
#include <config.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#include <libavutil/avutil.h>
#include <libvje/vje.h>
#include <libyuv/yuvconv.h>
#include <libvjmsg/vj-msg.h>
#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 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)
}
}

View File

@@ -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

View File

@@ -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 <config.h>
#include <stdint.h>
#include <stdio.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#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 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

View File

@@ -20,10 +20,6 @@
#ifndef CARTONIZE_H
#define CARTONIZE_H
#include <libvje/vje.h>
#include <sys/types.h>
#include <stdint.h>
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

View File

@@ -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 <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <libvje/vje.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#include <libvjmsg/vj-msg.h>
#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 int len = frame->len;
VJFrame source;
int strides[4] = { len, len, len, 0 };
vj_frame_copy( frame->data, tmpimage, strides );

View File

@@ -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 );

View File

@@ -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 <config.h>
#include <stdint.h>
#include <stdio.h>
#include <libvje/vje.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#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;

View File

@@ -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();

View File

@@ -23,13 +23,9 @@
threshold value or substraction value depending on the mode
of this effect */
#include <stdint.h>
#include <stdio.h>
#include <libvje/vje.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#include "chromamagick.h"
#include <math.h>
#include "common.h"
vj_effect *chromamagick_init(int w, int h)
{

View File

@@ -23,13 +23,10 @@
threshold value or substraction value depending on the mode
of this effect */
#include <stdint.h>
#include <stdio.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#include "chromamagickalpha.h"
#include <math.h>
#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,8 +66,7 @@ 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;
@@ -97,8 +93,7 @@ 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;
@@ -136,8 +131,7 @@ 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;
@@ -166,8 +160,7 @@ 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;
@@ -196,7 +189,7 @@ 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;
@@ -244,8 +237,7 @@ 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;
@@ -274,8 +266,7 @@ 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;
@@ -305,8 +296,7 @@ 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;
@@ -334,7 +324,7 @@ 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;
@@ -372,7 +362,7 @@ 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;
@@ -415,8 +405,7 @@ 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;
@@ -452,8 +441,7 @@ 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;
@@ -494,7 +482,7 @@ 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;
uint8_t *Y = frame->data[0];
@@ -547,7 +535,7 @@ 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;
@@ -584,7 +572,7 @@ 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;
@@ -629,7 +617,7 @@ 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;
@@ -668,7 +656,7 @@ 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;
@@ -705,7 +693,7 @@ 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;
@@ -743,7 +731,7 @@ 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;
@@ -779,7 +767,7 @@ 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;
@@ -813,7 +801,7 @@ 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;
@@ -852,7 +840,7 @@ 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;
@@ -893,8 +881,7 @@ 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;
uint8_t *Y = frame->data[0];
@@ -934,7 +921,7 @@ 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;
@@ -963,7 +950,7 @@ 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;
@@ -993,7 +980,7 @@ 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;
@@ -1040,7 +1027,7 @@ 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;
@@ -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;
}
}

View File

@@ -20,10 +20,6 @@
#ifndef CHROMAMAGICKALPHA_H
#define CHROMAMAGICKALPHA_H
#include <libvje/vje.h>
#include <sys/types.h>
#include <stdint.h>
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

View File

@@ -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 <config.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include "chromapalette.h"
#include "common.h"
#include <math.h>
#include <libvjmem/vjmem.h>
#include "chromapalette.h"
vj_effect *chromapalette_init(int w, int h)
{
@@ -83,7 +79,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 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;

View File

@@ -20,11 +20,6 @@
#ifndef CHROMAPAL_H
#define CHROMAPAL_H
#include <libvjmem/vjmem.h>
#include <libvje/vje.h>
#include <sys/types.h>
#include <stdint.h>
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

View File

@@ -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 <config.h>
#include <stdint.h>
#include <stdio.h>
#include <libvjmem/vjmem.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#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,8 +138,8 @@ 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 unsigned int width = frame->width;
const unsigned int height = frame->height;
const int len = frame->len;
const unsigned int op_a = (opacity > 255) ? 255 : opacity;
const unsigned int op_b = 255 - op_a;

View File

@@ -20,11 +20,6 @@
#ifndef CHROMASCRATCHER_H
#define CHROMASCRATCHER_H
#include <libvjmem/vjmem.h>
#include <libvje/vje.h>
#include <sys/types.h>
#include <stdint.h>
vj_effect *chromascratcher_init(int w, int h);
int chromascratcher_malloc(int w, int h);
void chromascratcher_free();

View File

@@ -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 <config.h>
#include <stdint.h>
#include <stdlib.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#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];

View File

@@ -20,10 +20,6 @@
#ifndef CHROMIUM_H
#define CHROMIUM_H
#include <libvje/vje.h>
#include <sys/types.h>
#include <stdint.h>
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

View File

@@ -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 <config.h>
#include <stdint.h>
#include <stdio.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#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 int len = frame->len;
const int uv_len = (frame->ssm ? 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;
}
}
}

View File

@@ -20,10 +20,6 @@
#ifndef COLFLASH_H
#define COLFLASH_H
#include <libvje/vje.h>
#include <sys/types.h>
#include <stdint.h>
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

View File

@@ -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 <config.h>
#include <stdio.h>
#include <stdint.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#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,18 +91,19 @@ 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;
unsigned int len = frame->len;
const unsigned int width = frame->width;
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
{ 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 }
};

View File

@@ -20,12 +20,8 @@
#ifndef COLMORPHOLOGY_H
#define COLMORPHOLOGY_H
#include <libvje/vje.h>
#include <sys/types.h>
#include <stdint.h>
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

View File

@@ -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 <stdint.h>
#include <stdio.h>
#include <libvje/vje.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#include "color.h"

View File

@@ -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 <stdint.h>
#include <stdio.h>
#include <math.h>
#include <libvje/vje.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#include "coloradjust.h"
#include "common.h"
vj_effect *coloradjust_init(int w, int h)
{

View File

@@ -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 <config.h>
#include <stdint.h>
#include <stdio.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#include "colorhis.h"
#include <libavutil/pixfmt.h>
#include <libyuv/yuvconv.h>
#include <veejay/vims.h>
#include <libel/avcommon.h>
#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 );
}
}
}

View File

@@ -20,12 +20,8 @@
#ifndef COLORHIS_H
#define COLORHIS_H
#include <libvje/vje.h>
#include <sys/types.h>
#include <stdint.h>
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

View File

@@ -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 <config.h>
#include <stdint.h>
#include <stdio.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#include <libvje/effects/common.h>
#include "colormap.h"
vj_effect *colormap_init(int w, int h)
@@ -55,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];

View File

@@ -20,10 +20,6 @@
#ifndef COLORMAP_H
#define COLORMAP_H
#include <libvje/vje.h>
#include <sys/types.h>
#include <stdint.h>
vj_effect *colormap_init(int w, int h);
void colormap_apply( VJFrame *frame, int vala , int valb, int valc);
#endif

View File

@@ -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 <config.h>
#include <stdint.h>
#include <stdio.h>
#include <libvje/vje.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#include "colorshift.h"
#include "common.h"
vj_effect *colorshift_init(int w, int h)
{
@@ -61,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++)
@@ -70,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++)
@@ -80,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;
@@ -88,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];
@@ -100,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 ? 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];
@@ -120,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];
@@ -132,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;
@@ -143,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;
@@ -154,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];
@@ -172,7 +169,7 @@ static void softmask_applyycbcr(VJFrame *frame, int paramt)
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 int uv_len = (frame->ssm ? len : frame->uv_len);
unsigned int x;
for (x = 0; x < len; x++)

View File

@@ -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 <stdint.h>
#include <stdio.h>
#include <math.h>
#include <libvje/vje.h>
#include <libvjmem/vjmem.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#include "complexinvert.h"
vj_effect *complexinvert_init(int w, int h)
@@ -80,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;
@@ -108,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;

View File

@@ -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 <stdint.h>
#include <stdio.h>
#include <libvjmem/vjmem.h>
#include <math.h>
#include "complexsaturate.h"
#include "common.h"
#include <libvjmem/vjmem.h>
#include "complexsaturate.h"
vj_effect *complexsaturation_init(int w, int h)
{
@@ -75,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);
@@ -123,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;

View File

@@ -20,10 +20,6 @@
#ifndef COMPLEXSATURATE_H
#define COMPLEXSATURATE_H
#include <libvje/vje.h>
#include <sys/types.h>
#include <stdint.h>
vj_effect *complexsaturation_init();
void complexsaturation_apply(VJFrame *frame, int i_angle,
int red, int green, int blue,

View File

@@ -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 <stdint.h>
#include <stdio.h>
#include <libvjmem/vjmem.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#include "complexsync.h"
#include <stdlib.h>
static uint8_t *c_outofsync_buffer[4] = { NULL,NULL,NULL, NULL };
@@ -72,7 +70,7 @@ 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 width = frame->width;
uint8_t *Y = frame->data[0];
uint8_t *Cb = frame->data[1];
uint8_t *Cr = frame->data[2];

View File

@@ -20,11 +20,6 @@
#ifndef COMPLEXSYNC_H
#define COMPLEXSYNC_H
#include <libvjmem/vjmem.h>
#include <libvje/vje.h>
#include <sys/types.h>
#include <stdint.h>
vj_effect *complexsync_init(int width, int height);
int complexsync_malloc(int w, int h);
void complexsync_free();

View File

@@ -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 <stdint.h>
#include <stdio.h>
#include <math.h>
#include <libvje/vje.h>
#include <libvjmem/vjmem.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#include "complexthreshold.h"
//FIXME: rewrite this FX
@@ -109,7 +106,7 @@ void complexthreshold_apply(VJFrame *frame, VJFrame *frame2, int i_angle,
int matrix[5];
int val, tmp1;
const int len = frame->len;
const int width = frame->width;
const unsigned int width = frame->width;
uint8_t *Y = frame->data[0];
uint8_t *Cb = frame->data[1];
uint8_t *Cr = frame->data[2];

View File

@@ -25,12 +25,10 @@
*/
#include <config.h>
#include <stdint.h>
#include <stdio.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#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 int len = frame->len;
const uint8_t y = (uint8_t) valY;
const float s = ((float) scale / 100.0 );

View File

@@ -20,11 +20,6 @@
#ifndef constantblend_H
#define constantblend_H
#include <libvje/vje.h>
#include <sys/types.h>
#include <stdint.h>
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

View File

@@ -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 <stdint.h>
#include <stdio.h>
#include <math.h>
#include <libvje/vje.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#include <libavutil/avutil.h>
#include <libvjmsg/vj-msg.h>
#include <libyuv/yuvconv.h>
#include "common.h"
#include "softblur.h"
#include "diff.h"
#include "contourextract.h"
@@ -208,8 +205,8 @@ 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 unsigned int width = frame->width;
const unsigned int height = frame->height;
const int len = frame->len;
const int uv_len = frame->uv_len;
uint8_t *Y = frame->data[0];

View File

@@ -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 <config.h>
#include <stdint.h>
#include <stdio.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#include "contrast.h"
#include "common.h"
vj_effect *contrast_init(int w, int h)
{
vj_effect *ve = (vj_effect *) vj_calloc(sizeof(vj_effect));
@@ -60,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];

View File

@@ -20,14 +20,7 @@
#ifndef CONTRAST_H
#define CONTRAST_H
#include <libvje/vje.h>
#include <sys/types.h>
#include <stdint.h>
vj_effect *contrast_init();
void contrast_apply(VJFrame *frame, int *t);
void contrast_free();
#endif

View File

@@ -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 <stdint.h>
#include <stdio.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#include "crosspixel.h"
#include "common.h"
#include <stdlib.h>
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 unsigned int width = frame->width;
const unsigned int height = frame->height;
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];
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};

View File

@@ -20,11 +20,6 @@
#ifndef CROSSPIXEL_H
#define CROSSPIXEL_H
#include <libvjmem/vjmem.h>
#include <libvje/vje.h>
#include <sys/types.h>
#include <stdint.h>
vj_effect *crosspixel_init(int w, int h);
int crosspixel_malloc(int w, int h);
void crosspixel_free();

View File

@@ -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 <config.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <libvjmem/vjmem.h>
#include <libvje/vje.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#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;
const int len = frame->len;
uint8_t *Yb = vvcutstop_buffer[0];
uint8_t *Ub = vvcutstop_buffer[1];
uint8_t *Vb = vvcutstop_buffer[2];

View File

@@ -1,13 +1,27 @@
/*
* Linux VeeJay
*
* Copyright(C)2002 Niels Elburg <nwelburg@gmail.com>
*
* 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

View File

@@ -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 <stdint.h>
#include <stdio.h>
#include <libvjmem/vjmem.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#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];

View File

@@ -20,10 +20,6 @@
#ifndef DEINTERLACE_H
#define DEINTERLACE_H
#include <libvje/vje.h>
#include <sys/types.h>
#include <stdint.h>
vj_effect *deinterlace_init();
void deinterlace_apply(VJFrame *frame, int val);
void deinterlace_free();

View File

@@ -26,11 +26,8 @@
* the GNU Public License.
*
*/
#include <config.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#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];

View File

@@ -20,10 +20,6 @@
#ifndef DICES_H
#define DICES_H
#include <libvje/vje.h>
#include <sys/types.h>
#include <stdint.h>
vj_effect *dices_init(int width, int height);
int dices_malloc(int w, int h);
void dices_free();

View File

@@ -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 <config.h>
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <libvje/vje.h>
#include <libavutil/avutil.h>
#include <libyuv/yuvconv.h>
#include <libvjmsg/vj-msg.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#include <libavutil/avutil.h>
#include <libvjmsg/vj-msg.h>
#include "softblur.h"
#include "diff.h"
#include "common.h"
static uint8_t *static_bg = NULL;
static uint32_t *dt_map = NULL;
@@ -136,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];

View File

@@ -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 <config.h>
#include <stdint.h>
#include <stdio.h>
#include <libvje/vje.h>
#include <libvjmem/vjmem.h>
#include "diffmap.h"
#include "common.h"
#include <libvjmem/vjmem.h>
#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;
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];

View File

@@ -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

View File

@@ -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 <config.h>
#include <stdint.h>
#include <stdio.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#include "dissolve.h"
#include <stdlib.h>
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 int len = frame->len;
const int op1 = (opacity > 255) ? 255 : opacity;
const int op0 = 255 - op1;

View File

@@ -20,11 +20,6 @@
#ifndef DISSOLVE_H
#define DISSOLVE_H
#include <libvje/vje.h>
#include <sys/types.h>
#include <stdint.h>
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

View File

@@ -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 <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <libvje/vje.h>
#include <libvjmem/vjmem.h>
#include <math.h>
#include "common.h"
#include "distort.h"
#include <libvjmem/vjmem.h>
#include "widthmirror.h"
#include "distort.h"
static int plasma_table[512];
static int plasma_pos1 = 0;
@@ -146,15 +141,15 @@ 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];
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 unsigned int height = frame->height;
const unsigned int width = frame->width;
const int len = frame->len;
int strides[4] = { len,len,len, 0 };

View File

@@ -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 <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#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 )
{

View File

@@ -20,10 +20,6 @@
#ifndef DITHER_H
#define DITHER_H
#include <libvje/vje.h>
#include <sys/types.h>
#include <stdint.h>
vj_effect *dither_init();
void dither_apply(VJFrame *frame, int size, int n);
#endif

View File

@@ -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 <stdint.h>
#include <stdio.h>
#include <libvje/vje.h>
#include "common.h"
#include <libvjmem/vjmem.h>
#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 int len = frame->len;
const int uv_len = frame->uv_len;
int colorCb=128, colorCr=128, colorY=0;

View File

@@ -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 <stdint.h>
#include <stdio.h>
#include <libvjmem/vjmem.h>
#include "dupmagic.h"
#include "magicoverlays.h"
#include "common.h"
#include <libvjmem/vjmem.h>
#include "magicoverlays.h"
#include "dupmagic.h"
vj_effect *dupmagic_init(int w, int h)
{

View File

@@ -20,10 +20,6 @@
#ifndef DUPMAGIC_H
#define DUPMAGIC_H
#include <libvje/vje.h>
#include <sys/types.h>
#include <stdint.h>
vj_effect *dupmagic_init();
void dupmagic_apply(VJFrame *frame, VJFrame *frame2,int n);
#endif

Some files were not shown because too many files have changed in this diff Show More