mirror of
https://github.com/game-stop/veejay.git
synced 2025-12-20 23:00:02 +01:00
Libvje / refactor : alphablend
* w,h * clean headers
This commit is contained in:
@@ -17,14 +17,10 @@
|
|||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA.
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 , USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <config.h>
|
#include "common.h"
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <libvjmem/vjmem.h>
|
#include <libvjmem/vjmem.h>
|
||||||
#include "alphablend.h"
|
#include "alphablend.h"
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
vj_effect *alphablend_init(int w, int 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;
|
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 );
|
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 );
|
blend_plane( frame->data[0], frame->data[0], frame2->data[0], frame2->data[3], frame->len );
|
||||||
|
|||||||
@@ -20,11 +20,6 @@
|
|||||||
|
|
||||||
#ifndef ALPHABLEND_H
|
#ifndef ALPHABLEND_H
|
||||||
#define ALPHABLEND_H
|
#define ALPHABLEND_H
|
||||||
#include <libvje/vje.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
vj_effect *alphablend_init(int w, int 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
|
#endif
|
||||||
|
|||||||
@@ -519,7 +519,7 @@ extern void travelmatte_apply( VJFrame *frame, VJFrame *frame2, int mode);
|
|||||||
extern void feathermask_apply( VJFrame *frame );
|
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 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 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 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 chromamagickalpha_apply( VJFrame *frame, VJFrame *frame2, int width, int height, int type, int opacity );
|
||||||
extern void overlaymagicalpha_apply( VJFrame *frame, VJFrame *frame2, int width, int height, int type, int mode );
|
extern void overlaymagicalpha_apply( VJFrame *frame, VJFrame *frame2, int width, int height, int type, int mode );
|
||||||
|
|||||||
@@ -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]);
|
travelmatte_apply(frames[0],frames[1],arg[0]);
|
||||||
break;
|
break;
|
||||||
case VJ_VIDEO_EFFECT_ALPHABLEND:
|
case VJ_VIDEO_EFFECT_ALPHABLEND:
|
||||||
alphablend_apply(frames[0],frames[1],frames[0]->width,frames[0]->height);
|
alphablend_apply(frames[0],frames[1]);
|
||||||
break;
|
break;
|
||||||
case VJ_VIDEO_EFFECT_PORTERDUFF:
|
case VJ_VIDEO_EFFECT_PORTERDUFF:
|
||||||
porterduff_apply(frames[0], frames[1], arg[0]);
|
porterduff_apply(frames[0], frames[1], arg[0]);
|
||||||
|
|||||||
Reference in New Issue
Block a user