comparison bitstream.c @ 10263:fd9dfd5aa5e9 libavcodec

Completely remove INIT_VLC_USE_STATIC, it is deprecated since ages and finally no longer used anywhere.
author reimar
date Thu, 24 Sep 2009 15:13:34 +0000
parents f3ff182e9ecf
children 05190dd593c9
comparison
equal deleted inserted replaced
10262:0eed6587903b 10263:fd9dfd5aa5e9
149 int i, j, k, n, table_size, table_index, nb, n1, index, code_prefix2, symbol; 149 int i, j, k, n, table_size, table_index, nb, n1, index, code_prefix2, symbol;
150 uint32_t code; 150 uint32_t code;
151 VLC_TYPE (*table)[2]; 151 VLC_TYPE (*table)[2];
152 152
153 table_size = 1 << table_nb_bits; 153 table_size = 1 << table_nb_bits;
154 table_index = alloc_table(vlc, table_size, flags & (INIT_VLC_USE_STATIC|INIT_VLC_USE_NEW_STATIC)); 154 table_index = alloc_table(vlc, table_size, flags & INIT_VLC_USE_NEW_STATIC);
155 #ifdef DEBUG_VLC 155 #ifdef DEBUG_VLC
156 av_log(NULL,AV_LOG_DEBUG,"new table index=%d size=%d code_prefix=%x n=%d\n", 156 av_log(NULL,AV_LOG_DEBUG,"new table index=%d size=%d code_prefix=%x n=%d\n",
157 table_index, table_size, code_prefix, n_prefix); 157 table_index, table_size, code_prefix, n_prefix);
158 #endif 158 #endif
159 if (table_index < 0) 159 if (table_index < 0)
284 if(vlc->table_size && vlc->table_size == vlc->table_allocated){ 284 if(vlc->table_size && vlc->table_size == vlc->table_allocated){
285 return 0; 285 return 0;
286 }else if(vlc->table_size){ 286 }else if(vlc->table_size){
287 abort(); // fatal error, we are called on a partially initialized table 287 abort(); // fatal error, we are called on a partially initialized table
288 } 288 }
289 }else if(!(flags & INIT_VLC_USE_STATIC)) { 289 }else {
290 vlc->table = NULL; 290 vlc->table = NULL;
291 vlc->table_allocated = 0; 291 vlc->table_allocated = 0;
292 vlc->table_size = 0; 292 vlc->table_size = 0;
293 } else {
294 /* Static tables are initially always NULL, return
295 if vlc->table != NULL to avoid double allocation */
296 if(vlc->table)
297 return 0;
298 } 293 }
299 294
300 #ifdef DEBUG_VLC 295 #ifdef DEBUG_VLC
301 av_log(NULL,AV_LOG_DEBUG,"build table nb_codes=%d\n", nb_codes); 296 av_log(NULL,AV_LOG_DEBUG,"build table nb_codes=%d\n", nb_codes);
302 #endif 297 #endif