summaryrefslogtreecommitdiff
path: root/vp9/common
diff options
context:
space:
mode:
authorYunqing Wang <yunqingwang@google.com>2012-12-18 12:09:46 -0800
committerJohn Koleszar <jkoleszar@google.com>2012-12-21 15:26:56 -0800
commit6ee08f3ccf82871963e740f1420655668e3b7ea5 (patch)
treeebf0214f74b5d6a5e44f054e1d7f5dd685ba7629 /vp9/common
parent229273391fd5eac64426e47fb134a26992bb11c1 (diff)
downloadlibvpx-6ee08f3ccf82871963e740f1420655668e3b7ea5.tar
libvpx-6ee08f3ccf82871963e740f1420655668e3b7ea5.tar.gz
libvpx-6ee08f3ccf82871963e740f1420655668e3b7ea5.tar.bz2
libvpx-6ee08f3ccf82871963e740f1420655668e3b7ea5.zip
Fix a warning
Fixed the warning: the size of array ‘intermediate_buffer’ can’t be evaluated [-Wvla]. Change-Id: Ibcffd6969bd71cee0c10f7cf18960e58cd0bd915
Diffstat (limited to 'vp9/common')
-rw-r--r--vp9/common/vp9_filter.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/vp9/common/vp9_filter.c b/vp9/common/vp9_filter.c
index 18217e627..a59d1e669 100644
--- a/vp9/common/vp9_filter.c
+++ b/vp9/common/vp9_filter.c
@@ -489,9 +489,6 @@ static const unsigned int filter_size_to_wh[][2] = {
{16,16},
};
-static const unsigned int filter_max_height = 16;
-static const unsigned int filter_max_width = 16;
-
static void filter_block2d_8_c(const unsigned char *src_ptr,
const unsigned int src_stride,
const short *HFilter,
@@ -509,14 +506,15 @@ static void filter_block2d_8_c(const unsigned char *src_ptr,
const int kInterp_Extend = 4;
const unsigned int intermediate_height =
(kInterp_Extend - 1) + output_height + kInterp_Extend;
- const unsigned int max_intermediate_height =
- (kInterp_Extend - 1) + filter_max_height + kInterp_Extend;
-#ifdef _MSC_VER
- // MSVC does not support C99 style declaration
+
+ /* Size of intermediate_buffer is max_intermediate_height * filter_max_width,
+ * where max_intermediate_height = (kInterp_Extend - 1) + filter_max_height
+ * + kInterp_Extend
+ * = 3 + 16 + 4
+ * = 23
+ * and filter_max_width = 16
+ */
unsigned char intermediate_buffer[23 * 16];
-#else
- unsigned char intermediate_buffer[max_intermediate_height * filter_max_width];
-#endif
const int intermediate_next_stride = 1 - intermediate_height * output_width;
// Horizontal pass (src -> transposed intermediate).