summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2012-08-21 12:41:40 +0200
committerDiego Biurrun <diego@biurrun.de>2012-10-01 10:24:28 +0200
commit1218777ffd152287244349d4ff9e1cbc84fa2c54 (patch)
treee2c8f97065c7ca67151019d6e1dd84a6d3bdd7fe /libavcodec
parent9c6cf7f2c9d326281e3eefa67673aabaa9d69940 (diff)
avcodec: Convert some commented-out printf/av_log instances to av_dlog
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/dcadec.c4
-rw-r--r--libavcodec/ffv1.c16
-rw-r--r--libavcodec/flicvideo.c4
-rw-r--r--libavcodec/h263dec.c3
-rw-r--r--libavcodec/h264_cabac.c3
-rw-r--r--libavcodec/imc.c2
-rw-r--r--libavcodec/jpegls.c2
-rw-r--r--libavcodec/jpeglsdec.c10
-rw-r--r--libavcodec/mjpegdec.c15
-rw-r--r--libavcodec/motion_est.c4
-rw-r--r--libavcodec/mpeg12.c13
-rw-r--r--libavcodec/mpegaudiodec.c4
-rw-r--r--libavcodec/mpegvideo.c12
-rw-r--r--libavcodec/mpegvideo_enc.c10
-rw-r--r--libavcodec/msmpeg4.c15
-rw-r--r--libavcodec/msmpeg4enc.c3
-rw-r--r--libavcodec/ratecontrol.c24
-rw-r--r--libavcodec/svq1dec.c4
-rw-r--r--libavcodec/vc1.c5
-rw-r--r--libavcodec/vc1dec.c3
-rw-r--r--libavcodec/vp3.c3
-rw-r--r--libavcodec/wmadec.c4
-rw-r--r--libavcodec/wmv2dec.c11
23 files changed, 105 insertions, 69 deletions
diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c
index 6b0812cf70..a0a5ea948d 100644
--- a/libavcodec/dcadec.c
+++ b/libavcodec/dcadec.c
@@ -704,8 +704,8 @@ static int dca_subframe_header(DCAContext *s, int base_channel, int block_index)
}
if (s->bitalloc[j][k] > 26) {
- // av_log(s->avctx, AV_LOG_DEBUG, "bitalloc index [%i][%i] too big (%i)\n",
- // j, k, s->bitalloc[j][k]);
+ av_dlog(s->avctx, "bitalloc index [%i][%i] too big (%i)\n",
+ j, k, s->bitalloc[j][k]);
return AVERROR_INVALIDDATA;
}
}
diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c
index b1358b8de6..a257803349 100644
--- a/libavcodec/ffv1.c
+++ b/libavcodec/ffv1.c
@@ -401,7 +401,8 @@ static inline void put_vlc_symbol(PutBitContext *pb, VlcState * const state, int
code= v ^ ((2*state->drift + state->count)>>31);
#endif
-//printf("v:%d/%d bias:%d error:%d drift:%d count:%d k:%d\n", v, code, state->bias, state->error_sum, state->drift, state->count, k);
+ av_dlog(NULL, "v:%d/%d bias:%d error:%d drift:%d count:%d k:%d\n", v, code,
+ state->bias, state->error_sum, state->drift, state->count, k);
set_sr_golomb(pb, code, k, 12, bits);
update_vlc_state(state, v);
@@ -420,7 +421,8 @@ static inline int get_vlc_symbol(GetBitContext *gb, VlcState * const state, int
assert(k<=8);
v= get_sr_golomb(gb, k, 12, bits);
-//printf("v:%d bias:%d error:%d drift:%d count:%d k:%d", v, state->bias, state->error_sum, state->drift, state->count, k);
+ av_dlog(NULL, "v:%d bias:%d error:%d drift:%d count:%d k:%d",
+ v, state->bias, state->error_sum, state->drift, state->count, k);
#if 0 // JPEG LS
if(k==0 && 2*state->drift <= - state->count) v ^= (-1);
@@ -500,7 +502,9 @@ static av_always_inline int encode_line(FFV1Context *s, int w,
}
}
-// printf("count:%d index:%d, mode:%d, x:%d y:%d pos:%d\n", run_count, run_index, run_mode, x, y, (int)put_bits_count(&s->pb));
+ av_dlog(s->avctx, "count:%d index:%d, mode:%d, x:%d pos:%d\n",
+ run_count, run_index, run_mode, x,
+ (int)put_bits_count(&s->pb));
if(run_mode == 0)
put_vlc_symbol(&s->pb, &p->vlc_state[context], diff, bits);
@@ -1300,7 +1304,8 @@ static av_always_inline void decode_line(FFV1Context *s, int w,
}else
diff= get_vlc_symbol(&s->gb, &p->vlc_state[context], bits);
-// printf("count:%d index:%d, mode:%d, x:%d y:%d pos:%d\n", run_count, run_index, run_mode, x, y, get_bits_count(&s->gb));
+ av_dlog(s->avctx, "count:%d index:%d, mode:%d, x:%d pos:%d\n",
+ run_count, run_index, run_mode, x, get_bits_count(&s->gb));
}
if(sign) diff= -diff;
@@ -1572,7 +1577,8 @@ static int read_header(FFV1Context *f){
return -1;
}
-//printf("%d %d %d\n", f->chroma_h_shift, f->chroma_v_shift,f->avctx->pix_fmt);
+ av_dlog(f->avctx, "%d %d %d\n",
+ f->chroma_h_shift, f->chroma_v_shift, f->avctx->pix_fmt);
if(f->version < 2){
context_count= read_quant_tables(c, f->quant_table);
if(context_count < 0){
diff --git a/libavcodec/flicvideo.c b/libavcodec/flicvideo.c
index fe59963964..831ada093b 100644
--- a/libavcodec/flicvideo.c
+++ b/libavcodec/flicvideo.c
@@ -486,7 +486,9 @@ static int flic_decode_frame_15_16BPP(AVCodecContext *avctx,
/* For some reason, it seems that non-palettized flics do
* include one of these chunks in their first frame.
* Why I do not know, it seems rather extraneous. */
-/* av_log(avctx, AV_LOG_ERROR, "Unexpected Palette chunk %d in non-paletised FLC\n",chunk_type);*/
+ av_dlog(avctx,
+ "Unexpected Palette chunk %d in non-palettized FLC\n",
+ chunk_type);
bytestream2_skip(&g2, chunk_size - 6);
break;
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index 1231f29e32..f93d79a675 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -215,7 +215,8 @@ static int decode_slice(MpegEncContext *s){
s->mv_dir = MV_DIR_FORWARD;
s->mv_type = MV_TYPE_16X16;
// s->mb_skipped = 0;
-//printf("%d %d %06X\n", ret, get_bits_count(&s->gb), show_bits(&s->gb, 24));
+ av_dlog(s, "%d %d %06X\n",
+ ret, get_bits_count(&s->gb), show_bits(&s->gb, 24));
ret= s->decode_mb(s, s->block);
if (s->pict_type!=AV_PICTURE_TYPE_B)
diff --git a/libavcodec/h264_cabac.c b/libavcodec/h264_cabac.c
index 88bcc734bb..f2fea5d3f2 100644
--- a/libavcodec/h264_cabac.c
+++ b/libavcodec/h264_cabac.c
@@ -2027,7 +2027,8 @@ decode_intra_mb:
int pred = pred_intra_mode( h, i );
h->intra4x4_pred_mode_cache[ scan8[i] ] = decode_cabac_mb_intra4x4_pred_mode( h, pred );
- //av_log( s->avctx, AV_LOG_ERROR, "i4x4 pred=%d mode=%d\n", pred, h->intra4x4_pred_mode_cache[ scan8[i] ] );
+ av_dlog(s->avctx, "i4x4 pred=%d mode=%d\n", pred,
+ h->intra4x4_pred_mode_cache[scan8[i]]);
}
}
write_back_intra_pred_mode(h);
diff --git a/libavcodec/imc.c b/libavcodec/imc.c
index 262f4f75cc..8e6b5bfb31 100644
--- a/libavcodec/imc.c
+++ b/libavcodec/imc.c
@@ -742,7 +742,7 @@ static int imc_get_coeffs(IMCContext *q, IMCChannel *chctx)
cw = 0;
if (get_bits_count(&q->gb) + cw_len > 512) {
- // av_log(NULL, 0, "Band %i coeff %i cw_len %i\n", i, j, cw_len);
+ av_dlog(NULL, "Band %i coeff %i cw_len %i\n", i, j, cw_len);
return AVERROR_INVALIDDATA;
}
diff --git a/libavcodec/jpegls.c b/libavcodec/jpegls.c
index ebe6b85e98..4740f11e05 100644
--- a/libavcodec/jpegls.c
+++ b/libavcodec/jpegls.c
@@ -85,5 +85,5 @@ void ff_jpegls_reset_coding_parameters(JLSState *s, int reset_all){
}
if(s->reset==0 || reset_all) s->reset= 64;
-// av_log(NULL, AV_LOG_DEBUG, "[JPEG-LS RESET] T=%i,%i,%i\n", s->T1, s->T2, s->T3);
+ av_dlog(NULL, "[JPEG-LS RESET] T=%i,%i,%i\n", s->T1, s->T2, s->T3);
}
diff --git a/libavcodec/jpeglsdec.c b/libavcodec/jpeglsdec.c
index 48974dd8d3..8a558476c3 100644
--- a/libavcodec/jpeglsdec.c
+++ b/libavcodec/jpeglsdec.c
@@ -78,7 +78,7 @@ int ff_jpegls_decode_lse(MJpegDecodeContext *s)
av_log(s->avctx, AV_LOG_ERROR, "invalid id %d\n", id);
return -1;
}
-// av_log(s->avctx, AV_LOG_DEBUG, "ID=%i, T=%i,%i,%i\n", id, s->t1, s->t2, s->t3);
+ av_dlog(s->avctx, "ID=%i, T=%i,%i,%i\n", id, s->t1, s->t2, s->t3);
return 0;
}
@@ -282,8 +282,12 @@ int ff_jpegls_decode_picture(MJpegDecodeContext *s, int near, int point_transfor
else
shift = point_transform + (16 - s->bits);
-// av_log(s->avctx, AV_LOG_DEBUG, "JPEG-LS params: %ix%i NEAR=%i MV=%i T(%i,%i,%i) RESET=%i, LIMIT=%i, qbpp=%i, RANGE=%i\n",s->width,s->height,state->near,state->maxval,state->T1,state->T2,state->T3,state->reset,state->limit,state->qbpp, state->range);
-// av_log(s->avctx, AV_LOG_DEBUG, "JPEG params: ILV=%i Pt=%i BPP=%i, scan = %i\n", ilv, point_transform, s->bits, s->cur_scan);
+ av_dlog(s->avctx, "JPEG-LS params: %ix%i NEAR=%i MV=%i T(%i,%i,%i) RESET=%i, LIMIT=%i, qbpp=%i, RANGE=%i\n",
+ s->width, s->height, state->near, state->maxval,
+ state->T1, state->T2, state->T3,
+ state->reset, state->limit, state->qbpp, state->range);
+ av_dlog(s->avctx, "JPEG params: ILV=%i Pt=%i BPP=%i, scan = %i\n",
+ ilv, point_transform, s->bits, s->cur_scan);
if(ilv == 0) { /* separate planes */
off = s->cur_scan - 1;
stride = (s->nb_components > 1) ? 3 : 1;
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 7217f4f196..1bcbcfd1d4 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -365,9 +365,9 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
for (i = 0; i < 3; i++)
s->linesize[i] = s->picture_ptr->linesize[i] << s->interlaced;
-// printf("%d %d %d %d %d %d\n",
-// s->width, s->height, s->linesize[0], s->linesize[1],
-// s->interlaced, s->avctx->height);
+ av_dlog(s->avctx, "%d %d %d %d %d %d\n",
+ s->width, s->height, s->linesize[0], s->linesize[1],
+ s->interlaced, s->avctx->height);
if (len != (8 + (3 * nb_components)))
av_log(s->avctx, AV_LOG_DEBUG, "decode_sof0: error, len(%d) mismatch\n", len);
@@ -892,11 +892,10 @@ static int mjpeg_decode_scan(MJpegDecodeContext *s, int nb_components, int Ah,
return AVERROR_INVALIDDATA;
}
}
- // av_log(s->avctx, AV_LOG_DEBUG, "mb: %d %d processed\n",
- // mb_y, mb_x);
- // av_log(NULL, AV_LOG_DEBUG, "%d %d %d %d %d %d %d %d \n",
- // mb_x, mb_y, x, y, c, s->bottom_field,
- // (v * mb_y + y) * 8, (h * mb_x + x) * 8);
+ av_dlog(s->avctx, "mb: %d %d processed\n", mb_y, mb_x);
+ av_dlog(s->avctx, "%d %d %d %d %d %d %d %d \n",
+ mb_x, mb_y, x, y, c, s->bottom_field,
+ (v * mb_y + y) * 8, (h * mb_x + x) * 8);
if (++x == h) {
x = 0;
y++;
diff --git a/libavcodec/motion_est.c b/libavcodec/motion_est.c
index f34a3477f7..932406d35b 100644
--- a/libavcodec/motion_est.c
+++ b/libavcodec/motion_est.c
@@ -1720,11 +1720,11 @@ void ff_estimate_b_frame_motion(MpegEncContext * s,
c->skip=0;
bmin= ff_estimate_motion_b(s, mb_x, mb_y, s->b_back_mv_table, 2, s->b_code) + 2*penalty_factor;
-//printf(" %d %d ", s->b_forw_mv_table[xy][0], s->b_forw_mv_table[xy][1]);
+ av_dlog(s, " %d %d ", s->b_forw_mv_table[xy][0], s->b_forw_mv_table[xy][1]);
c->skip=0;
fbmin= bidir_refine(s, mb_x, mb_y) + penalty_factor;
-//printf("%d %d %d %d\n", dmin, fmin, bmin, fbmin);
+ av_dlog(s, "%d %d %d %d\n", dmin, fmin, bmin, fbmin);
if(s->flags & CODEC_FLAG_INTERLACED_ME){
//FIXME mb type penalty
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index a9626c4026..fd8d71f1b4 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -1275,8 +1275,10 @@ static int mpeg_decode_postinit(AVCodecContext *avctx)
//res_change_ffmpeg_aspect.ts 4/3 225/44 ->4/3
//widescreen-issue562.mpg 4/3 16/9 -> 16/9
// s->avctx->sample_aspect_ratio = av_mul_q(s->avctx->sample_aspect_ratio, (AVRational) {s->width, s->height});
-//av_log(NULL, AV_LOG_ERROR, "A %d/%d\n", ff_mpeg2_aspect[s->aspect_ratio_info].num, ff_mpeg2_aspect[s->aspect_ratio_info].den);
-//av_log(NULL, AV_LOG_ERROR, "B %d/%d\n", s->avctx->sample_aspect_ratio.num, s->avctx->sample_aspect_ratio.den);
+ av_dlog(avctx, "A %d/%d\n",
+ ff_mpeg2_aspect[s->aspect_ratio_info].num, ff_mpeg2_aspect[s->aspect_ratio_info].den);
+ av_dlog(avctx, "B %d/%d\n", s->avctx->sample_aspect_ratio.num,
+ s->avctx->sample_aspect_ratio.den);
}
} else {
s->avctx->sample_aspect_ratio =
@@ -1843,7 +1845,7 @@ static int mpeg_decode_slice(MpegEncContext *s, int mb_y,
}
eos: // end of slice
*buf += (get_bits_count(&s->gb)-1)/8;
-//printf("y %d %d %d %d\n", s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y);
+ av_dlog(s, "y %d %d %d %d\n", s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y);
return 0;
}
@@ -1862,8 +1864,9 @@ static int slice_decode_thread(AVCodecContext *c, void *arg)
ret = mpeg_decode_slice(s, mb_y, &buf, s->gb.buffer_end - buf);
emms_c();
-//av_log(c, AV_LOG_DEBUG, "ret:%d resync:%d/%d mb:%d/%d ts:%d/%d ec:%d\n",
-//ret, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, s->start_mb_y, s->end_mb_y, s->error_count);
+ av_dlog(c, "ret:%d resync:%d/%d mb:%d/%d ts:%d/%d ec:%d\n",
+ ret, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y,
+ s->start_mb_y, s->end_mb_y, s->error_count);
if (ret < 0) {
if (c->err_recognition & AV_EF_EXPLODE)
return ret;
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c
index e6a8b171f6..80acdadc48 100644
--- a/libavcodec/mpegaudiodec.c
+++ b/libavcodec/mpegaudiodec.c
@@ -1383,8 +1383,8 @@ static int mp_decode_layer3(MPADecodeContext *s)
FFMAX(0, LAST_BUF_SIZE - s->last_buf_size));
assert((get_bits_count(&s->gb) & 7) == 0);
/* now we get bits from the main_data_begin offset */
- av_dlog(s->avctx, "seekback: %d\n", main_data_begin);
- //av_log(NULL, AV_LOG_ERROR, "backstep:%d, lastbuf:%d\n", main_data_begin, s->last_buf_size);
+ av_dlog(s->avctx, "seekback:%d, lastbuf:%d\n",
+ main_data_begin, s->last_buf_size);
memcpy(s->last_buf + s->last_buf_size, ptr, extrasize);
s->in_gb = s->gb;
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index d81adca841..592b4f2b2e 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -1396,12 +1396,12 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
if (!s->dropable)
s->next_picture_ptr = s->current_picture_ptr;
}
- /* av_log(s->avctx, AV_LOG_DEBUG, "L%p N%p C%p L%p N%p C%p type:%d drop:%d\n",
- s->last_picture_ptr, s->next_picture_ptr,s->current_picture_ptr,
- s->last_picture_ptr ? s->last_picture_ptr->f.data[0] : NULL,
- s->next_picture_ptr ? s->next_picture_ptr->f.data[0] : NULL,
- s->current_picture_ptr ? s->current_picture_ptr->f.data[0] : NULL,
- s->pict_type, s->dropable); */
+ av_dlog(s->avctx, "L%p N%p C%p L%p N%p C%p type:%d drop:%d\n",
+ s->last_picture_ptr, s->next_picture_ptr,s->current_picture_ptr,
+ s->last_picture_ptr ? s->last_picture_ptr->f.data[0] : NULL,
+ s->next_picture_ptr ? s->next_picture_ptr->f.data[0] : NULL,
+ s->current_picture_ptr ? s->current_picture_ptr->f.data[0] : NULL,
+ s->pict_type, s->dropable);
if (s->codec_id != AV_CODEC_ID_H264) {
if ((s->last_picture_ptr == NULL ||
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 31ba122af4..8325ee0f74 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -957,8 +957,8 @@ static int load_input_picture(MpegEncContext *s, AVFrame *pic_arg)
if (pic_arg->linesize[2] != s->uvlinesize)
direct = 0;
- //av_log(AV_LOG_DEBUG, "%d %d %d %d\n",pic_arg->linesize[0],
- // pic_arg->linesize[1], s->linesize, s->uvlinesize);
+ av_dlog(s->avctx, "%d %d %d %d\n", pic_arg->linesize[0],
+ pic_arg->linesize[1], s->linesize, s->uvlinesize);
if (direct) {
i = ff_find_unused_picture(s, 1);
@@ -2989,7 +2989,8 @@ static int encode_thread(AVCodecContext *c, void *arg){
if(CONFIG_H263_ENCODER && s->out_format == FMT_H263)
ff_h263_loop_filter(s);
}
-//printf("MB %d %d bits\n", s->mb_x+s->mb_y*s->mb_stride, put_bits_count(&s->pb));
+ av_dlog(s->avctx, "MB %d %d bits\n",
+ s->mb_x + s->mb_y * s->mb_stride, put_bits_count(&s->pb));
}
}
@@ -3184,7 +3185,8 @@ static int encode_picture(MpegEncContext *s, int picture_number)
s->pict_type= AV_PICTURE_TYPE_I;
for(i=0; i<s->mb_stride*s->mb_height; i++)
s->mb_type[i]= CANDIDATE_MB_TYPE_INTRA;
-//printf("Scene change detected, encoding as I Frame %d %d\n", s->current_picture.mb_var_sum, s->current_picture.mc_mb_var_sum);
+ av_dlog(s, "Scene change detected, encoding as I Frame %d %d\n",
+ s->current_picture.mb_var_sum, s->current_picture.mc_mb_var_sum);
}
if(!s->umvplus){
diff --git a/libavcodec/msmpeg4.c b/libavcodec/msmpeg4.c
index 2755aa26f6..5e562d8478 100644
--- a/libavcodec/msmpeg4.c
+++ b/libavcodec/msmpeg4.c
@@ -380,7 +380,7 @@ static int msmpeg4v2_decode_motion(MpegEncContext * s, int pred, int f_code)
int code, val, sign, shift;
code = get_vlc2(&s->gb, v2_mv_vlc.table, V2_MV_VLC_BITS, 2);
-// printf("MV code %d at %d %d pred: %d\n", code, s->mb_x,s->mb_y, pred);
+ av_dlog(s, "MV code %d at %d %d pred: %d\n", code, s->mb_x,s->mb_y, pred);
if (code < 0)
return 0xffff;
@@ -556,12 +556,15 @@ static int msmpeg4v34_decode_mb(MpegEncContext *s, DCTELEM block[6][64])
s->mv[0][0][1] = my;
*mb_type_ptr = MB_TYPE_L0 | MB_TYPE_16x16;
} else {
-//printf("I at %d %d %d %06X\n", s->mb_x, s->mb_y, ((cbp&3)? 1 : 0) +((cbp&0x3C)? 2 : 0), show_bits(&s->gb, 24));
+ av_dlog(s, "I at %d %d %d %06X\n", s->mb_x, s->mb_y,
+ ((cbp & 3) ? 1 : 0) +((cbp & 0x3C)? 2 : 0),
+ show_bits(&s->gb, 24));
s->ac_pred = get_bits1(&s->gb);
*mb_type_ptr = MB_TYPE_INTRA;
if(s->inter_intra_pred){
s->h263_aic_dir= get_vlc2(&s->gb, ff_inter_intra_vlc.table, INTER_INTRA_VLC_BITS, 1);
-// printf("%d%d %d %d/", s->ac_pred, s->h263_aic_dir, s->mb_x, s->mb_y);
+ av_dlog(s, "%d%d %d %d/",
+ s->ac_pred, s->h263_aic_dir, s->mb_x, s->mb_y);
}
if(s->per_mb_rl_table && cbp){
s->rl_table_index = decode012(&s->gb);
@@ -836,7 +839,8 @@ int ff_msmpeg4_decode_picture_header(MpegEncContext * s)
s->no_rounding = 0;
}
}
-//printf("%d %d %d %d %d\n", s->pict_type, s->bit_rate, s->inter_intra_pred, s->width, s->height);
+ av_dlog(s->avctx, "%d %d %d %d %d\n", s->pict_type, s->bit_rate,
+ s->inter_intra_pred, s->width, s->height);
s->esc3_level_length= 0;
s->esc3_run_length= 0;
@@ -1023,7 +1027,8 @@ int ff_msmpeg4_decode_block(MpegEncContext * s, DCTELEM * block,
last= SHOW_UBITS(re, &s->gb, 1); SKIP_BITS(re, &s->gb, 1);
if(!s->esc3_level_length){
int ll;
- //printf("ESC-3 %X at %d %d\n", show_bits(&s->gb, 24), s->mb_x, s->mb_y);
+ av_dlog(s->avctx, "ESC-3 %X at %d %d\n",
+ show_bits(&s->gb, 24), s->mb_x, s->mb_y);
if(s->qscale<8){
ll= SHOW_UBITS(re, &s->gb, 3); SKIP_BITS(re, &s->gb, 3);
if(ll==0){
diff --git a/libavcodec/msmpeg4enc.c b/libavcodec/msmpeg4enc.c
index e6951e8539..4a362c3921 100644
--- a/libavcodec/msmpeg4enc.c
+++ b/libavcodec/msmpeg4enc.c
@@ -230,7 +230,8 @@ void ff_msmpeg4_encode_picture_header(MpegEncContext * s, int picture_number)
s->per_mb_rl_table = 0;
if(s->msmpeg4_version==4)
s->inter_intra_pred= (s->width*s->height < 320*240 && s->bit_rate<=II_BITRATE && s->pict_type==AV_PICTURE_TYPE_P);
-//printf("%d %d %d %d %d\n", s->pict_type, s->bit_rate, s->inter_intra_pred, s->width, s->height);
+ av_dlog(s, "%d %d %d %d %d\n", s->pict_type, s->bit_rate,
+ s->inter_intra_pred, s->width, s->height);
if (s->pict_type == AV_PICTURE_TYPE_I) {
s->slice_height= s->mb_height/1;
diff --git a/libavcodec/ratecontrol.c b/libavcodec/ratecontrol.c
index 0772a912c1..2cb5eeaefe 100644
--- a/libavcodec/ratecontrol.c
+++ b/libavcodec/ratecontrol.c
@@ -270,7 +270,8 @@ int ff_vbv_update(MpegEncContext *s, int frame_size){
const double min_rate= s->avctx->rc_min_rate/fps;
const double max_rate= s->avctx->rc_max_rate/fps;
-//printf("%d %f %d %f %f\n", buffer_size, rcc->buffer_index, frame_size, min_rate, max_rate);
+ av_dlog(s, "%d %f %d %f %f\n",
+ buffer_size, rcc->buffer_index, frame_size, min_rate, max_rate);
if(buffer_size){
int left;
@@ -479,7 +480,9 @@ static double modify_qscale(MpegEncContext *s, RateControlEntry *rce, double q,
}
}
}
-//printf("q:%f max:%f min:%f size:%f index:%d bits:%f agr:%f\n", q,max_rate, min_rate, buffer_size, rcc->buffer_index, bits, s->avctx->rc_buffer_aggressivity);
+ av_dlog(s, "q:%f max:%f min:%f size:%f index:%f agr:%f\n",
+ q, max_rate, min_rate, buffer_size, rcc->buffer_index,
+ s->avctx->rc_buffer_aggressivity);
if(s->avctx->rc_qsquish==0.0 || qmin==qmax){
if (q<qmin) q=qmin;
else if(q>qmax) q=qmax;
@@ -706,7 +709,8 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run)
assert(pict_type == rce->new_pict_type);
q= rce->new_qscale / br_compensation;
-//printf("%f %f %f last:%d var:%d type:%d//\n", q, rce->new_qscale, br_compensation, s->frame_bits, var, pict_type);
+ av_dlog(s, "%f %f %f last:%d var:%d type:%d//\n", q, rce->new_qscale,
+ br_compensation, s->frame_bits, var, pict_type);
}else{
rce->pict_type=
rce->new_pict_type= pict_type;
@@ -883,11 +887,9 @@ static int init_pass2(MpegEncContext *s)
expected_bits += bits;
}
- /*
- av_log(s->avctx, AV_LOG_INFO,
- "expected_bits: %f all_available_bits: %d rate_factor: %f\n",
- expected_bits, (int)all_available_bits, rate_factor);
- */
+ av_dlog(s->avctx,
+ "expected_bits: %f all_available_bits: %d rate_factor: %f\n",
+ expected_bits, (int)all_available_bits, rate_factor);
if(expected_bits > all_available_bits) {
rate_factor-= step;
++toobig;
@@ -899,8 +901,10 @@ static int init_pass2(MpegEncContext *s)
/* check bitrate calculations and print info */
qscale_sum = 0.0;
for(i=0; i<rcc->num_entries; i++){
- /* av_log(s->avctx, AV_LOG_DEBUG, "[lavc rc] entry[%d].new_qscale = %.3f qp = %.3f\n",
- i, rcc->entry[i].new_qscale, rcc->entry[i].new_qscale / FF_QP2LAMBDA); */
+ av_dlog(s, "[lavc rc] entry[%d].new_qscale = %.3f qp = %.3f\n",
+ i,
+ rcc->entry[i].new_qscale,
+ rcc->entry[i].new_qscale / FF_QP2LAMBDA);
qscale_sum += av_clip(rcc->entry[i].new_qscale / FF_QP2LAMBDA, s->avctx->qmin, s->avctx->qmax);
}
assert(toobig <= 40);
diff --git a/libavcodec/svq1dec.c b/libavcodec/svq1dec.c
index c16fd062e3..4af8b42624 100644
--- a/libavcodec/svq1dec.c
+++ b/libavcodec/svq1dec.c
@@ -521,8 +521,8 @@ static int svq1_decode_frame_header (GetBitContext *bitbuf,MpegEncContext *s) {
csum = ff_svq1_packet_checksum (bitbuf->buffer, bitbuf->size_in_bits>>3, csum);
-// av_log(s->avctx, AV_LOG_INFO, "%s checksum (%02x) for packet data\n",
-// (csum == 0) ? "correct" : "incorrect", csum);
+ av_dlog(s->avctx, "%s checksum (%02x) for packet data\n",
+ (csum == 0) ? "correct" : "incorrect", csum);
}
if ((s->f_code ^ 0x10) >= 0x50) {
diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c
index cd56499eba..b04d570602 100644
--- a/libavcodec/vc1.c
+++ b/libavcodec/vc1.c
@@ -652,8 +652,9 @@ int ff_vc1_parse_frame_header(VC1Context *v, GetBitContext* gb)
v->x8_type = get_bits1(gb);
} else
v->x8_type = 0;
-//av_log(v->s.avctx, AV_LOG_INFO, "%c Frame: QP=[%i]%i (+%i/2) %i\n",
-// (v->s.pict_type == AV_PICTURE_TYPE_P) ? 'P' : ((v->s.pict_type == AV_PICTURE_TYPE_I) ? 'I' : 'B'), pqindex, v->pq, v->halfpq, v->rangeredfrm);
+ av_dlog(v->s.avctx, "%c Frame: QP=[%i]%i (+%i/2) %i\n",
+ (v->s.pict_type == AV_PICTURE_TYPE_P) ? 'P' : ((v->s.pict_type == AV_PICTURE_TYPE_I) ? 'I' : 'B'),
+ pqindex, v->pq, v->halfpq, v->rangeredfrm);
if (v->s.pict_type == AV_PICTURE_TYPE_I || v->s.pict_type == AV_PICTURE_TYPE_P)
v->use_ic = 0;
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 986e4adc5e..310172a84d 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -5622,7 +5622,8 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,
s->linesize >>= 1;
s->uvlinesize >>= 1;
}
-//av_log(s->avctx, AV_LOG_INFO, "Consumed %i/%i bits\n", get_bits_count(&s->gb), s->gb.size_in_bits);
+ av_dlog(s->avctx, "Consumed %i/%i bits\n",
+ get_bits_count(&s->gb), s->gb.size_in_bits);
// if (get_bits_count(&s->gb) > buf_size * 8)
// return -1;
ff_er_frame_end(s);
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index 296f9fca9a..1f5f6c8982 100644
--- a/libavcodec/vp3.c
+++ b/libavcodec/vp3.c
@@ -2073,7 +2073,8 @@ static int read_huffman_tree(AVCodecContext *avctx, GetBitContext *gb)
return -1;
}
token = get_bits(gb, 5);
- //av_log(avctx, AV_LOG_DEBUG, "hti %d hbits %x token %d entry : %d size %d\n", s->hti, s->hbits, token, s->entries, s->huff_code_size);
+ av_dlog(avctx, "hti %d hbits %x token %d entry : %d size %d\n",
+ s->hti, s->hbits, token, s->entries, s->huff_code_size);
s->huffman_table[s->hti][token][0] = s->hbits;
s->huffman_table[s->hti][token][1] = s->huff_code_size;
s->entries++;
diff --git a/libavcodec/wmadec.c b/libavcodec/wmadec.c
index 78ada71466..1f9ab61969 100644
--- a/libavcodec/wmadec.c
+++ b/libavcodec/wmadec.c
@@ -913,7 +913,9 @@ static int wma_decode_superframe(AVCodecContext *avctx, void *data,
samples += s->nb_channels * s->frame_len;
}
-//av_log(NULL, AV_LOG_ERROR, "%d %d %d %d outbytes:%d eaten:%d\n", s->frame_len_bits, s->block_len_bits, s->frame_len, s->block_len, (int8_t *)samples - (int8_t *)data, s->block_align);
+ av_dlog(s->avctx, "%d %d %d %d outbytes:%d eaten:%d\n",
+ s->frame_len_bits, s->block_len_bits, s->frame_len, s->block_len,
+ (int8_t *)samples - (int8_t *)data, s->block_align);
*got_frame_ptr = 1;
*(AVFrame *)data = s->frame;
diff --git a/libavcodec/wmv2dec.c b/libavcodec/wmv2dec.c
index 106e91b269..c1fd4ee0a3 100644
--- a/libavcodec/wmv2dec.c
+++ b/libavcodec/wmv2dec.c
@@ -415,13 +415,16 @@ int ff_wmv2_decode_mb(MpegEncContext *s, DCTELEM block[6][64])
}
}
} else {
-//if(s->pict_type==AV_PICTURE_TYPE_P)
-// printf("%d%d ", s->inter_intra_pred, cbp);
-//printf("I at %d %d %d %06X\n", s->mb_x, s->mb_y, ((cbp&3)? 1 : 0) +((cbp&0x3C)? 2 : 0), show_bits(&s->gb, 24));
+ if (s->pict_type==AV_PICTURE_TYPE_P)
+ av_dlog(s->avctx, "%d%d ", s->inter_intra_pred, cbp);
+ av_dlog(s->avctx, "I at %d %d %d %06X\n", s->mb_x, s->mb_y,
+ ((cbp & 3) ? 1 : 0) +((cbp & 0x3C)? 2 : 0),
+ show_bits(&s->gb, 24));
s->ac_pred = get_bits1(&s->gb);
if(s->inter_intra_pred){
s->h263_aic_dir= get_vlc2(&s->gb, ff_inter_intra_vlc.table, INTER_INTRA_VLC_BITS, 1);
-// printf("%d%d %d %d/", s->ac_pred, s->h263_aic_dir, s->mb_x, s->mb_y);
+ av_dlog(s->avctx, "%d%d %d %d/",
+ s->ac_pred, s->h263_aic_dir, s->mb_x, s->mb_y);
}
if(s->per_mb_rl_table && cbp){
s->rl_table_index = decode012(&s->gb);