Browse code

Use dprintf() instead of '#ifdef DEBUG' and av_log().

Originally committed as revision 19528 to svn://svn.ffmpeg.org/ffmpeg/trunk

Diego Biurrun authored on 2009/07/28 21:50:32
Showing 1 changed files
... ...
@@ -307,9 +307,7 @@ static int rv10_decode_picture_header(MpegEncContext *s)
307 307
     if(!marker) av_log(s->avctx, AV_LOG_ERROR, "marker missing\n");
308 308
     pb_frame = get_bits1(&s->gb);
309 309
 
310
-#ifdef DEBUG
311
-    av_log(s->avctx, AV_LOG_DEBUG, "pict_type=%d pb_frame=%d\n", s->pict_type, pb_frame);
312
-#endif
310
+    dprintf(s->avctx, "pict_type=%d pb_frame=%d\n", s->pict_type, pb_frame);
313 311
 
314 312
     if (pb_frame){
315 313
         av_log(s->avctx, AV_LOG_ERROR, "pb frame not supported\n");
... ...
@@ -328,12 +326,8 @@ static int rv10_decode_picture_header(MpegEncContext *s)
328 328
             s->last_dc[0] = get_bits(&s->gb, 8);
329 329
             s->last_dc[1] = get_bits(&s->gb, 8);
330 330
             s->last_dc[2] = get_bits(&s->gb, 8);
331
-#ifdef DEBUG
332
-            av_log(s->avctx, AV_LOG_DEBUG, "DC:%d %d %d\n",
333
-                   s->last_dc[0],
334
-                   s->last_dc[1],
335
-                   s->last_dc[2]);
336
-#endif
331
+            dprintf(s->avctx, "DC:%d %d %d\n", s->last_dc[0],
332
+                    s->last_dc[1], s->last_dc[2]);
337 333
         }
338 334
     }
339 335
     /* if multiple packets per frame are sent, the position at which
... ...
@@ -630,9 +624,7 @@ static int rv10_decode_packet(AVCodecContext *avctx,
630 630
         ff_er_frame_start(s);
631 631
     }
632 632
 
633
-#ifdef DEBUG
634
-    av_log(avctx, AV_LOG_DEBUG, "qscale=%d\n", s->qscale);
635
-#endif
633
+    dprintf(avctx, "qscale=%d\n", s->qscale);
636 634
 
637 635
     /* default quantization values */
638 636
     if(s->codec_id== CODEC_ID_RV10){
... ...
@@ -672,9 +664,7 @@ static int rv10_decode_packet(AVCodecContext *avctx,
672 672
     for(s->mb_num_left= mb_count; s->mb_num_left>0; s->mb_num_left--) {
673 673
         int ret;
674 674
         ff_update_block_index(s);
675
-#ifdef DEBUG
676
-        av_log(avctx, AV_LOG_DEBUG, "**mb x=%d y=%d\n", s->mb_x, s->mb_y);
677
-#endif
675
+        dprintf(avctx, "**mb x=%d y=%d\n", s->mb_x, s->mb_y);
678 676
 
679 677
         s->mv_dir = MV_DIR_FORWARD;
680 678
         s->mv_type = MV_TYPE_16X16;
... ...
@@ -723,9 +713,7 @@ static int rv10_decode_frame(AVCodecContext *avctx,
723 723
     int slice_count;
724 724
     const uint8_t *slices_hdr = NULL;
725 725
 
726
-#ifdef DEBUG
727
-    av_log(avctx, AV_LOG_DEBUG, "*****frame %d size=%d\n", avctx->frame_number, buf_size);
728
-#endif
726
+    dprintf(avctx, "*****frame %d size=%d\n", avctx->frame_number, buf_size);
729 727
 
730 728
     /* no supplementary picture */
731 729
     if (buf_size == 0) {