comparison common.c @ 1598:932d306bf1dc libavcodec

av_log() patch by (Michel Bardiaux <mbardiaux at peaktime dot be>)
author michael
date Mon, 03 Nov 2003 13:26:22 +0000
parents dd544554ed42
children fdb8244da1e5
comparison
equal deleted inserted replaced
1597:4c9165372ab3 1598:932d306bf1dc
194 } 194 }
195 195
196 int check_marker(GetBitContext *s, const char *msg) 196 int check_marker(GetBitContext *s, const char *msg)
197 { 197 {
198 int bit= get_bits1(s); 198 int bit= get_bits1(s);
199 if(!bit) printf("Marker bit missing %s\n", msg); 199 if(!bit)
200 av_log(NULL, AV_LOG_INFO, "Marker bit missing %s\n", msg);
200 201
201 return bit; 202 return bit;
202 } 203 }
203 204
204 /* VLC decoding */ 205 /* VLC decoding */
279 /* no need to add another table */ 280 /* no need to add another table */
280 j = (code << (table_nb_bits - n)) & (table_size - 1); 281 j = (code << (table_nb_bits - n)) & (table_size - 1);
281 nb = 1 << (table_nb_bits - n); 282 nb = 1 << (table_nb_bits - n);
282 for(k=0;k<nb;k++) { 283 for(k=0;k<nb;k++) {
283 #ifdef DEBUG_VLC 284 #ifdef DEBUG_VLC
284 printf("%4x: code=%d n=%d\n", 285 av_log(AV_LOG_DEBUG, "%4x: code=%d n=%d\n",
285 j, i, n); 286 j, i, n);
286 #endif 287 #endif
287 if (table[j][1] /*bits*/ != 0) { 288 if (table[j][1] /*bits*/ != 0) {
288 fprintf(stderr, "incorrect codes\n"); 289 av_log(NULL, AV_LOG_ERROR, "incorrect codes\n");
289 av_abort(); 290 av_abort();
290 } 291 }
291 table[j][1] = n; //bits 292 table[j][1] = n; //bits
292 table[j][0] = i; //code 293 table[j][0] = i; //code
293 j++; 294 j++;