[libav-commits] avcodec: Drop silly and/or broken printf debug output

Diego Biurrun git at libav.org
Mon Oct 1 10:31:06 CEST 2012


Module: libav
Branch: master
Commit: 9c6cf7f2c9d326281e3eefa67673aabaa9d69940

Author:    Diego Biurrun <diego at biurrun.de>
Committer: Diego Biurrun <diego at biurrun.de>
Date:      Tue Sep 25 18:28:44 2012 +0200

avcodec: Drop silly and/or broken printf debug output

---

 avserver.c                       |    2 --
 libavcodec/error_resilience.c    |    4 ----
 libavcodec/ffv1.c                |    7 +------
 libavcodec/h263dec.c             |    2 --
 libavcodec/h264.c                |    3 ---
 libavcodec/h264_loopfilter.c     |    4 ----
 libavcodec/h264_parser.c         |    1 -
 libavcodec/ljpegenc.c            |    1 -
 libavcodec/mjpegdec.c            |    9 ---------
 libavcodec/mjpegenc.c            |    1 -
 libavcodec/motion_est.c          |   10 ----------
 libavcodec/motion_est_template.c |   14 ++------------
 libavcodec/mpegvideo_enc.c       |    7 -------
 libavcodec/msmpeg4.c             |    7 +------
 libavcodec/msmpeg4enc.c          |    3 ---
 libavcodec/put_bits.h            |    3 ---
 libavcodec/ratecontrol.c         |   12 ------------
 libavcodec/utils.c               |    1 -
 libavcodec/wmadec.c              |    1 -
 libavcodec/wmv2dec.c             |    4 ----
 libavcodec/x86/mpegvideo.c       |    4 ++--
 21 files changed, 6 insertions(+), 94 deletions(-)

diff --git a/avserver.c b/avserver.c
index 6d103bb..94ea0a0 100644
--- a/avserver.c
+++ b/avserver.c
@@ -2663,8 +2663,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) {
diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c
index 53e8bf9..ae9ef68 100644
--- a/libavcodec/error_resilience.c
+++ b/libavcodec/error_resilience.c
@@ -699,8 +699,6 @@ skip_last_mv:
                         fixed[mb_xy] = MV_UNCHANGED;
                 }
             }
-
-            // printf(".%d/%d", changed, score_sum); fflush(stdout);
         }
 
         if (none_left)
@@ -711,7 +709,6 @@ skip_last_mv:
             if (fixed[mb_xy])
                 fixed[mb_xy] = MV_FROZEN;
         }
-        // printf(":"); fflush(stdout);
     }
 }
 
@@ -789,7 +786,6 @@ static int is_intra_more_likely(MpegEncContext *s)
             }
         }
     }
-    // printf("is_intra_likely: %d type:%d\n", is_intra_likely, s->pict_type);
     return is_intra_likely > 0;
 }
 
diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c
index 51ead47..b1358b8 100644
--- a/libavcodec/ffv1.c
+++ b/libavcodec/ffv1.c
@@ -383,7 +383,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;
@@ -432,7 +431,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;
 }
 
@@ -1117,7 +1116,6 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
 
     if(!f->ac){
         used_count += ff_rac_terminate(c);
-//printf("pos=%d\n", used_count);
         init_put_bits(&f->slice_context[0]->pb, pkt->data + used_count, pkt->size - used_count);
     }else if (f->ac>1){
         int i;
@@ -1432,8 +1430,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");
         }
     }
 
@@ -1704,7 +1700,6 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
     if(!f->ac){
         bytes_read = c->bytestream - c->bytestream_start - 1;
         if(bytes_read ==0) av_log(avctx, AV_LOG_ERROR, "error at end of AC stream\n"); //FIXME
-//printf("pos=%d\n", bytes_read);
         init_get_bits(&f->slice_context[0]->gb, buf + bytes_read, (buf_size - bytes_read) * 8);
     } else {
         bytes_read = 0; /* avoid warning */
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index ba7fb8a..1231f29 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -228,7 +228,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--;
@@ -510,7 +509,6 @@ retry:
 
         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;
 
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 5de7f10..068c57a 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -235,7 +235,6 @@ const uint8_t *ff_h264_decode_nal(H264Context *h, const uint8_t *src,
     if (dst == NULL)
         return NULL;
 
-    // printf("decoding esc\n");
     memcpy(dst, src, i);
     si = di = i;
     while (si + 2 < length) {
@@ -2134,7 +2133,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)
@@ -4049,7 +4047,6 @@ out:
 
     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);
 }
