I need to apply a 1D type-II DCT (Discrete Cosine Transform) to each column of a matrix while normalizing the result in C++. Effectively, I want to multiply my matrix with an orthogonal type-II DCT-matrix (while avoiding the performance cost of matrix multiplication, of course).
Since this seems like an important computational kernel in many applications, isn't there a highly optimized library for this purpose out there? After searching for a bit I can find a couple of implementations, but I don't know if they're good. I was expecting a function somewhere in a well-known library such as Boost or Eigen. After all, in Python everything I need to do is this (using SciPy):