mirror of
https://github.com/game-stop/veejay.git
synced 2026-01-06 06:55:31 +01:00
Libvje / refactor : perspective
* f->w , f->h, f->len
This commit is contained in:
@@ -97,8 +97,13 @@ void perspective_free() {
|
||||
perspective_vp_ = NULL;
|
||||
}
|
||||
|
||||
void perspective_apply( VJFrame *frame, int width, int height, int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4, int reverse)
|
||||
void perspective_apply( VJFrame *frame, int x1, int y1, int x2, int y2,
|
||||
int x3, int y3, int x4, int y4, int reverse)
|
||||
{
|
||||
const int width = frame->width;
|
||||
const int height = frame->height;
|
||||
const uint32_t len = frame->len;
|
||||
|
||||
if( x1 != perspective_[0] || y1 != perspective_[1] || x2 != perspective_[2] || y2 != perspective_[3] ||
|
||||
x3 != perspective_[4] || y3 != perspective_[5] || x4 != perspective_[6] || y4 != perspective_[7] || reverse != perspective_[8] )
|
||||
{
|
||||
@@ -118,7 +123,7 @@ void perspective_apply( VJFrame *frame, int width, int height, int x1, int y1, i
|
||||
perspective_[8] = reverse;
|
||||
}
|
||||
|
||||
int strides[4] = { (width*height),(width*height),(width*height), 0 };
|
||||
int strides[4] = { len, len, len, 0 };
|
||||
vj_frame_copy( frame->data, perspective_private_, strides );
|
||||
|
||||
viewport_process_dynamic( perspective_vp_, perspective_private_, frame->data );
|
||||
|
||||
@@ -27,5 +27,5 @@
|
||||
vj_effect *perspective_init(int width, int height);
|
||||
int perspective_malloc(int w, int h);
|
||||
void perspective_free();
|
||||
void perspective_apply( VJFrame *frame, int width, int height, int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4, int reverse);
|
||||
void perspective_apply( VJFrame *frame, int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4, int reverse);
|
||||
#endif
|
||||
|
||||
@@ -416,8 +416,8 @@ extern void ripple_apply(VJFrame *frame, int waves, int ampli,int atten);
|
||||
extern void bathroom_apply(VJFrame *frame, int mode, int val, int x0, int x1);
|
||||
extern void slice_apply(VJFrame *frame, int val, int reinit);
|
||||
extern void zoom_apply(VJFrame *frame, int xo, int yo, int f, int dir, int alpha);
|
||||
|
||||
extern void perspective_apply( VJFrame *frame, int width, int height, int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4, int reverse);
|
||||
extern void perspective_apply( VJFrame *frame, int x1, int y1, int x2, int y2,
|
||||
int x3, int y3, int x4, int y4, int reverse);
|
||||
|
||||
extern void deinterlace_apply(VJFrame *frame, int w, int h, int val);
|
||||
|
||||
|
||||
@@ -391,7 +391,7 @@ static void vj_effman_apply_image_effect(
|
||||
todo_info->tmp[1] = 0;
|
||||
break;
|
||||
case VJ_IMAGE_EFFECT_PERSPECTIVE:
|
||||
perspective_apply(frames[0],frames[0]->width,frames[0]->height,arg[0],arg[1],arg[2],arg[3],arg[4],arg[5],arg[6],arg[7],arg[8] );
|
||||
perspective_apply(frames[0],arg[0],arg[1],arg[2],arg[3],arg[4],arg[5],arg[6],arg[7],arg[8] );
|
||||
break;
|
||||
case VJ_IMAGE_EFFECT_ALPHAFILL:
|
||||
alphafill_apply( frames[0], frames[0]->width,frames[0]->height, arg[0] );
|
||||
|
||||
Reference in New Issue
Block a user