Currently broken
(frame)
| 210 | |
| 211 | |
| 212 | def __DCT2(frame): |
| 213 | """Currently broken""" |
| 214 | N = len(frame) # window length |
| 215 | |
| 216 | k = np.arange(N, dtype=float) |
| 217 | F = k.reshape(1, -1) * k.reshape(-1, 1) |
| 218 | K = np.divide(F, k, out=np.zeros_like(F), where=F != 0) |
| 219 | |
| 220 | FC = np.cos(F * np.pi / N + K * np.pi / 2 * N) |
| 221 | return 2 * (FC @ frame) |
| 222 | |
| 223 | |
| 224 | def DFT(frame, positive_only=True): |
nothing calls this directly
no outgoing calls
no test coverage detected