The DCT function in MathToolBox needs refinement. 2 ways to go: 1. Implement FFT-like algorithm to lower the complexity from O(n^2) to O(nlogn). 2. Multi-threading.