Commit 6a85dfc8 authored by Vittorio Giovara's avatar Vittorio Giovara

lavc: Replace av_dlog and tprintf with internal macros

parent 1a3eb042
......@@ -862,10 +862,10 @@ static int decode_audio_specific_config(AACContext *ac,
GetBitContext gb;
int i, ret;
av_dlog(avctx, "extradata size %d\n", avctx->extradata_size);
ff_dlog(avctx, "extradata size %d\n", avctx->extradata_size);
for (i = 0; i < avctx->extradata_size; i++)
av_dlog(avctx, "%02x ", avctx->extradata[i]);
av_dlog(avctx, "\n");
ff_dlog(avctx, "%02x ", avctx->extradata[i]);
ff_dlog(avctx, "\n");
if ((ret = init_get_bits(&gb, data, bit_size)) < 0)
return ret;
......@@ -912,7 +912,7 @@ static int decode_audio_specific_config(AACContext *ac,
return AVERROR(ENOSYS);
}
av_dlog(avctx,
ff_dlog(avctx,
"AOT %d chan config %d sampling index %d (%d) SBR %d PS %d\n",
m4ac->object_type, m4ac->chan_config, m4ac->sampling_index,
m4ac->sample_rate, m4ac->sbr,
......
......@@ -1690,43 +1690,43 @@ static void dprint_options(AC3EncodeContext *s)
case 16: av_strlcpy(strbuf, "E-AC-3 (enhanced)", 32); break;
default: snprintf(strbuf, 32, "ERROR");
}
av_dlog(avctx, "bitstream_id: %s (%d)\n", strbuf, s->bitstream_id);
av_dlog(avctx, "sample_fmt: %s\n", av_get_sample_fmt_name(avctx->sample_fmt));
ff_dlog(avctx, "bitstream_id: %s (%d)\n", strbuf, s->bitstream_id);
ff_dlog(avctx, "sample_fmt: %s\n", av_get_sample_fmt_name(avctx->sample_fmt));
av_get_channel_layout_string(strbuf, 32, s->channels, avctx->channel_layout);
av_dlog(avctx, "channel_layout: %s\n", strbuf);
av_dlog(avctx, "sample_rate: %d\n", s->sample_rate);
av_dlog(avctx, "bit_rate: %d\n", s->bit_rate);
av_dlog(avctx, "blocks/frame: %d (code=%d)\n", s->num_blocks, s->num_blks_code);
ff_dlog(avctx, "channel_layout: %s\n", strbuf);
ff_dlog(avctx, "sample_rate: %d\n", s->sample_rate);
ff_dlog(avctx, "bit_rate: %d\n", s->bit_rate);
ff_dlog(avctx, "blocks/frame: %d (code=%d)\n", s->num_blocks, s->num_blks_code);
if (s->cutoff)
av_dlog(avctx, "cutoff: %d\n", s->cutoff);
ff_dlog(avctx, "cutoff: %d\n", s->cutoff);
av_dlog(avctx, "per_frame_metadata: %s\n",
ff_dlog(avctx, "per_frame_metadata: %s\n",
opt->allow_per_frame_metadata?"on":"off");
if (s->has_center)
av_dlog(avctx, "center_mixlev: %0.3f (%d)\n", opt->center_mix_level,
ff_dlog(avctx, "center_mixlev: %0.3f (%d)\n", opt->center_mix_level,
s->center_mix_level);
else
av_dlog(avctx, "center_mixlev: {not written}\n");
ff_dlog(avctx, "center_mixlev: {not written}\n");
if (s->has_surround)
av_dlog(avctx, "surround_mixlev: %0.3f (%d)\n", opt->surround_mix_level,
ff_dlog(avctx, "surround_mixlev: %0.3f (%d)\n", opt->surround_mix_level,
s->surround_mix_level);
else
av_dlog(avctx, "surround_mixlev: {not written}\n");
ff_dlog(avctx, "surround_mixlev: {not written}\n");
if (opt->audio_production_info) {
av_dlog(avctx, "mixing_level: %ddB\n", opt->mixing_level);
ff_dlog(avctx, "mixing_level: %ddB\n", opt->mixing_level);
switch (opt->room_type) {
case AC3ENC_OPT_NOT_INDICATED: av_strlcpy(strbuf, "notindicated", 32); break;
case AC3ENC_OPT_LARGE_ROOM: av_strlcpy(strbuf, "large", 32); break;
case AC3ENC_OPT_SMALL_ROOM: av_strlcpy(strbuf, "small", 32); break;
default: snprintf(strbuf, 32, "ERROR (%d)", opt->room_type);
}
av_dlog(avctx, "room_type: %s\n", strbuf);
ff_dlog(avctx, "room_type: %s\n", strbuf);
} else {
av_dlog(avctx, "mixing_level: {not written}\n");
av_dlog(avctx, "room_type: {not written}\n");
ff_dlog(avctx, "mixing_level: {not written}\n");
ff_dlog(avctx, "room_type: {not written}\n");
}
av_dlog(avctx, "copyright: %s\n", opt->copyright?"on":"off");
av_dlog(avctx, "dialnorm: %ddB\n", opt->dialogue_level);
ff_dlog(avctx, "copyright: %s\n", opt->copyright?"on":"off");
ff_dlog(avctx, "dialnorm: %ddB\n", opt->dialogue_level);
if (s->channel_mode == AC3_CHMODE_STEREO) {
switch (opt->dolby_surround_mode) {
case AC3ENC_OPT_NOT_INDICATED: av_strlcpy(strbuf, "notindicated", 32); break;
......@@ -1734,11 +1734,11 @@ static void dprint_options(AC3EncodeContext *s)
case AC3ENC_OPT_MODE_OFF: av_strlcpy(strbuf, "off", 32); break;
default: snprintf(strbuf, 32, "ERROR (%d)", opt->dolby_surround_mode);
}
av_dlog(avctx, "dsur_mode: %s\n", strbuf);
ff_dlog(avctx, "dsur_mode: %s\n", strbuf);
} else {
av_dlog(avctx, "dsur_mode: {not written}\n");
ff_dlog(avctx, "dsur_mode: {not written}\n");
}
av_dlog(avctx, "original: %s\n", opt->original?"on":"off");
ff_dlog(avctx, "original: %s\n", opt->original?"on":"off");
if (s->bitstream_id == 6) {
if (opt->extended_bsi_1) {
......@@ -1748,17 +1748,17 @@ static void dprint_options(AC3EncodeContext *s)
case AC3ENC_OPT_DOWNMIX_LORO: av_strlcpy(strbuf, "loro", 32); break;
default: snprintf(strbuf, 32, "ERROR (%d)", opt->preferred_stereo_downmix);
}
av_dlog(avctx, "dmix_mode: %s\n", strbuf);
av_dlog(avctx, "ltrt_cmixlev: %0.3f (%d)\n",
ff_dlog(avctx, "dmix_mode: %s\n", strbuf);
ff_dlog(avctx, "ltrt_cmixlev: %0.3f (%d)\n",
opt->ltrt_center_mix_level, s->ltrt_center_mix_level);
av_dlog(avctx, "ltrt_surmixlev: %0.3f (%d)\n",
ff_dlog(avctx, "ltrt_surmixlev: %0.3f (%d)\n",
opt->ltrt_surround_mix_level, s->ltrt_surround_mix_level);
av_dlog(avctx, "loro_cmixlev: %0.3f (%d)\n",
ff_dlog(avctx, "loro_cmixlev: %0.3f (%d)\n",
opt->loro_center_mix_level, s->loro_center_mix_level);
av_dlog(avctx, "loro_surmixlev: %0.3f (%d)\n",
ff_dlog(avctx, "loro_surmixlev: %0.3f (%d)\n",
opt->loro_surround_mix_level, s->loro_surround_mix_level);
} else {
av_dlog(avctx, "extended bitstream info 1: {not written}\n");
ff_dlog(avctx, "extended bitstream info 1: {not written}\n");
}
if (opt->extended_bsi_2) {
switch (opt->dolby_surround_ex_mode) {
......@@ -1767,23 +1767,23 @@ static void dprint_options(AC3EncodeContext *s)
case AC3ENC_OPT_MODE_OFF: av_strlcpy(strbuf, "off", 32); break;
default: snprintf(strbuf, 32, "ERROR (%d)", opt->dolby_surround_ex_mode);
}
av_dlog(avctx, "dsurex_mode: %s\n", strbuf);
ff_dlog(avctx, "dsurex_mode: %s\n", strbuf);
switch (opt->dolby_headphone_mode) {
case AC3ENC_OPT_NOT_INDICATED: av_strlcpy(strbuf, "notindicated", 32); break;
case AC3ENC_OPT_MODE_ON: av_strlcpy(strbuf, "on", 32); break;
case AC3ENC_OPT_MODE_OFF: av_strlcpy(strbuf, "off", 32); break;
default: snprintf(strbuf, 32, "ERROR (%d)", opt->dolby_headphone_mode);
}
av_dlog(avctx, "dheadphone_mode: %s\n", strbuf);
ff_dlog(avctx, "dheadphone_mode: %s\n", strbuf);
switch (opt->ad_converter_type) {
case AC3ENC_OPT_ADCONV_STANDARD: av_strlcpy(strbuf, "standard", 32); break;
case AC3ENC_OPT_ADCONV_HDCD: av_strlcpy(strbuf, "hdcd", 32); break;
default: snprintf(strbuf, 32, "ERROR (%d)", opt->ad_converter_type);
}
av_dlog(avctx, "ad_conv_type: %s\n", strbuf);
ff_dlog(avctx, "ad_conv_type: %s\n", strbuf);
} else {
av_dlog(avctx, "extended bitstream info 2: {not written}\n");
ff_dlog(avctx, "extended bitstream info 2: {not written}\n");
}
}
#endif
......
......@@ -252,24 +252,24 @@ static av_cold void dprint_specific_config(ALSDecContext *ctx)
AVCodecContext *avctx = ctx->avctx;
ALSSpecificConfig *sconf = &ctx->sconf;
av_dlog(avctx, "resolution = %i\n", sconf->resolution);
av_dlog(avctx, "floating = %i\n", sconf->floating);
av_dlog(avctx, "frame_length = %i\n", sconf->frame_length);
av_dlog(avctx, "ra_distance = %i\n", sconf->ra_distance);
av_dlog(avctx, "ra_flag = %i\n", sconf->ra_flag);
av_dlog(avctx, "adapt_order = %i\n", sconf->adapt_order);
av_dlog(avctx, "coef_table = %i\n", sconf->coef_table);
av_dlog(avctx, "long_term_prediction = %i\n", sconf->long_term_prediction);
av_dlog(avctx, "max_order = %i\n", sconf->max_order);
av_dlog(avctx, "block_switching = %i\n", sconf->block_switching);
av_dlog(avctx, "bgmc = %i\n", sconf->bgmc);
av_dlog(avctx, "sb_part = %i\n", sconf->sb_part);
av_dlog(avctx, "joint_stereo = %i\n", sconf->joint_stereo);
av_dlog(avctx, "mc_coding = %i\n", sconf->mc_coding);
av_dlog(avctx, "chan_config = %i\n", sconf->chan_config);
av_dlog(avctx, "chan_sort = %i\n", sconf->chan_sort);
av_dlog(avctx, "RLSLMS = %i\n", sconf->rlslms);
av_dlog(avctx, "chan_config_info = %i\n", sconf->chan_config_info);
ff_dlog(avctx, "resolution = %i\n", sconf->resolution);
ff_dlog(avctx, "floating = %i\n", sconf->floating);
ff_dlog(avctx, "frame_length = %i\n", sconf->frame_length);
ff_dlog(avctx, "ra_distance = %i\n", sconf->ra_distance);
ff_dlog(avctx, "ra_flag = %i\n", sconf->ra_flag);
ff_dlog(avctx, "adapt_order = %i\n", sconf->adapt_order);
ff_dlog(avctx, "coef_table = %i\n", sconf->coef_table);
ff_dlog(avctx, "long_term_prediction = %i\n", sconf->long_term_prediction);
ff_dlog(avctx, "max_order = %i\n", sconf->max_order);
ff_dlog(avctx, "block_switching = %i\n", sconf->block_switching);
ff_dlog(avctx, "bgmc = %i\n", sconf->bgmc);
ff_dlog(avctx, "sb_part = %i\n", sconf->sb_part);
ff_dlog(avctx, "joint_stereo = %i\n", sconf->joint_stereo);
ff_dlog(avctx, "mc_coding = %i\n", sconf->mc_coding);
ff_dlog(avctx, "chan_config = %i\n", sconf->chan_config);
ff_dlog(avctx, "chan_sort = %i\n", sconf->chan_sort);
ff_dlog(avctx, "RLSLMS = %i\n", sconf->rlslms);
ff_dlog(avctx, "chan_config_info = %i\n", sconf->chan_config_info);
#endif
}
......
......@@ -56,12 +56,12 @@ void ff_af_queue_close(AudioFrameQueue *afq)
static void af_queue_log_state(AudioFrameQueue *afq)
{
AudioFrame *f;
av_dlog(afq->avctx, "remaining delay = %d\n", afq->remaining_delay);
av_dlog(afq->avctx, "remaining samples = %d\n", afq->remaining_samples);
av_dlog(afq->avctx, "frames:\n");
ff_dlog(afq->avctx, "remaining delay = %d\n", afq->remaining_delay);
ff_dlog(afq->avctx, "remaining samples = %d\n", afq->remaining_samples);
ff_dlog(afq->avctx, "frames:\n");
f = afq->frame_queue;
while (f) {
av_dlog(afq->avctx, " [ pts=%9"PRId64" duration=%d ]\n",
ff_dlog(afq->avctx, " [ pts=%9"PRId64" duration=%d ]\n",
f->pts, f->duration);
f = f->next;
}
......
......@@ -29,6 +29,7 @@
*/
#include "avcodec.h"
#include "internal.h"
#include "mathops.h"
#include "get_bits.h"
#include "put_bits.h"
......@@ -166,7 +167,7 @@ static int build_table(VLC *vlc, int table_nb_bits, int nb_codes,
table_size = 1 << table_nb_bits;
table_index = alloc_table(vlc, table_size, flags & INIT_VLC_USE_NEW_STATIC);
av_dlog(NULL, "new table index=%d size=%d\n", table_index, table_size);
ff_dlog(NULL, "new table index=%d size=%d\n", table_index, table_size);
if (table_index < 0)
return table_index;
table = &vlc->table[table_index];
......@@ -181,7 +182,7 @@ static int build_table(VLC *vlc, int table_nb_bits, int nb_codes,
n = codes[i].bits;
code = codes[i].code;
symbol = codes[i].symbol;
av_dlog(NULL, "i=%d n=%d code=0x%x\n", i, n, code);
ff_dlog(NULL, "i=%d n=%d code=0x%x\n", i, n, code);
if (n <= table_nb_bits) {
/* no need to add another table */
j = code >> (32 - table_nb_bits);
......@@ -192,7 +193,7 @@ static int build_table(VLC *vlc, int table_nb_bits, int nb_codes,
inc = 1 << n;
}
for (k = 0; k < nb; k++) {
av_dlog(NULL, "%4x: code=%d n=%d\n", j, i, n);
ff_dlog(NULL, "%4x: code=%d n=%d\n", j, i, n);
if (table[j][1] /*bits*/ != 0) {
av_log(NULL, AV_LOG_ERROR, "incorrect codes\n");
return AVERROR_INVALIDDATA;
......@@ -222,7 +223,7 @@ static int build_table(VLC *vlc, int table_nb_bits, int nb_codes,
subtable_bits = FFMIN(subtable_bits, table_nb_bits);
j = (flags & INIT_VLC_LE) ? bitswap_32(code_prefix) >> (32 - table_nb_bits) : code_prefix;
table[j][1] = -subtable_bits;
av_dlog(NULL, "%4x: n=%d (subtable)\n",
ff_dlog(NULL, "%4x: n=%d (subtable)\n",
j, codes[i].bits + table_nb_bits);
index = build_table(vlc, subtable_bits, k-i, codes+i, flags);
if (index < 0)
......@@ -285,7 +286,7 @@ int ff_init_vlc_sparse(VLC *vlc, int nb_bits, int nb_codes,
vlc->table_size = 0;
}
av_dlog(NULL, "build table nb_codes=%d\n", nb_codes);
ff_dlog(NULL, "build table nb_codes=%d\n", nb_codes);
buf = av_malloc((nb_codes + 1) * sizeof(VLCcode));
if (!buf)
......
......@@ -1013,14 +1013,14 @@ static int cook_decode_frame(AVCodecContext *avctx, void *data,
static void dump_cook_context(COOKContext *q)
{
//int i=0;
#define PRINT(a, b) av_dlog(q->avctx, " %s = %d\n", a, b);
av_dlog(q->avctx, "COOKextradata\n");
av_dlog(q->avctx, "cookversion=%x\n", q->subpacket[0].cookversion);
#define PRINT(a, b) ff_dlog(q->avctx, " %s = %d\n", a, b);
ff_dlog(q->avctx, "COOKextradata\n");
ff_dlog(q->avctx, "cookversion=%x\n", q->subpacket[0].cookversion);
if (q->subpacket[0].cookversion > STEREO) {
PRINT("js_subband_start", q->subpacket[0].js_subband_start);
PRINT("js_vlc_bits", q->subpacket[0].js_vlc_bits);
}
av_dlog(q->avctx, "COOKContext\n");
ff_dlog(q->avctx, "COOKContext\n");
PRINT("nb_channels", q->avctx->channels);
PRINT("bit_rate", q->avctx->bit_rate);
PRINT("sample_rate", q->avctx->sample_rate);
......
......@@ -401,7 +401,7 @@ static int dca_subframe_header(DCAContext *s, int base_channel, int block_index)
}
if (s->bitalloc[j][k] > 26) {
av_dlog(s->avctx, "bitalloc index [%i][%i] too big (%i)\n",
ff_dlog(s->avctx, "bitalloc index [%i][%i] too big (%i)\n",
j, k, s->bitalloc[j][k]);
return AVERROR_INVALIDDATA;
}
......@@ -1374,14 +1374,14 @@ FF_ENABLE_DEPRECATION_WARNINGS
s->downmix_coef[i][1] = ff_dca_default_coeffs[am][i][1];
}
}
av_dlog(s->avctx, "Stereo downmix coeffs:\n");
ff_dlog(s->avctx, "Stereo downmix coeffs:\n");
for (i = 0; i < num_core_channels + !!s->lfe; i++) {
av_dlog(s->avctx, "L, input channel %d = %f\n", i,
ff_dlog(s->avctx, "L, input channel %d = %f\n", i,
s->downmix_coef[i][0]);
av_dlog(s->avctx, "R, input channel %d = %f\n", i,
ff_dlog(s->avctx, "R, input channel %d = %f\n", i,
s->downmix_coef[i][1]);
}
av_dlog(s->avctx, "\n");
ff_dlog(s->avctx, "\n");
}
} else {
av_log(avctx, AV_LOG_ERROR, "Non standard configuration %d !\n", s->amode);
......
......@@ -132,7 +132,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame,
ctx->height = AV_RB16(buf + 0x18);
ctx->width = AV_RB16(buf + 0x1a);
av_dlog(ctx->avctx, "width %d, height %d\n", ctx->width, ctx->height);
ff_dlog(ctx->avctx, "width %d, height %d\n", ctx->width, ctx->height);
if (!ctx->bit_depth) {
ff_blockdsp_init(&ctx->bdsp, ctx->avctx);
......@@ -161,7 +161,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame,
}
cid = AV_RB32(buf + 0x28);
av_dlog(ctx->avctx, "compression id %d\n", cid);
ff_dlog(ctx->avctx, "compression id %d\n", cid);
if ((ret = dnxhd_init_vlc(ctx, cid)) < 0)
return ret;
......@@ -184,7 +184,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame,
ctx->mb_width = ctx->width >> 4;
ctx->mb_height = buf[0x16d];
av_dlog(ctx->avctx,
ff_dlog(ctx->avctx,
"mb width %d, mb height %d\n", ctx->mb_width, ctx->mb_height);
if ((ctx->height + 15) >> 4 == ctx->mb_height && frame->interlaced_frame)
......@@ -199,7 +199,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame,
for (i = 0; i < ctx->mb_height; i++) {
ctx->mb_scan_index[i] = AV_RB32(buf + 0x170 + (i << 2));
av_dlog(ctx->avctx, "mb scan index %d\n", ctx->mb_scan_index[i]);
ff_dlog(ctx->avctx, "mb scan index %d\n", ctx->mb_scan_index[i]);
if (buf_size < ctx->mb_scan_index[i] + 0x280) {
av_log(ctx->avctx, AV_LOG_ERROR,
"invalid mb scan index (%d < %d).\n",
......@@ -413,7 +413,7 @@ static int dnxhd_decode_frame(AVCodecContext *avctx, void *data,
int first_field = 1;
int ret;
av_dlog(avctx, "frame size %d\n", buf_size);
ff_dlog(avctx, "frame size %d\n", buf_size);
decode_coding_unit:
if ((ret = dnxhd_decode_header(ctx, picture, buf, buf_size, first_field)) < 0)
......
......@@ -814,7 +814,7 @@ static int dnxhd_encode_rdo(AVCodecContext *avctx, DNXHDEncContext *ctx)
if (bits > ctx->frame_bits)
break;
}
// av_dlog(ctx->m.avctx,
// ff_dlog(ctx->m.avctx,
// "lambda %d, up %u, down %u, bits %d, frame %d\n",
// lambda, last_higher, last_lower, bits, ctx->frame_bits);
if (end) {
......@@ -845,7 +845,7 @@ static int dnxhd_encode_rdo(AVCodecContext *avctx, DNXHDEncContext *ctx)
down_step = 1<<LAMBDA_FRAC_BITS;
}
}
//av_dlog(ctx->m.avctx, "out lambda %d\n", lambda);
//ff_dlog(ctx->m.avctx, "out lambda %d\n", lambda);
ctx->lambda = lambda;
return 0;
}
......@@ -874,7 +874,7 @@ static int dnxhd_find_qscale(DNXHDEncContext *ctx)
if (bits > ctx->frame_bits)
break;
}
// av_dlog(ctx->m.avctx,
// ff_dlog(ctx->m.avctx,
// "%d, qscale %d, bits %d, frame %d, higher %d, lower %d\n",
// ctx->m.avctx->frame_number, qscale, bits, ctx->frame_bits,
// last_higher, last_lower);
......@@ -906,7 +906,7 @@ static int dnxhd_find_qscale(DNXHDEncContext *ctx)
return AVERROR(EINVAL);
}
}
//av_dlog(ctx->m.avctx, "out qscale %d\n", qscale);
//ff_dlog(ctx->m.avctx, "out qscale %d\n", qscale);
ctx->qscale = qscale;
return 0;
}
......
......@@ -20,6 +20,7 @@
*/
#include "avcodec.h"
#include "get_bits.h"
#include "internal.h"
/* Parser (mostly) copied from dvdsub.c */
......@@ -51,18 +52,18 @@ static int dvbsub_parse(AVCodecParserContext *s,
uint8_t *p, *p_end;
int i, len, buf_pos = 0;
av_dlog(avctx, "DVB parse packet pts=%"PRIx64", lpts=%"PRIx64", cpts=%"PRIx64":\n",
ff_dlog(avctx, "DVB parse packet pts=%"PRIx64", lpts=%"PRIx64", cpts=%"PRIx64":\n",
s->pts, s->last_pts, s->cur_frame_pts[s->cur_frame_start_index]);
for (i=0; i < buf_size; i++)
{
av_dlog(avctx, "%02x ", buf[i]);
ff_dlog(avctx, "%02x ", buf[i]);
if (i % 16 == 15)
av_dlog(avctx, "\n");
ff_dlog(avctx, "\n");
}
if (i % 16 != 0)
av_dlog(avctx, "\n");
ff_dlog(avctx, "\n");
*poutbuf = NULL;
*poutbuf_size = 0;
......@@ -73,7 +74,7 @@ static int dvbsub_parse(AVCodecParserContext *s,
{
if (pc->packet_index != pc->packet_start)
{
av_dlog(avctx, "Discarding %d bytes\n",
ff_dlog(avctx, "Discarding %d bytes\n",
pc->packet_index - pc->packet_start);
}
......@@ -81,7 +82,7 @@ static int dvbsub_parse(AVCodecParserContext *s,
pc->packet_index = 0;
if (buf_size < 2 || buf[0] != 0x20 || buf[1] != 0x00) {
av_dlog(avctx, "Bad packet header\n");
ff_dlog(avctx, "Bad packet header\n");
return -1;
}
......@@ -138,7 +139,7 @@ static int dvbsub_parse(AVCodecParserContext *s,
} else if (*p == 0xff) {
if (p + 1 < p_end)
{
av_dlog(avctx, "Junk at end of packet\n");
ff_dlog(avctx, "Junk at end of packet\n");
}
pc->packet_index = p - pc->packet_buf;
pc->in_packet = 0;
......
......@@ -22,6 +22,7 @@
#include "avcodec.h"
#include "get_bits.h"
#include "bytestream.h"
#include "internal.h"
#include "libavutil/colorspace.h"
#define DVBSUB_PAGE_SEGMENT 0x10
......@@ -735,20 +736,20 @@ static void dvbsub_parse_pixel_data_block(AVCodecContext *avctx, DVBSubObjectDis
0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff};
uint8_t *map_table;
av_dlog(avctx, "DVB pixel block size %d, %s field:\n", buf_size,
ff_dlog(avctx, "DVB pixel block size %d, %s field:\n", buf_size,
top_bottom ? "bottom" : "top");
for (i = 0; i < buf_size; i++) {
if (i % 16 == 0)
av_dlog(avctx, "0x%8p: ", buf+i);
ff_dlog(avctx, "0x%8p: ", buf+i);
av_dlog(avctx, "%02x ", buf[i]);
ff_dlog(avctx, "%02x ", buf[i]);
if (i % 16 == 15)
av_dlog(avctx, "\n");
ff_dlog(avctx, "\n");
}
if (i % 16)
av_dlog(avctx, "\n");
ff_dlog(avctx, "\n");
if (region == 0)
return;
......@@ -904,16 +905,16 @@ static int dvbsub_parse_clut_segment(AVCodecContext *avctx,
int y, cr, cb, alpha;
int r, g, b, r_add, g_add, b_add;
av_dlog(avctx, "DVB clut packet:\n");
ff_dlog(avctx, "DVB clut packet:\n");
for (i=0; i < buf_size; i++) {
av_dlog(avctx, "%02x ", buf[i]);
ff_dlog(avctx, "%02x ", buf[i]);
if (i % 16 == 15)
av_dlog(avctx, "\n");
ff_dlog(avctx, "\n");
}
if (i % 16)
av_dlog(avctx, "\n");
ff_dlog(avctx, "\n");
clut_id = *buf++;
buf += 1;
......@@ -965,7 +966,7 @@ static int dvbsub_parse_clut_segment(AVCodecContext *avctx,
YUV_TO_RGB1_CCIR(cb, cr);
YUV_TO_RGB2_CCIR(r, g, b, y);
av_dlog(avctx, "clut %d := (%d,%d,%d,%d)\n", entry_id, r, g, b, alpha);
ff_dlog(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,11 +1047,11 @@ static int dvbsub_parse_region_segment(AVCodecContext *avctx,
region->bgcolor = (((*buf++) >> 2) & 3);
}
av_dlog(avctx, "Region %d, (%dx%d)\n", region_id, region->width, region->height);
ff_dlog(avctx, "Region %d, (%dx%d)\n", region_id, region->width, region->height);
if (fill) {
memset(region->pbuf, region->bgcolor, region->buf_size);
av_dlog(avctx, "Fill region (%d)\n", region->bgcolor);
ff_dlog(avctx, "Fill region (%d)\n", region->bgcolor);
}
delete_region_display_list(ctx, region);
......@@ -1117,7 +1118,7 @@ static int dvbsub_parse_page_segment(AVCodecContext *avctx,
ctx->time_out = *buf++;
page_state = ((*buf++) >> 2) & 3;
av_dlog(avctx, "Page time out %ds, state %d\n", ctx->time_out, page_state);
ff_dlog(avctx, "Page time out %ds, state %d\n", ctx->time_out, page_state);
if (page_state == 2) {
delete_state(ctx);
......@@ -1158,7 +1159,7 @@ static int dvbsub_parse_page_segment(AVCodecContext *avctx,
ctx->display_list = display;
ctx->display_list_size++;
av_dlog(avctx, "Region %d, (%d,%d)\n", region_id, display->x_pos, display->y_pos);
ff_dlog(avctx, "Region %d, (%d,%d)\n", region_id, display->x_pos, display->y_pos);
}
while (tmp_display_list) {
......@@ -1421,19 +1422,19 @@ static int dvbsub_decode(AVCodecContext *avctx,
int segment_length;
int i;
av_dlog(avctx, "DVB sub packet:\n");
ff_dlog(avctx, "DVB sub packet:\n");
for (i=0; i < buf_size; i++) {
av_dlog(avctx, "%02x ", buf[i]);
ff_dlog(avctx, "%02x ", buf[i]);
if (i % 16 == 15)
av_dlog(avctx, "\n");
ff_dlog(avctx, "\n");
}
if (i % 16)
av_dlog(avctx, "\n");
ff_dlog(avctx, "\n");
if (buf_size <= 6 || *buf != 0x0f) {
av_dlog(avctx, "incomplete or broken packet");
ff_dlog(avctx, "incomplete or broken packet");
return AVERROR_INVALIDDATA;
}
......@@ -1449,7 +1450,7 @@ static int dvbsub_decode(AVCodecContext *avctx,
p += 2;
if (p_end - p < segment_length) {
av_dlog(avctx, "incomplete or broken packet");
ff_dlog(avctx, "incomplete or broken packet");
return -1;
}
......@@ -1478,7 +1479,7 @@ static int dvbsub_decode(AVCodecContext *avctx,
*data_size = ret;
break;
default:
av_dlog(avctx, "Subtitling segment type 0x%x, page id %d, length %d\n",
ff_dlog(avctx, "Subtitling segment type 0x%x, page id %d, length %d\n",
segment_type, page_id, segment_length);
break;
}
......
......@@ -102,7 +102,7 @@ static void dv_decode_ac(GetBitContext *gb, BlockInfo *mb, int16_t *block)
/* get the AC coefficients until last_index is reached */
for (;;) {
av_dlog(NULL, "%2d: bits=%04x index=%d\n", pos, SHOW_UBITS(re, gb, 16),
ff_dlog(NULL, "%2d: bits=%04x index=%d\n", pos, SHOW_UBITS(re, gb, 16),
re_index);
/* our own optimized GET_RL_VLC */
index = NEG_USR32(re_cache, TEX_VLC_BITS);
......@@ -125,7 +125,7 @@ static void dv_decode_ac(GetBitContext *gb, BlockInfo *mb, int16_t *block)
}
re_index += vlc_len;
av_dlog(NULL, "run=%d level=%d\n", run, level);
ff_dlog(NULL, "run=%d level=%d\n", run, level);
pos += run;
if (pos >= 64)
break;
......@@ -222,7 +222,7 @@ static int dv_decode_video_segment(AVCodecContext *avctx, void *arg)
mb->pos = 0;
mb->partial_bit_count = 0;
av_dlog(avctx, "MB block: %d, %d ", mb_index, j);
ff_dlog(avctx, "MB block: %d, %d ", mb_index, j);
dv_decode_ac(&gb, mb, block);
/* write the remaining bits in a new buffer only if the
......@@ -235,7 +235,7 @@ static int dv_decode_video_segment(AVCodecContext *avctx, void *arg)
}
/* pass 2: we can do it just after */
av_dlog(avctx, "***pass 2 size=%d MB#=%d\n", put_bits_count(&pb), mb_index);
ff_dlog(avctx, "***pass 2 size=%d MB#=%d\n", put_bits_count(&pb), mb_index);
block = block1;
mb = mb1;
init_get_bits(&gb, mb_bit_buffer, put_bits_count(&pb));
......@@ -256,7 +256,7 @@ static int dv_decode_video_segment(AVCodecContext *avctx, void *arg)
}
/* we need a pass over the whole video segment */
av_dlog(avctx, "***pass 3 size=%d\n", put_bits_count(&vs_pb));
ff_dlog(avctx, "***pass 3 size=%d\n", put_bits_count(&vs_pb));
block = &sblock[0][0];
mb = mb_data;
init_get_bits(&gb, vs_bit_buffer, put_bits_count(&vs_pb));
......@@ -265,7 +265,7 @@ static int dv_decode_video_segment(AVCodecContext *avctx, void *arg)
for (mb_index = 0; mb_index < 5; mb_index++) {
for (j = 0; j < s->sys->bpm; j++) {
if (mb->pos < 64) {
av_dlog(avctx, "start %d:%d\n", mb_index, j);
ff_dlog(avctx, "start %d:%d\n", mb_index, j);
dv_decode_ac(&gb, mb, block);
}
if (mb->pos >= 64 && mb->pos < 127)
......
......@@ -205,7 +205,7 @@ static int decode_dvd_subtitles(DVDSubContext *ctx, AVSubtitle *sub_header,
while (cmd_pos > 0 && cmd_pos < buf_size - 2 - offset_size) {
date = AV_RB16(buf + cmd_pos);
next_cmd_pos = READ_OFFSET(buf + cmd_pos + 2);
av_dlog(NULL, "cmd_pos=0x%04x next=0x%04x date=%d\n",
ff_dlog(NULL, "cmd_pos=0x%04x next=0x%04x date=%d\n",
cmd_pos, next_cmd_pos, date);
pos = cmd_pos + 2 + offset_size;
offset1 = -1;
......@@ -213,7 +213,7 @@ static int decode_dvd_subtitles(DVDSubContext *ctx, AVSubtitle *sub_header,
x1 = y1 = x2 = y2 = 0;
while (pos < buf_size) {
cmd = buf[pos++];
av_dlog(NULL, "cmd=%02x\n", cmd);
ff_dlog(NULL, "cmd=%02x\n", cmd);
switch(cmd) {
case 0x00:
/* menu subpicture */
......@@ -246,7 +246,7 @@ static int decode_dvd_subtitles(DVDSubContext *ctx, AVSubtitle *sub_header,
alpha[1] = buf[pos + 1] >> 4;
alpha[0] = buf[pos + 1] & 0x0f;
pos += 2;
av_dlog(NULL, "alpha=%x%x%x%x\n", alpha[0],alpha[1],alpha[2],alpha[3]);
ff_dlog(NULL, "alpha=%x%x%x%x\n", alpha[0],alpha[1],alpha[2],alpha[3]);
break;
case 0x05:
case 0x85:
......@@ -258,7 +258,7 @@ static int decode_dvd_subtitles(DVDSubContext *ctx, AVSubtitle *sub_header,
y2 = ((buf[pos + 4] & 0x0f) << 8) | buf[pos + 5];
if (cmd & 0x80)
is_8bit = 1;
av_dlog(NULL, "x1=%d x2=%d y1=%d y2=%d\n", x1, x2, y1, y2);
ff_dlog(NULL, "x1=%d x2=%d y1=%d y2=%d\n", x1, x2, y1, y2);
pos += 6;
break;
case 0x06:
......@@ -266,7 +266,7 @@ static int decode_dvd_subtitles(DVDSubContext *ctx, AVSubtitle *sub_header,
goto fail;
offset1 = AV_RB16(buf + pos);
offset2 = AV_RB16(buf + pos + 2);
av_dlog(NULL, "offset1=0x%04x offset2=0x%04x\n", offset1, offset2);