Project

General

Profile

Download (396 Bytes) Statistics
| Branch: | Tag: | Revision:
1 5b3bd67f henryk
#!/usr/bin/env python
2
3
a = range(1001)
4
5
#b = [ (pow(10, (float(e)/500))) * 202  - 202 for e in a]
6
b = [ 65534 * (pow((float(e)/1000), 2)) for e in a]
7
maximum = max(b)+1
8
9
print "/* Autogenerated from gammatable.py */"
10
print "const u_int16_t gammatable[] = {" + ", ".join( [str(int(round(int(e)))) for e in b]  ) + "};"
11
print "#define GAMMA_MAX %i" % maximum
12
print "#define GAMMA_LEN %i" % len(b)
Add picture from clipboard (Maximum size: 48.8 MB)