Unified · Split
| @@ -704,8 +704,8 @@ static int dca_subframe_header(DCAContext *s, int base_channel, int block_index) · 703 unmodified lines | ||
| 704 | 704 | } |
| 705 | 705 | |
| 706 | 706 | if (s->bitalloc[j][k] > 26) { |
| 707 | − // av_log(s->avctx, AV_LOG_DEBUG, "bitalloc index [%i][%i] too big (%i)\n", | |
| 708 | − // j, k, s->bitalloc[j][k]); | |
| 707 | + av_dlog(s->avctx, "bitalloc index [%i][%i] too big (%i)\n", | |
| 708 | + j, k, s->bitalloc[j][k]); | |
| 709 | 709 | return AVERROR_INVALIDDATA; |
| 710 | 710 | } |
| 711 | 711 | } |
| @@ -401,7 +401,8 @@ static inline void put_vlc_symbol(PutBitContext *pb, VlcState * const state, int · 400 unmodified lines | ||
| 401 | 401 | code= v ^ ((2*state->drift + state->count)>>31); |
| 402 | 402 | #endif |
| 403 | 403 | |
| 404 | −//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); | |
| 404 | + av_dlog(NULL, "v:%d/%d bias:%d error:%d drift:%d count:%d k:%d\n", v, code, | |
| 405 | + state->bias, state->error_sum, state->drift, state->count, k); | |
| 405 | 406 | set_sr_golomb(pb, code, k, 12, bits); |
| 406 | 407 | |
| 407 | 408 | update_vlc_state(state, v); |
| @@ -420,7 +421,8 @@ static inline int get_vlc_symbol(GetBitContext *gb, VlcState * const state, int · 12 unmodified lines | ||
| 420 | 421 | assert(k<=8); |
| 421 | 422 | |
| 422 | 423 | v= get_sr_golomb(gb, k, 12, bits); |
| 423 | −//printf("v:%d bias:%d error:%d drift:%d count:%d k:%d", v, state->bias, state->error_sum, state->drift, state->count, k); | |
| 424 | + av_dlog(NULL, "v:%d bias:%d error:%d drift:%d count:%d k:%d", | |
| 425 | + v, state->bias, state->error_sum, state->drift, state->count, k); | |
| 424 | 426 | |
| 425 | 427 | #if 0 // JPEG LS |
| 426 | 428 | 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, · 73 unmodified lines | ||
| 500 | 502 | } |
| 501 | 503 | } |
| 502 | 504 | |
| 503 | −// 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)); | |
| 505 | + av_dlog(s->avctx, "count:%d index:%d, mode:%d, x:%d pos:%d\n", | |
| 506 | + run_count, run_index, run_mode, x, | |
| 507 | + (int)put_bits_count(&s->pb)); | |
| 504 | 508 | |
| 505 | 509 | if(run_mode == 0) |
| 506 | 510 | 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, · 793 unmodified lines | ||
| 1300 | 1304 | }else |
| 1301 | 1305 | diff= get_vlc_symbol(&s->gb, &p->vlc_state[context], bits); |
| 1302 | 1306 | |
| 1303 | −// 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)); | |
| 1307 | + av_dlog(s->avctx, "count:%d index:%d, mode:%d, x:%d pos:%d\n", | |
| 1308 | + run_count, run_index, run_mode, x, get_bits_count(&s->gb)); | |
| 1304 | 1309 | } |
| 1305 | 1310 | |
| 1306 | 1311 | if(sign) diff= -diff; |
| @@ -1572,7 +1577,8 @@ static int read_header(FFV1Context *f){ · 265 unmodified lines | ||
| 1572 | 1577 | return -1; |
| 1573 | 1578 | } |
| 1574 | 1579 | |
| 1575 | −//printf("%d %d %d\n", f->chroma_h_shift, f->chroma_v_shift,f->avctx->pix_fmt); | |
| 1580 | + av_dlog(f->avctx, "%d %d %d\n", | |
| 1581 | + f->chroma_h_shift, f->chroma_v_shift, f->avctx->pix_fmt); | |
| 1576 | 1582 | if(f->version < 2){ |
| 1577 | 1583 | context_count= read_quant_tables(c, f->quant_table); |
| 1578 | 1584 | if(context_count < 0){ |
| @@ -486,7 +486,9 @@ static int flic_decode_frame_15_16BPP(AVCodecContext *avctx, · 485 unmodified lines | ||
| 486 | 486 | /* For some reason, it seems that non-palettized flics do |
| 487 | 487 | * include one of these chunks in their first frame. |
| 488 | 488 | * Why I do not know, it seems rather extraneous. */ |
| 489 | −/* av_log(avctx, AV_LOG_ERROR, "Unexpected Palette chunk %d in non-paletised FLC\n",chunk_type);*/ | |
| 489 | + av_dlog(avctx, | |
| 490 | + "Unexpected Palette chunk %d in non-palettized FLC\n", | |
| 491 | + chunk_type); | |
| 490 | 492 | bytestream2_skip(&g2, chunk_size - 6); |
| 491 | 493 | break; |
| 492 | 494 | |
| @@ -215,7 +215,8 @@ static int decode_slice(MpegEncContext *s){ · 214 unmodified lines | ||
| 215 | 215 | s->mv_dir = MV_DIR_FORWARD; |
| 216 | 216 | s->mv_type = MV_TYPE_16X16; |
| 217 | 217 | // s->mb_skipped = 0; |
| 218 | −//printf("%d %d %06X\n", ret, get_bits_count(&s->gb), show_bits(&s->gb, 24)); | |
| 218 | + av_dlog(s, "%d %d %06X\n", | |
| 219 | + ret, get_bits_count(&s->gb), show_bits(&s->gb, 24)); | |
| 219 | 220 | ret= s->decode_mb(s, s->block); |
| 220 | 221 | |
| 221 | 222 | if (s->pict_type!=AV_PICTURE_TYPE_B) |
| @@ -2027,7 +2027,8 @@ decode_intra_mb: · 2026 unmodified lines | ||
| 2027 | 2027 | int pred = pred_intra_mode( h, i ); |
| 2028 | 2028 | h->intra4x4_pred_mode_cache[ scan8[i] ] = decode_cabac_mb_intra4x4_pred_mode( h, pred ); |
| 2029 | 2029 | |
| 2030 | − //av_log( s->avctx, AV_LOG_ERROR, "i4x4 pred=%d mode=%d\n", pred, h->intra4x4_pred_mode_cache[ scan8[i] ] ); | |
| 2030 | + av_dlog(s->avctx, "i4x4 pred=%d mode=%d\n", pred, | |
| 2031 | + h->intra4x4_pred_mode_cache[scan8[i]]); | |
| 2031 | 2032 | } |
| 2032 | 2033 | } |
| 2033 | 2034 | write_back_intra_pred_mode(h); |
| @@ -742,7 +742,7 @@ static int imc_get_coeffs(IMCContext *q, IMCChannel *chctx) · 741 unmodified lines | ||
| 742 | 742 | cw = 0; |
| 743 | 743 | |
| 744 | 744 | if (get_bits_count(&q->gb) + cw_len > 512) { |
| 745 | − // av_log(NULL, 0, "Band %i coeff %i cw_len %i\n", i, j, cw_len); | |
| 745 | + av_dlog(NULL, "Band %i coeff %i cw_len %i\n", i, j, cw_len); | |
| 746 | 746 | return AVERROR_INVALIDDATA; |
| 747 | 747 | } |
| 748 | 748 | |
| @@ -85,5 +85,5 @@ void ff_jpegls_reset_coding_parameters(JLSState *s, int reset_all){ · 84 unmodified lines | ||
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | if(s->reset==0 || reset_all) s->reset= 64; |
| 88 | −// av_log(NULL, AV_LOG_DEBUG, "[JPEG-LS RESET] T=%i,%i,%i\n", s->T1, s->T2, s->T3); | |
| 88 | + av_dlog(NULL, "[JPEG-LS RESET] T=%i,%i,%i\n", s->T1, s->T2, s->T3); | |
| 89 | 89 | } |
| @@ -78,7 +78,7 @@ int ff_jpegls_decode_lse(MJpegDecodeContext *s) · 77 unmodified lines | ||
| 78 | 78 | av_log(s->avctx, AV_LOG_ERROR, "invalid id %d\n", id); |
| 79 | 79 | return -1; |
| 80 | 80 | } |
| 81 | −// av_log(s->avctx, AV_LOG_DEBUG, "ID=%i, T=%i,%i,%i\n", id, s->t1, s->t2, s->t3); | |
| 81 | + av_dlog(s->avctx, "ID=%i, T=%i,%i,%i\n", id, s->t1, s->t2, s->t3); | |
| 82 | 82 | |
| 83 | 83 | return 0; |
| 84 | 84 | } |
| @@ -282,8 +282,12 @@ int ff_jpegls_decode_picture(MJpegDecodeContext *s, int near, int point_transfor · 197 unmodified lines | ||
| 282 | 282 | else |
| 283 | 283 | shift = point_transform + (16 - s->bits); |
| 284 | 284 | |
| 285 | −// 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); | |
| 286 | −// 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); | |
| 285 | + 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", | |
| 286 | + s->width, s->height, state->near, state->maxval, | |
| 287 | + state->T1, state->T2, state->T3, | |
| 288 | + state->reset, state->limit, state->qbpp, state->range); | |
| 289 | + av_dlog(s->avctx, "JPEG params: ILV=%i Pt=%i BPP=%i, scan = %i\n", | |
| 290 | + ilv, point_transform, s->bits, s->cur_scan); | |
| 287 | 291 | if(ilv == 0) { /* separate planes */ |
| 288 | 292 | off = s->cur_scan - 1; |
| 289 | 293 | stride = (s->nb_components > 1) ? 3 : 1; |
| @@ -365,9 +365,9 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) · 364 unmodified lines | ||
| 365 | 365 | for (i = 0; i < 3; i++) |
| 366 | 366 | s->linesize[i] = s->picture_ptr->linesize[i] << s->interlaced; |
| 367 | 367 | |
| 368 | −// printf("%d %d %d %d %d %d\n", | |
| 369 | −// s->width, s->height, s->linesize[0], s->linesize[1], | |
| 370 | −// s->interlaced, s->avctx->height); | |
| 368 | + av_dlog(s->avctx, "%d %d %d %d %d %d\n", | |
| 369 | + s->width, s->height, s->linesize[0], s->linesize[1], | |
| 370 | + s->interlaced, s->avctx->height); | |
| 371 | 371 | |
| 372 | 372 | if (len != (8 + (3 * nb_components))) |
| 373 | 373 | 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, · 518 unmodified lines | ||
| 892 | 892 | return AVERROR_INVALIDDATA; |
| 893 | 893 | } |
| 894 | 894 | } |
| 895 | − // av_log(s->avctx, AV_LOG_DEBUG, "mb: %d %d processed\n", | |
| 896 | − // mb_y, mb_x); | |
| 897 | − // av_log(NULL, AV_LOG_DEBUG, "%d %d %d %d %d %d %d %d \n", | |
| 898 | − // mb_x, mb_y, x, y, c, s->bottom_field, | |
| 899 | − // (v * mb_y + y) * 8, (h * mb_x + x) * 8); | |
| 895 | + av_dlog(s->avctx, "mb: %d %d processed\n", mb_y, mb_x); | |
| 896 | + av_dlog(s->avctx, "%d %d %d %d %d %d %d %d \n", | |
| 897 | + mb_x, mb_y, x, y, c, s->bottom_field, | |
| 898 | + (v * mb_y + y) * 8, (h * mb_x + x) * 8); | |
| 900 | 899 | if (++x == h) { |
| 901 | 900 | x = 0; |
| 902 | 901 | y++; |
| @@ -1720,11 +1720,11 @@ void ff_estimate_b_frame_motion(MpegEncContext * s, · 1719 unmodified lines | ||
| 1720 | 1720 | |
| 1721 | 1721 | c->skip=0; |
| 1722 | 1722 | bmin= ff_estimate_motion_b(s, mb_x, mb_y, s->b_back_mv_table, 2, s->b_code) + 2*penalty_factor; |
| 1723 | −//printf(" %d %d ", s->b_forw_mv_table[xy][0], s->b_forw_mv_table[xy][1]); | |
| 1723 | + av_dlog(s, " %d %d ", s->b_forw_mv_table[xy][0], s->b_forw_mv_table[xy][1]); | |
| 1724 | 1724 | |
| 1725 | 1725 | c->skip=0; |
| 1726 | 1726 | fbmin= bidir_refine(s, mb_x, mb_y) + penalty_factor; |
| 1727 | −//printf("%d %d %d %d\n", dmin, fmin, bmin, fbmin); | |
| 1727 | + av_dlog(s, "%d %d %d %d\n", dmin, fmin, bmin, fbmin); | |
| 1728 | 1728 | |
| 1729 | 1729 | if(s->flags & CODEC_FLAG_INTERLACED_ME){ |
| 1730 | 1730 | //FIXME mb type penalty |
| @@ -1275,8 +1275,10 @@ static int mpeg_decode_postinit(AVCodecContext *avctx) · 1274 unmodified lines | ||
| 1275 | 1275 | //res_change_ffmpeg_aspect.ts 4/3 225/44 ->4/3 |
| 1276 | 1276 | //widescreen-issue562.mpg 4/3 16/9 -> 16/9 |
| 1277 | 1277 | // s->avctx->sample_aspect_ratio = av_mul_q(s->avctx->sample_aspect_ratio, (AVRational) {s->width, s->height}); |
| 1278 | −//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); | |
| 1279 | −//av_log(NULL, AV_LOG_ERROR, "B %d/%d\n", s->avctx->sample_aspect_ratio.num, s->avctx->sample_aspect_ratio.den); | |
| 1278 | + av_dlog(avctx, "A %d/%d\n", | |
| 1279 | + ff_mpeg2_aspect[s->aspect_ratio_info].num, ff_mpeg2_aspect[s->aspect_ratio_info].den); | |
| 1280 | + av_dlog(avctx, "B %d/%d\n", s->avctx->sample_aspect_ratio.num, | |
| 1281 | + s->avctx->sample_aspect_ratio.den); | |
| 1280 | 1282 | } |
| 1281 | 1283 | } else { |
| 1282 | 1284 | s->avctx->sample_aspect_ratio = |
| @@ -1843,7 +1845,7 @@ static int mpeg_decode_slice(MpegEncContext *s, int mb_y, · 560 unmodified lines | ||
| 1843 | 1845 | } |
| 1844 | 1846 | eos: // end of slice |
| 1845 | 1847 | *buf += (get_bits_count(&s->gb)-1)/8; |
| 1846 | −//printf("y %d %d %d %d\n", s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y); | |
| 1848 | + av_dlog(s, "y %d %d %d %d\n", s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y); | |
| 1847 | 1849 | return 0; |
| 1848 | 1850 | } |
| 1849 | 1851 | |
| @@ -1862,8 +1864,9 @@ static int slice_decode_thread(AVCodecContext *c, void *arg) · 12 unmodified lines | ||
| 1862 | 1864 | |
| 1863 | 1865 | ret = mpeg_decode_slice(s, mb_y, &buf, s->gb.buffer_end - buf); |
| 1864 | 1866 | emms_c(); |
| 1865 | −//av_log(c, AV_LOG_DEBUG, "ret:%d resync:%d/%d mb:%d/%d ts:%d/%d ec:%d\n", | |
| 1866 | −//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); | |
| 1867 | + av_dlog(c, "ret:%d resync:%d/%d mb:%d/%d ts:%d/%d ec:%d\n", | |
| 1868 | + ret, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, | |
| 1869 | + s->start_mb_y, s->end_mb_y, s->error_count); | |
| 1867 | 1870 | if (ret < 0) { |
| 1868 | 1871 | if (c->err_recognition & AV_EF_EXPLODE) |
| 1869 | 1872 | return ret; |
| @@ -1383,8 +1383,8 @@ static int mp_decode_layer3(MPADecodeContext *s) · 1382 unmodified lines | ||
| 1383 | 1383 | FFMAX(0, LAST_BUF_SIZE - s->last_buf_size)); |
| 1384 | 1384 | assert((get_bits_count(&s->gb) & 7) == 0); |
| 1385 | 1385 | /* now we get bits from the main_data_begin offset */ |
| 1386 | − av_dlog(s->avctx, "seekback: %d\n", main_data_begin); | |
| 1387 | − //av_log(NULL, AV_LOG_ERROR, "backstep:%d, lastbuf:%d\n", main_data_begin, s->last_buf_size); | |
| 1386 | + av_dlog(s->avctx, "seekback:%d, lastbuf:%d\n", | |
| 1387 | + main_data_begin, s->last_buf_size); | |
| 1388 | 1388 | |
| 1389 | 1389 | memcpy(s->last_buf + s->last_buf_size, ptr, extrasize); |
| 1390 | 1390 | s->in_gb = s->gb; |
| @@ -1396,12 +1396,12 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx) · 1395 unmodified lines | ||
| 1396 | 1396 | if (!s->dropable) |
| 1397 | 1397 | s->next_picture_ptr = s->current_picture_ptr; |
| 1398 | 1398 | } |
| 1399 | − /* av_log(s->avctx, AV_LOG_DEBUG, "L%p N%p C%p L%p N%p C%p type:%d drop:%d\n", | |
| 1400 | − s->last_picture_ptr, s->next_picture_ptr,s->current_picture_ptr, | |
| 1401 | − s->last_picture_ptr ? s->last_picture_ptr->f.data[0] : NULL, | |
| 1402 | − s->next_picture_ptr ? s->next_picture_ptr->f.data[0] : NULL, | |
| 1403 | − s->current_picture_ptr ? s->current_picture_ptr->f.data[0] : NULL, | |
| 1404 | − s->pict_type, s->dropable); */ | |
| 1399 | + av_dlog(s->avctx, "L%p N%p C%p L%p N%p C%p type:%d drop:%d\n", | |
| 1400 | + s->last_picture_ptr, s->next_picture_ptr,s->current_picture_ptr, | |
| 1401 | + s->last_picture_ptr ? s->last_picture_ptr->f.data[0] : NULL, | |
| 1402 | + s->next_picture_ptr ? s->next_picture_ptr->f.data[0] : NULL, | |
| 1403 | + s->current_picture_ptr ? s->current_picture_ptr->f.data[0] : NULL, | |
| 1404 | + s->pict_type, s->dropable); | |
| 1405 | 1405 | |
| 1406 | 1406 | if (s->codec_id != AV_CODEC_ID_H264) { |
| 1407 | 1407 | if ((s->last_picture_ptr == NULL || |
| @@ -957,8 +957,8 @@ static int load_input_picture(MpegEncContext *s, AVFrame *pic_arg) · 956 unmodified lines | ||
| 957 | 957 | if (pic_arg->linesize[2] != s->uvlinesize) |
| 958 | 958 | direct = 0; |
| 959 | 959 | |
| 960 | − //av_log(AV_LOG_DEBUG, "%d %d %d %d\n",pic_arg->linesize[0], | |
| 961 | − // pic_arg->linesize[1], s->linesize, s->uvlinesize); | |
| 960 | + av_dlog(s->avctx, "%d %d %d %d\n", pic_arg->linesize[0], | |
| 961 | + pic_arg->linesize[1], s->linesize, s->uvlinesize); | |
| 962 | 962 | |
| 963 | 963 | if (direct) { |
| 964 | 964 | i = ff_find_unused_picture(s, 1); |
| @@ -2989,7 +2989,8 @@ static int encode_thread(AVCodecContext *c, void *arg){ · 2024 unmodified lines | ||
| 2989 | 2989 | if(CONFIG_H263_ENCODER && s->out_format == FMT_H263) |
| 2990 | 2990 | ff_h263_loop_filter(s); |
| 2991 | 2991 | } |
| 2992 | −//printf("MB %d %d bits\n", s->mb_x+s->mb_y*s->mb_stride, put_bits_count(&s->pb)); | |
| 2992 | + av_dlog(s->avctx, "MB %d %d bits\n", | |
| 2993 | + s->mb_x + s->mb_y * s->mb_stride, put_bits_count(&s->pb)); | |
| 2993 | 2994 | } |
| 2994 | 2995 | } |
| 2995 | 2996 | |
| @@ -3184,7 +3185,8 @@ static int encode_picture(MpegEncContext *s, int picture_number) · 188 unmodified lines | ||
| 3184 | 3185 | s->pict_type= AV_PICTURE_TYPE_I; |
| 3185 | 3186 | for(i=0; i<s->mb_stride*s->mb_height; i++) |
| 3186 | 3187 | s->mb_type[i]= CANDIDATE_MB_TYPE_INTRA; |
| 3187 | −//printf("Scene change detected, encoding as I Frame %d %d\n", s->current_picture.mb_var_sum, s->current_picture.mc_mb_var_sum); | |
| 3188 | + av_dlog(s, "Scene change detected, encoding as I Frame %d %d\n", | |
| 3189 | + s->current_picture.mb_var_sum, s->current_picture.mc_mb_var_sum); | |
| 3188 | 3190 | } |
| 3189 | 3191 | |
| 3190 | 3192 | if(!s->umvplus){ |
| @@ -380,7 +380,7 @@ static int msmpeg4v2_decode_motion(MpegEncContext * s, int pred, int f_code) · 379 unmodified lines | ||
| 380 | 380 | int code, val, sign, shift; |
| 381 | 381 | |
| 382 | 382 | code = get_vlc2(&s->gb, v2_mv_vlc.table, V2_MV_VLC_BITS, 2); |
| 383 | −// printf("MV code %d at %d %d pred: %d\n", code, s->mb_x,s->mb_y, pred); | |
| 383 | + av_dlog(s, "MV code %d at %d %d pred: %d\n", code, s->mb_x,s->mb_y, pred); | |
| 384 | 384 | if (code < 0) |
| 385 | 385 | return 0xffff; |
| 386 | 386 | |
| @@ -556,12 +556,15 @@ static int msmpeg4v34_decode_mb(MpegEncContext *s, DCTELEM block[6][64]) · 169 unmodified lines | ||
| 556 | 556 | s->mv[0][0][1] = my; |
| 557 | 557 | *mb_type_ptr = MB_TYPE_L0 | MB_TYPE_16x16; |
| 558 | 558 | } else { |
| 559 | −//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)); | |
| 559 | + av_dlog(s, "I at %d %d %d %06X\n", s->mb_x, s->mb_y, | |
| 560 | + ((cbp & 3) ? 1 : 0) +((cbp & 0x3C)? 2 : 0), | |
| 561 | + show_bits(&s->gb, 24)); | |
| 560 | 562 | s->ac_pred = get_bits1(&s->gb); |
| 561 | 563 | *mb_type_ptr = MB_TYPE_INTRA; |
| 562 | 564 | if(s->inter_intra_pred){ |
| 563 | 565 | s->h263_aic_dir= get_vlc2(&s->gb, ff_inter_intra_vlc.table, INTER_INTRA_VLC_BITS, 1); |
| 564 | −// printf("%d%d %d %d/", s->ac_pred, s->h263_aic_dir, s->mb_x, s->mb_y); | |
| 566 | + av_dlog(s, "%d%d %d %d/", | |
| 567 | + s->ac_pred, s->h263_aic_dir, s->mb_x, s->mb_y); | |
| 565 | 568 | } |
| 566 | 569 | if(s->per_mb_rl_table && cbp){ |
| 567 | 570 | s->rl_table_index = decode012(&s->gb); |
| @@ -836,7 +839,8 @@ int ff_msmpeg4_decode_picture_header(MpegEncContext * s) · 268 unmodified lines | ||
| 836 | 839 | s->no_rounding = 0; |
| 837 | 840 | } |
| 838 | 841 | } |
| 839 | −//printf("%d %d %d %d %d\n", s->pict_type, s->bit_rate, s->inter_intra_pred, s->width, s->height); | |
| 842 | + av_dlog(s->avctx, "%d %d %d %d %d\n", s->pict_type, s->bit_rate, | |
| 843 | + s->inter_intra_pred, s->width, s->height); | |
| 840 | 844 | |
| 841 | 845 | s->esc3_level_length= 0; |
| 842 | 846 | s->esc3_run_length= 0; |
| @@ -1023,7 +1027,8 @@ int ff_msmpeg4_decode_block(MpegEncContext * s, DCTELEM * block, · 180 unmodified lines | ||
| 1023 | 1027 | last= SHOW_UBITS(re, &s->gb, 1); SKIP_BITS(re, &s->gb, 1); |
| 1024 | 1028 | if(!s->esc3_level_length){ |
| 1025 | 1029 | int ll; |
| 1026 | − //printf("ESC-3 %X at %d %d\n", show_bits(&s->gb, 24), s->mb_x, s->mb_y); | |
| 1030 | + av_dlog(s->avctx, "ESC-3 %X at %d %d\n", | |
| 1031 | + show_bits(&s->gb, 24), s->mb_x, s->mb_y); | |
| 1027 | 1032 | if(s->qscale<8){ |
| 1028 | 1033 | ll= SHOW_UBITS(re, &s->gb, 3); SKIP_BITS(re, &s->gb, 3); |
| 1029 | 1034 | if(ll==0){ |
| @@ -230,7 +230,8 @@ void ff_msmpeg4_encode_picture_header(MpegEncContext * s, int picture_number) · 229 unmodified lines | ||
| 230 | 230 | s->per_mb_rl_table = 0; |
| 231 | 231 | if(s->msmpeg4_version==4) |
| 232 | 232 | s->inter_intra_pred= (s->width*s->height < 320*240 && s->bit_rate<=II_BITRATE && s->pict_type==AV_PICTURE_TYPE_P); |
| 233 | −//printf("%d %d %d %d %d\n", s->pict_type, s->bit_rate, s->inter_intra_pred, s->width, s->height); | |
| 233 | + av_dlog(s, "%d %d %d %d %d\n", s->pict_type, s->bit_rate, | |
| 234 | + s->inter_intra_pred, s->width, s->height); | |
| 234 | 235 | |
| 235 | 236 | if (s->pict_type == AV_PICTURE_TYPE_I) { |
| 236 | 237 | s->slice_height= s->mb_height/1; |
| @@ -270,7 +270,8 @@ int ff_vbv_update(MpegEncContext *s, int frame_size){ · 269 unmodified lines | ||
| 270 | 270 | const double min_rate= s->avctx->rc_min_rate/fps; |
| 271 | 271 | const double max_rate= s->avctx->rc_max_rate/fps; |
| 272 | 272 | |
| 273 | −//printf("%d %f %d %f %f\n", buffer_size, rcc->buffer_index, frame_size, min_rate, max_rate); | |
| 273 | + av_dlog(s, "%d %f %d %f %f\n", | |
| 274 | + buffer_size, rcc->buffer_index, frame_size, min_rate, max_rate); | |
| 274 | 275 | if(buffer_size){ |
| 275 | 276 | int left; |
| 276 | 277 | |
| @@ -479,7 +480,9 @@ static double modify_qscale(MpegEncContext *s, RateControlEntry *rce, double q, · 202 unmodified lines | ||
| 479 | 480 | } |
| 480 | 481 | } |
| 481 | 482 | } |
| 482 | −//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); | |
| 483 | + av_dlog(s, "q:%f max:%f min:%f size:%f index:%f agr:%f\n", | |
| 484 | + q, max_rate, min_rate, buffer_size, rcc->buffer_index, | |
| 485 | + s->avctx->rc_buffer_aggressivity); | |
| 483 | 486 | if(s->avctx->rc_qsquish==0.0 || qmin==qmax){ |
| 484 | 487 | if (q<qmin) q=qmin; |
| 485 | 488 | else if(q>qmax) q=qmax; |
| @@ -706,7 +709,8 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run) · 220 unmodified lines | ||
| 706 | 709 | assert(pict_type == rce->new_pict_type); |
| 707 | 710 | |
| 708 | 711 | q= rce->new_qscale / br_compensation; |
| 709 | −//printf("%f %f %f last:%d var:%d type:%d//\n", q, rce->new_qscale, br_compensation, s->frame_bits, var, pict_type); | |
| 712 | + av_dlog(s, "%f %f %f last:%d var:%d type:%d//\n", q, rce->new_qscale, | |
| 713 | + br_compensation, s->frame_bits, var, pict_type); | |
| 710 | 714 | }else{ |
| 711 | 715 | rce->pict_type= |
| 712 | 716 | rce->new_pict_type= pict_type; |
| @@ -883,11 +887,9 @@ static int init_pass2(MpegEncContext *s) · 170 unmodified lines | ||
| 883 | 887 | expected_bits += bits; |
| 884 | 888 | } |
| 885 | 889 | |
| 886 | − /* | |
| 887 | − av_log(s->avctx, AV_LOG_INFO, | |
| 888 | − "expected_bits: %f all_available_bits: %d rate_factor: %f\n", | |
| 889 | − expected_bits, (int)all_available_bits, rate_factor); | |
| 890 | − */ | |
| 890 | + av_dlog(s->avctx, | |
| 891 | + "expected_bits: %f all_available_bits: %d rate_factor: %f\n", | |
| 892 | + expected_bits, (int)all_available_bits, rate_factor); | |
| 891 | 893 | if(expected_bits > all_available_bits) { |
| 892 | 894 | rate_factor-= step; |
| 893 | 895 | ++toobig; |
| @@ -899,8 +901,10 @@ static int init_pass2(MpegEncContext *s) · 5 unmodified lines | ||
| 899 | 901 | /* check bitrate calculations and print info */ |
| 900 | 902 | qscale_sum = 0.0; |
| 901 | 903 | for(i=0; i<rcc->num_entries; i++){ |
| 902 | − /* av_log(s->avctx, AV_LOG_DEBUG, "[lavc rc] entry[%d].new_qscale = %.3f qp = %.3f\n", | |
| 903 | − i, rcc->entry[i].new_qscale, rcc->entry[i].new_qscale / FF_QP2LAMBDA); */ | |
| 904 | + av_dlog(s, "[lavc rc] entry[%d].new_qscale = %.3f qp = %.3f\n", | |
| 905 | + i, | |
| 906 | + rcc->entry[i].new_qscale, | |
| 907 | + rcc->entry[i].new_qscale / FF_QP2LAMBDA); | |
| 904 | 908 | qscale_sum += av_clip(rcc->entry[i].new_qscale / FF_QP2LAMBDA, s->avctx->qmin, s->avctx->qmax); |
| 905 | 909 | } |
| 906 | 910 | assert(toobig <= 40); |
| @@ -521,8 +521,8 @@ static int svq1_decode_frame_header (GetBitContext *bitbuf,MpegEncContext *s) { · 520 unmodified lines | ||
| 521 | 521 | |
| 522 | 522 | csum = ff_svq1_packet_checksum (bitbuf->buffer, bitbuf->size_in_bits>>3, csum); |
| 523 | 523 | |
| 524 | −// av_log(s->avctx, AV_LOG_INFO, "%s checksum (%02x) for packet data\n", | |
| 525 | −// (csum == 0) ? "correct" : "incorrect", csum); | |
| 524 | + av_dlog(s->avctx, "%s checksum (%02x) for packet data\n", | |
| 525 | + (csum == 0) ? "correct" : "incorrect", csum); | |
| 526 | 526 | } |
| 527 | 527 | |
| 528 | 528 | if ((s->f_code ^ 0x10) >= 0x50) { |
| @@ -652,8 +652,9 @@ int ff_vc1_parse_frame_header(VC1Context *v, GetBitContext* gb) · 651 unmodified lines | ||
| 652 | 652 | v->x8_type = get_bits1(gb); |
| 653 | 653 | } else |
| 654 | 654 | v->x8_type = 0; |
| 655 | −//av_log(v->s.avctx, AV_LOG_INFO, "%c Frame: QP=[%i]%i (+%i/2) %i\n", | |
| 656 | −// (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); | |
| 655 | + av_dlog(v->s.avctx, "%c Frame: QP=[%i]%i (+%i/2) %i\n", | |
| 656 | + (v->s.pict_type == AV_PICTURE_TYPE_P) ? 'P' : ((v->s.pict_type == AV_PICTURE_TYPE_I) ? 'I' : 'B'), | |
| 657 | + pqindex, v->pq, v->halfpq, v->rangeredfrm); | |
| 657 | 658 | |
| 658 | 659 | if (v->s.pict_type == AV_PICTURE_TYPE_I || v->s.pict_type == AV_PICTURE_TYPE_P) |
| 659 | 660 | v->use_ic = 0; |
| @@ -5622,7 +5622,8 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data, · 5621 unmodified lines | ||
| 5622 | 5622 | s->linesize >>= 1; |
| 5623 | 5623 | s->uvlinesize >>= 1; |
| 5624 | 5624 | } |
| 5625 | −//av_log(s->avctx, AV_LOG_INFO, "Consumed %i/%i bits\n", get_bits_count(&s->gb), s->gb.size_in_bits); | |
| 5625 | + av_dlog(s->avctx, "Consumed %i/%i bits\n", | |
| 5626 | + get_bits_count(&s->gb), s->gb.size_in_bits); | |
| 5626 | 5627 | // if (get_bits_count(&s->gb) > buf_size * 8) |
| 5627 | 5628 | // return -1; |
| 5628 | 5629 | ff_er_frame_end(s); |
| @@ -2073,7 +2073,8 @@ static int read_huffman_tree(AVCodecContext *avctx, GetBitContext *gb) · 2072 unmodified lines | ||
| 2073 | 2073 | return -1; |
| 2074 | 2074 | } |
| 2075 | 2075 | token = get_bits(gb, 5); |
| 2076 | − //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); | |
| 2076 | + av_dlog(avctx, "hti %d hbits %x token %d entry : %d size %d\n", | |
| 2077 | + s->hti, s->hbits, token, s->entries, s->huff_code_size); | |
| 2077 | 2078 | s->huffman_table[s->hti][token][0] = s->hbits; |
| 2078 | 2079 | s->huffman_table[s->hti][token][1] = s->huff_code_size; |
| 2079 | 2080 | s->entries++; |
| @@ -913,7 +913,9 @@ static int wma_decode_superframe(AVCodecContext *avctx, void *data, · 912 unmodified lines | ||
| 913 | 913 | samples += s->nb_channels * s->frame_len; |
| 914 | 914 | } |
| 915 | 915 | |
| 916 | −//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); | |
| 916 | + av_dlog(s->avctx, "%d %d %d %d outbytes:%d eaten:%d\n", | |
| 917 | + s->frame_len_bits, s->block_len_bits, s->frame_len, s->block_len, | |
| 918 | + (int8_t *)samples - (int8_t *)data, s->block_align); | |
| 917 | 919 | |
| 918 | 920 | *got_frame_ptr = 1; |
| 919 | 921 | *(AVFrame *)data = s->frame; |
| @@ -415,13 +415,16 @@ int ff_wmv2_decode_mb(MpegEncContext *s, DCTELEM block[6][64]) · 414 unmodified lines | ||
| 415 | 415 | } |
| 416 | 416 | } |
| 417 | 417 | } else { |
| 418 | −//if(s->pict_type==AV_PICTURE_TYPE_P) | |
| 419 | −// printf("%d%d ", s->inter_intra_pred, cbp); | |
| 420 | −//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)); | |
| 418 | + if (s->pict_type==AV_PICTURE_TYPE_P) | |
| 419 | + av_dlog(s->avctx, "%d%d ", s->inter_intra_pred, cbp); | |
| 420 | + av_dlog(s->avctx, "I at %d %d %d %06X\n", s->mb_x, s->mb_y, | |
| 421 | + ((cbp & 3) ? 1 : 0) +((cbp & 0x3C)? 2 : 0), | |
| 422 | + show_bits(&s->gb, 24)); | |
| 421 | 423 | s->ac_pred = get_bits1(&s->gb); |
| 422 | 424 | if(s->inter_intra_pred){ |
| 423 | 425 | s->h263_aic_dir= get_vlc2(&s->gb, ff_inter_intra_vlc.table, INTER_INTRA_VLC_BITS, 1); |
| 424 | −// printf("%d%d %d %d/", s->ac_pred, s->h263_aic_dir, s->mb_x, s->mb_y); | |
| 426 | + av_dlog(s->avctx, "%d%d %d %d/", | |
| 427 | + s->ac_pred, s->h263_aic_dir, s->mb_x, s->mb_y); | |
| 425 | 428 | } |
| 426 | 429 | if(s->per_mb_rl_table && cbp){ |
| 427 | 430 | s->rl_table_index = decode012(&s->gb); |