diff options
Diffstat (limited to 'apps/codecs/libcook/bitstream.c')
-rw-r--r-- | apps/codecs/libcook/bitstream.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/codecs/libcook/bitstream.c b/apps/codecs/libcook/bitstream.c index 6c8915d12f..3b0c0a7b55 100644 --- a/apps/codecs/libcook/bitstream.c +++ b/apps/codecs/libcook/bitstream.c | |||
@@ -152,7 +152,7 @@ static int build_table(VLC *vlc, int table_nb_bits, | |||
152 | table_size = 1 << table_nb_bits; | 152 | table_size = 1 << table_nb_bits; |
153 | table_index = alloc_table(vlc, table_size, flags & (INIT_VLC_USE_STATIC|INIT_VLC_USE_NEW_STATIC)); | 153 | table_index = alloc_table(vlc, table_size, flags & (INIT_VLC_USE_STATIC|INIT_VLC_USE_NEW_STATIC)); |
154 | #ifdef DEBUG_VLC | 154 | #ifdef DEBUG_VLC |
155 | av_log(NULL,AV_LOG_DEBUG,"new table index=%d size=%d code_prefix=%x n=%d\n", | 155 | printf("new table index=%d size=%d code_prefix=%x n=%d\n", |
156 | table_index, table_size, code_prefix, n_prefix); | 156 | table_index, table_size, code_prefix, n_prefix); |
157 | #endif | 157 | #endif |
158 | if (table_index < 0) | 158 | if (table_index < 0) |
@@ -176,7 +176,7 @@ static int build_table(VLC *vlc, int table_nb_bits, | |||
176 | else | 176 | else |
177 | GET_DATA(symbol, symbols, i, symbols_wrap, symbols_size); | 177 | GET_DATA(symbol, symbols, i, symbols_wrap, symbols_size); |
178 | #if defined(DEBUG_VLC) && 0 | 178 | #if defined(DEBUG_VLC) && 0 |
179 | av_log(NULL,AV_LOG_DEBUG,"i=%d n=%d code=0x%x\n", i, n, code); | 179 | printf("i=%d n=%d code=0x%x\n", i, n, code); |
180 | #endif | 180 | #endif |
181 | /* if code matches the prefix, it is in the table */ | 181 | /* if code matches the prefix, it is in the table */ |
182 | n -= n_prefix; | 182 | n -= n_prefix; |
@@ -193,11 +193,11 @@ static int build_table(VLC *vlc, int table_nb_bits, | |||
193 | if(flags & INIT_VLC_LE) | 193 | if(flags & INIT_VLC_LE) |
194 | j = (code >> n_prefix) + (k<<n); | 194 | j = (code >> n_prefix) + (k<<n); |
195 | #ifdef DEBUG_VLC | 195 | #ifdef DEBUG_VLC |
196 | av_log(NULL, AV_LOG_DEBUG, "%4x: code=%d n=%d\n", | 196 | printf("%4x: code=%d n=%d\n", |
197 | j, i, n); | 197 | j, i, n); |
198 | #endif | 198 | #endif |
199 | if (table[j][1] /*bits*/ != 0) { | 199 | if (table[j][1] /*bits*/ != 0) { |
200 | av_log(NULL, AV_LOG_ERROR, "incorrect codes\n"); | 200 | printf("incorrect codes\n"); |
201 | return -1; | 201 | return -1; |
202 | } | 202 | } |
203 | table[j][1] = n; //bits | 203 | table[j][1] = n; //bits |
@@ -208,7 +208,7 @@ static int build_table(VLC *vlc, int table_nb_bits, | |||
208 | n -= table_nb_bits; | 208 | n -= table_nb_bits; |
209 | j = (code >> ((flags & INIT_VLC_LE) ? n_prefix : n)) & ((1 << table_nb_bits) - 1); | 209 | j = (code >> ((flags & INIT_VLC_LE) ? n_prefix : n)) & ((1 << table_nb_bits) - 1); |
210 | #ifdef DEBUG_VLC | 210 | #ifdef DEBUG_VLC |
211 | av_log(NULL,AV_LOG_DEBUG,"%4x: n=%d (subtable)\n", | 211 | printf("%4x: n=%d (subtable)\n", |
212 | j, n); | 212 | j, n); |
213 | #endif | 213 | #endif |
214 | /* compute table size */ | 214 | /* compute table size */ |
@@ -297,7 +297,7 @@ int init_vlc_sparse(VLC *vlc, int nb_bits, int nb_codes, | |||
297 | } | 297 | } |
298 | 298 | ||
299 | #ifdef DEBUG_VLC | 299 | #ifdef DEBUG_VLC |
300 | av_log(NULL,AV_LOG_DEBUG,"build table nb_codes=%d\n", nb_codes); | 300 | printf("build table nb_codes=%d\n", nb_codes); |
301 | #endif | 301 | #endif |
302 | 302 | ||
303 | if (build_table(vlc, nb_bits, nb_codes, | 303 | if (build_table(vlc, nb_bits, nb_codes, |
@@ -309,7 +309,7 @@ int init_vlc_sparse(VLC *vlc, int nb_bits, int nb_codes, | |||
309 | return -1; | 309 | return -1; |
310 | } | 310 | } |
311 | if((flags & INIT_VLC_USE_NEW_STATIC) && vlc->table_size != vlc->table_allocated) | 311 | if((flags & INIT_VLC_USE_NEW_STATIC) && vlc->table_size != vlc->table_allocated) |
312 | av_log(NULL, AV_LOG_ERROR, "needed %d had %d\n", vlc->table_size, vlc->table_allocated); | 312 | printf("needed %d had %d\n", vlc->table_size, vlc->table_allocated); |
313 | return 0; | 313 | return 0; |
314 | } | 314 | } |
315 | 315 | ||