https://github.com/superauguste/dct-zig
Discrete Cosine Transform coeff calculation in Zig!
https://github.com/superauguste/dct-zig
Last synced: 11 months ago
JSON representation
Discrete Cosine Transform coeff calculation in Zig!
- Host: GitHub
- URL: https://github.com/superauguste/dct-zig
- Owner: SuperAuguste
- License: mit
- Created: 2022-03-06T23:56:22.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-03-11T12:11:13.000Z (over 4 years ago)
- Last Synced: 2025-07-21T22:30:42.308Z (11 months ago)
- Language: Zig
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dct-zig
Calculate those coefficients 😎😎
Simply get yourself a headerless signed 8-bit PCM file (Audacity can export to that format 😇), rename it to `dct.raw` (I didn't include a default `dct.raw` because the one I have on-hand is copyrighted and also 200kbs), put it in your current working directory (here), and `zig build run`!
The program will return a list of DCT coefficients! Then, head to [this convenient Desmos graph I created](https://www.desmos.com/calculator/fy1irskdfx) and paste the coefficients into the brackets of the `K = [ ]` line and you should see a snazzy audio signature. You can change the amplitude scale by changing that `100` at the bottom!