4 * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 // Environment for EffectTV effects
33 EffectTV(int w, int h);
36 void image_set_threshold_y(int threshold);
37 unsigned char* image_bgsubtract_update_y(unsigned char **input_rows,
38 unsigned char **output_rows,
40 unsigned char* image_bgsubtract_y(unsigned char **input_rows, int color_model);
41 void image_bgset_y(VFrame *frame);
42 unsigned char* image_diff_filter(unsigned char *diff);
45 static void frame_to_effecttv(VFrame *frame, uint32_t *tmp);
46 static void effecttv_to_frame(VFrame *frame, uint32_t *tmp);
49 * fastrand - fast fake random number generator
50 * Warning: The low-order bits of numbers generated by fastrand()
51 * are bad as random numbers. For example, fastrand()%4
52 * generates 1,2,3,0,1,2,3,0...
53 * You should use high-order bits.
55 static unsigned int fastrand_val;
57 static inline unsigned int fastrand()
59 return (fastrand_val = fastrand_val * 1103515245 + 12345);
67 unsigned char *background;
68 unsigned char *diff, *diff2;