Libvje / refactor : alphablend

* w,h
* clean headers
This commit is contained in:
[d.j.a.y] Jerome Blanchi
2016-07-30 11:06:46 +02:00
parent 3b625b7393
commit a650bbee13
4 changed files with 6 additions and 15 deletions

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

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

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

View File

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