]> git.sesse.net Git - movit/blobdiff - fft_pass_effect.cpp
Fix a small overallocation.
[movit] / fft_pass_effect.cpp
index e3999b30682a1514b922ef64b825fe9096ab6065..b46e5e589fc9bb4f548dafc234745c801506beb4 100644 (file)
@@ -119,8 +119,8 @@ void FFTPassEffect::generate_support_texture()
        // bit, so the stride is 8, and so on.
 
        assert((fft_size & (fft_size - 1)) == 0);  // Must be power of two.
-       fp16_int_t *tmp = new fp16_int_t[fft_size * 4];
        int subfft_size = 1 << pass_number;
+       fp16_int_t *tmp = new fp16_int_t[subfft_size * 4];
        double mulfac;
        if (inverse) {
                mulfac = 2.0 * M_PI;