ref: c25e37a9891a7f12e2c36e9a446658461ede35d9
parent: 068cddb9999f970b89fab8b6f6d5bbc390e5428f
author: Nathan E. Egge <unlord@xiph.org>
date: Wed Sep 26 07:19:30 EDT 2018
Fix -Wvla warning in cdef_filter_block_c()
--- a/src/cdef.c
+++ b/src/cdef.c
@@ -91,7 +91,8 @@
const int damping, const enum CdefEdgeFlags edges)
{
const ptrdiff_t tmp_stride = 16 >> (w == 4);
- uint16_t tmp[tmp_stride * (h + 4)];
+ assert((w == 4 || w == 8) && (h == 4 || h == 8));
+ uint16_t tmp[192]; // 16*12 is the maximum value of tmp_stride * (h + 4)
uint16_t *tmp2 = tmp + 2 * tmp_stride + 2;
const uint8_t *const pri_taps = cdef_pri_taps[(pri_strength >> (BITDEPTH - 8)) & 1];
const uint8_t *const sec_taps = cdef_sec_taps[(pri_strength >> (BITDEPTH - 8)) & 1];