Browse code

libzvbi-teletextdec: use av_dlog where possible

Signed-off-by: Marton Balint <cus@passwd.hu>

Marton Balint authored on 2014/03/02 07:31:04
Showing 1 changed files
... ...
@@ -23,6 +23,7 @@
23 23
 #include "libavutil/opt.h"
24 24
 #include "libavutil/bprint.h"
25 25
 #include "libavutil/intreadwrite.h"
26
+#include "libavutil/log.h"
26 27
 
27 28
 #include <libzvbi.h>
28 29
 
... ...
@@ -272,10 +273,7 @@ static int gen_sub_bitmap(TeletextContext *ctx, AVSubtitleRect *sub_rect, vbi_pa
272 272
         b = VBI_B(page->color_map[ci]);
273 273
         a = VBI_A(page->color_map[ci]);
274 274
         ((uint32_t *)sub_rect->pict.data[1])[ci] = RGBA(r, g, b, a);
275
-#ifdef DEBUG
276
-        av_log(ctx, AV_LOG_DEBUG, "palette %0x\n",
277
-               ((uint32_t *)sub_rect->pict.data[1])[ci]);
278
-#endif
275
+        av_dlog(ctx, "palette %0x\n", ((uint32_t *)sub_rect->pict.data[1])[ci]);
279 276
     }
280 277
     ((uint32_t *)sub_rect->pict.data[1])[cmax] = RGBA(0, 0, 0, 0);
281 278
     sub_rect->type = SUBTITLE_BITMAP;
... ...
@@ -404,11 +402,8 @@ static int teletext_decode_frame(AVCodecContext *avctx, void *data, int *data_si
404 404
         while (left > 0) {
405 405
             int64_t pts = 0;
406 406
             unsigned int lines = vbi_dvb_demux_cor(ctx->dx, ctx->sliced, 64, &pts, &buf, &left);
407
-#ifdef DEBUG
408
-            av_log(avctx, AV_LOG_DEBUG,
409
-                   "ctx=%p buf_size=%d left=%u lines=%u pts=%f pkt_pts=%f\n",
410
-                   ctx, pkt->size, left, lines, (double)pts/90000.0, (double)pkt->pts/90000.0);
411
-#endif
407
+            av_dlog(avctx, "ctx=%p buf_size=%d left=%u lines=%u pts=%f pkt_pts=%f\n",
408
+                    ctx, pkt->size, left, lines, (double)pts/90000.0, (double)pkt->pts/90000.0);
412 409
             if (lines > 0) {
413 410
 #ifdef DEBUGx
414 411
                 int i;
... ...
@@ -497,9 +492,7 @@ static int teletext_close_decoder(AVCodecContext *avctx)
497 497
 {
498 498
     TeletextContext *ctx = avctx->priv_data;
499 499
 
500
-#ifdef DEBUG
501
-    av_log(avctx, AV_LOG_DEBUG, "lines_total=%u\n", ctx->lines_processed);
502
-#endif
500
+    av_dlog(avctx, "lines_total=%u\n", ctx->lines_processed);
503 501
     while (ctx->nb_pages)
504 502
         subtitle_rect_free(&ctx->pages[--ctx->nb_pages].sub_rect);
505 503
     av_freep(&ctx->pages);