summaryrefslogtreecommitdiff
path: root/libavcodec/dvbsubdec.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2009-07-30 21:00:08 +0000
committerDiego Biurrun <diego@biurrun.de>2009-07-30 21:00:08 +0000
commit8b44de14d1fa363fa7fe18d015ead0017a0177c8 (patch)
treea4ddabf3ea7c9fa492b3448341678aba350af933 /libavcodec/dvbsubdec.c
parent7881793dd0b83bf96ef83c4780da6baeb255406e (diff)
Change av_log() calls surrounded by '#ifdef DEBUG' into dprintf macros.
Originally committed as revision 19550 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/dvbsubdec.c')
-rw-r--r--libavcodec/dvbsubdec.c34
1 files changed, 9 insertions, 25 deletions
diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c
index ac6bd1393f..fb09740c2b 100644
--- a/libavcodec/dvbsubdec.c
+++ b/libavcodec/dvbsubdec.c
@@ -731,10 +731,8 @@ static void dvbsub_parse_pixel_data_block(AVCodecContext *avctx, DVBSubObjectDis
0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff};
uint8_t *map_table;
-#ifdef DEBUG
- av_log(avctx, AV_LOG_INFO, "DVB pixel block size %d, %s field:\n", buf_size,
- top_bottom ? "bottom" : "top");
-#endif
+ dprintf(avctx, "DVB pixel block size %d, %s field:\n", buf_size,
+ top_bottom ? "bottom" : "top");
#ifdef DEBUG_PACKET_CONTENTS
for (i = 0; i < buf_size; i++) {
@@ -968,9 +966,7 @@ static void dvbsub_parse_clut_segment(AVCodecContext *avctx,
YUV_TO_RGB1_CCIR(cb, cr);
YUV_TO_RGB2_CCIR(r, g, b, y);
-#ifdef DEBUG
- av_log(avctx, AV_LOG_INFO, "clut %d := (%d,%d,%d,%d)\n", entry_id, r, g, b, alpha);
-#endif
+ dprintf(avctx, "clut %d := (%d,%d,%d,%d)\n", entry_id, r, g, b, alpha);
if (depth & 0x80)
clut->clut4[entry_id] = RGBA(r,g,b,255 - alpha);
@@ -1046,15 +1042,11 @@ static void dvbsub_parse_region_segment(AVCodecContext *avctx,
region->bgcolor = (((*buf++) >> 2) & 3);
}
-#ifdef DEBUG
- av_log(avctx, AV_LOG_INFO, "Region %d, (%dx%d)\n", region_id, region->width, region->height);
-#endif
+ dprintf(avctx, "Region %d, (%dx%d)\n", region_id, region->width, region->height);
if (fill) {
memset(region->pbuf, region->bgcolor, region->buf_size);
-#ifdef DEBUG
- av_log(avctx, AV_LOG_INFO, "Fill region (%d)\n", region->bgcolor);
-#endif
+ dprintf(avctx, "Fill region (%d)\n", region->bgcolor);
}
delete_region_display_list(ctx, region);
@@ -1115,9 +1107,7 @@ static void dvbsub_parse_page_segment(AVCodecContext *avctx,
ctx->time_out = *buf++;
page_state = ((*buf++) >> 2) & 3;
-#ifdef DEBUG
- av_log(avctx, AV_LOG_INFO, "Page time out %ds, state %d\n", ctx->time_out, page_state);
-#endif
+ dprintf(avctx, "Page time out %ds, state %d\n", ctx->time_out, page_state);
if (page_state == 2) {
delete_state(ctx);
@@ -1155,9 +1145,7 @@ static void dvbsub_parse_page_segment(AVCodecContext *avctx,
ctx->display_list = display;
ctx->display_list_size++;
-#ifdef DEBUG
- av_log(avctx, AV_LOG_INFO, "Region %d, (%d,%d)\n", region_id, display->x_pos, display->y_pos);
-#endif
+ dprintf(avctx, "Region %d, (%d,%d)\n", region_id, display->x_pos, display->y_pos);
}
while (tmp_display_list) {
@@ -1405,10 +1393,8 @@ static int dvbsub_decode(AVCodecContext *avctx,
*data_size = dvbsub_display_end_segment(avctx, p, segment_length, sub);
break;
default:
-#ifdef DEBUG
- av_log(avctx, AV_LOG_INFO, "Subtitling segment type 0x%x, page id %d, length %d\n",
+ dprintf(avctx, "Subtitling segment type 0x%x, page id %d, length %d\n",
segment_type, page_id, segment_length);
-#endif
break;
}
}
@@ -1417,9 +1403,7 @@ static int dvbsub_decode(AVCodecContext *avctx,
}
if (p != p_end) {
-#ifdef DEBUG
- av_log(avctx, AV_LOG_INFO, "Junk at end of packet\n");
-#endif
+ dprintf(avctx, "Junk at end of packet\n");
return -1;
}