diff --git a/veejay-current/veejay-server/libvje/Makefile.am b/veejay-current/veejay-server/libvje/Makefile.am index 3b2f81af..f0add54b 100644 --- a/veejay-current/veejay-server/libvje/Makefile.am +++ b/veejay-current/veejay-server/libvje/Makefile.am @@ -47,7 +47,7 @@ EXTRA_DIST += effects/autoeq.h effects/crosspixel.h effects/mask.h effects/rawva effects/contrast.h effects/magicscratcher.h effects/rawman.h effects/zoom.h effects/iris.h \ effects/cali.h effects/median.h effects/average-blend.h effects/perspective.h \ effects/toalpha.h effects/mixtoalpha.h effects/alpha2img.h effects/alphafill.h effects/alphaflatten.h \ - effects/magicalphaoverlays.h + effects/magicalphaoverlays.h effects/travelmatte.h effects/feathermask.h EXTRA_DIST += specs/FreeFrame.h specs/frei0r.h @@ -96,6 +96,6 @@ libvje_la_SOURCES = vj-effect.c vj-effman.c effects/common.c \ effects/contourextract.c effects/maskstop.c effects/photoplay.c effects/videoplay.c effects/rgbchannel.c \ effects/videowall.c effects/flare.c effects/radioactive.c effects/baltantv.c effects/constantblend.c effects/picinpic.c effects/bgsubtract.c effects/cali.c effects/median.c effects/average-blend.c effects/perspective.c \ effects/toalpha.c effects/mixtoalpha.c effects/alpha2img.c effects/alphafill.c effects/alphaflatten.c \ - effects/magicalphaoverlays.c + effects/magicalphaoverlays.c effects/travelmatte.c effects/feathermask.c diff --git a/veejay-current/veejay-server/libvje/internal.h b/veejay-current/veejay-server/libvje/internal.h index 028642ab..b02a18d4 100644 --- a/veejay-current/veejay-server/libvje/internal.h +++ b/veejay-current/veejay-server/libvje/internal.h @@ -122,6 +122,7 @@ enum { VJ_VIDEO_EFFECT_AVERAGEBLEND = 247, VJ_VIDEO_EFFECT_MIXTOALPHA = 248, VJ_VIDEO_EFFECT_MAGICALPHA = 249, + VJ_VIDEO_EFFECT_TRAVELMATTE = 250, }; @@ -223,14 +224,15 @@ enum { VJ_IMAGE_EFFECT_ALPHA2IMG = 194, VJ_IMAGE_EFFECT_TOALPHA = 195, VJ_IMAGE_EFFECT_ALPHAFLATTEN = 196, + VJ_IMAGE_EFFECT_ALPHAFEATHERMASK = 197, VJ_IMAGE_EFFECT_DUMMY=100, }; #define VJ_IMAGE_EFFECT_MIN 100 -#define VJ_IMAGE_EFFECT_MAX 197 +#define VJ_IMAGE_EFFECT_MAX 198 #define VJ_VIDEO_EFFECT_MIN 200 -#define VJ_VIDEO_EFFECT_MAX 250 +#define VJ_VIDEO_EFFECT_MAX 251 #define VJ_VIDEO_COUNT (VJ_VIDEO_EFFECT_MAX - VJ_VIDEO_EFFECT_MIN) @@ -641,4 +643,6 @@ 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); 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 ); #endif diff --git a/veejay-current/veejay-server/libvje/vj-effect.c b/veejay-current/veejay-server/libvje/vj-effect.c index 28ef1241..9ae8dcba 100644 --- a/veejay-current/veejay-server/libvje/vj-effect.c +++ b/veejay-current/veejay-server/libvje/vj-effect.c @@ -175,6 +175,8 @@ #include "effects/mixtoalpha.h" #include "effects/alphaflatten.h" #include "effects/magicalphaoverlays.h" +#include "effects/travelmatte.h" +#include "effects/feathermask.h" #include #include @@ -266,6 +268,7 @@ static struct { bgsubtract_malloc, bgsubtract_free, VJ_IMAGE_EFFECT_BGSUBTRACT }, { slicer_malloc, slicer_free, VJ_VIDEO_EFFECT_SLICER }, { perspective_malloc, perspective_free, VJ_IMAGE_EFFECT_PERSPECTIVE }, +{ feathermask_malloc, feathermask_free, VJ_IMAGE_EFFECT_ALPHAFEATHERMASK }, { NULL , NULL ,0 }, }; @@ -576,7 +579,8 @@ void vj_effect_initialize(int width, int height, int full_range) vj_effects[44] = iris_init(width,height); vj_effects[48] = mixtoalpha_init(width,height); vj_effects[49] = overlayalphamagic_init(width,height); - vj_effects[50] = dummy_init(width,height); + vj_effects[50] = travelmatte_init(width,height); + vj_effects[51] = dummy_init(width,height); vj_effects[i + 1] = mirrors2_init(width,height); vj_effects[i + 2] = mirrors_init(width,height); vj_effects[i + 3] = widthmirror_init(width,height); @@ -673,6 +677,7 @@ void vj_effect_initialize(int width, int height, int full_range) vj_effects[i + 94 ] = alpha2img_init(width,height); vj_effects[i + 95 ] = toalpha_init(width,height); vj_effects[i + 96 ] = alphaflatten_init(width,height); + vj_effects[i + 97 ] = feathermask_init(width,height); max_width = width; max_height = height; diff --git a/veejay-current/veejay-server/libvje/vj-effman.c b/veejay-current/veejay-server/libvje/vj-effman.c index d75dad19..114c3dc5 100644 --- a/veejay-current/veejay-server/libvje/vj-effman.c +++ b/veejay-current/veejay-server/libvje/vj-effman.c @@ -424,6 +424,9 @@ void vj_effman_apply_image_effect( case VJ_IMAGE_EFFECT_ALPHAFLATTEN: alphaflatten_apply(frames[0],frames[0]->width,frames[0]->height); break; + case VJ_IMAGE_EFFECT_ALPHAFEATHERMASK: + feathermask_apply(frames[0], frames[0]->width, frames[0]->height ); + break; } } @@ -652,6 +655,9 @@ void vj_effman_apply_video_effect( VJFrame **frames, vjp_kf *todo_info,int *arg, case VJ_VIDEO_EFFECT_MAGICALPHA: overlayalphamagic_apply(frames[0],frames[1],frames[0]->width,frames[0]->height,arg[0],arg[1]); break; + case VJ_VIDEO_EFFECT_TRAVELMATTE: + travelmatte_apply(frames[0],frames[1],frames[0]->width,frames[0]->height,arg[0]); + break; } } diff --git a/veejay-current/veejay-server/libvje/vje.h b/veejay-current/veejay-server/libvje/vje.h index 985ac1d5..9577c8b5 100644 --- a/veejay-current/veejay-server/libvje/vje.h +++ b/veejay-current/veejay-server/libvje/vje.h @@ -22,7 +22,7 @@ #define FX_LIMIT 1024 -#define MAX_EFFECTS 147 +#define MAX_EFFECTS 149 #define PARAM_WIDTH (1<<0x2) #define PARAM_HEIGHT (1<<0x3) #define PARAM_FADER (1<<0x1)