diff --git a/libavcodec/h264_loopfilter.c b/libavcodec/h264_loopfilter.c
index be750ca..b045d23 100644
--- a/libavcodec/h264_loopfilter.c
+++ b/libavcodec/h264_loopfilter.c
@@ -583,9 +583,7 @@ static av_always_inline void filter_mb_dir(H264Context *h, int mb_x, int mb_y, u
             // value in IPCM macroblocks.
             if(bS[0]+bS[1]+bS[2]+bS[3]){
                 qp = (s->current_picture.f.qscale_table[mb_xy] + s->current_picture.f.qscale_table[mbm_xy] + 1) >> 1;
-                //tprintf(s->avctx, "filter mb:%d/%d dir:%d edge:%d, QPy:%d, QPc:%d, QPcn:%d\n", mb_x, mb_y, dir, edge, qp, h->chroma_qp[0], s->current_picture.qscale_table[mbn_xy]);
                 tprintf(s->avctx, "filter mb:%d/%d dir:%d edge:%d, QPy:%d ls:%d uvls:%d", mb_x, mb_y, dir, edge, qp, linesize, uvlinesize);
-                //{ int i; for (i = 0; i < 4; i++) tprintf(s->avctx, " bS[%d]:%d", i, bS[i]); tprintf(s->avctx, "\n"); }
                 chroma_qp_avg[0] = (h->chroma_qp[0] + get_chroma_qp(h, 0, s->current_picture.f.qscale_table[mbm_xy]) + 1) >> 1;
                 chroma_qp_avg[1] = (h->chroma_qp[1] + get_chroma_qp(h, 1, s->current_picture.f.qscale_table[mbm_xy]) + 1) >> 1;
                 if( dir == 0 ) {
@@ -668,9 +666,7 @@ static av_always_inline void filter_mb_dir(H264Context *h, int mb_x, int mb_y, u
         // Do not use s->qscale as luma quantizer because it has not the same
         // value in IPCM macroblocks.
         qp = s->current_picture.f.qscale_table[mb_xy];
-        //tprintf(s->avctx, "filter mb:%d/%d dir:%d edge:%d, QPy:%d, QPc:%d, QPcn:%d\n", mb_x, mb_y, dir, edge, qp, h->chroma_qp[0], s->current_picture.qscale_table[mbn_xy]);
         tprintf(s->avctx, "filter mb:%d/%d dir:%d edge:%d, QPy:%d ls:%d uvls:%d", mb_x, mb_y, dir, edge, qp, linesize, uvlinesize);
-        //{ int i; for (i = 0; i < 4; i++) tprintf(s->avctx, " bS[%d]:%d", i, bS[i]); tprintf(s->avctx, "\n"); }
         if( dir == 0 ) {
             filter_mb_edgev( &img_y[4*edge << h->pixel_shift], linesize, bS, qp, a, b, h, 0 );
             if (chroma) {
diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c
index 1ad8e49..0464476 100644
--- a/libavcodec/h264_parser.c
+++ b/libavcodec/h264_parser.c
@@ -37,7 +37,6 @@ static int ff_h264_find_frame_end(H264Context *h, const uint8_t *buf, int buf_si
     int i;
     uint32_t state;
     ParseContext *pc = &(h->s.parse_context);
-//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)
diff --git a/libavcodec/ljpegenc.c b/libavcodec/ljpegenc.c
index 41db067..331ec5c 100644
--- a/libavcodec/ljpegenc.c
+++ b/libavcodec/ljpegenc.c
@@ -174,7 +174,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)
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 72c9cfa..7217f4f 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -1178,8 +1178,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);
         if (i == 2)
             s->bottom_field = 1;
@@ -1191,8 +1189,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;
     }
 
@@ -1314,8 +1310,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 > 20 && !strncmp(cbuf, "Intel(R) JPEG Library", 21)) ||
@@ -1605,9 +1599,6 @@ eoi_parser:
                 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;
             }
 
 not_the_end:
diff --git a/libavcodec/mjpegenc.c b/libavcodec/mjpegenc.c
index f976e28..ebe8993 100644
--- a/libavcodec/mjpegenc.c
+++ b/libavcodec/mjpegenc.c
@@ -320,7 +320,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--;
         }
diff --git a/libavcodec/motion_est.c b/libavcodec/motion_est.c
index 12e1257..f34a347 100644
--- a/libavcodec/motion_est.c
+++ b/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];
 
