I’ve been searching Google for a while now to find pseudo-code of a decently efficient 8×8 (or nxn) DCT algorithm, and I can’t find anything!
I implemented the naive approach, and it took far too long to execute.
If you could post some pseudo-code or reference a good book/document/website, that would be helpful.
C or C++ examples would be better yet!
As requested in the comments, source (be slightly warned, it’s in C#, but the difference with C++ should be minimal, and yes I know the code is lame):
Main loop (A = result, B = input):
Support stuff:
edit: I timed it – for 512 by 512 pixels (single channel) it takes half a second. Sure that’s slow, but nowhere near “forever”.