r125: This commit was manufactured by cvs2svn to create tag 'r1_1_7-last'.
[cinelerra_cv/mob.git] / hvirtual / plugins / burn / effecttv.h
blob34fdd891b5361dcd540f3a457ec3585ce2fb6533
1 #ifndef EFFECTTV_H
2 #define EFFECTTV_H
4 #include "vframe.inc"
5 #include <stdint.h>
7 // Environment for EffectTV effects
8 class EffectTV
10 public:
11 EffectTV(int w, int h);
12 virtual ~EffectTV();
14 void image_set_threshold_y(int threshold);
15 unsigned char* image_bgsubtract_update_y(unsigned char **input_rows,
16 unsigned char **output_rows,
17 int color_model);
18 unsigned char* image_bgsubtract_y(unsigned char **input_rows, int color_model);
19 void image_bgset_y(VFrame *frame);
20 unsigned char* image_diff_filter(unsigned char *diff);
22 int yuv_init();
23 static void frame_to_effecttv(VFrame *frame, uint32_t *tmp);
24 static void effecttv_to_frame(VFrame *frame, uint32_t *tmp);
27 * fastrand - fast fake random number generator
28 * Warning: The low-order bits of numbers generated by fastrand()
29 * are bad as random numbers. For example, fastrand()%4
30 * generates 1,2,3,0,1,2,3,0...
31 * You should use high-order bits.
33 static unsigned int fastrand_val;
35 static inline unsigned int fastrand()
37 return (fastrand_val = fastrand_val * 1103515245 + 12345);
40 int w;
41 int h;
43 int y_threshold;
45 unsigned char *background;
46 unsigned char *diff, *diff2;
48 int YtoRGB[0x100];
49 int VtoR[0x100];
50 int VtoG[0x100];
51 int UtoG[0x100];
52 int UtoB[0x100];
53 int RtoY[0x100];
54 int RtoU[0x100];
55 int RtoV[0x100];
56 int GtoY[0x100];
57 int GtoU[0x100];
58 int GtoV[0x100];
59 int BtoY[0x100];
60 int BtoV[0x100];
64 #endif