Commit 068cddb9 authored by Nathan Egge's avatar Nathan Egge
Browse files

Fix -Wvla warning in inv_txfm_add_c()

parent 3f13730e
......@@ -49,7 +49,9 @@ inv_txfm_add_c(pixel *dst, const ptrdiff_t stride,
{
int i, j;
const ptrdiff_t sh = imin(h, 32), sw = imin(w, 32);
coef tmp[w * h], out[h], in_mem[w];
assert((h >= 4 || h <= 64) && (w >= 4 || w <= 64));
// Maximum value for h and w is 64
coef tmp[4096 /* w * h */], out[64 /* h */], in_mem[64 /* w */];
const int is_rect2 = w * 2 == h || h * 2 == w;
if (w != sw) memset(&in_mem[sw], 0, (w - sw) * sizeof(*in_mem));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment