Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge remote-tracking branch 'qatar/master'

* qatar/master:
  avcodec: Convert some commented-out printf/av_log instances to av_dlog
  avcodec: Drop silly and/or broken printf debug output
  avcodec: Drop some silly commented-out av_log() invocations
  avformat: Convert some commented-out printf/av_log instances to av_dlog
  avformat: Remove non-compiling and/or silly commented-out printf/av_log statements
  Remove some silly disabled code.
  ac3dec: ensure get_buffer() gets a buffer for the correct number of channels

Conflicts:
	libavcodec/dnxhddec.c
	libavcodec/ffv1.c
	libavcodec/h264.c
	libavcodec/h264_parser.c
	libavcodec/mjpegdec.c
	libavcodec/motion_est_template.c
	libavcodec/mpegaudiodec.c
	libavcodec/mpegvideo_enc.c
	libavcodec/put_bits.h
	libavcodec/ratecontrol.c
	libavcodec/wmaenc.c
	libavdevice/timefilter.c
	libavformat/asfdec.c
	libavformat/avidec.c
	libavformat/avienc.c
	libavformat/flvenc.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
  • Loading branch information...
commit 31ab1575e59e33957864d1bdf13253f8d366ccba 2 parents adc5539 + 1218777
@michaelni michaelni authored
Showing with 176 additions and 297 deletions.
  1. +0 −2  ffserver.c
  2. +0 −3  libavcodec/aaccoder.c
  3. +1 −0  libavcodec/ac3dec.c
  4. +0 −1  libavcodec/adpcm.c
  5. +2 −7 libavcodec/cook.c
  6. +2 −2 libavcodec/dcadec.c
  7. +0 −5 libavcodec/dnxhddec.c
  8. +0 −3  libavcodec/error_resilience.c
  9. +12 −9 libavcodec/ffv1.c
  10. +3 −1 libavcodec/flicvideo.c
  11. +0 −2  libavcodec/golomb.h
  12. +2 −3 libavcodec/h263dec.c
  13. +0 −3  libavcodec/h264.c
  14. +4 −12 libavcodec/h264_cabac.c
  15. +0 −1  libavcodec/h264_parser.c
  16. +1 −3 libavcodec/imc.c
  17. +1 −1  libavcodec/jpegls.c
  18. +7 −3 libavcodec/jpeglsdec.c
  19. +0 −1  libavcodec/ljpegenc.c
  20. +7 −17 libavcodec/mjpegdec.c
  21. +0 −1  libavcodec/mjpegenc.c
  22. +2 −12 libavcodec/motion_est.c
  23. +2 −12 libavcodec/motion_est_template.c
  24. +8 −5 libavcodec/mpeg12.c
  25. +2 −7 libavcodec/mpegaudiodec.c
  26. +6 −7 libavcodec/mpegvideo.c
  27. +8 −20 libavcodec/mpegvideo_enc.c
  28. +11 −11 libavcodec/msmpeg4.c
  29. +2 −4 libavcodec/msmpeg4enc.c
  30. +0 −1  libavcodec/parser.c
  31. +0 −3  libavcodec/put_bits.h
  32. +14 −22 libavcodec/ratecontrol.c
  33. +1 −6 libavcodec/rv10.c
  34. +2 −2 libavcodec/svq1dec.c
  35. +0 −1  libavcodec/utils.c
  36. +3 −4 libavcodec/vc1.c
  37. +2 −1  libavcodec/vc1dec.c
  38. +1 −3 libavcodec/vorbis.c
  39. +2 −1  libavcodec/vp3.c
  40. +3 −4 libavcodec/wmadec.c
  41. +0 −1  libavcodec/wmaenc.c
  42. +7 −8 libavcodec/wmv2dec.c
  43. +2 −2 libavcodec/x86/mpegvideo.c
  44. +0 −7 libavdevice/timefilter.c
  45. +19 −30 libavformat/asfdec.c
  46. +1 −1  libavformat/assdec.c
  47. +14 −10 libavformat/avidec.c
  48. +0 −3  libavformat/ffmdec.c
  49. +0 −3  libavformat/flvenc.c
  50. +0 −2  libavformat/h263dec.c
  51. +0 −1  libavformat/movenc.c
  52. +0 −2  libavformat/mpeg.c
  53. +7 −2 libavformat/mpegenc.c
  54. +4 −2 libavformat/mpegts.c
  55. +1 −1  libavformat/mpegtsenc.c
  56. +1 −1  libavformat/mxfenc.c
  57. +0 −4 libavformat/nutenc.c
  58. +3 −2 libavformat/rmdec.c
  59. +0 −2  libavformat/rtsp.c
  60. +0 −1  libavformat/swfdec.c
  61. +6 −5 libavformat/utils.c
  62. +0 −1  tools/pktdumper.c
