mirror of
https://github.com/game-stop/veejay.git
synced 2025-12-19 14:19:58 +01:00
Libvje / refactor : mirror (fix)
* w, h * clean headers
This commit is contained in:
@@ -17,13 +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 <stdio.h>
|
#include "common.h"
|
||||||
#include <stdint.h>
|
|
||||||
#include <libvje/vje.h>
|
|
||||||
#include <libvjmem/vjmem.h>
|
#include <libvjmem/vjmem.h>
|
||||||
#include "mirrors.h"
|
#include "mirrors.h"
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
vj_effect *mirrors_init(int width,int height)
|
vj_effect *mirrors_init(int width,int height)
|
||||||
{
|
{
|
||||||
@@ -138,13 +135,15 @@ static int N__ = 0;
|
|||||||
|
|
||||||
void mirrors_apply(VJFrame *frame, int type, int factor )
|
void mirrors_apply(VJFrame *frame, int type, int factor )
|
||||||
{
|
{
|
||||||
|
const unsigned int width = frame->width;
|
||||||
|
const unsigned int height = frame->height;
|
||||||
int interpolate = 1;
|
int interpolate = 1;
|
||||||
int motion = 0;
|
int motion = 0;
|
||||||
int tmp1 = 0;
|
int tmp1 = 0;
|
||||||
int tmp2 = factor;
|
int tmp2 = factor;
|
||||||
if( motionmap_active() )
|
if( motionmap_active() )
|
||||||
{
|
{
|
||||||
int hi = (int)((float)(frame->width * 0.33));
|
int hi = (int)((float)(width * 0.33));
|
||||||
|
|
||||||
motionmap_scale_to( hi,hi,0,0,&tmp1,&tmp2,&n__,&N__);
|
motionmap_scale_to( hi,hi,0,0,&tmp1,&tmp2,&n__,&N__);
|
||||||
motion = 1;
|
motion = 1;
|
||||||
@@ -158,16 +157,16 @@ void mirrors_apply(VJFrame *frame, int type, int factor )
|
|||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 0:
|
case 0:
|
||||||
_mirrors_v(frame->data, frame->width, frame->height, tmp2, 0);
|
_mirrors_v(frame->data, width, height, tmp2, 0);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
_mirrors_v(frame->data,frame->width, frame->height,tmp2,1);
|
_mirrors_v(frame->data,width, height,tmp2,1);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
_mirrors_h(frame->data,frame->width, frame->height,tmp2,0);
|
_mirrors_h(frame->data,width, height,tmp2,0);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
_mirrors_h(frame->data,frame->width, frame->height,tmp2,1);
|
_mirrors_h(frame->data,width, height,tmp2,1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user