o
odinpkg.dev
packages / library / 1D_and_2D_DCT_Transforms_in_Odin__Discrete_Cosine_Transform

1D_and_2D_DCT_Transforms_in_Odin__Discrete_Cosine_Transform

ee4086elibrary

Those are two simple implementations of the Discrete Cosine Transform in the Odin programming language.

No license · updated 2 years ago

1D and 2D DCT Transforms in Odin - Discrete Cosine Transform

Those are two simple implementations of the Discrete Cosine Transform.

Description

In this repository, there is a dct_transform_lee directory that is a port from C to Odin of an MIT licensed discrete cosine transform that uses the fast Lee algorithm and the original can be found in the following file link:

Fast Discrete Cosine Transform algoriothm
by Nayuki Minase
https://github.com/nayuki/Nayuki-web-published-code/blob/master/fast-discrete-cosine-transform-algorithms/fast-dct-lee.c


from Project Nayuki
Fast discrete cosine transform algorithms
https://www.nayuki.io/page/fast-discrete-cosine-transform-algorithms


Then, I added to that file the 2D transform 16x16, constructed from the 1D transform and the correction factors for the transform. The other is a simple directed and slower implementation of the 2D Cosine Transform. Both give the same exact values but the one that uses Lee Algorithm is significantly faster.

License

MIT Open Source License

Have fun

Best regards,
Joao Carvalho