summaryrefslogtreecommitdiff
path: root/hacks/hz.py
diff options
context:
space:
mode:
Diffstat (limited to 'hacks/hz.py')
-rw-r--r--hacks/hz.py37
1 files changed, 23 insertions, 14 deletions
diff --git a/hacks/hz.py b/hacks/hz.py
index 78951d101..3d85d86cb 100644
--- a/hacks/hz.py
+++ b/hacks/hz.py
@@ -1,23 +1,32 @@
import math
-MAX_FPS = 30
+factors = (
+ 16,
+ 17,
+ 18,
+ 19,
+ 20,
+ 21,
+ 22,
+ 23,
+ 24,
+ 25,
+ 30,
+ 48,
+ 50,
+ 60,
+ 48000,
+ 96000,
+)
-X = MAX_FPS
-for i in range(MAX_FPS - 1, 1, -1):
- if (X % i) != 0:
- X *= i
-
-for i in (36, 48, 60):
- if (X % i) != 0:
- X *= i
+X = 1
+for factor in factors:
+ if (X % factor):
+ X *= factor
print(f"Timebase: {X}")
print(f"Bits: {math.log2(X)}")
-# 5 hours
-HOURS = 5
+HOURS = 12
print(f"{HOURS} hour film requires: {math.log2(X * HOURS * 60 * 60)} bits")
-for i in range(2, MAX_FPS + 1):
- assert (X % i) == 0
-