VkFFT now supports Discrete Cosine Transforms

Hello, I am the creator of the VkFFT - GPU Fast Fourier Transform library for Vulkan/CUDA/HIP and OpenCL. In the latest update, I have added support for the computation of Discrete Cosine Transforms of types II, III and IV. This is a very exciting addition to what VkFFT can do as DCTs are of big importance to image processing, data compression and numerous scientific tasks. And so far there has not been a good GPU alternative to FFTW3 in this regard.

VkFFT calculates DCT-II and III by mapping them to the Real-to-Complex FFT of the same size and applying needed pre and post-processing on-flight, without additional uploads/downloads. This way, VkFFT is able to achieve bandwidth-limited calculation of DCT, similar to the ordinary FFT.

DCT-IV was harder to implement algorithm-wise - it is decomposed in DCT-II and DST-II sequences of half the original size. These sequences are then used to perform a single Complex-to-Complex FFT of half-size where they are used as the real and imaginary parts of a complex number. Everything is done in a single upload from global memory (with a very difficult pre/post-processing), so DCT-IV is also bandwidth-limited in VkFFT.

DCTs support FP32 and FP64 precision modes and work for multidimensional systems as well. So far DCTs can be computed in a single upload configuration, which limits the max length to 8192 in FP32 for 64KB shared memory systems, but this will be improved in the future. DCT-I will also be implemented later on, as three other types of DCT are used more often and were the main target for this update.

Hope this will be useful to the community and feel free to ask any questions about the DCT implementation and VkFFT in general!

πŸ‘︎ 42
πŸ’¬︎
πŸ‘€︎ u/xdtolm
πŸ“…︎ Jun 19 2021
🚨︎ report
VkFFT now supports Discrete Cosine Transforms on GPU github.com/DTolm/VkFFT
πŸ‘︎ 41
πŸ’¬︎
πŸ‘€︎ u/xdtolm
πŸ“…︎ Jun 19 2021
🚨︎ report
TIL Naris Ahmed, an Indian-American electrical engineer and Professor Emeritus at UNM, is considered to be the inventor a discrete cosine transform (DCT) , one of the most widely used data compression algorithms, the basis of today's most digital media standards. en.wikipedia.org/wiki/Nas…
πŸ‘︎ 88
πŸ’¬︎
πŸ‘€︎ u/maxpyne2000
πŸ“…︎ Feb 18 2021
🚨︎ report
Discrete Cosine Transform in Video Compression – Explain Like I'm Five ottverse.com/discrete-cos…
πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/bprogramming
πŸ“…︎ Aug 26 2020
🚨︎ report
Great explanation of the Discrete Cosine Transform and it's use in JPEG compression youtube.com/watch?v=Q2aEz…
πŸ‘︎ 510
πŸ’¬︎
πŸ‘€︎ u/Oersted4
πŸ“…︎ May 22 2015
🚨︎ report
I wrote a library for doing DCT (discrete cosine transform) in pytorch github.com/zh217/torch-dc…
πŸ‘︎ 5
πŸ’¬︎
πŸ‘€︎ u/zh217
πŸ“…︎ Sep 21 2018
🚨︎ report
Why does windowing with modified discrete cosine transform work?

I already have trouble fully getting how plain MDCT works by discarding half the coefficients, but that's not the main part of my question.

My bigger question is why does windowing make things better? Firstly, IMDCTing lapped segments already allows perfect reconstruction, so why go ahead and window the segments as well? Second, why would you window the segment twice: once before MDCT and once after? Wouldn't that just leave the overlapping segment with a reduced signal? I don't get it!

πŸ‘︎ 7
πŸ’¬︎
πŸ‘€︎ u/dvorahtheexplorer
πŸ“…︎ Feb 09 2019
🚨︎ report
The Discrete Cosine Transform in Action squidarth.com/rc/math/201…
πŸ‘︎ 4
πŸ’¬︎
πŸ‘€︎ u/sidpshanker
πŸ“…︎ Jun 27 2018
🚨︎ report
TIL the algorithm behind JPEG image compression (the discrete cosine transform) was invanted by Indians en.wikipedia.org/wiki/JPE…
πŸ‘︎ 24
πŸ’¬︎
πŸ“…︎ May 25 2015
🚨︎ report
Texture compression using the discrete cosine transform. altdevblogaday.org/2011/0…
πŸ‘︎ 44
πŸ’¬︎
πŸ‘€︎ u/ethicszen
πŸ“…︎ May 19 2011
🚨︎ report
Discrete Cosine Transform experiment, AKA jpegball
πŸ‘︎ 4
πŸ’¬︎
πŸ‘€︎ u/iamgreaser
πŸ“…︎ Oct 07 2015
🚨︎ report
Confusiong about the Discrete Cosine Transform

http://fourier.eng.hmc.edu/e101/lectures/image_processing/node13.html

Why is the coefficient sqrt( 1 / N ) for n=0, and sqrt( 2 / N ) for every other frequency? I have been reading around all weekend and can't find any explanations.

πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/fng_programmer
πŸ“…︎ Sep 23 2013
🚨︎ report
Discrete Cosine Transform and A Case Study on Image Compression bugra.github.io/work/note…
πŸ‘︎ 11
πŸ’¬︎
πŸ‘€︎ u/bugra
πŸ“…︎ Jul 14 2014
🚨︎ report
JPEG DCT (Discrete Cosine Transform) - Computerphile youtube.com/watch?v=Q2aEz…
πŸ‘︎ 5
πŸ’¬︎
πŸ‘€︎ u/gummywormsyum
πŸ“…︎ May 22 2015
🚨︎ report
2D Discrete Cosine Transform Calculation?

I've designed a 2D DCT-II in Labview but have no way to check the correctness.

If anyone has a 2D DCT-II simulation could they run a very simple matrix through it and post what comes out so I could check my design.

eg [[1,2],[3,4]]

πŸ‘︎ 2
πŸ’¬︎
πŸ“…︎ Apr 13 2013
🚨︎ report
How do you express the IMDCT (Inverse Modified Discrete Cosine Transform) in terms of the DFT (Discrete Fourier Transform)?

edit: if anyone knows how to express the DCT-IV in terms of the DFT, that'd be great too.

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/DiamondSoul
πŸ“…︎ May 12 2012
🚨︎ report
MRW an exam question says I should explain the Fourier spectral analysis and discrete cosine transformation mathematically
πŸ‘︎ 19
πŸ’¬︎
πŸ‘€︎ u/meukow
πŸ“…︎ Jul 01 2015
🚨︎ report
Understanding Discrete Cosine Transformation

Hi, I'm currently working on some software and a key component is 2D DCT. But my question is more general, as I'm trying to understand the DCT in general, let's say from engineers point of view. For start, I know that there are 8 types of DCT, and that many authors use different notation, sometimes even different parameterization, but that's doesn't matter as I'm not going to implement DCT, I only want to understand it.

I will stick to this formula, scavenged from http://www.cs.cf.ac.uk/Dave/Multimedia/node231.html . DCT is defined here: http://i.imgur.com/rb1Eg.gif

N is count of samples.

i is index of particular sample and f(i) it's value.

LAMBDA - well I'm not sure, but it's only a weight coefficient, so it does not affect the principle of the DCT.

What I'm struggling to understand are values u and F(u). I know that DCT transform data to frequency domain, but I have not found the meaning of this values. My guess is that u is particular frequency and F(u) is amount of this frequency in data, e.g. for signal with 8kHz frequency (for example whistle), the DCT would return 0 for all values of u and some great value for u=8000. (this is an ideal case, I know this is overcast example).

So are my conclusions right, or completely off track? Thanks.

πŸ‘︎ 4
πŸ’¬︎
πŸ‘€︎ u/sutr90
πŸ“…︎ Oct 18 2012
🚨︎ report
Discrete Cosine Transformations datagenetics.com/blog/nov…
πŸ‘︎ 2
πŸ’¬︎
πŸ“…︎ Nov 18 2012
🚨︎ report
Does anyone know how to put this in a discrete system Z Transform
πŸ‘︎ 8
πŸ’¬︎
πŸ‘€︎ u/psous_32
πŸ“…︎ Jan 14 2022
🚨︎ report
What are some real world uses of discrete Fourier transform/series ?

Coming from an electrical engineering background, I get that de DFT is heavily used on signal processing and system analysis. I think it is also used in vibration analysis in mechanical/civil engineering.

However, I have to teach DFT and Fourier series to students from other branches of engineering and I'd like to give them some real-world applications other than EE. These students don't have a great background on physics, so the application must be rather simple to explain. If you could link me a paper / book in which the subject is discussed that would be great. Thanks in advance!

πŸ‘︎ 2
πŸ’¬︎
πŸ“…︎ Dec 16 2021
🚨︎ report
The Discrete Fourier Transform and the Need for Window Functions dsprelated.com/showarticl…
πŸ‘︎ 21
πŸ’¬︎
πŸ‘€︎ u/chtef
πŸ“…︎ Dec 08 2021
🚨︎ report
I wrote an SFML-based program that uses the discrete Fourier transform to draw any curve

https://github.com/ChrisThrasher/fourier-draw

This is my 3rd SFML project this year. I had a lot of fun with this one and enjoy playing with it. If you haven't seen the first two, check them out.

https://github.com/ChrisThrasher/mandelbrot

https://github.com/ChrisThrasher/boids

Two new things I had to figure out where click-and-drag mechanics and how to draw lines.

Click-and-drag mechanics ended up being pretty simple because I just needed to query the left mouse button. I didn't have to use the event system to pull this off.

Line drawing was more complicated and I'm not sure I solved it the best way. I'm drawing lines as sequences of lines with circles in between to help smooth it out. The results looks as good as I hoped but I have to think there's a better way to do it.

