r125: This commit was manufactured by cvs2svn to create tag 'r1_1_7-last'.
[cinelerra_cv/mob.git] / hvirtual / mpeg2enc / create_mtable.c
blob2553519d337328b48e699863e071682dca7bd044
1 #include <stdio.h>
3 int main(char**, int)
5 FILE *fout;
6 int i, j, v;
8 fout = fopen("mtable.h", "wt");
9 fprintf(fout, "const unsigned char motion_lookup[256][256] = {\n");
10 for (i = 0; i < 256; i++)
12 fprintf(fout, "{");
13 for (j = 0; j < 256; j++)
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");
24 if (i != 255)
25 fprintf(fout, "},\n");
27 fprintf(fout, "}};\n");
28 fclose(fout);
30 return 0;