[FFmpeg-soc] [soc]: r3872 - in dirac/libavcodec: dirac.c diracdec.c
conrad
subversion at mplayerhq.hu
Sat Dec 6 03:01:01 CET 2008
Author: conrad
Date: Sat Dec 6 03:01:01 2008
New Revision: 3872
Log:
Remove some debugging code
Modified:
dirac/libavcodec/dirac.c
dirac/libavcodec/diracdec.c
Modified: dirac/libavcodec/dirac.c
==============================================================================
--- dirac/libavcodec/dirac.c (original)
+++ dirac/libavcodec/dirac.c Sat Dec 6 03:01:01 2008
@@ -25,8 +25,6 @@
* @author Marco Gerards <marco at gnu.org>
*/
-#define DEBUG 1
-
#include "dirac.h"
#include "avcodec.h"
#include "dsputil.h"
@@ -130,49 +128,6 @@ static const uint8_t eighthpel_weights[]
};
/**
- * Dump the source parameters. DEBUG needs to be defined.
- */
-void dirac_dump_source_parameters(AVCodecContext *avctx)
-{
- DiracContext *s = avctx->priv_data;
- dirac_source_params *source = &s->source;
-
- dprintf(avctx, "-----------------------------------------------------\n");
- dprintf(avctx, " Dumping source parameters:\n");
- dprintf(avctx, "-----------------------------------------------------\n");
-
- dprintf(avctx, "Luma size=%dx%d chroma format %d\n",
- source->width, source->height, source->chroma_format);
-
- if (! source->interlaced)
- dprintf(avctx, "No interlacing\n");
- else
- dprintf(avctx, "Interlacing: top fields first=%d\n",
- source->top_field_first);
-
- dprintf(avctx, "Frame rate: %d/%d\n",
- avctx->time_base.den, avctx->time_base.num);
- dprintf(avctx, "Aspect ratio: %d/%d\n",
- avctx->sample_aspect_ratio.num, avctx->sample_aspect_ratio.den);
-
- dprintf(avctx, "Clean space: loff=%d, roff=%d, size=%dx%d\n",
- source->clean_left_offset, source->clean_right_offset,
- source->clean_width, source->clean_height);
-
- dprintf(avctx, "Luma offset=%d, Luma excursion=%d\n",
- source->pixel_range.luma_offset,
- source->pixel_range.luma_excursion);
- dprintf(avctx, "Croma offset=%d, Chroma excursion=%d\n",
- source->pixel_range.chroma_offset,
- source->pixel_range.chroma_excursion);
- dprintf(avctx, "Color spec: Primary %d Matrix %d Transfer %d\n",
- source->color_spec.primaries, source->color_spec.matrix,
- source->color_spec.transfer_function);
-
- dprintf(avctx, "-----------------------------------------------------\n");
-}
-
-/**
* Parse the source parameters in the sequence header.
*/
static int parse_source_parameters(GetBitContext *gb, AVCodecContext *avctx,
@@ -327,13 +282,8 @@ int ff_dirac_parse_sequence_header(GetBi
avctx->profile = svq3_get_ue_golomb(gb);
avctx->level = svq3_get_ue_golomb(gb);
- av_log(avctx, AV_LOG_DEBUG, "Sequence header: Version %d.%d\n",
- version_major, version_minor);
- av_log(avctx, AV_LOG_DEBUG, " Profile: %d, Level: %d\n",
- avctx->profile, avctx->level);
video_format = svq3_get_ue_golomb(gb);
- av_log(avctx, AV_LOG_DEBUG, " Video format: %d\n", video_format);
if (video_format > 20)
return -1;
Modified: dirac/libavcodec/diracdec.c
==============================================================================
--- dirac/libavcodec/diracdec.c (original)
+++ dirac/libavcodec/diracdec.c Sat Dec 6 03:01:01 2008
@@ -37,7 +37,6 @@
static int decode_init(AVCodecContext *avctx)
{
- av_log_set_level(AV_LOG_DEBUG);
return 0;
}
@@ -698,40 +697,6 @@ static int dirac_decode_frame_internal(D
return 0;
}
-static const char *wavelet_names[] = {
- "Deslauriers-Dubuc (9,7)", "LeGall (5,3)", "Deslauriers-Dubuc (13,7)",
- "Haar", "Haar with shift", "Fidelity", "Daubechies (9,7)"
-};
-static const char *mv_precision_name[] = { "fullpel", "hpel", "qpel", "eighthpel" };
-
-static void dump_frame_params(AVCodecContext *avctx)
-{
- DiracContext *s = avctx->priv_data;
-
- dprintf(avctx, "\tFrame: display num %d\n", (int)s->picnum);
- if (s->refs) {
- dprintf(avctx, "\tRef 1 = %d\n", s->ref[0]);
- if (s->refs == 2)
- dprintf(avctx, "\tRef 2 = %d\n", s->ref[1]);
- dprintf(avctx, "\tRefs weight precision: %d 1: %d 2: %d\n",
- s->decoding.picture_weight_precision,
- s->decoding.picture_weight_ref1,
- s->decoding.picture_weight_ref2);
- dprintf(avctx, "\t%s ", mv_precision_name[s->decoding.mv_precision]);
- dprintf(avctx, "block seperation %dx%d ",
- s->decoding.xbsep[0], s->decoding.ybsep[0]);
- dprintf(avctx, "length %dx%d\n",
- s->decoding.xblen[0], s->decoding.yblen[0]);
- }
- if (s->zero_res)
- dprintf(avctx, "\tNo residual\n");
- else {
- dprintf(avctx, "\tWavelet %s, depth %d\n", wavelet_names[s->wavelet_idx],
- s->decoding.wavelet_depth);
- dprintf(avctx, "\tCodeblock mode %d\n", s->codeblock_mode);
- }
-}
-
/**
* Parse a frame and setup DiracContext to decode it
*
@@ -849,9 +814,6 @@ int dirac_decode_frame(AVCodecContext *a
if (data_unit_size > buf_size - buf_read)
return -1;
- dprintf(avctx, "Decoding frame: size=%d head=%c%c%c%c parse=%02x\n",
- data_unit_size, buf[0], buf[1], buf[2], buf[3], buf[4]);
-
init_get_bits(&s->gb, &buf[13], (data_unit_size - 13) * 8);
s->avctx = avctx;
@@ -861,8 +823,6 @@ int dirac_decode_frame(AVCodecContext *a
avcodec_get_chroma_sub_sample(avctx->pix_fmt, &s->chroma_hshift,
&s->chroma_vshift);
- /* Dump the header. */
- dirac_dump_source_parameters(avctx);
} else if (parse_code & 0x8)
// we found a picture
@@ -881,7 +841,6 @@ int dirac_decode_frame(AVCodecContext *a
if (parse_frame(s) < 0)
return -1;
- dump_frame_params(avctx);
if (s->picture.data[0] != NULL)
avctx->release_buffer(avctx, &s->picture);
@@ -891,15 +850,6 @@ int dirac_decode_frame(AVCodecContext *a
return -1;
}
-#if 0
- for (i = 0; i < s->refcnt; i++)
- dprintf(avctx, "Reference frame #%d\n",
- s->refframes[i].frame.display_picture_number);
-
- for (i = 0; i < s->refs; i++)
- dprintf(avctx, "Reference frame %d: #%d\n", i, s->ref[i]);
-#endif
-
if (dirac_decode_frame_internal(s))
return -1;
More information about the FFmpeg-soc
mailing list