changeset 11948:e8cf7f5fb715 libavcodec

rv34: kill VLAs
author mru
date Fri, 25 Jun 2010 08:19:20 +0000
parents fc9e4874a12c
children 778bdafd5496
files rv34.c rv34vlc.h
diffstat 2 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/rv34.c	Fri Jun 25 04:23:45 2010 +0000
+++ b/rv34.c	Fri Jun 25 08:19:20 2010 +0000
@@ -103,8 +103,8 @@
 {
     int i;
     int counts[17] = {0}, codes[17];
-    uint16_t cw[size], syms[size];
-    uint8_t bits2[size];
+    uint16_t cw[MAX_VLC_SIZE], syms[MAX_VLC_SIZE];
+    uint8_t bits2[MAX_VLC_SIZE];
     int maxbits = 0, realsize = 0;
 
     for(i = 0; i < size; i++){
--- a/rv34vlc.h	Fri Jun 25 04:23:45 2010 +0000
+++ b/rv34vlc.h	Fri Jun 25 08:19:20 2010 +0000
@@ -37,6 +37,7 @@
 #define FIRSTBLK_VLC_SIZE  864
 #define OTHERBLK_VLC_SIZE  108
 #define COEFF_VLC_SIZE      32
+#define MAX_VLC_SIZE      1296
 
 static const uint8_t rv34_table_intra_cbppat[NUM_INTRA_TABLES][2][CBPPAT_VLC_SIZE] = {
   {