#!/usr/bin/env python

a = range(1001)

#b = [ (pow(10, (float(e)/500))) * 202  - 202 for e in a]
b = [ 65534 * (pow((float(e)/1000), 2)) for e in a]
maximum = max(b)+1

print "/* Autogenerated from gammatable.py */"
print "const u_int16_t gammatable[] = {" + ", ".join( [str(int(round(int(e)))) for e in b]  ) + "};"
print "#define GAMMA_MAX %i" % maximum
print "#define GAMMA_LEN %i" % len(b)

