I need to implement DCT transform, but i can't use float or double types. There is a lot of implementations on the internet, but all of them use float.
Does anyone know any source with DCT on integers?
P.S I need it to implement Color Layout Descriptor.
I found a blog post that describes the integer based DCT and IDCT here and gives an implementation in Matlab.
The code he used is on GitHub, available here.
I used the method bink_dct_B2.m. This calculates a scaled 1D-DCT transform, so if you want the 2D-orthogonal DCT tranform, you have have to use following code:
Here A is the matrix you want to transform. This will give approximately the same output as the Matlab built-in dct2-command (this integer implementation will introduce some rounding-errors).