πŸ‘︎ 9
πŸ’¬︎
πŸ‘€︎ u/Thrash3r
πŸ“…︎ Dec 04 2021
🚨︎ report
New Fractals in the Discrete Fourier Transform youtu.be/GkvYe1qVwVA
πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/shakes76
πŸ“…︎ Nov 24 2021
🚨︎ report
An epicycle drawing of Emilia I made using discrete fourier transform. There are a grand total of 20,110 circles all rotating at their own constant speeds and radii. v.redd.it/nouk78gd7yc71
πŸ‘︎ 208
πŸ’¬︎
πŸ‘€︎ u/Account-For-Anime
πŸ“…︎ Jul 23 2021
🚨︎ report
VkFFT now supports Discrete Cosine Transforms

Hello, I am the creator of the VkFFT - GPU Fast Fourier Transform library for Vulkan/CUDA/HIP and OpenCL. In the latest update, I have added support for the computation of Discrete Cosine Transforms of types II, III and IV. This is a very exciting addition to what VkFFT can do as DCTs are of big importance to image processing, data compression and numerous scientific tasks. And so far there has not been a good GPU alternative to FFTW3 in this regard.

VkFFT calculates DCT-II and III by mapping them to the Real-to-Complex FFT of the same size and applying needed pre and post-processing on-flight, without additional uploads/downloads. This way, VkFFT is able to achieve bandwidth-limited calculation of DCT, similar to the ordinary FFT.

DCT-IV was harder to implement algorithm-wise - it is decomposed in DCT-II and DST-II sequences of half the original size. These sequences are then used to perform a single Complex-to-Complex FFT of half-size where they are used as the real and imaginary parts of a complex number. Everything is done in a single upload from global memory (with a very difficult pre/post-processing), so DCT-IV is also bandwidth-limited in VkFFT.

DCTs support FP32 and FP64 precision modes and work for multidimensional systems as well. So far DCTs can be computed in a single upload configuration, which limits the max length to 8192 in FP32 for 64KB shared memory systems, but this will be improved in the future. DCT-I will also be implemented later on, as three other types of DCT are used more often and were the main target for this update.

Hope this will be useful to the community and feel free to ask any questions about the DCT implementation and VkFFT in general!

πŸ‘︎ 10
πŸ’¬︎
πŸ‘€︎ u/xdtolm
πŸ“…︎ Jun 19 2021
🚨︎ report
[P] VkFFT now supports Discrete Cosine Transforms on GPU

Hello, I am the creator of the VkFFT - GPU Fast Fourier Transform library for Vulkan/CUDA/HIP and OpenCL. In the latest update, I have added support for the computation of Discrete Cosine Transforms of types II, III and IV. This is a very exciting addition to what VkFFT can do as DCTs are of big importance to image processing, data compression and numerous scientific tasks. And so far there has not been a good GPU alternative to FFTW3 in this regard.

VkFFT calculates DCT-II and III by mapping them to the Real-to-Complex FFT of the same size and applying needed pre and post-processing on-flight, without additional uploads/downloads. This way, VkFFT is able to achieve bandwidth-limited calculation of DCT, similar to the ordinary FFT.

DCT-IV was harder to implement algorithm-wise - it is decomposed in DCT-II and DST-II sequences of half the original size. These sequences are then used to perform a single Complex-to-Complex FFT of half-size where they are used as the real and imaginary parts of a complex number. Everything is done in a single upload from global memory (with a very difficult pre/post-processing), so DCT-IV is also bandwidth-limited in VkFFT.

DCTs support FP32 and FP64 precision modes and work for multidimensional systems as well. So far DCTs can be computed in a single upload configuration, which limits the max length to 8192 in FP32 for 64KB shared memory systems, but this will be improved in the future. DCT-I will also be implemented later on, as three other types of DCT are used more often and were the main target for this update.

Hope this will be useful to the community and feel free to ask any questions about the DCT implementation and VkFFT in general!

πŸ‘︎ 4
πŸ’¬︎
πŸ‘€︎ u/xdtolm
πŸ“…︎ Jun 19 2021
🚨︎ report
ELI5: Discrete Cosine Transforms
πŸ‘︎ 78
πŸ’¬︎
πŸ‘€︎ u/harryp1998
πŸ“…︎ Nov 26 2015
🚨︎ report
ELI5: Why does windowing with modified discrete cosine transform work?

I already have trouble fully getting how plain MDCT works by discarding half the coefficients, but that's not the main part of my question.

My bigger question is why does windowing make things better? Firstly, IMDCTing lapped segments already allows perfect reconstruction, so why go ahead and window the segments as well? Second, why would you window the segment twice: once before MDCT and once after? Wouldn't that just leave the overlapping segment with a reduced signal? I don't get it!

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/dvorahtheexplorer
πŸ“…︎ Feb 08 2019
🚨︎ report

Please note that this site uses cookies to personalise content and adverts, to provide social media features, and to analyse web traffic. Click here for more information.