remove Features5, rework gradient plugin, fix paste_edl track title bug, gl_probe...
[goodguy/cinelerra.git] / cinelerra-5.1 / mpeg2enc / create_mtable.c
1 #include <stdio.h>
2
3 int main(char**, int)
4 {
5   FILE *fout;
6   int i, j, v;
7
8   fout = fopen("mtable.h", "wt");
9   fprintf(fout, "const unsigned char motion_lookup[256][256] = {\n");
10   for (i = 0; i < 256; i++)
11   {
12     fprintf(fout, "{");
13     for (j = 0; j < 256; j++)
14     {
15       v = i - j;
16       if (v < 0)
17         v = -v;
18       fprintf(fout, "%3d", v);
19       if (j != 255)
20         fprintf(fout, ", ");
21       if ((j) && (j % 16 == 0))
22         fprintf(fout, "\n");
23     }
24     if (i != 255)
25       fprintf(fout, "},\n");
26   }
27   fprintf(fout, "}};\n");
28   fclose(fout);
29
30   return 0;
31 }