summaryrefslogtreecommitdiff
path: root/hacks/hz.py
blob: 1744537cc3a4e48632750d83991a39f6dd3861a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import math

factors = (
    16,
    17,
    18,
    19,
    20,
    21,
    22,
    23,
    24,
    25,
    30,
    48,
    50,
    60,
    72,
    48000,
    96000,
)

X = 1
for factor in factors:
    if (X % factor):
        X *= factor

print(f"Timebase: {X}")
print(f"Bits: {math.log2(X)}")

HOURS = 12
print(f"{HOURS} hour film requires: {math.log2(X * HOURS * 60 * 60)} bits")