30 static unsigned int myrnd(
unsigned int *seed_ptr,
int n)
35 seed = (seed * 314159) + 1;
50 #define FRAC_ONE (1 << FRAC_BITS)
78 static unsigned int seed = 1;
82 int r,
g,
b, x,
y, i, dx, dy, x1, y1;
101 for (y = 0; y <
h; y++) {
102 for (x = 0; x < w; x++) {
106 g = (((x1 + y1) * 9) >>
FRAC_BITS) & 0xff;
114 for (y = 0; y <
NOISE_W; y++) {
115 for (x = 0; x <
NOISE_W; x++) {
116 r =
myrnd(&seed1, 256);
117 g =
myrnd(&seed1, 256);
118 b =
myrnd(&seed1, 256);
124 for (i = 0; i <
NB_OBJS; i++) {
127 for (y = 0; y < p->
h; y++) {
128 for (x = 0; x < p->
w; x++) {
133 r +=
myrnd(&seed1, 50);
134 g +=
myrnd(&seed1, 50);
135 b +=
myrnd(&seed1, 50);
146 printf(
"usage: %s file|dir [w=%i] [h=%i]\n"
147 "generate a test video stream\n",
152 int main(
int argc,
char **argv)
158 if (argc < 2 || argc > 4) {
162 if (!freopen(argv[1],
"wb", stdout))
184 snprintf(buf,
sizeof(buf),
"%s%02d.pgm", argv[1], i);
const char const char void * val
static void pgmyuv_save(const char *filename, int w, int h, const unsigned char *rgb_tab)
static void put_pixel(int x, int y, int r, int g, int b)
static unsigned char * rgb_tab
static void gen_image(int num, int w, int h)
static unsigned int myrnd(unsigned int *seed_ptr, int n)
int main(int argc, char **argv)
void print_help(const char *name)
BYTE int const BYTE int int int height
static int int_cos(int a)
static VObj objs[NB_OBJS]