@@ -1314,7 +1312,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;
@@ -1837,15 +1834,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;
     }
@@ -1865,7 +1856,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;
 
diff --git a/libavcodec/motion_est_template.c b/libavcodec/motion_est_template.c
index 136d8b8..7228744 100644
--- a/libavcodec/motion_est_template.c
+++ b/libavcodec/motion_est_template.c
@@ -367,13 +367,11 @@ static int qpel_motion_search(MpegEncContext * s,
     assert((x) <= xmax);\
     assert((y) >= ymin);\
     assert((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)\
     }\
 }
@@ -391,13 +389,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;\
@@ -448,7 +444,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)
@@ -660,13 +655,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;\
             \
@@ -974,7 +967,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;
 }
 
@@ -1020,7 +1012,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)
@@ -1050,7 +1042,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;
 }
 
@@ -1080,7 +1071,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)
@@ -1110,6 +1101,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;
 }
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 4bf4471..31ba122 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -1397,7 +1397,6 @@ no_output_pic:
         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));
     }
@@ -1444,8 +1443,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)
@@ -2396,7 +2393,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();
 
@@ -2446,7 +2442,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;
 
@@ -2918,7 +2913,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;
@@ -3088,7 +3082,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;
 }
diff --git a/libavcodec/msmpeg4.c b/libavcodec/msmpeg4.c
index c4ef22e..2755aa2 100644
--- a/libavcodec/msmpeg4.c
+++ b/libavcodec/msmpeg4.c
@@ -543,7 +543,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;
@@ -858,8 +857,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)
     {
@@ -1043,7 +1040,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);
@@ -1056,7 +1052,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);
@@ -1182,7 +1178,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 {
diff --git a/libavcodec/msmpeg4enc.c b/libavcodec/msmpeg4enc.c
index 67490b5..e6951e8 100644
--- a/libavcodec/msmpeg4enc.c
+++ b/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);
diff --git a/libavcodec/put_bits.h b/libavcodec/put_bits.h
index f19a7c6..f32b7fd 100644
--- a/libavcodec/put_bits.h
+++ b/libavcodec/put_bits.h
@@ -130,13 +130,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);
     assert(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);
@@ -155,7 +153,6 @@ static inline void put_bits(PutBitContext *s, int n, unsigned int value)
         bit_buf<<=bit_left;
         bit_buf |= value >> (n - bit_left);
         AV_WB32(s->buf_ptr, bit_buf);
-        //printf("bitbuf = %08x\n", bit_buf);
         s->buf_ptr+=4;
         bit_left+=32 - n;
         bit_buf = value;
diff --git a/libavcodec/ratecontrol.c b/libavcodec/ratecontrol.c
index de32da2..0772a91 100644
--- a/libavcodec/ratecontrol.c
+++ b/libavcodec/ratecontrol.c
@@ -444,7 +444,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;
@@ -623,8 +622,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;
     }
 }
@@ -669,7 +666,6 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run)
     get_qminmax(&qmin, &qmax, s, pict_type);
 
     fps= 1/av_q2d(s->avctx->time_base);
-//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;
@@ -692,9 +688,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, "%Ld %Ld %Ld %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
@@ -750,9 +743,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
@@ -761,9 +752,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);
 
@@ -888,7 +877,6 @@ 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;
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 7c02d33..a72c434 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -551,7 +551,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 "
diff --git a/libavcodec/wmadec.c b/libavcodec/wmadec.c
index db5900e..78ada71 100644
--- a/libavcodec/wmadec.c
+++ b/libavcodec/wmadec.c
@@ -851,7 +851,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)
diff --git a/libavcodec/wmv2dec.c b/libavcodec/wmv2dec.c
index b23ebf0..106e91b 100644
--- a/libavcodec/wmv2dec.c
+++ b/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){
diff --git a/libavcodec/x86/mpegvideo.c b/libavcodec/x86/mpegvideo.c
index 077031a..3bc93f3 100644
--- a/libavcodec/x86/mpegvideo.c
+++ b/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"



More information about the libav-commits mailing list