Moved mdct state and window to the mode so it can be shared between multiple