mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 06:35:42 +00:00
17 lines
273 B
Python
17 lines
273 B
Python
#!/usr/bin/python
|
|
|
|
import math
|
|
|
|
f = open("jpeg_nbits_table.h", "w")
|
|
|
|
for i in range(65536):
|
|
f.write('%2d' % math.ceil(math.log(i + 1, 2)))
|
|
if i != 65535:
|
|
f.write(',')
|
|
if (i + 1) % 16 == 0:
|
|
f.write('\n')
|
|
else:
|
|
f.write(' ')
|
|
|
|
f.close()
|