Factorize ff_generate_sliding_window_mmcos() out.