mirror of
https://github.com/google/liblc3.git
synced 2026-06-10 21:12:25 +00:00
Merge MDCT orthogonalization factor in rot twiddles (remove 1 mult by samples in common case)
This commit is contained in:
+3
-1
@@ -125,8 +125,10 @@ def mdct_rot_twiddles():
|
||||
print('\n--- mdct rot twiddles {:3d} ---'.format(n))
|
||||
|
||||
kv = 2 * np.pi * (np.arange(n // 4) + 1/8) / n
|
||||
scale = np.sqrt( np.sqrt( 4 / n ) )
|
||||
for (i, k) in enumerate(kv):
|
||||
print('{{ {:14.7e}, {:14.7e} }},'.format(np.cos(k), np.sin(k)),
|
||||
print('{{ {:14.7e}, {:14.7e} }},'.format(
|
||||
np.cos(k) * scale, np.sin(k) * scale),
|
||||
end = '\n' if i%2 == 1 else ' ')
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user