summaryrefslogtreecommitdiff
path: root/libavcodec/dvbsubdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-06-08 03:56:36 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-06-08 05:25:28 +0200
commitd552f616a26623e5b593e4d3474c61563f3939fd (patch)
treef5f3791b58abe6ea8895709b7d2be272afc493ab /libavcodec/dvbsubdec.c
parent7d89f7cbf3ccd98f9a5f58db97effa9afd2d571a (diff)
parentac4a8548110bc180cb67bea6eaf8b8e1081370cf (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: (28 commits) Remove some non-compiling debug messages. ffplay: Fix non-compiling debug printf and replace it by av_dlog. H264: x86 predict init cosmetics. ac3enc: Fix linking of AC-3 encoder without the E-AC-3 encoder. Move E-AC-3 encoder functions to a separate eac3enc.c file. ac3enc: remove convenience macro, #define DEBUG ac3enc: remove unused #define vc1: re-initialize tables after width/height change. APIchanges: fill-in git commit hash for av_get_bytes_per_sample() addition samplefmt: add av_get_bytes_per_sample() iirfilter: fix biquad filter coefficients. swscale: remove duplicate conversion routine in swScale(). swscale: add yuv2planar/packed function typedefs. swscale: integrate yuv2nv12X_C into yuv2yuvX() function pointers. swscale: reindent x86 init code. swscale: extract SWS_FULL_CHR_H_INT conditional into init code. swscale: cosmetics. swscale: remove alp/chr/lumSrcOffset. swscale: un-special-case yuv2yuvX16_c(). shorten: Remove stray DEBUG #define and corresponding av_dlog statement. ... Conflicts: doc/APIchanges libavcodec/ac3enc.c libavutil/avutil.h libavutil/samplefmt.c libswscale/swscale.c libswscale/swscale_internal.h libswscale/x86/swscale_template.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dvbsubdec.c')
-rw-r--r--libavcodec/dvbsubdec.c48
1 files changed, 16 insertions, 32 deletions
diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c
index cd2b53decf..d6acd5646e 100644
--- a/libavcodec/dvbsubdec.c
+++ b/libavcodec/dvbsubdec.c
@@ -24,10 +24,6 @@
#include "bytestream.h"
#include "libavutil/colorspace.h"
-//#define DEBUG
-//#define DEBUG_PACKET_CONTENTS
-//#define DEBUG_SAVE_IMAGES
-
#define DVBSUB_PAGE_SEGMENT 0x10
#define DVBSUB_REGION_SEGMENT 0x11
#define DVBSUB_CLUT_SEGMENT 0x12
@@ -37,7 +33,7 @@
#define cm (ff_cropTbl + MAX_NEG_CROP)
-#ifdef DEBUG_SAVE_IMAGES
+#ifdef DEBUG
#undef fprintf
#if 0
static void png_save(const char *filename, uint8_t *bitmap, int w, int h,
@@ -768,20 +764,17 @@ static void dvbsub_parse_pixel_data_block(AVCodecContext *avctx, DVBSubObjectDis
av_dlog(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++) {
if (i % 16 == 0)
- av_log(avctx, AV_LOG_INFO, "0x%08p: ", buf+i);
+ av_dlog(avctx, "0x%8p: ", buf+i);
- av_log(avctx, AV_LOG_INFO, "%02x ", buf[i]);
+ av_dlog(avctx, "%02x ", buf[i]);
if (i % 16 == 15)
- av_log(avctx, AV_LOG_INFO, "\n");
+ av_dlog(avctx, "\n");
}
if (i % 16)
- av_log(avctx, AV_LOG_INFO, "\n");
-
-#endif
+ av_dlog(avctx, "\n");
if (region == 0)
return;
@@ -930,27 +923,22 @@ static void dvbsub_parse_clut_segment(AVCodecContext *avctx,
DVBSubContext *ctx = avctx->priv_data;
const uint8_t *buf_end = buf + buf_size;
- int clut_id;
+ int i, clut_id;
DVBSubCLUT *clut;
int entry_id, depth , full_range;
int y, cr, cb, alpha;
int r, g, b, r_add, g_add, b_add;
-#ifdef DEBUG_PACKET_CONTENTS
- int i;
-
- av_log(avctx, AV_LOG_INFO, "DVB clut packet:\n");
+ av_dlog(avctx, "DVB clut packet:\n");
for (i=0; i < buf_size; i++) {
- av_log(avctx, AV_LOG_INFO, "%02x ", buf[i]);
+ av_dlog(avctx, "%02x ", buf[i]);
if (i % 16 == 15)
- av_log(avctx, AV_LOG_INFO, "\n");
+ av_dlog(avctx, "\n");
}
if (i % 16)
- av_log(avctx, AV_LOG_INFO, "\n");
-
-#endif
+ av_dlog(avctx, "\n");
clut_id = *buf++;
buf += 1;
@@ -1194,7 +1182,7 @@ static void dvbsub_parse_page_segment(AVCodecContext *avctx,
}
-#ifdef DEBUG_SAVE_IMAGES
+#ifdef DEBUG
static void save_display_set(DVBSubContext *ctx)
{
DVBSubRegion *region;
@@ -1404,7 +1392,7 @@ static int dvbsub_display_end_segment(AVCodecContext *avctx, const uint8_t *buf,
sub->num_rects = i;
-#ifdef DEBUG_SAVE_IMAGES
+#ifdef DEBUG
save_display_set(ctx);
#endif
@@ -1423,22 +1411,18 @@ static int dvbsub_decode(AVCodecContext *avctx,
int segment_type;
int page_id;
int segment_length;
-
-#ifdef DEBUG_PACKET_CONTENTS
int i;
- av_log(avctx, AV_LOG_INFO, "DVB sub packet:\n");
+ av_dlog(avctx, "DVB sub packet:\n");
for (i=0; i < buf_size; i++) {
- av_log(avctx, AV_LOG_INFO, "%02x ", buf[i]);
+ av_dlog(avctx, "%02x ", buf[i]);
if (i % 16 == 15)
- av_log(avctx, AV_LOG_INFO, "\n");
+ av_dlog(avctx, "\n");
}
if (i % 16)
- av_log(avctx, AV_LOG_INFO, "\n");
-
-#endif
+ av_dlog(avctx, "\n");
if (buf_size <= 6 || *buf != 0x0f) {
av_dlog(avctx, "incomplete or broken packet");