mirror of
https://github.com/game-stop/veejay.git
synced 2025-12-21 15:20:02 +01:00
Libvje / refactor : solarize
* frame->width, frame->height
This commit is contained in:
@@ -43,20 +43,19 @@ vj_effect *solarize_init(int w,int h)
|
||||
return ve;
|
||||
}
|
||||
|
||||
void solarize_apply( VJFrame *frame, int width, int height, int threshold)
|
||||
void solarize_apply( VJFrame *frame, int threshold)
|
||||
{
|
||||
int i, len;
|
||||
int i, len= frame->len;
|
||||
uint8_t val;
|
||||
uint8_t *Y = frame->data[0];
|
||||
uint8_t *Cb= frame->data[1];
|
||||
uint8_t *Cr= frame->data[2];
|
||||
len = frame->len;
|
||||
for (i = 0; i < len; i++) {
|
||||
val = Y[i];
|
||||
if (val > threshold)
|
||||
{
|
||||
Y[i] = 255 - val;
|
||||
Cb[i] = 255 - Cb[i];
|
||||
Cb[i] = 255 - Cb[i];
|
||||
Cr[i] = 255 - Cr[i];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
#include <stdint.h>
|
||||
|
||||
vj_effect *solarize_init();
|
||||
void solarize_apply(VJFrame *frame, int width, int height,
|
||||
int threshold);
|
||||
void solarize_apply(VJFrame *frame, int threshold);
|
||||
void solarize_free();
|
||||
#endif
|
||||
|
||||
@@ -357,9 +357,7 @@ extern void rgbkey_apply( VJFrame *frame, VJFrame *frame2, int i_angle,
|
||||
int i_noise, int r, int g, int b,
|
||||
int min, int max, int op);
|
||||
extern void gamma_apply( VJFrame *frame, int val);
|
||||
|
||||
extern void solarize_apply(VJFrame *frame, int width, int height,
|
||||
int threshold);
|
||||
extern void solarize_apply(VJFrame *frame, int threshold);
|
||||
extern void dummy_apply(VJFrame *frame, int width, int height,
|
||||
int color_num);
|
||||
extern void rotozoom_apply(VJFrame *frame, int width, int height, int a,
|
||||
|
||||
@@ -165,7 +165,7 @@ static void vj_effman_apply_image_effect(
|
||||
enhancemask_apply(frames[0],frames[0]->width,frames[0]->height,arg);
|
||||
break;
|
||||
case VJ_IMAGE_EFFECT_SOLARIZE:
|
||||
solarize_apply(frames[0], frames[0]->width, frames[0]->height, arg[0]);
|
||||
solarize_apply(frames[0], arg[0]);
|
||||
break;
|
||||
case VJ_IMAGE_EFFECT_DISTORTION:
|
||||
distortion_apply(frames[0], arg[0],arg[1],arg[2],arg[3],arg[4],arg[5] );
|
||||
|
||||
Reference in New Issue
Block a user