View
2  ffserver.c
@@ -2689,8 +2689,6 @@ static int http_receive_data(HTTPContext *c)
/* a packet has been received : write it in the store, except
if header */
if (c->data_count > FFM_PACKET_SIZE) {
-
- // printf("writing pos=0x%"PRIx64" size=0x%"PRIx64"\n", feed->feed_write_index, feed->feed_size);
/* XXX: use llseek or url_seek */
lseek(c->feed_fd, feed->feed_write_index, SEEK_SET);
if (write(c->feed_fd, c->buffer, FFM_PACKET_SIZE) < 0) {
View
3  libavcodec/aaccoder.c
@@ -585,7 +585,6 @@ static void search_for_quantizers_anmr(AVCodecContext *avctx, AACEncContext *s,
q0 = coef2minsf(q0f);
//maximum scalefactor index is when maximum coefficient after quantizing is still not zero
q1 = coef2maxsf(q1f);
- //av_log(NULL, AV_LOG_ERROR, "q0 %d, q1 %d\n", q0, q1);
if (q1 - q0 > 60) {
int q0low = q0;
int q1high = q1;
@@ -593,7 +592,6 @@ static void search_for_quantizers_anmr(AVCodecContext *avctx, AACEncContext *s,
int qnrg = av_clip_uint8(log2f(sqrtf(qnrgf/qcnt))*4 - 31 + SCALE_ONE_POS - SCALE_DIV_512);
q1 = qnrg + 30;
q0 = qnrg - 30;
- //av_log(NULL, AV_LOG_ERROR, "q0 %d, q1 %d\n", q0, q1);
if (q0 < q0low) {
q1 += q0low - q0;
q0 = q0low;
@@ -602,7 +600,6 @@ static void search_for_quantizers_anmr(AVCodecContext *avctx, AACEncContext *s,
q1 = q1high;
}
}
- //av_log(NULL, AV_LOG_ERROR, "q0 %d, q1 %d\n", q0, q1);
for (i = 0; i < TRELLIS_STATES; i++) {
paths[0][i].cost = 0.0f;
View
1  libavcodec/ac3dec.c
@@ -1377,6 +1377,7 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data,
avctx->audio_service_type = AV_AUDIO_SERVICE_TYPE_KARAOKE;
/* get output buffer */
+ avctx->channels = s->out_channels;
s->frame.nb_samples = s->num_blocks * 256;
if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
View
1  libavcodec/adpcm.c
@@ -353,7 +353,6 @@ static void adpcm_swf_decode(AVCodecContext *avctx, const uint8_t *buf, int buf_
//read bits & initial values
nb_bits = get_bits(&gb, 2)+2;
- //av_log(NULL,AV_LOG_INFO,"nb_bits: %d\n", nb_bits);
table = swf_index_tables[nb_bits-2];
k0 = 1 << (nb_bits-2);
signmask = 1 << (nb_bits-1);
View
9 libavcodec/cook.c
@@ -420,11 +420,9 @@ static void categorize(COOKContext *q, COOKSubpacket *p, const int *quant_index_
bits_left = p->bits_per_subpacket - get_bits_count(&q->gb);
- if (bits_left > q->samples_per_channel) {
+ if (bits_left > q->samples_per_channel)
bits_left = q->samples_per_channel +
((bits_left - q->samples_per_channel) * 5) / 8;
- //av_log(q->avctx, AV_LOG_ERROR, "bits_left = %d\n",bits_left);
- }
bias = -32;
@@ -936,10 +934,7 @@ static int decode_subpacket(COOKContext *q, COOKSubpacket *p,
{
int sub_packet_size = p->size;
int res;
- /* packet dump */
- // for (i = 0; i < sub_packet_size ; i++)
- // av_log(q->avctx, AV_LOG_ERROR, "%02x", inbuffer[i]);
- // av_log(q->avctx, AV_LOG_ERROR, "\n");
+
memset(q->decode_buffer_1, 0, sizeof(q->decode_buffer_1));
decode_bytes_and_gain(q, p, inbuffer, &p->gains1);
View
4 libavcodec/dcadec.c
@@ -861,8 +861,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;
}
}
View
5 libavcodec/dnxhddec.c
@@ -223,7 +223,6 @@ static av_always_inline void dnxhd_decode_dct_block(DNXHDContext *ctx,
ctx->last_dc[component] += level;
}
block[0] = ctx->last_dc[component];
- //av_log(ctx->avctx, AV_LOG_DEBUG, "dc %d\n", block[0]);
i = 0;
@@ -256,14 +255,11 @@ static av_always_inline void dnxhd_decode_dct_block(DNXHDContext *ctx,
}
j = ctx->scantable.permutated[i];
- //av_log(ctx->avctx, AV_LOG_DEBUG, "j %d\n", j);
- //av_log(ctx->avctx, AV_LOG_DEBUG, "level %d, weight %d\n", level, weight_matrix[i]);
level *= scale[i];
if (level_bias < 32 || weight_matrix[i] != level_bias)
level += level_bias;
level >>= level_shift;
- //av_log(NULL, AV_LOG_DEBUG, "i %d, j %d, end level %d\n", i, j, level);
block[j] = (level^sign) - sign;
UPDATE_CACHE(bs, &ctx->gb);
@@ -297,7 +293,6 @@ static int dnxhd_decode_macroblock(DNXHDContext *ctx, int x, int y)
qscale = get_bits(&ctx->gb, 11);
skip_bits1(&ctx->gb);
- //av_log(ctx->avctx, AV_LOG_DEBUG, "qscale %d\n", qscale);
if (qscale != ctx->last_qscale) {
for (i = 0; i < 64; i++) {
View
3  libavcodec/error_resilience.c
@@ -724,8 +724,6 @@ static void guess_mv(MpegEncContext *s)
fixed[mb_xy] = MV_UNCHANGED;
}
}
-
- // printf(".%d/%d", changed, score_sum); fflush(stdout);
}
if (none_left)
@@ -736,7 +734,6 @@ static void guess_mv(MpegEncContext *s)
if (fixed[mb_xy])
fixed[mb_xy] = MV_FROZEN;
}
- // printf(":"); fflush(stdout);
}
}
View
21 libavcodec/ffv1.c
@@ -405,7 +405,6 @@ static inline void update_vlc_state(VlcState * const state, const int v){
static inline void put_vlc_symbol(PutBitContext *pb, VlcState * const state, int v, int bits){
int i, k, code;
-//printf("final: %d ", v);
v = fold(v - state->bias, bits);
i= state->count;
@@ -424,7 +423,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);
@@ -443,7 +443,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);
@@ -454,7 +455,7 @@ static inline int get_vlc_symbol(GetBitContext *gb, VlcState * const state, int
ret= fold(v + state->bias, bits);
update_vlc_state(state, v);
-//printf("final: %d\n", ret);
+
return ret;
}
@@ -523,7 +524,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);
@@ -1488,7 +1491,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;
@@ -1734,8 +1738,6 @@ static int read_quant_table(RangeCoder *c, int16_t *quant_table, int scale){
while(len--){
quant_table[i] = scale*v;
i++;
-//printf("%2d ",v);
-//if(i%16==0) printf("\n");
}
}
@@ -1945,7 +1947,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){
View
4 libavcodec/flicvideo.c
@@ -539,7 +539,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;
View
2  libavcodec/golomb.h
@@ -465,8 +465,6 @@ static inline void set_te_golomb(PutBitContext *pb, int i, int range){
* write signed exp golomb code. 16 bits at most.
*/
static inline void set_se_golomb(PutBitContext *pb, int i){
-// if (i>32767 || i<-32767)
-// av_log(NULL,AV_LOG_ERROR,"value out of range %d\n", i);
#if 0
if(i<=0) i= -2*i;
else i= 2*i-1;
View
5 libavcodec/h263dec.c
@@ -221,7 +221,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)
@@ -234,7 +235,6 @@ static int decode_slice(MpegEncContext *s){
if(s->loop_filter)
ff_h263_loop_filter(s);
-//printf("%d %d %d %06X\n", s->mb_x, s->mb_y, s->gb.size*8 - get_bits_count(&s->gb), show_bits(&s->gb, 24));
ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, ER_MB_END&part_mask);
s->padding_bug_score--;
@@ -538,7 +538,6 @@ uint64_t time= rdtsc();
if(s->divx_version>=0)
s->workaround_bugs|= FF_BUG_DIRECT_BLOCKSIZE;
-//printf("padding_bug_score: %d\n", s->padding_bug_score);
if(s->divx_version==501 && s->divx_build==20020416)
s->padding_bug_score= 256*256*256*64;
View
3  libavcodec/h264.c
@@ -254,7 +254,6 @@ const uint8_t *ff_h264_decode_nal(H264Context *h, const uint8_t *src,
}
}
- // printf("decoding esc\n");
memcpy(dst, src, i);
si = di = i;
while (si + 2 < length) {
@@ -2135,7 +2134,6 @@ static int init_poc(H264Context *h)
h->poc_msb = h->prev_poc_msb - max_poc_lsb;
else
h->poc_msb = h->prev_poc_msb;
- // printf("poc: %d %d\n", h->poc_msb, h->poc_lsb);
field_poc[0] =
field_poc[1] = h->poc_msb + h->poc_lsb;
if (s->picture_structure == PICT_FRAME)
@@ -4149,7 +4147,6 @@ static int decode_frame(AVCodecContext *avctx, void *data,
assert(pict->data[0] || !*data_size);
ff_print_debug_info(s, pict);
- // printf("out %d\n", (int)pict->data[0]);
return get_consumed_bytes(s, buf_index, buf_size);
}
View
16 libavcodec/h264_cabac.c
@@ -1814,7 +1814,6 @@ static av_always_inline void decode_cabac_luma_residual( H264Context *h, const u
MpegEncContext * const s = &h->s;
int qscale = p == 0 ? s->qscale : h->chroma_qp[p-1];
if( IS_INTRA16x16( mb_type ) ) {
- //av_log( s->avctx, AV_LOG_ERROR, "INTRA16x16 DC\n" );
AV_ZERO128(h->mb_luma_dc[p]+0);
AV_ZERO128(h->mb_luma_dc[p]+8);
AV_ZERO128(h->mb_luma_dc[p]+16);
@@ -1825,7 +1824,6 @@ static av_always_inline void decode_cabac_luma_residual( H264Context *h, const u
qmul = h->dequant4_coeff[p][qscale];
for( i4x4 = 0; i4x4 < 16; i4x4++ ) {
const int index = 16*p + i4x4;
- //av_log( s->avctx, AV_LOG_ERROR, "INTRA16x16 AC:%d\n", index );
decode_cabac_residual_nondc(h, h->mb + (16*index << pixel_shift), ctx_cat[1][p], index, scan + 1, qmul, 15);
}
} else {
@@ -1843,7 +1841,6 @@ static av_always_inline void decode_cabac_luma_residual( H264Context *h, const u
qmul = h->dequant4_coeff[cqm][qscale];
for( i4x4 = 0; i4x4 < 4; i4x4++ ) {
const int index = 16*p + 4*i8x8 + i4x4;
- //av_log( s->avctx, AV_LOG_ERROR, "Luma4x4: %d\n", index );
//START_TIMER
decode_cabac_residual_nondc(h, h->mb + (16*index << pixel_shift), ctx_cat[2][p], index, scan, qmul, 16);
//STOP_TIMER("decode_residual")
@@ -2029,7 +2026,8 @@ int ff_h264_decode_mb_cabac(H264Context *h) {
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);
@@ -2350,12 +2348,10 @@ int ff_h264_decode_mb_cabac(H264Context *h) {
} else if (CHROMA422) {
if( cbp&0x30 ){
int c;
- for( c = 0; c < 2; c++ ) {
- //av_log( s->avctx, AV_LOG_ERROR, "INTRA C%d-DC\n",c );
+ for (c = 0; c < 2; c++)
decode_cabac_residual_dc_422(h, h->mb + ((256 + 16*16*c) << pixel_shift), 3,
CHROMA_DC_BLOCK_INDEX + c,
chroma422_dc_scan, 8);
- }
}
if( cbp&0x20 ) {
@@ -2366,7 +2362,6 @@ int ff_h264_decode_mb_cabac(H264Context *h) {
for (i8x8 = 0; i8x8 < 2; i8x8++) {
for (i = 0; i < 4; i++) {
const int index = 16 + 16 * c + 8*i8x8 + i;
- //av_log(s->avctx, AV_LOG_ERROR, "INTRA C%d-AC %d\n",c, index - 16);
decode_cabac_residual_nondc(h, mb, 4, index, scan + 1, qmul, 15);
mb += 16<<pixel_shift;
}
@@ -2379,10 +2374,8 @@ int ff_h264_decode_mb_cabac(H264Context *h) {
} else /* yuv420 */ {
if( cbp&0x30 ){
int c;
- for( c = 0; c < 2; c++ ) {
- //av_log( s->avctx, AV_LOG_ERROR, "INTRA C%d-DC\n",c );
+ for (c = 0; c < 2; c++)
decode_cabac_residual_dc(h, h->mb + ((256 + 16*16*c) << pixel_shift), 3, CHROMA_DC_BLOCK_INDEX+c, chroma_dc_scan, 4);
- }
}
if( cbp&0x20 ) {
@@ -2391,7 +2384,6 @@ int ff_h264_decode_mb_cabac(H264Context *h) {
qmul = h->dequant4_coeff[c+1+(IS_INTRA( mb_type ) ? 0:3)][h->chroma_qp[c]];
for( i = 0; i < 4; i++ ) {
const int index = 16 + 16 * c + i;
- //av_log( s->avctx, AV_LOG_ERROR, "INTRA C%d-AC %d\n",c, index - 16 );
decode_cabac_residual_nondc(h, h->mb + (16*index << pixel_shift), 4, index, scan + 1, qmul, 15);
}
}
View
1  libavcodec/h264_parser.c
@@ -39,7 +39,6 @@ static int ff_h264_find_frame_end(H264Context *h, const uint8_t *buf, int buf_si
ParseContext *pc = &(h->s.parse_context);
int next_avc= h->is_avc ? 0 : buf_size;
-//printf("first %02X%02X%02X%02X\n", buf[0], buf[1],buf[2],buf[3]);
// mb_addr= pc->mb_addr - 1;
state= pc->state;
if(state>13)
View
4 libavcodec/imc.c
@@ -743,7 +743,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;
}
@@ -782,8 +782,6 @@ static int imc_decode_block(AVCodecContext *avctx, IMCContext *q, int ch)
return AVERROR_PATCHWELCOME;
}
-// av_log(avctx, AV_LOG_DEBUG, "stream_format_code = %d\n", stream_format_code);
-
if (stream_format_code & 0x04)
chctx->decoder_reset = 1;
View
2  libavcodec/jpegls.c
@@ -83,5 +83,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);
}
View
10 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;
}
@@ -285,8 +285,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 */
stride = (s->nb_components > 1) ? 3 : 1;
off = av_clip(s->cur_scan - 1, 0, stride);
View
1  libavcodec/ljpegenc.c
@@ -180,7 +180,6 @@ static int encode_picture_lossless(AVCodecContext *avctx, AVPacket *pkt,
int pred;
ptr = p->data[i] + (linesize * (v * mb_y + y)) + (h * mb_x + x); //FIXME optimize this crap
-//printf("%d %d %d %d %8X\n", mb_x, mb_y, x, y, ptr);
PREDICT(pred, ptr[-linesize-1], ptr[-linesize], ptr[-1], predictor);
if(i==0)
View
24 libavcodec/mjpegdec.c
@@ -436,9 +436,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);
@@ -1047,11 +1047,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++;
@@ -1331,8 +1330,6 @@ static int mjpeg_decode_app(MJpegDecodeContext *s)
4bytes field_size_less_padding
*/
s->buggy_avid = 1;
-// if (s->first_picture)
-// printf("mjpeg: workarounding buggy AVID\n");
i = get_bits(&s->gb, 8); len--;
av_log(s->avctx, AV_LOG_DEBUG, "polarity %d\n", i);
#if 0
@@ -1341,8 +1338,6 @@ static int mjpeg_decode_app(MJpegDecodeContext *s)
skip_bits(&s->gb, 32);
len -= 10;
#endif
-// if (s->interlace_polarity)
-// printf("mjpeg: interlace polarity: %d\n", s->interlace_polarity);
goto out;
}
@@ -1464,8 +1459,6 @@ static int mjpeg_decode_com(MJpegDecodeContext *s)
/* buggy avid, it puts EOI only at every 10th frame */
if (!strcmp(cbuf, "AVID")) {
s->buggy_avid = 1;
- // if (s->first_picture)
- // printf("mjpeg: workarounding buggy AVID\n");
} else if (!strcmp(cbuf, "CS=ITU601"))
s->cs_itu601 = 1;
else if ((len > 31 && !strncmp(cbuf, "Intel(R) JPEG Library, version 1", 32)) ||
@@ -1741,9 +1734,6 @@ int ff_mjpeg_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
av_log(avctx, AV_LOG_ERROR,
"mjpeg: unsupported coding type (%x)\n", start_code);
break;
-// default:
-// printf("mjpeg: unsupported marker (%x)\n", start_code);
-// break;
}
/* eof process start code */
View
1  libavcodec/mjpegenc.c
@@ -339,7 +339,6 @@ static void escape_FF(MpegEncContext *s, int start)
int v= buf[i];
if(v==0xFF){
-//printf("%d %d\n", i, ff_count);
buf[i+ff_count]= 0;
ff_count--;
}
View
14 libavcodec/motion_est.c
@@ -395,12 +395,10 @@ static int sad_hpel_motion_search(MpegEncContext * s,
assert(flags == 0);
if(c->skip){
-// printf("S");
*mx_ptr = 0;
*my_ptr = 0;
return dmin;
}
-// printf("N");
pix = c->src[src_index][0];
@@ -1325,7 +1323,6 @@ static int ff_estimate_motion_b(MpegEncContext * s,
if(c->avctx->me_sub_cmp != c->avctx->mb_cmp && !c->skip)
dmin= get_mb_score(s, mx, my, 0, ref_index, 0, 16, 1);
-//printf("%d %d %d %d//", s->mb_x, s->mb_y, mx, my);
// s->mb_type[mb_y*s->mb_width + mb_x]= mb_type;
mv_table[mot_xy][0]= mx;
mv_table[mot_xy][1]= my;
@@ -1734,11 +1731,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
@@ -1848,15 +1845,9 @@ int ff_get_best_fcode(MpegEncContext * s, int16_t (*mv_table)[2], int type)
best_score= score[i];
best_fcode= i;
}
-// printf("%d %d\n", i, score[i]);
}
-// printf("fcode: %d type: %d\n", i, s->pict_type);
return best_fcode;
-/* for(i=0; i<=MAX_FCODE; i++){
- printf("%d ", mv_num[i]);
- }
- printf("\n");*/
}else{
return 1;
}
@@ -1876,7 +1867,6 @@ void ff_fix_long_p_mvs(MpegEncContext * s)
if(c->avctx->me_range && range > c->avctx->me_range) range= c->avctx->me_range;
-//printf("%d no:%d %d//\n", clip, noclip, f_code);
if(s->flags&CODEC_FLAG_4MV){
const int wrap= s->b8_stride;
View
14 libavcodec/motion_est_template.c
@@ -363,13 +363,11 @@ static int qpel_motion_search(MpegEncContext * s,
av_assert2((x) <= xmax);\
av_assert2((y) >= ymin);\
av_assert2((y) <= ymax);\
-/*printf("check_mv %d %d\n", x, y);*/\
if(map[index]!=key){\
d= cmp(s, x, y, 0, 0, size, h, ref_index, src_index, cmpf, chroma_cmpf, flags);\
map[index]= key;\
score_map[index]= d;\
d += (mv_penalty[((x)<<shift)-pred_x] + mv_penalty[((y)<<shift)-pred_y])*penalty_factor;\
-/*printf("score:%d\n", d);*/\
COPY3_IF_LT(dmin, d, best[0], x, best[1], y)\
}\
}
@@ -387,13 +385,11 @@ static int qpel_motion_search(MpegEncContext * s,
{\
const unsigned key = ((y)<<ME_MAP_MV_BITS) + (x) + map_generation;\
const int index= (((y)<<ME_MAP_SHIFT) + (x))&(ME_MAP_SIZE-1);\
-/*printf("check_mv_dir %d %d %d\n", x, y, new_dir);*/\
if(map[index]!=key){\
d= cmp(s, x, y, 0, 0, size, h, ref_index, src_index, cmpf, chroma_cmpf, flags);\
map[index]= key;\
score_map[index]= d;\
d += (mv_penalty[((x)<<shift)-pred_x] + mv_penalty[((y)<<shift)-pred_y])*penalty_factor;\
-/*printf("score:%d\n", d);*/\
if(d<dmin){\
best[0]=x;\
best[1]=y;\
@@ -444,7 +440,6 @@ static av_always_inline int small_diamond_search(MpegEncContext * s, int *best,
const int y= best[1];
next_dir=-1;
-//printf("%d", dir);
if(dir!=2 && x>xmin) CHECK_MV_DIR(x-1, y , 0)
if(dir!=3 && y>ymin) CHECK_MV_DIR(x , y-1, 1)
if(dir!=0 && x<xmax) CHECK_MV_DIR(x+1, y , 2)
@@ -656,13 +651,11 @@ static int full_search(MpegEncContext * s, int *best, int dmin,
{\
const unsigned key = ((ay)<<ME_MAP_MV_BITS) + (ax) + map_generation;\
const int index= (((ay)<<ME_MAP_SHIFT) + (ax))&(ME_MAP_SIZE-1);\
-/*printf("sab check %d %d\n", ax, ay);*/\
if(map[index]!=key){\
d= cmp(s, ax, ay, 0, 0, size, h, ref_index, src_index, cmpf, chroma_cmpf, flags);\
map[index]= key;\
score_map[index]= d;\
d += (mv_penalty[((ax)<<shift)-pred_x] + mv_penalty[((ay)<<shift)-pred_y])*penalty_factor;\
-/*printf("score: %d\n", d);*/\
if(d < minima[minima_count-1].height){\
int j=0;\
\
@@ -970,7 +963,6 @@ static av_always_inline int epzs_motion_search_internal(MpegEncContext * s, int
*mx_ptr= best[0];
*my_ptr= best[1];
-// printf("%d %d %d \n", best[0], best[1], dmin);
return dmin;
}
@@ -1016,7 +1008,7 @@ static int epzs_motion_search4(MpegEncContext * s,
map_generation= update_map_generation(c);
dmin = 1000000;
-//printf("%d %d %d %d //",xmin, ymin, xmax, ymax);
+
/* first line */
if (s->first_slice_line) {
CHECK_MV(P_LEFT[0]>>shift, P_LEFT[1]>>shift)
@@ -1046,7 +1038,6 @@ static int epzs_motion_search4(MpegEncContext * s,
*mx_ptr= best[0];
*my_ptr= best[1];
-// printf("%d %d %d \n", best[0], best[1], dmin);
return dmin;
}
@@ -1076,7 +1067,7 @@ static int epzs_motion_search2(MpegEncContext * s,
map_generation= update_map_generation(c);
dmin = 1000000;
-//printf("%d %d %d %d //",xmin, ymin, xmax, ymax);
+
/* first line */
if (s->first_slice_line) {
CHECK_MV(P_LEFT[0]>>shift, P_LEFT[1]>>shift)
@@ -1106,6 +1097,5 @@ static int epzs_motion_search2(MpegEncContext * s,
*mx_ptr= best[0];
*my_ptr= best[1];
-// printf("%d %d %d \n", best[0], best[1], dmin);
return dmin;
}
View
13 libavcodec/mpeg12.c
@@ -1326,8 +1326,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 =
@@ -1881,7 +1883,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;
}
@@ -1900,8 +1902,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;
View
9 libavcodec/mpegaudiodec.c
@@ -892,9 +892,7 @@ static int huffman_decode(MPADecodeContext *s, GranuleDef *g,
int pos = get_bits_count(&s->gb);
if (pos >= end_pos){
-// av_log(NULL, AV_LOG_ERROR, "pos: %d %d %d %d\n", pos, end_pos, end_pos2, s_index);
switch_buffer(s, &pos, &end_pos, &end_pos2);
-// av_log(NULL, AV_LOG_ERROR, "new pos: %d %d\n", pos, end_pos);
if (pos >= end_pos)
break;
}
@@ -968,9 +966,7 @@ static int huffman_decode(MPADecodeContext *s, GranuleDef *g,
s_index=0;
break;
}
-// av_log(NULL, AV_LOG_ERROR, "pos2: %d %d %d %d\n", pos, end_pos, end_pos2, s_index);
switch_buffer(s, &pos, &end_pos, &end_pos2);
-// av_log(NULL, AV_LOG_ERROR, "new pos2: %d %d %d\n", pos, end_pos, s_index);
if (pos >= end_pos)
break;
}
@@ -993,7 +989,6 @@ static int huffman_decode(MPADecodeContext *s, GranuleDef *g,
}
/* skip extension bits */
bits_left = end_pos2 - get_bits_count(&s->gb);
-//av_log(NULL, AV_LOG_ERROR, "left:%d buf:%p\n", bits_left, s->in_gb.buffer);
if (bits_left < 0 && (s->err_recognition & (AV_EF_BUFFER|AV_EF_COMPLIANT))) {
av_log(s->avctx, AV_LOG_ERROR, "bits_left=%d\n", bits_left);
s_index=0;
@@ -1406,8 +1401,8 @@ static int mp_decode_layer3(MPADecodeContext *s)
int extrasize = av_clip(get_bits_left(&s->gb) >> 3, 0, EXTRABYTES);
av_assert1((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;
View
13 libavcodec/mpegvideo.c
@@ -1383,12 +1383,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 ||
@@ -1738,7 +1738,6 @@ void ff_print_debug_info(MpegEncContext *s, AVFrame *pict)
else
av_log(s->avctx, AV_LOG_DEBUG, " ");
}
- // av_log(s->avctx, AV_LOG_DEBUG, " ");
}
av_log(s->avctx, AV_LOG_DEBUG, "\n");
}
View
28 libavcodec/mpegvideo_enc.c
@@ -1011,8 +1011,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);
@@ -1291,10 +1291,6 @@ static int select_input_picture(MpegEncContext *s)
if (s->picture_in_gop_number < s->gop_size &&
skip_check(s, s->input_picture[0], s->next_picture_ptr)) {
// FIXME check that te gop check above is +-1 correct
- //av_log(NULL, AV_LOG_DEBUG, "skip %p %"PRId64"\n",
- // s->input_picture[0]->f.data[0],
- // s->input_picture[0]->pts);
-
if (s->input_picture[0]->f.type == FF_BUFFER_TYPE_SHARED) {
for (i = 0; i < 4; i++)
s->input_picture[0]->f.data[i] = NULL;
@@ -1366,9 +1362,6 @@ static int select_input_picture(MpegEncContext *s)
}
emms_c();
- //static int b_count = 0;
- //b_count += b_frames;
- //av_log(s->avctx, AV_LOG_DEBUG, "b_frames: %d\n", b_count);
for (i = b_frames - 1; i >= 0; i--) {
int type = s->input_picture[i]->f.pict_type;
@@ -1462,7 +1455,6 @@ static int select_input_picture(MpegEncContext *s)
ff_copy_picture(&s->current_picture, s->current_picture_ptr);
s->picture_number = s->new_picture.f.display_picture_number;
- //printf("dpn:%d\n", s->picture_number);
} else {
memset(&s->new_picture, 0, sizeof(Picture));
}
@@ -1508,8 +1500,6 @@ int ff_MPV_encode_picture(AVCodecContext *avctx, AVPacket *pkt,
s->pict_type = s->new_picture.f.pict_type;
//emms_c();
- //printf("qs:%f %f %d\n", s->new_picture.quality,
- // s->current_picture.quality, s->qscale);
ff_MPV_frame_start(s, avctx);
vbv_retry:
if (encode_picture(s, s->picture_number) < 0)
@@ -1558,7 +1548,6 @@ int ff_MPV_encode_picture(AVCodecContext *avctx, AVPacket *pkt,
s->time_base = s->last_time_base;
s->last_non_b_time = s->time - s->pp_time;
}
- //av_log(NULL, AV_LOG_ERROR, "R:%d ", s->next_lambda);
for (i = 0; i < context_count; i++) {
PutBitContext *pb = &s->thread_context[i]->pb;
init_put_bits(pb, pb->buf, pb->buf_end - pb->buf);
@@ -2463,7 +2452,6 @@ static int encode_thread(AVCodecContext *c, void *arg){
uint8_t bit_buf2[2][MAX_MB_BYTES];
uint8_t bit_buf_tex[2][MAX_MB_BYTES];
PutBitContext pb[2], pb2[2], tex_pb[2];
-//printf("%d->%d\n", s->resync_mb_y, s->end_mb_y);
ff_check_alignment();
@@ -2518,7 +2506,6 @@ static int encode_thread(AVCodecContext *c, void *arg){
s->first_slice_line = 1;
s->ptr_lastgob = s->pb.buf;
for(mb_y= s->start_mb_y; mb_y < s->end_mb_y; mb_y++) {
-// printf("row %d at %X\n", s->mb_y, (int)s);
s->mb_x=0;
s->mb_y= mb_y;
@@ -2992,7 +2979,6 @@ static int encode_thread(AVCodecContext *c, void *arg){
s->mb_intra= 0;
motion_x= s->mv[0][0][0] = s->b_forw_mv_table[xy][0];
motion_y= s->mv[0][0][1] = s->b_forw_mv_table[xy][1];
-// printf(" %d %d ", motion_x, motion_y);
break;
case CANDIDATE_MB_TYPE_FORWARD_I:
s->mv_dir = MV_DIR_FORWARD;
@@ -3069,7 +3055,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));
}
}
@@ -3162,7 +3149,6 @@ static int estimate_qp(MpegEncContext *s, int dry_run){
//FIXME broken
}else
s->lambda = s->current_picture.f.quality;
-//printf("%d %d\n", s->avctx->global_quality, s->current_picture.quality);
update_qscale(s);
return 0;
}
@@ -3272,8 +3258,10 @@ 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);
- if(s->msmpeg4_version >= 3) s->no_rounding=1;
+ if(s->msmpeg4_version >= 3)
+ s->no_rounding=1;
+ 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){
View
22 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;
@@ -547,7 +547,6 @@ static int msmpeg4v34_decode_mb(MpegEncContext *s, DCTELEM block[6][64])
if (!s->mb_intra) {
int mx, my;
-//printf("P at %d %d\n", s->mb_x, s->mb_y);
if(s->per_mb_rl_table && cbp){
s->rl_table_index = decode012(&s->gb);
s->rl_chroma_table_index = s->rl_table_index;
@@ -561,12 +560,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);
@@ -841,7 +843,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;
@@ -862,8 +865,6 @@ int ff_msmpeg4_decode_ext_header(MpegEncContext * s, int buf_size)
s->flipflop_rounding= get_bits1(&s->gb);
else
s->flipflop_rounding= 0;
-
-// printf("fps:%2d bps:%2d roundingType:%1d\n", fps, s->bit_rate/1024, s->flipflop_rounding);
}
else if(left<length+8)
{
@@ -1030,7 +1031,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){
@@ -1047,7 +1049,6 @@ int ff_msmpeg4_decode_block(MpegEncContext * s, DCTELEM * block,
s->esc3_level_length= ll;
s->esc3_run_length= SHOW_UBITS(re, &s->gb, 2) + 3; SKIP_BITS(re, &s->gb, 2);
-//printf("level length:%d, run length: %d\n", ll, s->esc3_run_length);
UPDATE_CACHE(re, &s->gb);
}
run= SHOW_UBITS(re, &s->gb, s->esc3_run_length);
@@ -1060,7 +1061,7 @@ int ff_msmpeg4_decode_block(MpegEncContext * s, DCTELEM * block,
SKIP_BITS(re, &s->gb, s->esc3_level_length);
if(sign) level= -level;
}
-//printf("level: %d, run: %d at %d %d\n", level, run, s->mb_x, s->mb_y);
+
#if 0 // waste of time / this will detect very few errors
{
const int abs_level= FFABS(level);
@@ -1186,7 +1187,6 @@ int ff_msmpeg4_decode_motion(MpegEncContext * s,
return -1;
}
if (code == mv->n) {
-//printf("MV ESC %X at %d %d\n", show_bits(&s->gb, 24), s->mb_x, s->mb_y);
mx = get_bits(&s->gb, 6);
my = get_bits(&s->gb, 6);
} else {
View
6 libavcodec/msmpeg4enc.c
@@ -193,9 +193,6 @@ static void find_best_tables(MpegEncContext * s)
}
}
-// printf("type:%d, best:%d, qp:%d, var:%d, mcvar:%d, size:%d //\n",
-// s->pict_type, best, s->qscale, s->mb_var_sum, s->mc_mb_var_sum, best_size);
-
if(s->pict_type==AV_PICTURE_TYPE_P) chroma_best= best;
memset(s->ac_stats, 0, sizeof(int)*(MAX_LEVEL+1)*(MAX_RUN+1)*2*2*2);
@@ -233,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;
View
1  libavcodec/parser.c
@@ -150,7 +150,6 @@ int av_parser_parse2(AVCodecParserContext *s,
/* WARNING: the returned index can be negative */
index = s->parser->parser_parse(s, avctx, (const uint8_t **)poutbuf, poutbuf_size, buf, buf_size);
-//av_log(NULL, AV_LOG_DEBUG, "parser: in:%"PRId64", %"PRId64", out:%"PRId64", %"PRId64", in:%d out:%d id:%d\n", pts, dts, s->last_pts, s->last_dts, buf_size, *poutbuf_size, avctx->codec_id);
/* update the file pointer */
if (*poutbuf_size) {
/* fill the data for the current frame */
View
3  libavcodec/put_bits.h
@@ -131,13 +131,11 @@ static inline void put_bits(PutBitContext *s, int n, unsigned int value)
unsigned int bit_buf;
int bit_left;
- // printf("put_bits=%d %x\n", n, value);
av_assert2(n <= 31 && value < (1U << n));
bit_buf = s->bit_buf;
bit_left = s->bit_left;
- // printf("n=%d value=%x cnt=%d buf=%x\n", n, value, bit_cnt, bit_buf);
/* XXX: optimize */
#ifdef BITSTREAM_WRITER_LE
bit_buf |= value << (32 - bit_left);
@@ -158,7 +156,6 @@ static inline void put_bits(PutBitContext *s, int n, unsigned int value)
bit_buf |= value >> (n - bit_left);
av_assert2(s->buf_ptr+3<s->buf_end);
AV_WB32(s->buf_ptr, bit_buf);
- //printf("bitbuf = %08x\n", bit_buf);
s->buf_ptr+=4;
bit_left+=32 - n;
bit_buf = value;
View
36 libavcodec/ratecontrol.c
@@ -283,7 +283,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;
-//av_log(0,0, "%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;
@@ -457,7 +458,6 @@ static double modify_qscale(MpegEncContext *s, RateControlEntry *rce, double q,
if(s->avctx->rc_qmod_freq && frame_num%s->avctx->rc_qmod_freq==0 && pict_type==AV_PICTURE_TYPE_P)
q*= s->avctx->rc_qmod_amp;
-//printf("q:%f\n", q);
/* buffer overflow/underflow protection */
if(buffer_size){
double expected_size= rcc->buffer_index;
@@ -493,7 +493,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;
@@ -636,8 +638,6 @@ static void adaptive_quantization(MpegEncContext *s, double q){
if (intq > qmax) intq= qmax;
else if(intq < qmin) intq= qmin;
-//if(i%s->mb_width==0) printf("\n");
-//printf("%2d%3d ", intq, ff_sqrt(s->mc_mb_var[i]));
s->lambda_table[mb_xy]= intq;
}
}
@@ -682,7 +682,6 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run)
get_qminmax(&qmin, &qmax, s, pict_type);
fps= get_fps(s->avctx);
-//printf("input_pic_num:%d pic_num:%d frame_rate:%d\n", s->input_picture_number, s->picture_number, s->frame_rate);
/* update predictors */
if(picture_number>2 && !dry_run){
const int last_var= s->last_pict_type == AV_PICTURE_TYPE_I ? rcc->last_mb_var_sum : rcc->last_mc_mb_var_sum;
@@ -706,9 +705,6 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run)
else
dts_pic= s->last_picture_ptr;
-//if(dts_pic)
-// av_log(NULL, AV_LOG_ERROR, "%"PRId64" %"PRId64" %"PRId64" %d\n", s->current_picture_ptr->pts, s->user_specified_pts, dts_pic->pts, picture_number);
-
if (!dts_pic || dts_pic->f.pts == AV_NOPTS_VALUE)
wanted_bits= (uint64_t)(s->bit_rate*(double)picture_number/fps);
else
@@ -727,7 +723,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;
@@ -764,9 +761,7 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run)
return -1;
assert(q>0.0);
-//printf("%f ", q);
q= get_diff_limited_q(s, rce, q);
-//printf("%f ", q);
assert(q>0.0);
if(pict_type==AV_PICTURE_TYPE_P || s->intra_only){ //FIXME type dependent blur like in 2-pass
@@ -775,9 +770,7 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run)
rcc->short_term_qsum+= q;
rcc->short_term_qcount++;
-//printf("%f ", q);
q= short_term_q= rcc->short_term_qsum/rcc->short_term_qcount;
-//printf("%f ", q);
}
assert(q>0.0);
@@ -908,18 +901,15 @@ static int init_pass2(MpegEncContext *s)
double bits;
rce->new_qscale= modify_qscale(s, rce, blurred_qscale[i], i);
bits= qp2bits(rce, rce->new_qscale) + rce->mv_bits + rce->misc_bits;
-//printf("%d %f\n", rce->new_bits, blurred_qscale[i]);
bits += 8*ff_vbv_update(s, bits);
rce->expected_bits= expected_bits;
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;
@@ -931,8 +921,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);
View
7 libavcodec/rv10.c
@@ -399,7 +399,6 @@ static int rv20_decode_picture_header(RVDecContext *rv)
mb_pos = ff_h263_decode_mba(s);
-//av_log(s->avctx, AV_LOG_DEBUG, "%d\n", seq);
seq |= s->time &~0x7FFF;
if(seq - s->time > 0x4000) seq -= 0x8000;
if(seq - s->time < -0x4000) seq += 0x8000;
@@ -418,11 +417,7 @@ static int rv20_decode_picture_header(RVDecContext *rv)
ff_mpeg4_init_direct_mv(s);
}
}
-// printf("%d %d %d %d %d\n", seq, (int)s->time, (int)s->last_non_b_time, s->pp_time, s->pb_time);
-/*for(i=0; i<32; i++){
- av_log(s->avctx, AV_LOG_DEBUG, "%d", get_bits1(&s->gb));
-}
-av_log(s->avctx, AV_LOG_DEBUG, "\n");*/
+
s->no_rounding= get_bits1(&s->gb);
if(RV_GET_MINOR_VER(rv->sub_id) <= 1 && s->pict_type == AV_PICTURE_TYPE_B)
View
4 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) {
View
1  libavcodec/utils.c
@@ -610,7 +610,6 @@ void avcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic)
for (i = 0; i < AV_NUM_DATA_POINTERS; i++)
pic->data[i] = NULL;
// pic->base[i]=NULL;
- //printf("R%X\n", pic->opaque);
if (s->debug & FF_DEBUG_BUFFERS)
av_log(s, AV_LOG_DEBUG, "default_release_buffer called on pic %p, %d "
View
7 libavcodec/vc1.c
@@ -395,8 +395,6 @@ int ff_vc1_decode_sequence_header(AVCodecContext *avctx, VC1Context *v, GetBitCo
v->res_rtm_flag = get_bits1(gb); //reserved
}
if (!v->res_rtm_flag) {
-// av_log(avctx, AV_LOG_ERROR,
-// "0 for reserved RES_RTM_FLAG is forbidden\n");
av_log(avctx, AV_LOG_ERROR,
"Old WMV3 version detected, some frames may be decoded incorrectly\n");
//return -1;
@@ -663,8 +661,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;
View
3  libavcodec/vc1dec.c
@@ -5637,7 +5637,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;
if(s->error_occurred && s->pict_type == AV_PICTURE_TYPE_B)
View
4 libavcodec/vorbis.c
@@ -66,10 +66,8 @@ int ff_vorbis_len2vlc(uint8_t *bits, uint32_t *codes, unsigned num)
for (p = 0; (bits[p] == 0) && (p < num); ++p)
;
- if (p == num) {
-// av_log(vc->avccontext, AV_LOG_INFO, "An empty codebook. Heh?! \n");
+ if (p == num)
return 0;
- }
codes[p] = 0;
if (bits[p] > 32)
View
3  libavcodec/vp3.c
@@ -2068,7 +2068,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++;
View
7 libavcodec/wmadec.c
@@ -95,8 +95,6 @@ static int wma_decode_init(AVCodecContext * avctx)
} else if (avctx->codec->id == AV_CODEC_ID_WMAV2 && avctx->extradata_size >= 6) {
flags2 = AV_RL16(extradata+4);
}
-// for(i=0; i<avctx->extradata_size; i++)
-// av_log(NULL, AV_LOG_ERROR, "%02X ", extradata[i]);
s->use_exp_vlc = flags2 & 0x0001;
s->use_bit_reservoir = flags2 & 0x0002;
@@ -866,7 +864,6 @@ static int wma_decode_superframe(AVCodecContext *avctx, void *data,
}
if (s->last_superframe_len > 0) {
- // printf("skip=%d\n", s->last_bitoffset);
/* add bit_offset bits to last frame */
if ((s->last_superframe_len + ((bit_offset + 7) >> 3)) >
MAX_CODED_SUPERFRAME_SIZE)
@@ -929,7 +926,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;
View
1  libavcodec/wmaenc.c
@@ -82,7 +82,6 @@ static int encode_init(AVCodecContext * avctx){
(avctx->sample_rate * 8);
s->block_align = FFMIN(s->block_align, MAX_CODED_SUPERFRAME_SIZE);
avctx->block_align = s->block_align;
-//av_log(NULL, AV_LOG_ERROR, "%d %d %d %d\n", s->block_align, avctx->bit_rate, s->frame_len, avctx->sample_rate);
avctx->frame_size = avctx->delay = s->frame_len;
#if FF_API_OLD_ENCODE_AUDIO
View
15 libavcodec/wmv2dec.c
@@ -244,8 +244,6 @@ static inline int wmv2_decode_motion(Wmv2Context *w, int *mx_ptr, int *my_ptr){
else
w->hshift= 0;
-//printf("%d %d ", *mx_ptr, *my_ptr);
-
return 0;
}
@@ -314,7 +312,6 @@ static inline int wmv2_decode_inter_block(Wmv2Context *w, DCTELEM *block, int n,
// const uint8_t *scantable= w->abt_type-1 ? w->abt_scantable[1].permutated : w->abt_scantable[0].scantable;
sub_cbp= sub_cbp_table[ decode012(&s->gb) ];
-// printf("S%d", sub_cbp);
if(sub_cbp&1){
if (ff_msmpeg4_decode_block(s, block, n, 1, scantable) < 0)
@@ -385,7 +382,6 @@ int ff_wmv2_decode_mb(MpegEncContext *s, DCTELEM block[6][64])
if (!s->mb_intra) {
int mx, my;
-//printf("P at %d %d\n", s->mb_x, s->mb_y);
wmv2_pred_motion(w, &mx, &my);
if(cbp){
@@ -419,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);
View
4 libavcodec/x86/mpegvideo.c
@@ -51,7 +51,7 @@ static void dct_unquantize_h263_intra_mmx(MpegEncContext *s,
nCoeffs=63;
else
nCoeffs= s->inter_scantable.raster_end[ s->block_last_index[n] ];
-//printf("%d %d ", qmul, qadd);
+
__asm__ volatile(
"movd %1, %%mm6 \n\t" //qmul
"packssdw %%mm6, %%mm6 \n\t"
@@ -114,7 +114,7 @@ static void dct_unquantize_h263_inter_mmx(MpegEncContext *s,
assert(s->block_last_index[n]>=0 || s->h263_aic);
nCoeffs= s->inter_scantable.raster_end[ s->block_last_index[n] ];
-//printf("%d %d ", qmul, qadd);
+
__asm__ volatile(
"movd %1, %%mm6 \n\t" //qmul
"packssdw %%mm6, %%mm6 \n\t"
View
7 libavdevice/timefilter.c
@@ -103,15 +103,8 @@ int main(void)
double ideal[SAMPLES];
double samples[SAMPLES];
double samplet[SAMPLES];
-#if 1
for (n0 = 0; n0 < 40; n0 = 2 * n0 + 1) {
for (n1 = 0; n1 < 10; n1 = 2 * n1 + 1) {
-#else
- {
- {
- n0 = 7;
- n1 = 1;
-#endif
double best_error = 1000000000;
double bestpar0 = 1;
double bestpar1 = 1;
View
49 libavformat/asfdec.c
@@ -21,6 +21,7 @@
//#define DEBUG
+#include "libavutil/attributes.h"
#include "libavutil/bswap.h"
#include "libavutil/common.h"
#include "libavutil/avstring.h"
@@ -420,9 +421,6 @@ static int asf_read_stream_properties(AVFormatContext *s, int64_t size)
avio_rl16(pb); //ds_data_size
avio_r8(pb); //ds_silence_data
}
- //printf("Descrambling: ps:%d cs:%d ds:%d s:%d sd:%d\n",
- // asf_st->ds_packet_size, asf_st->ds_chunk_size,
- // asf_st->ds_data_size, asf_st->ds_span, asf_st->ds_silence_data);
if (asf_st->ds_span > 1) {
if (!asf_st->ds_chunk_size
|| (asf_st->ds_packet_size/asf_st->ds_chunk_size <= 1)
@@ -443,7 +441,6 @@ static int asf_read_stream_properties(AVFormatContext *s, int64_t size)
st->codec->bits_per_coded_sample = avio_rl16(pb); /* depth */
tag1 = avio_rl32(pb);
avio_skip(pb, 20);
- // av_log(s, AV_LOG_DEBUG, "size:%d tsize:%d sizeX:%d\n", size, total_size, sizeX);
if (sizeX > 40) {
st->codec->extradata_size = sizeX - 40;
st->codec->extradata = av_mallocz(st->codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
@@ -614,16 +611,18 @@ static int asf_read_metadata(AVFormatContext *s, int64_t size)
for(i=0;i<n;i++) {
char name[1024];
+ int av_unused value_type;
avio_rl16(pb); //lang_list_index
stream_num= avio_rl16(pb);
name_len= avio_rl16(pb);
- avio_skip(pb, 2); /* value_type */
+ value_type = avio_rl16(pb); /* value_type */
value_len= avio_rl32(pb);
if ((ret = avio_get_str16le(pb, name_len, name, sizeof(name))) < name_len)
avio_skip(pb, name_len - ret);
- //av_log(s, AV_LOG_ERROR, "%d %d %d %d %d <%s>\n", i, stream_num, name_len, value_type, value_len, name);
+ av_dlog(s, "%d %d %d %d %d <%s>\n",
+ i, stream_num, name_len, value_type, value_len, name);
value_num= avio_rl16(pb);//we should use get_value() here but it does not work 2 is le16 here but le32 elsewhere
avio_skip(pb, value_len - 2);
@@ -689,9 +688,7 @@ static int asf_read_header(AVFormatContext *s)
uint64_t gpos= avio_tell(pb);
ff_get_guid(pb, &g);
gsize = avio_rl64(pb);
- av_dlog(s, "%08"PRIx64": ", gpos);
print_guid(&g);
- av_dlog(s, " size=0x%"PRIx64"\n", gsize);
if (!ff_guidcmp(&g, &ff_asf_data_header)) {
asf->data_object_offset = avio_tell(pb);
// if not streaming, gsize is not unlimited (how?), and there is enough space in the file..
@@ -784,7 +781,9 @@ static int asf_read_header(AVFormatContext *s)
&st->sample_aspect_ratio.num,
asf->dar[0].num, asf->dar[0].den, INT_MAX);
-//av_log(s, AV_LOG_INFO, "i=%d, st->codec->codec_type:%d, dar %d:%d sar=%d:%d\n", i, st->codec->codec_type, dar[i].num, dar[i].den, st->sample_aspect_ratio.num, st->sample_aspect_ratio.den);
+ av_dlog(s, "i=%d, st->codec->codec_type:%d, asf->dar %d:%d sar=%d:%d\n",
+ i, st->codec->codec_type, asf->dar[i].num, asf->dar[i].den,
+ st->sample_aspect_ratio.num, st->sample_aspect_ratio.den);
// copy and convert language codes to the frontend
if (asf->streams[i].stream_language_index < 128) {
@@ -926,7 +925,9 @@ static int asf_read_frame_header(AVFormatContext *s, AVIOContext *pb){
DO_2BITS(asf->packet_property >> 4, asf->packet_seq, 0);
DO_2BITS(asf->packet_property >> 2, asf->packet_frag_offset, 0);
DO_2BITS(asf->packet_property, asf->packet_replic_size, 0);
-//printf("key:%d stream:%d seq:%d offset:%d replic_size:%d\n", asf->packet_key_frame, asf->stream_index, asf->packet_seq, //asf->packet_frag_offset, asf->packet_replic_size);
+ av_dlog(asf, "key:%d stream:%d seq:%d offset:%d replic_size:%d\n",
+ asf->packet_key_frame, asf->stream_index, asf->packet_seq,
+ asf->packet_frag_offset, asf->packet_replic_size);
if (rsize+asf->packet_replic_size > asf->packet_size_left) {
av_log(s, AV_LOG_ERROR, "packet_replic_size %d is invalid\n", asf->packet_replic_size);
return AVERROR_INVALIDDATA;
@@ -939,9 +940,6 @@ static int asf_read_frame_header(AVFormatContext *s, AVIOContext *pb){
}
asf->packet_frag_timestamp = avio_rl32(pb); // timestamp
if(asf->packet_replic_size >= 8+38+4){
-// for(i=0; i<asf->packet_replic_size-8; i++)
-// av_log(s, AV_LOG_DEBUG, "%02X ",avio_r8(pb));
-// av_log(s, AV_LOG_DEBUG, "\n");
avio_skip(pb, 10);
ts0= avio_rl64(pb);
ts1= avio_rl64(pb);
@@ -980,10 +978,8 @@ static int asf_read_frame_header(AVFormatContext *s, AVIOContext *pb){
asf->packet_padsize -= diff;
}
}
- //printf("Fragsize %d\n", asf->packet_frag_size);
} else {
asf->packet_frag_size = asf->packet_size_left - rsize;
- //printf("Using rest %d %d %d\n", asf->packet_frag_size, asf->packet_size_left, rsize);
}
if (asf->packet_replic_size == 1) {
asf->packet_multi_size = asf->packet_frag_size;
@@ -991,7 +987,6 @@ static int asf_read_frame_header(AVFormatContext *s, AVIOContext *pb){
return AVERROR_INVALIDDATA;
}
asf->packet_size_left -= rsize;
- //printf("___objsize____ %d %d rs:%d\n", asf->packet_obj_size, asf->packet_frag_offset, rsize);
return 0;
}
@@ -1017,7 +1012,6 @@ static int ff_asf_parse_packet(AVFormatContext *s, AVIOContext *pb, AVPacket *pk
|| asf->packet_segments < 1) {
//asf->packet_size_left <= asf->packet_padsize) {
int ret = asf->packet_size_left + asf->packet_padsize;
- //printf("PacketLeftSize:%d Pad:%d Pos:%"PRId64"\n", asf->packet_size_left, asf->packet_padsize, avio_tell(pb));
assert(ret>=0);
/* fail safe */
avio_skip(pb, ret);
@@ -1064,7 +1058,6 @@ static int ff_asf_parse_packet(AVFormatContext *s, AVIOContext *pb, AVPacket *pk
continue;
}
asf->packet_multi_size -= asf->packet_obj_size;
- //printf("COMPRESS size %d %d %d ms:%d\n", asf->packet_obj_size, asf->packet_frag_timestamp, asf->packet_size_left, asf->packet_multi_size);
}
if( /*asf->packet_frag_size == asf->packet_obj_size*/
asf_st->frag_offset + asf->packet_frag_size <= asf_st->pkt.size
@@ -1100,9 +1093,11 @@ static int ff_asf_parse_packet(AVFormatContext *s, AVIOContext *pb, AVPacket *pk
asf_st->palette_changed = 0;
}
}
-//printf("new packet: stream:%d key:%d packet_key:%d audio:%d size:%d\n",
-//asf->stream_index, asf->packet_key_frame, asf_st->pkt.flags & AV_PKT_FLAG_KEY,
-//s->streams[asf->stream_index]->codec->codec_type == AVMEDIA_TYPE_AUDIO, asf->packet_obj_size);
+ av_dlog(asf, "new packet: stream:%d key:%d packet_key:%d audio:%d size:%d\n",
+ asf->stream_index, asf->packet_key_frame,
+ asf_st->pkt.flags & AV_PKT_FLAG_KEY,
+ s->streams[asf->stream_index]->codec->codec_type == AVMEDIA_TYPE_AUDIO,
+ asf->packet_obj_size);
if (s->streams[asf->stream_index]->codec->codec_type == AVMEDIA_TYPE_AUDIO)
asf->packet_key_frame = 1;
if (asf->packet_key_frame)
@@ -1110,9 +1105,9 @@ static int ff_asf_parse_packet(AVFormatContext *s, AVIOContext *pb, AVPacket *pk
}
/* read data */
- //printf("READ PACKET s:%d os:%d o:%d,%d l:%d DATA:%p\n",
- // s->packet_size, asf_st->pkt.size, asf->packet_frag_offset,
- // asf_st->frag_offset, asf->packet_frag_size, asf_st->pkt.data);
+ av_dlog(asf, "READ PACKET s:%d os:%d o:%d,%d l:%d DATA:%p\n",
+ s->packet_size, asf_st->pkt.size, asf->packet_frag_offset,
+ asf_st->frag_offset, asf->packet_frag_size, asf_st->pkt.data);
asf->packet_size_left -= asf->packet_frag_size;
if (asf->packet_size_left < 0)
continue;
@@ -1174,8 +1169,6 @@ static int ff_asf_parse_packet(AVFormatContext *s, AVIOContext *pb, AVPacket *pk
int row = off / asf_st->ds_span;
int col = off % asf_st->ds_span;
int idx = row + col * asf_st->ds_packet_size / asf_st->ds_chunk_size;
- //printf("off:%d row:%d col:%d idx:%d\n", off, row, col, idx);
-
assert(offset + asf_st->ds_chunk_size <= asf_st->pkt.size);
assert(idx+1 <= asf_st->pkt.size / asf_st->ds_chunk_size);
memcpy(newdata + offset,
@@ -1190,7 +1183,6 @@ static int ff_asf_parse_packet(AVFormatContext *s, AVIOContext *pb, AVPacket *pk
}
asf_st->frag_offset = 0;
*pkt= asf_st->pkt;
- //printf("packet %d %d\n", asf_st->pkt.size, asf->packet_frag_size);
asf_st->pkt.size = 0;
asf_st->pkt.data = 0;
asf_st->pkt.side_data_elems = 0;
@@ -1280,7 +1272,6 @@ static int64_t asf_read_pts(AVFormatContext *s, int stream_index, int64_t *ppos,
if (avio_seek(s->pb, pos, SEEK_SET) < 0)
return AV_NOPTS_VALUE;
-//printf("asf_read_pts\n");
asf_reset_header(s);
for(;;){
if (av_read_frame(s, pkt) < 0){
@@ -1308,8 +1299,6 @@ static int64_t asf_read_pts(AVFormatContext *s, int stream_index, int64_t *ppos,
}
*ppos= pos;
-//printf("found keyframe at %"PRId64" stream %d stamp:%"PRId64"\n", *ppos, stream_index, pts);
-
return pts;
}
View
2  libavformat/assdec.c
@@ -60,7 +60,7 @@ static int64_t get_pts(const uint8_t *p)
if(sscanf(p, "%*[^,],%d:%d:%d%*c%d", &hour, &min, &sec, &hsec) != 4)
return AV_NOPTS_VALUE;
-// av_log(NULL, AV_LOG_ERROR, "%d %d %d %d %d [%s]\n", i, hour, min, sec, hsec, p);
+ av_dlog(NULL, "%d %d %d %d [%s]\n", hour, min, sec, hsec, p);
min+= 60*hour;
sec+= 60*min;
View
24 libavformat/avidec.c
@@ -545,7 +545,8 @@ static int avi_read_header(AVFormatContext *s)
}
ast->sample_size = avio_rl32(pb); /* sample ssize */
ast->cum_len *= FFMAX(1, ast->sample_size);
-// av_log(s, AV_LOG_DEBUG, "%d %d %d %d\n", ast->rate, ast->scale, ast->start, ast->sample_size);
+ av_dlog(s, "%"PRIu32" %"PRIu32" %d\n",
+ ast->rate, ast->scale, ast->sample_size);
switch(tag1) {
case MKTAG('v', 'i', 'd', 's'):
@@ -743,7 +744,9 @@ static int avi_read_header(AVFormatContext *s)
if(active_aspect.num && active_aspect.den && active.num && active.den){
st->sample_aspect_ratio= av_div_q(active_aspect, active);
-//av_log(s, AV_LOG_ERROR, "vprp %d/%d %d/%d\n", active_aspect.num, active_aspect.den, active.num, active.den);
+ av_dlog(s, "vprp %d/%d %d/%d\n",
+ active_aspect.num, active_aspect.den,
+ active.num, active.den);
}
size -= 9*4;
}
@@ -921,7 +924,8 @@ static int avi_sync(AVFormatContext *s, int exit_early)
size= d[4] + (d[5]<<8) + (d[6]<<16) + (d[7]<<24);
n= get_stream_idx(d+2);
-//av_log(s, AV_LOG_DEBUG, "%X %X %X %X %X %X %X %X %"PRId64" %d %d\n", d[0], d[1], d[2], d[3], d[4], d[5], d[6], d[7], i, size, n);
+ av_dlog(s, "%X %X %X %X %X %X %X %X %"PRId64" %u %d\n",
+ d[0], d[1], d[2], d[3], d[4], d[5], d[6], d[7], i, size, n);
if(i + (uint64_t)size > avi->fsize || d[0] > 127)
continue;
@@ -931,7 +935,6 @@ static int avi_sync(AVFormatContext *s, int exit_early)
||(d[0] == 'J' && d[1] == 'U' && d[2] == 'N' && d[3] == 'K')
||(d[0] == 'i' && d[1] == 'd' && d[2] == 'x' && d[3] == '1')){
avio_skip(pb, size);
-//av_log(s, AV_LOG_DEBUG, "SKIP\n");
goto start_sync;
}
@@ -1010,7 +1013,6 @@ static int avi_sync(AVFormatContext *s, int exit_early)
if (exit_early)
return 0;
-//av_log(s, AV_LOG_DEBUG, "OK\n");
if(d[2]*256+d[3] == ast->prefix)
ast->prefix_count++;
else{
@@ -1073,7 +1075,8 @@ static int avi_read_packet(AVFormatContext *s, AVPacket *pkt)
ts = av_rescale_q(ts, st->time_base, (AVRational){FFMAX(1, ast->sample_size), AV_TIME_BASE});
-// av_log(s, AV_LOG_DEBUG, "%"PRId64" %d/%d %"PRId64"\n", ts, st->time_base.num, st->time_base.den, ast->frame_offset);
+ av_dlog(s, "%"PRId64" %d/%d %"PRId64"\n", ts,
+ st->time_base.num, st->time_base.den, ast->frame_offset);
if(ts < best_ts){
best_ts= ts;
best_st= st;
@@ -1093,13 +1096,11 @@ static int avi_read_packet(AVFormatContext *s, AVPacket *pkt)
best_ast->frame_offset= best_st->index_entries[i].timestamp;
}
-// av_log(s, AV_LOG_DEBUG, "%d\n", i);
if(i>=0){
int64_t pos= best_st->index_entries[i].pos;
pos += best_ast->packet_size - best_ast->remaining;
if(avio_seek(s->pb, pos + 8, SEEK_SET) < 0)
return AVERROR_EOF;
-// av_log(s, AV_LOG_DEBUG, "pos=%"PRId64"\n", pos);
av_assert0(best_ast->remaining <= best_ast->packet_size);
@@ -1168,7 +1169,9 @@ static int avi_read_packet(AVFormatContext *s, AVPacket *pkt)
// pkt->dts += ast->start;
if(ast->sample_size)
pkt->dts /= ast->sample_size;
-//av_log(s, AV_LOG_DEBUG, "dts:%"PRId64" offset:%"PRId64" %d/%d smpl_siz:%d base:%d st:%d size:%d\n", pkt->dts, ast->frame_offset, ast->scale, ast->rate, ast->sample_size, AV_TIME_BASE, avi->stream_index, size);
+ av_dlog(s, "dts:%"PRId64" offset:%"PRId64" %d/%d smpl_siz:%d base:%d st:%d size:%d\n",
+ pkt->dts, ast->frame_offset, ast->scale, ast->rate,
+ ast->sample_size, AV_TIME_BASE, avi->stream_index, size);
pkt->stream_index = avi->stream_index;
if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
@@ -1457,7 +1460,8 @@ static int avi_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp
pos = st->index_entries[index].pos;
timestamp = st->index_entries[index].timestamp / FFMAX(ast->sample_size, 1);
-// av_log(s, AV_LOG_DEBUG, "XX %"PRId64" %d %"PRId64"\n", timestamp, index, st->index_entries[index].timestamp);
+ av_dlog(s, "XX %"PRId64" %d %"PRId64"\n",
+ timestamp, index, st->index_entries[index].timestamp);
if (CONFIG_DV_DEMUXER && avi->dv_demux) {
/* One and only one real stream for DV in AVI, and it has video */
View
3  libavformat/ffmdec.c
@@ -246,9 +246,6 @@ static void adjust_write_index(AVFormatContext *s)
ffm->write_index += pos_max;
}
- //printf("Adjusted write index from %"PRId64" to %"PRId64": pts=%0.6f\n", orig_write_index, ffm->write_index, pts / 1000000.);
- //printf("pts range %0.6f - %0.6f\n", get_dts(s, 0) / 1000000. , get_dts(s, ffm->file_size - 2 * FFM_PACKET_SIZE) / 1000000. );
-
end:
avio_seek(pb, ptr, SEEK_SET);
}
View
3  libavformat/flvenc.c
@@ -446,9 +446,6 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt)
uint8_t *data = NULL;
int flags = -1, flags_size, ret;
- av_dlog(s, "type:%s pts:%"PRId64" dts:%"PRId64" size:%d\n",
- av_get_media_type_string(enc->codec_type), pkt->pts, pkt->dts, size);
-
if (enc->codec_id == AV_CODEC_ID_VP6 || enc->codec_id == AV_CODEC_ID_VP6F ||
enc->codec_id == AV_CODEC_ID_VP6A || enc->codec_id == AV_CODEC_ID_AAC)
flags_size = 2;
View
2  libavformat/h263dec.c
@@ -55,8 +55,6 @@ static int h263_probe(AVProbeData *p)
last_gn= gn;
}
}
-//av_log(NULL, AV_LOG_ERROR, "h263_probe: psc:%d invalid:%d res_change:%d\n", valid_psc, invalid_psc, res_change);
-//h263_probe: psc:3 invalid:0 res_change:0 (1588/recent_ffmpeg_parses_mpg_incorrectly.mpg)
if(valid_psc > 2*invalid_psc + 2*res_change + 3){
return 50;
}else if(valid_psc > 2*invalid_psc)
View
1  libavformat/movenc.c
@@ -2196,7 +2196,6 @@ static int mov_write_uuidusmt_tag(AVIOContext *pb, AVFormatContext *s)
mov_write_psp_udta_tag(pb, LIBAVCODEC_IDENT, "eng", 0x04);
mov_write_psp_udta_tag(pb, title->value, "eng", 0x01);
-// snprintf(dt,32,"%04d/%02d/%02d %02d:%02d:%02d",t_st->tm_year+1900,t_st->tm_mon+1,t_st->tm_mday,t_st->tm_hour,t_st->tm_min,t_st->tm_sec);
mov_write_psp_udta_tag(pb, "2006/04/01 11:11:11", "und", 0x03);
update_size(pb, pos2);
View
2  libavformat/mpeg.c
@@ -85,7 +85,6 @@ static int mpegps_probe(AVProbeData *p)
if(vid+audio > invalid+1) /* invalid VDR files nd short PES streams */
score= AVPROBE_SCORE_MAX/4;
-//av_log(NULL, AV_LOG_ERROR, "%d %d %d %d %d %d len:%d\n", sys, priv1, pspack,vid, audio, invalid, p->buf_size);
if(sys>invalid && sys*9 <= pspack*10)
return (audio > 12 || vid > 3 || pspack > 2) ? AVPROBE_SCORE_MAX/2+2 : AVPROBE_SCORE_MAX/4; // +1 for .mpg
if(pspack > invalid && (priv1+vid+audio)*10 >= pspack*9)
@@ -223,7 +222,6 @@ static int mpegps_read_pes_header(AVFormatContext *s,
size = MAX_SYNC_SIZE;
startcode = find_next_start_code(s->pb, &size, &m->header_state);
last_sync = avio_tell(s->pb);
- //printf("startcode=%x pos=0x%"PRIx64"\n", startcode, avio_tell(s->pb));
if (startcode < 0){
if(url_feof(s->pb))
return AVERROR_EOF;
View
9 libavformat/mpegenc.c
@@ -1006,7 +1006,10 @@ static int output_packet(AVFormatContext *ctx, int flush){
}
if(timestamp_packet){
-//av_log(ctx, AV_LOG_DEBUG, "dts:%f pts:%f scr:%f stream:%d\n", timestamp_packet->dts/90000.0, timestamp_packet->pts/90000.0, scr/90000.0, best_i);
+ av_dlog(ctx, "dts:%f pts:%f scr:%f stream:%d\n",
+ timestamp_packet->dts / 90000.0,
+ timestamp_packet->pts / 90000.0,
+ scr / 90000.0, best_i);
es_size= flush_packet(ctx, best_i, timestamp_packet->pts, timestamp_packet->dts, scr, trailer_size);
}else{
assert(av_fifo_size(stream->fifo) == trailer_size);
@@ -1065,7 +1068,9 @@ static int mpeg_mux_write_packet(AVFormatContext *ctx, AVPacket *pkt)
dts += 2*preload;
}
-//av_log(ctx, AV_LOG_DEBUG, "dts:%f pts:%f flags:%d stream:%d nopts:%d\n", dts/90000.0, pts/90000.0, pkt->flags, pkt->stream_index, pts != AV_NOPTS_VALUE);
+ av_dlog(ctx, "dts:%f pts:%f flags:%d stream:%d nopts:%d\n",
+ dts / 90000.0, pts / 90000.0, pkt->flags,
+ pkt->stream_index, pts != AV_NOPTS_VALUE);
if (!stream->premux_packet)
stream->next_packet = &stream->premux_packet;
*stream->next_packet=
View
6 libavformat/mpegts.c
@@ -423,7 +423,8 @@ static int get_packet_size(const uint8_t *buf, int size)
score = analyze(buf, size, TS_PACKET_SIZE, NULL);
dvhs_score = analyze(buf, size, TS_DVHS_PACKET_SIZE, NULL);
fec_score= analyze(buf, size, TS_FEC_PACKET_SIZE, NULL);
-// av_log(NULL, AV_LOG_DEBUG, "score: %d, dvhs_score: %d, fec_score: %d \n", score, dvhs_score, fec_score);
+ av_dlog(NULL, "score: %d, dvhs_score: %d, fec_score: %d \n",
+ score, dvhs_score, fec_score);
if (score > fec_score && score > dvhs_score) return TS_PACKET_SIZE;
else if(dvhs_score > score && dvhs_score > fec_score) return TS_DVHS_PACKET_SIZE;
@@ -1878,7 +1879,8 @@ static int mpegts_probe(AVProbeData *p)
score = analyze(p->buf, TS_PACKET_SIZE *check_count, TS_PACKET_SIZE , NULL)*CHECK_COUNT/check_count;
dvhs_score= analyze(p->buf, TS_DVHS_PACKET_SIZE*check_count, TS_DVHS_PACKET_SIZE, NULL)*CHECK_COUNT/check_count;
fec_score = analyze(p->buf, TS_FEC_PACKET_SIZE *check_count, TS_FEC_PACKET_SIZE , NULL)*CHECK_COUNT/check_count;
-// av_log(NULL, AV_LOG_DEBUG, "score: %d, dvhs_score: %d, fec_score: %d \n", score, dvhs_score, fec_score);
+ av_dlog(NULL, "score: %d, dvhs_score: %d, fec_score: %d \n",
+ score, dvhs_score, fec_score);
// we need a clear definition for the returned score otherwise things will become messy sooner or later
if (score > fec_score && score > dvhs_score && score > 6) return AVPROBE_SCORE_MAX + score - CHECK_COUNT;
View
2