[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec h261.c, 1.30, 1.31 h263dec.c, 1.175, 1.176 h264.c, 1.195, 1.196 huffyuv.c, 1.66, 1.67 motion_est.c, 1.120, 1.121 mpeg12.c, 1.249, 1.250 mpegaudiodec.c, 1.66, 1.67 msmpeg4.c, 1.93, 1.94 png.c, 1.14, 1.15 rv10.c, 1.77, 1.78
Diego Biurrun CVS
diego
Wed Mar 8 12:43:14 CET 2006
Update of /cvsroot/ffmpeg/ffmpeg/libavcodec
In directory mail:/var2/tmp/cvs-serv20266/libavcodec
Modified Files:
h261.c h263dec.c h264.c huffyuv.c motion_est.c mpeg12.c
mpegaudiodec.c msmpeg4.c png.c rv10.c
Log Message:
(f)printf --> av_log conversion
taken from a patch by Steve L'Homme
Index: h261.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/h261.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- h261.c 28 Jan 2006 16:05:06 -0000 1.30
+++ h261.c 8 Mar 2006 11:43:08 -0000 1.31
@@ -921,8 +921,8 @@
AVFrame *pict = data;
#ifdef DEBUG
- printf("*****frame %d size=%d\n", avctx->frame_number, buf_size);
- printf("bytes=%x %x %x %x\n", buf[0], buf[1], buf[2], buf[3]);
+ av_log(avctx, AV_LOG_DEBUG, "*****frame %d size=%d\n", avctx->frame_number, buf_size);
+ av_log(avctx, AV_LOG_DEBUG, "bytes=%x %x %x %x\n", buf[0], buf[1], buf[2], buf[3]);
#endif
s->flags= avctx->flags;
s->flags2= avctx->flags2;
Index: h263dec.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/h263dec.c,v
retrieving revision 1.175
retrieving revision 1.176
diff -u -d -r1.175 -r1.176
--- h263dec.c 19 Feb 2006 10:20:27 -0000 1.175
+++ h263dec.c 8 Mar 2006 11:43:08 -0000 1.176
@@ -694,7 +694,7 @@
return -1;
#ifdef DEBUG
- printf("qscale=%d\n", s->qscale);
+ av_log(avctx, AV_LOG_DEBUG, "qscale=%d\n", s->qscale);
#endif
ff_er_frame_start(s);
@@ -783,7 +783,7 @@
if(s->last_picture_ptr || s->low_delay)
*data_size = sizeof(AVFrame);
#ifdef PRINT_FRAME_TIME
-printf("%Ld\n", rdtsc()-time);
+av_log(avctx, AV_LOG_DEBUG, "%Ld\n", rdtsc()-time);
#endif
return get_consumed_bytes(s, buf_size);
Index: h264.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/h264.c,v
retrieving revision 1.195
retrieving revision 1.196
diff -u -d -r1.195 -r1.196
--- h264.c 7 Mar 2006 22:45:56 -0000 1.195
+++ h264.c 8 Mar 2006 11:43:08 -0000 1.196
@@ -6977,7 +6977,7 @@
hl_decode_mb(h);
if(ret<0){
- fprintf(stderr, "error while decoding MB %d %d\n", s->mb_x, s->mb_y);
+ av_log(s->avctx, AV_LOG_ERROR, "error while decoding MB %d %d\n", s->mb_x, s->mb_y);
ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, (AC_ERROR|DC_ERROR|MV_ERROR)&part_mask);
return -1;
Index: huffyuv.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/huffyuv.c,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -d -r1.66 -r1.67
--- huffyuv.c 25 Jan 2006 22:10:12 -0000 1.66
+++ huffyuv.c 8 Mar 2006 11:43:08 -0000 1.67
@@ -343,7 +343,7 @@
return 0;
#else
- fprintf(stderr, "v1 huffyuv is not supported \n");
+ av_log(s->avctx, AV_LOG_DEBUG, "v1 huffyuv is not supported \n");
return -1;
#endif
}
Index: motion_est.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/motion_est.c,v
retrieving revision 1.120
retrieving revision 1.121
diff -u -d -r1.120 -r1.121
--- motion_est.c 22 Jan 2006 20:54:52 -0000 1.120
+++ motion_est.c 8 Mar 2006 11:43:09 -0000 1.121
@@ -365,7 +365,7 @@
#if 0
if (*mx_ptr < -(2 * range) || *mx_ptr >= (2 * range) ||
*my_ptr < -(2 * range) || *my_ptr >= (2 * range)) {
- fprintf(stderr, "error %d %d\n", *mx_ptr, *my_ptr);
+ av_log(NULL, AV_LOG_ERROR, "error %d %d\n", *mx_ptr, *my_ptr);
}
#endif
return dmin;
Index: mpeg12.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/mpeg12.c,v
retrieving revision 1.249
retrieving revision 1.250
diff -u -d -r1.249 -r1.250
--- mpeg12.c 1 Mar 2006 22:59:22 -0000 1.249
+++ mpeg12.c 8 Mar 2006 11:43:09 -0000 1.250
@@ -2789,7 +2789,7 @@
dprintf("intra matrix present\n");
for(i=0;i<64;i++)
dprintf(" %d", s->intra_matrix[s->dsp.idct_permutation[i]]);
- printf("\n");
+ dprintf("\n");
#endif
} else {
for(i=0;i<64;i++) {
@@ -2814,7 +2814,7 @@
dprintf("non intra matrix present\n");
for(i=0;i<64;i++)
dprintf(" %d", s->inter_matrix[s->dsp.idct_permutation[i]]);
- printf("\n");
+ dprintf("\n");
#endif
} else {
for(i=0;i<64;i++) {
Index: mpegaudiodec.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/mpegaudiodec.c,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -d -r1.66 -r1.67
--- mpegaudiodec.c 12 Jan 2006 22:43:16 -0000 1.66
+++ mpegaudiodec.c 8 Mar 2006 11:43:09 -0000 1.67
@@ -489,10 +489,10 @@
#if defined(DEBUG)
for(j=0;j<8;j++) {
- printf("win%d=\n", j);
+ av_log(avctx, AV_LOG_DEBUG, "win%d=\n", j);
for(i=0;i<36;i++)
- printf("%f, ", (double)mdct_win[j][i] / FRAC_ONE);
- printf("\n");
+ av_log(avctx, AV_LOG_DEBUG, "%f, ", (double)mdct_win[j][i] / FRAC_ONE);
+ av_log(avctx, AV_LOG_DEBUG, "\n");
}
#endif
init = 1;
@@ -1179,20 +1179,20 @@
}
#if defined(DEBUG)
- printf("layer%d, %d Hz, %d kbits/s, ",
+ dprintf("layer%d, %d Hz, %d kbits/s, ",
s->layer, s->sample_rate, s->bit_rate);
if (s->nb_channels == 2) {
if (s->layer == 3) {
if (s->mode_ext & MODE_EXT_MS_STEREO)
- printf("ms-");
+ dprintf("ms-");
if (s->mode_ext & MODE_EXT_I_STEREO)
- printf("i-");
+ dprintf("i-");
}
- printf("stereo");
+ dprintf("stereo");
} else {
- printf("mono");
+ dprintf("mono");
}
- printf("\n");
+ dprintf("\n");
#endif
return 0;
}
@@ -1370,8 +1370,8 @@
{
for(ch=0;ch<s->nb_channels;ch++) {
for(i=0;i<sblimit;i++)
- printf(" %d", bit_alloc[ch][i]);
- printf("\n");
+ dprintf(" %d", bit_alloc[ch][i]);
+ dprintf("\n");
}
}
#endif
@@ -1421,12 +1421,12 @@
for(i=0;i<sblimit;i++) {
if (bit_alloc[ch][i]) {
sf = scale_factors[ch][i];
- printf(" %d %d %d", sf[0], sf[1], sf[2]);
+ dprintf(" %d %d %d", sf[0], sf[1], sf[2]);
} else {
- printf(" -");
+ dprintf(" -");
}
}
- printf("\n");
+ dprintf("\n");
}
#endif
@@ -2285,11 +2285,11 @@
}
#if defined(DEBUG)
{
- printf("scfsi=%x gr=%d ch=%d scale_factors:\n",
+ dprintf("scfsi=%x gr=%d ch=%d scale_factors:\n",
g->scfsi, gr, ch);
for(i=0;i<j;i++)
- printf(" %d", g->scale_factors[i]);
- printf("\n");
+ dprintf(" %d", g->scale_factors[i]);
+ dprintf("\n");
}
#endif
} else {
@@ -2342,11 +2342,11 @@
g->scale_factors[j] = 0;
#if defined(DEBUG)
{
- printf("gr=%d ch=%d scale_factors:\n",
+ dprintf("gr=%d ch=%d scale_factors:\n",
gr, ch);
for(i=0;i<40;i++)
- printf(" %d", g->scale_factors[i]);
- printf("\n");
+ dprintf(" %d", g->scale_factors[i]);
+ dprintf("\n");
}
#endif
}
@@ -2428,10 +2428,10 @@
for(i=0;i<nb_frames;i++) {
for(ch=0;ch<s->nb_channels;ch++) {
int j;
- printf("%d-%d:", i, ch);
+ dprintf("%d-%d:", i, ch);
for(j=0;j<SBLIMIT;j++)
- printf(" %0.6f", (double)s->sb_samples[ch][i][j] / FRAC_ONE);
- printf("\n");
+ dprintf(" %0.6f", (double)s->sb_samples[ch][i][j] / FRAC_ONE);
+ dprintf("\n");
}
}
#endif
Index: msmpeg4.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/msmpeg4.c,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -d -r1.93 -r1.94
--- msmpeg4.c 12 Jan 2006 22:43:16 -0000 1.93
+++ msmpeg4.c 8 Mar 2006 11:43:09 -0000 1.94
@@ -434,7 +434,7 @@
#ifdef DEBUG
intra_count = 0;
- printf("*****frame %d:\n", frame_count++);
+ av_log(s->avctx, AV_LOG_DEBUG, "*****frame %d:\n", frame_count++);
#endif
}
@@ -504,7 +504,7 @@
#if 0
if ((unsigned)mx >= 64 ||
(unsigned)my >= 64)
- fprintf(stderr, "error mx=%d my=%d\n", mx, my);
+ av_log(s->avctx, AV_LOG_ERROR, "error mx=%d my=%d\n", mx, my);
#endif
mv = &mv_tables[s->mv_table_index];
@@ -1214,9 +1214,9 @@
{
int i;
for(i=0; i<s->gb.size_in_bits; i++)
- printf("%d", get_bits1(&s->gb));
+ av_log(s->avctx, AV_LOG_DEBUG, "%d", get_bits1(&s->gb));
// get_bits1(&s->gb);
-printf("END\n");
+av_log(s->avctx, AV_LOG_DEBUG, "END\n");
return -1;
}
#endif
@@ -1370,7 +1370,7 @@
s->esc3_run_length= 0;
#ifdef DEBUG
- printf("*****frame %d:\n", frame_count++);
+ av_log(s->avctx, AV_LOG_DEBUG, "*****frame %d:\n", frame_count++);
#endif
return 0;
}
@@ -1794,15 +1794,15 @@
const int run1= run - rl->max_run[last][abs_level] - run_diff;
if(abs_level<=MAX_LEVEL && run<=MAX_RUN){
if(abs_level <= rl->max_level[last][run]){
- fprintf(stderr, "illegal 3. esc, vlc encoding possible\n");
+ av_log(s->avctx, AV_LOG_ERROR, "illegal 3. esc, vlc encoding possible\n");
return DECODING_AC_LOST;
}
if(abs_level <= rl->max_level[last][run]*2){
- fprintf(stderr, "illegal 3. esc, esc 1 encoding possible\n");
+ av_log(s->avctx, AV_LOG_ERROR, "illegal 3. esc, esc 1 encoding possible\n");
return DECODING_AC_LOST;
}
if(run1>=0 && abs_level <= rl->max_level[last][run1]){
- fprintf(stderr, "illegal 3. esc, esc 2 encoding possible\n");
+ av_log(s->avctx, AV_LOG_ERROR, "illegal 3. esc, esc 2 encoding possible\n");
return DECODING_AC_LOST;
}
}
@@ -1813,7 +1813,7 @@
else level= level * qmul - qadd;
#if 0 // waste of time too :(
if(level>2048 || level<-2048){
- fprintf(stderr, "|level| overflow in 3. esc\n");
+ av_log(s->avctx, AV_LOG_ERROR, "|level| overflow in 3. esc\n");
return DECODING_AC_LOST;
}
#endif
Index: png.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/png.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- png.c 12 Jan 2006 22:43:16 -0000 1.14
+++ png.c 8 Mar 2006 11:43:09 -0000 1.15
@@ -507,7 +507,7 @@
tag32 = get32(&s->bytestream);
tag = bswap_32(tag32);
#ifdef DEBUG
- printf("png: tag=%c%c%c%c length=%u\n",
+ av_log(avctx, AV_LOG_DEBUG, "png: tag=%c%c%c%c length=%u\n",
(tag & 0xff),
((tag >> 8) & 0xff),
((tag >> 16) & 0xff),
@@ -531,7 +531,7 @@
crc = get32(&s->bytestream);
s->state |= PNG_IHDR;
#ifdef DEBUG
- printf("width=%d height=%d depth=%d color_type=%d compression_type=%d filter_type=%d interlace_type=%d\n",
+ av_log(avctx, AV_LOG_DEBUG, "width=%d height=%d depth=%d color_type=%d compression_type=%d filter_type=%d interlace_type=%d\n",
s->width, s->height, s->bit_depth, s->color_type,
s->compression_type, s->filter_type, s->interlace_type);
#endif
@@ -589,7 +589,7 @@
s->crow_size = s->pass_row_size + 1;
}
#ifdef DEBUG
- printf("row_size=%d crow_size =%d\n",
+ av_log(avctx, AV_LOG_DEBUG, "row_size=%d crow_size =%d\n",
s->row_size, s->crow_size);
#endif
s->image_buf = p->data[0];
Index: rv10.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/rv10.c,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -d -r1.77 -r1.78
--- rv10.c 12 Jan 2006 22:43:16 -0000 1.77
+++ rv10.c 8 Mar 2006 11:43:09 -0000 1.78
@@ -321,7 +321,7 @@
pb_frame = get_bits(&s->gb, 1);
#ifdef DEBUG
- printf("pict_type=%d pb_frame=%d\n", s->pict_type, pb_frame);
+ av_log(s->avctx, AV_LOG_DEBUG, "pict_type=%d pb_frame=%d\n", s->pict_type, pb_frame);
#endif
if (pb_frame){
@@ -342,7 +342,7 @@
s->last_dc[1] = get_bits(&s->gb, 8);
s->last_dc[2] = get_bits(&s->gb, 8);
#ifdef DEBUG
- printf("DC:%d %d %d\n",
+ av_log(s->avctx, AV_LOG_DEBUG, "DC:%d %d %d\n",
s->last_dc[0],
s->last_dc[1],
s->last_dc[2]);
@@ -631,7 +631,7 @@
}
#ifdef DEBUG
- printf("qscale=%d\n", s->qscale);
+ av_log(avctx, AV_LOG_DEBUG, "qscale=%d\n", s->qscale);
#endif
/* default quantization values */
@@ -672,7 +672,7 @@
int ret;
ff_update_block_index(s);
#ifdef DEBUG
- printf("**mb x=%d y=%d\n", s->mb_x, s->mb_y);
+ av_log(avctx, AV_LOG_DEBUG, "**mb x=%d y=%d\n", s->mb_x, s->mb_y);
#endif
s->mv_dir = MV_DIR_FORWARD;
@@ -713,7 +713,7 @@
AVFrame *pict = data;
#ifdef DEBUG
- printf("*****frame %d size=%d\n", avctx->frame_number, buf_size);
+ av_log(avctx, AV_LOG_DEBUG, "*****frame %d size=%d\n", avctx->frame_number, buf_size);
#endif
/* no supplementary picture */
More information about the ffmpeg-cvslog
mailing list