Replace dprintf with av_dlog
dprintf clashes with POSIX.1-2008
This commit is contained in:
+18
-18
@@ -253,24 +253,24 @@ static av_cold void dprint_specific_config(ALSDecContext *ctx)
|
||||
AVCodecContext *avctx = ctx->avctx;
|
||||
ALSSpecificConfig *sconf = &ctx->sconf;
|
||||
|
||||
dprintf(avctx, "resolution = %i\n", sconf->resolution);
|
||||
dprintf(avctx, "floating = %i\n", sconf->floating);
|
||||
dprintf(avctx, "frame_length = %i\n", sconf->frame_length);
|
||||
dprintf(avctx, "ra_distance = %i\n", sconf->ra_distance);
|
||||
dprintf(avctx, "ra_flag = %i\n", sconf->ra_flag);
|
||||
dprintf(avctx, "adapt_order = %i\n", sconf->adapt_order);
|
||||
dprintf(avctx, "coef_table = %i\n", sconf->coef_table);
|
||||
dprintf(avctx, "long_term_prediction = %i\n", sconf->long_term_prediction);
|
||||
dprintf(avctx, "max_order = %i\n", sconf->max_order);
|
||||
dprintf(avctx, "block_switching = %i\n", sconf->block_switching);
|
||||
dprintf(avctx, "bgmc = %i\n", sconf->bgmc);
|
||||
dprintf(avctx, "sb_part = %i\n", sconf->sb_part);
|
||||
dprintf(avctx, "joint_stereo = %i\n", sconf->joint_stereo);
|
||||
dprintf(avctx, "mc_coding = %i\n", sconf->mc_coding);
|
||||
dprintf(avctx, "chan_config = %i\n", sconf->chan_config);
|
||||
dprintf(avctx, "chan_sort = %i\n", sconf->chan_sort);
|
||||
dprintf(avctx, "RLSLMS = %i\n", sconf->rlslms);
|
||||
dprintf(avctx, "chan_config_info = %i\n", sconf->chan_config_info);
|
||||
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);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, const uint8_t *buf, int buf_si
|
||||
ctx->height = AV_RB16(buf + 0x18);
|
||||
ctx->width = AV_RB16(buf + 0x1a);
|
||||
|
||||
dprintf(ctx->avctx, "width %d, heigth %d\n", ctx->width, ctx->height);
|
||||
av_dlog(ctx->avctx, "width %d, heigth %d\n", ctx->width, ctx->height);
|
||||
|
||||
if (buf[0x21] & 0x40) {
|
||||
av_log(ctx->avctx, AV_LOG_ERROR, "10 bit per component\n");
|
||||
@@ -115,7 +115,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, const uint8_t *buf, int buf_si
|
||||
}
|
||||
|
||||
ctx->cid = AV_RB32(buf + 0x28);
|
||||
dprintf(ctx->avctx, "compression id %d\n", ctx->cid);
|
||||
av_dlog(ctx->avctx, "compression id %d\n", ctx->cid);
|
||||
|
||||
if (dnxhd_init_vlc(ctx, ctx->cid) < 0)
|
||||
return -1;
|
||||
@@ -128,7 +128,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, const uint8_t *buf, int buf_si
|
||||
ctx->mb_width = ctx->width>>4;
|
||||
ctx->mb_height = buf[0x16d];
|
||||
|
||||
dprintf(ctx->avctx, "mb width %d, mb height %d\n", ctx->mb_width, ctx->mb_height);
|
||||
av_dlog(ctx->avctx, "mb width %d, mb height %d\n", ctx->mb_width, ctx->mb_height);
|
||||
|
||||
if ((ctx->height+15)>>4 == ctx->mb_height && ctx->picture.interlaced_frame)
|
||||
ctx->height <<= 1;
|
||||
@@ -141,7 +141,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, const uint8_t *buf, int buf_si
|
||||
|
||||
for (i = 0; i < ctx->mb_height; i++) {
|
||||
ctx->mb_scan_index[i] = AV_RB32(buf + 0x170 + (i<<2));
|
||||
dprintf(ctx->avctx, "mb scan index %d\n", ctx->mb_scan_index[i]);
|
||||
av_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\n");
|
||||
return -1;
|
||||
@@ -293,7 +293,7 @@ static int dnxhd_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
|
||||
AVFrame *picture = data;
|
||||
int first_field = 1;
|
||||
|
||||
dprintf(avctx, "frame size %d\n", buf_size);
|
||||
av_dlog(avctx, "frame size %d\n", buf_size);
|
||||
|
||||
decode_coding_unit:
|
||||
if (dnxhd_decode_header(ctx, buf, buf_size, first_field) < 0)
|
||||
|
||||
@@ -552,7 +552,7 @@ static int dnxhd_encode_rdo(AVCodecContext *avctx, DNXHDEncContext *ctx)
|
||||
if (bits > ctx->frame_bits)
|
||||
break;
|
||||
}
|
||||
//dprintf(ctx->m.avctx, "lambda %d, up %u, down %u, bits %d, frame %d\n",
|
||||
//av_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) {
|
||||
if (bits > ctx->frame_bits)
|
||||
@@ -582,7 +582,7 @@ static int dnxhd_encode_rdo(AVCodecContext *avctx, DNXHDEncContext *ctx)
|
||||
down_step = 1<<LAMBDA_FRAC_BITS;
|
||||
}
|
||||
}
|
||||
//dprintf(ctx->m.avctx, "out lambda %d\n", lambda);
|
||||
//av_dlog(ctx->m.avctx, "out lambda %d\n", lambda);
|
||||
ctx->lambda = lambda;
|
||||
return 0;
|
||||
}
|
||||
@@ -610,7 +610,7 @@ static int dnxhd_find_qscale(DNXHDEncContext *ctx)
|
||||
if (bits > ctx->frame_bits)
|
||||
break;
|
||||
}
|
||||
//dprintf(ctx->m.avctx, "%d, qscale %d, bits %d, frame %d, higher %d, lower %d\n",
|
||||
//av_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);
|
||||
if (bits < ctx->frame_bits) {
|
||||
if (qscale == 1)
|
||||
@@ -640,7 +640,7 @@ static int dnxhd_find_qscale(DNXHDEncContext *ctx)
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
//dprintf(ctx->m.avctx, "out qscale %d\n", qscale);
|
||||
//av_dlog(ctx->m.avctx, "out qscale %d\n", qscale);
|
||||
ctx->qscale = qscale;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ static int dvbsub_parse(AVCodecParserContext *s,
|
||||
uint8_t *p, *p_end;
|
||||
int len, buf_pos = 0;
|
||||
|
||||
dprintf(avctx, "DVB parse packet pts=%"PRIx64", lpts=%"PRIx64", cpts=%"PRIx64":\n",
|
||||
av_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]);
|
||||
|
||||
#ifdef DEBUG_PACKET_CONTENTS
|
||||
@@ -82,7 +82,7 @@ static int dvbsub_parse(AVCodecParserContext *s,
|
||||
{
|
||||
if (pc->packet_index != pc->packet_start)
|
||||
{
|
||||
dprintf(avctx, "Discarding %d bytes\n",
|
||||
av_dlog(avctx, "Discarding %d bytes\n",
|
||||
pc->packet_index - pc->packet_start);
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ static int dvbsub_parse(AVCodecParserContext *s,
|
||||
pc->packet_index = 0;
|
||||
|
||||
if (buf_size < 2 || buf[0] != 0x20 || buf[1] != 0x00) {
|
||||
dprintf(avctx, "Bad packet header\n");
|
||||
av_dlog(avctx, "Bad packet header\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ static int dvbsub_parse(AVCodecParserContext *s,
|
||||
} else if (*p == 0xff) {
|
||||
if (p + 1 < p_end)
|
||||
{
|
||||
dprintf(avctx, "Junk at end of packet\n");
|
||||
av_dlog(avctx, "Junk at end of packet\n");
|
||||
}
|
||||
pc->packet_index = p - pc->packet_buf;
|
||||
pc->in_packet = 0;
|
||||
|
||||
@@ -749,7 +749,7 @@ static void dvbsub_parse_pixel_data_block(AVCodecContext *avctx, DVBSubObjectDis
|
||||
0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff};
|
||||
uint8_t *map_table;
|
||||
|
||||
dprintf(avctx, "DVB pixel block size %d, %s field:\n", buf_size,
|
||||
av_dlog(avctx, "DVB pixel block size %d, %s field:\n", buf_size,
|
||||
top_bottom ? "bottom" : "top");
|
||||
|
||||
#ifdef DEBUG_PACKET_CONTENTS
|
||||
@@ -984,7 +984,7 @@ static void dvbsub_parse_clut_segment(AVCodecContext *avctx,
|
||||
YUV_TO_RGB1_CCIR(cb, cr);
|
||||
YUV_TO_RGB2_CCIR(r, g, b, y);
|
||||
|
||||
dprintf(avctx, "clut %d := (%d,%d,%d,%d)\n", entry_id, r, g, b, alpha);
|
||||
av_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);
|
||||
@@ -1060,11 +1060,11 @@ static void dvbsub_parse_region_segment(AVCodecContext *avctx,
|
||||
region->bgcolor = (((*buf++) >> 2) & 3);
|
||||
}
|
||||
|
||||
dprintf(avctx, "Region %d, (%dx%d)\n", region_id, region->width, region->height);
|
||||
av_dlog(avctx, "Region %d, (%dx%d)\n", region_id, region->width, region->height);
|
||||
|
||||
if (fill) {
|
||||
memset(region->pbuf, region->bgcolor, region->buf_size);
|
||||
dprintf(avctx, "Fill region (%d)\n", region->bgcolor);
|
||||
av_dlog(avctx, "Fill region (%d)\n", region->bgcolor);
|
||||
}
|
||||
|
||||
delete_region_display_list(ctx, region);
|
||||
@@ -1125,7 +1125,7 @@ static void dvbsub_parse_page_segment(AVCodecContext *avctx,
|
||||
ctx->time_out = *buf++;
|
||||
page_state = ((*buf++) >> 2) & 3;
|
||||
|
||||
dprintf(avctx, "Page time out %ds, state %d\n", ctx->time_out, page_state);
|
||||
av_dlog(avctx, "Page time out %ds, state %d\n", ctx->time_out, page_state);
|
||||
|
||||
if (page_state == 2) {
|
||||
delete_state(ctx);
|
||||
@@ -1163,7 +1163,7 @@ static void dvbsub_parse_page_segment(AVCodecContext *avctx,
|
||||
ctx->display_list = display;
|
||||
ctx->display_list_size++;
|
||||
|
||||
dprintf(avctx, "Region %d, (%d,%d)\n", region_id, display->x_pos, display->y_pos);
|
||||
av_dlog(avctx, "Region %d, (%d,%d)\n", region_id, display->x_pos, display->y_pos);
|
||||
}
|
||||
|
||||
while (tmp_display_list) {
|
||||
@@ -1461,7 +1461,7 @@ static int dvbsub_decode(AVCodecContext *avctx,
|
||||
*data_size = dvbsub_display_end_segment(avctx, p, segment_length, sub);
|
||||
break;
|
||||
default:
|
||||
dprintf(avctx, "Subtitling segment type 0x%x, page id %d, length %d\n",
|
||||
av_dlog(avctx, "Subtitling segment type 0x%x, page id %d, length %d\n",
|
||||
segment_type, page_id, segment_length);
|
||||
break;
|
||||
}
|
||||
@@ -1471,7 +1471,7 @@ static int dvbsub_decode(AVCodecContext *avctx,
|
||||
}
|
||||
|
||||
if (p != p_end) {
|
||||
dprintf(avctx, "Junk at end of packet\n");
|
||||
av_dlog(avctx, "Junk at end of packet\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -190,7 +190,7 @@ static int decode_dvd_subtitles(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);
|
||||
dprintf(NULL, "cmd_pos=0x%04x next=0x%04x date=%d\n",
|
||||
av_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;
|
||||
@@ -198,7 +198,7 @@ static int decode_dvd_subtitles(AVSubtitle *sub_header,
|
||||
x1 = y1 = x2 = y2 = 0;
|
||||
while (pos < buf_size) {
|
||||
cmd = buf[pos++];
|
||||
dprintf(NULL, "cmd=%02x\n", cmd);
|
||||
av_dlog(NULL, "cmd=%02x\n", cmd);
|
||||
switch(cmd) {
|
||||
case 0x00:
|
||||
/* menu subpicture */
|
||||
@@ -231,7 +231,7 @@ static int decode_dvd_subtitles(AVSubtitle *sub_header,
|
||||
alpha[1] = buf[pos + 1] >> 4;
|
||||
alpha[0] = buf[pos + 1] & 0x0f;
|
||||
pos += 2;
|
||||
dprintf(NULL, "alpha=%x%x%x%x\n", alpha[0],alpha[1],alpha[2],alpha[3]);
|
||||
av_dlog(NULL, "alpha=%x%x%x%x\n", alpha[0],alpha[1],alpha[2],alpha[3]);
|
||||
break;
|
||||
case 0x05:
|
||||
case 0x85:
|
||||
@@ -243,7 +243,7 @@ static int decode_dvd_subtitles(AVSubtitle *sub_header,
|
||||
y2 = ((buf[pos + 4] & 0x0f) << 8) | buf[pos + 5];
|
||||
if (cmd & 0x80)
|
||||
is_8bit = 1;
|
||||
dprintf(NULL, "x1=%d x2=%d y1=%d y2=%d\n", x1, x2, y1, y2);
|
||||
av_dlog(NULL, "x1=%d x2=%d y1=%d y2=%d\n", x1, x2, y1, y2);
|
||||
pos += 6;
|
||||
break;
|
||||
case 0x06:
|
||||
@@ -251,7 +251,7 @@ static int decode_dvd_subtitles(AVSubtitle *sub_header,
|
||||
goto fail;
|
||||
offset1 = AV_RB16(buf + pos);
|
||||
offset2 = AV_RB16(buf + pos + 2);
|
||||
dprintf(NULL, "offset1=0x%04x offset2=0x%04x\n", offset1, offset2);
|
||||
av_dlog(NULL, "offset1=0x%04x offset2=0x%04x\n", offset1, offset2);
|
||||
pos += 4;
|
||||
break;
|
||||
case 0x86:
|
||||
@@ -259,7 +259,7 @@ static int decode_dvd_subtitles(AVSubtitle *sub_header,
|
||||
goto fail;
|
||||
offset1 = AV_RB32(buf + pos);
|
||||
offset2 = AV_RB32(buf + pos + 4);
|
||||
dprintf(NULL, "offset1=0x%04x offset2=0x%04x\n", offset1, offset2);
|
||||
av_dlog(NULL, "offset1=0x%04x offset2=0x%04x\n", offset1, offset2);
|
||||
pos += 8;
|
||||
break;
|
||||
|
||||
@@ -282,7 +282,7 @@ static int decode_dvd_subtitles(AVSubtitle *sub_header,
|
||||
case 0xff:
|
||||
goto the_end;
|
||||
default:
|
||||
dprintf(NULL, "unrecognised subpicture command 0x%x\n", cmd);
|
||||
av_dlog(NULL, "unrecognised subpicture command 0x%x\n", cmd);
|
||||
goto the_end;
|
||||
}
|
||||
}
|
||||
@@ -475,7 +475,7 @@ static int dvdsub_decode(AVCodecContext *avctx,
|
||||
goto no_subtitle;
|
||||
|
||||
#if defined(DEBUG)
|
||||
dprintf(NULL, "start=%d ms end =%d ms\n",
|
||||
av_dlog(NULL, "start=%d ms end =%d ms\n",
|
||||
sub->start_display_time,
|
||||
sub->end_display_time);
|
||||
ppm_save("/tmp/a.ppm", sub->rects[0]->pict.data[0],
|
||||
|
||||
+6
-6
@@ -77,7 +77,7 @@ static int gif_read_image(GifState *s)
|
||||
has_local_palette = flags & 0x80;
|
||||
bits_per_pixel = (flags & 0x07) + 1;
|
||||
|
||||
dprintf(s->avctx, "gif: image x=%d y=%d w=%d h=%d\n", left, top, width, height);
|
||||
av_dlog(s->avctx, "gif: image x=%d y=%d w=%d h=%d\n", left, top, width, height);
|
||||
|
||||
if (has_local_palette) {
|
||||
bytestream_get_buffer(&s->bytestream, s->local_palette, 3 * (1 << bits_per_pixel));
|
||||
@@ -163,7 +163,7 @@ static int gif_read_extension(GifState *s)
|
||||
ext_code = bytestream_get_byte(&s->bytestream);
|
||||
ext_len = bytestream_get_byte(&s->bytestream);
|
||||
|
||||
dprintf(s->avctx, "gif: ext_code=0x%x len=%d\n", ext_code, ext_len);
|
||||
av_dlog(s->avctx, "gif: ext_code=0x%x len=%d\n", ext_code, ext_len);
|
||||
|
||||
switch(ext_code) {
|
||||
case 0xf9:
|
||||
@@ -179,7 +179,7 @@ static int gif_read_extension(GifState *s)
|
||||
s->transparent_color_index = -1;
|
||||
s->gce_disposal = (gce_flags >> 2) & 0x7;
|
||||
|
||||
dprintf(s->avctx, "gif: gce_flags=%x delay=%d tcolor=%d disposal=%d\n",
|
||||
av_dlog(s->avctx, "gif: gce_flags=%x delay=%d tcolor=%d disposal=%d\n",
|
||||
gce_flags, s->gce_delay,
|
||||
s->transparent_color_index, s->gce_disposal);
|
||||
|
||||
@@ -194,7 +194,7 @@ static int gif_read_extension(GifState *s)
|
||||
bytestream_get_byte(&s->bytestream);
|
||||
ext_len = bytestream_get_byte(&s->bytestream);
|
||||
|
||||
dprintf(s->avctx, "gif: ext_len1=%d\n", ext_len);
|
||||
av_dlog(s->avctx, "gif: ext_len1=%d\n", ext_len);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -231,7 +231,7 @@ static int gif_read_header1(GifState *s)
|
||||
s->background_color_index = bytestream_get_byte(&s->bytestream);
|
||||
bytestream_get_byte(&s->bytestream); /* ignored */
|
||||
|
||||
dprintf(s->avctx, "gif: screen_w=%d screen_h=%d bpp=%d global_palette=%d\n",
|
||||
av_dlog(s->avctx, "gif: screen_w=%d screen_h=%d bpp=%d global_palette=%d\n",
|
||||
s->screen_width, s->screen_height, s->bits_per_pixel,
|
||||
has_global_palette);
|
||||
|
||||
@@ -249,7 +249,7 @@ static int gif_parse_next_image(GifState *s)
|
||||
while (s->bytestream < s->bytestream_end) {
|
||||
int code = bytestream_get_byte(&s->bytestream);
|
||||
|
||||
dprintf(s->avctx, "gif: code=%02x '%c'\n", code, code);
|
||||
av_dlog(s->avctx, "gif: code=%02x '%c'\n", code, code);
|
||||
|
||||
switch (code) {
|
||||
case ',':
|
||||
|
||||
@@ -553,8 +553,8 @@ static int h261_decode_frame(AVCodecContext *avctx,
|
||||
int ret;
|
||||
AVFrame *pict = data;
|
||||
|
||||
dprintf(avctx, "*****frame %d size=%d\n", avctx->frame_number, buf_size);
|
||||
dprintf(avctx, "bytes=%x %x %x %x\n", buf[0], buf[1], buf[2], buf[3]);
|
||||
av_dlog(avctx, "*****frame %d size=%d\n", avctx->frame_number, buf_size);
|
||||
av_dlog(avctx, "bytes=%x %x %x %x\n", buf[0], buf[1], buf[2], buf[3]);
|
||||
s->flags= avctx->flags;
|
||||
s->flags2= avctx->flags2;
|
||||
|
||||
|
||||
@@ -325,7 +325,7 @@ static int h263p_decode_umotion(MpegEncContext * s, int pred)
|
||||
code >>= 1;
|
||||
|
||||
code = (sign) ? (pred - code) : (pred + code);
|
||||
dprintf(s->avctx,"H.263+ UMV Motion = %d\n", code);
|
||||
av_dlog(s->avctx,"H.263+ UMV Motion = %d\n", code);
|
||||
return code;
|
||||
|
||||
}
|
||||
@@ -951,7 +951,7 @@ int h263_decode_picture_header(MpegEncContext *s)
|
||||
if (ufep == 1) {
|
||||
/* OPPTYPE */
|
||||
format = get_bits(&s->gb, 3);
|
||||
dprintf(s->avctx, "ufep=1, format: %d\n", format);
|
||||
av_dlog(s->avctx, "ufep=1, format: %d\n", format);
|
||||
s->custom_pcf= get_bits1(&s->gb);
|
||||
s->umvplus = get_bits1(&s->gb); /* Unrestricted Motion Vector */
|
||||
if (get_bits1(&s->gb) != 0) {
|
||||
@@ -1002,7 +1002,7 @@ int h263_decode_picture_header(MpegEncContext *s)
|
||||
if (format == 6) {
|
||||
/* Custom Picture Format (CPFMT) */
|
||||
s->aspect_ratio_info = get_bits(&s->gb, 4);
|
||||
dprintf(s->avctx, "aspect: %d\n", s->aspect_ratio_info);
|
||||
av_dlog(s->avctx, "aspect: %d\n", s->aspect_ratio_info);
|
||||
/* aspect ratios:
|
||||
0 - forbidden
|
||||
1 - 1:1
|
||||
@@ -1015,7 +1015,7 @@ int h263_decode_picture_header(MpegEncContext *s)
|
||||
width = (get_bits(&s->gb, 9) + 1) * 4;
|
||||
skip_bits1(&s->gb);
|
||||
height = get_bits(&s->gb, 9) * 4;
|
||||
dprintf(s->avctx, "\nH.263+ Custom picture: %dx%d\n",width,height);
|
||||
av_dlog(s->avctx, "\nH.263+ Custom picture: %dx%d\n",width,height);
|
||||
if (s->aspect_ratio_info == FF_ASPECT_EXTENDED) {
|
||||
/* aspected dimensions */
|
||||
s->avctx->sample_aspect_ratio.num= get_bits(&s->gb, 8);
|
||||
|
||||
@@ -1255,7 +1255,7 @@ static int find_marker(const uint8_t **pbuf_ptr, const uint8_t *buf_end)
|
||||
}
|
||||
val = -1;
|
||||
found:
|
||||
dprintf(NULL, "find_marker skipped %d bytes\n", skipped);
|
||||
av_dlog(NULL, "find_marker skipped %d bytes\n", skipped);
|
||||
*pbuf_ptr = buf_ptr;
|
||||
return val;
|
||||
}
|
||||
|
||||
+20
-20
@@ -213,7 +213,7 @@ static int mpeg_decode_mb(MpegEncContext *s,
|
||||
int i, j, k, cbp, val, mb_type, motion_type;
|
||||
const int mb_block_count = 4 + (1<< s->chroma_format);
|
||||
|
||||
dprintf(s->avctx, "decode_mb: x=%d y=%d\n", s->mb_x, s->mb_y);
|
||||
av_dlog(s->avctx, "decode_mb: x=%d y=%d\n", s->mb_x, s->mb_y);
|
||||
|
||||
assert(s->mb_skipped==0);
|
||||
|
||||
@@ -272,7 +272,7 @@ static int mpeg_decode_mb(MpegEncContext *s,
|
||||
mb_type = btype2mb_type[ mb_type ];
|
||||
break;
|
||||
}
|
||||
dprintf(s->avctx, "mb_type=%x\n", mb_type);
|
||||
av_dlog(s->avctx, "mb_type=%x\n", mb_type);
|
||||
// motion_type = 0; /* avoid warning */
|
||||
if (IS_INTRA(mb_type)) {
|
||||
s->dsp.clear_blocks(s->block[0]);
|
||||
@@ -370,7 +370,7 @@ static int mpeg_decode_mb(MpegEncContext *s,
|
||||
|
||||
/* motion vectors */
|
||||
s->mv_dir= (mb_type>>13)&3;
|
||||
dprintf(s->avctx, "motion_type=%d\n", motion_type);
|
||||
av_dlog(s->avctx, "motion_type=%d\n", motion_type);
|
||||
switch(motion_type) {
|
||||
case MT_FRAME: /* or MT_16X8 */
|
||||
if (s->picture_structure == PICT_FRAME) {
|
||||
@@ -421,12 +421,12 @@ static int mpeg_decode_mb(MpegEncContext *s,
|
||||
s->last_mv[i][j][0]);
|
||||
s->last_mv[i][j][0] = val;
|
||||
s->mv[i][j][0] = val;
|
||||
dprintf(s->avctx, "fmx=%d\n", val);
|
||||
av_dlog(s->avctx, "fmx=%d\n", val);
|
||||
val = mpeg_decode_motion(s, s->mpeg_f_code[i][1],
|
||||
s->last_mv[i][j][1] >> 1);
|
||||
s->last_mv[i][j][1] = val << 1;
|
||||
s->mv[i][j][1] = val;
|
||||
dprintf(s->avctx, "fmy=%d\n", val);
|
||||
av_dlog(s->avctx, "fmy=%d\n", val);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -632,7 +632,7 @@ static inline int mpeg1_decode_block_intra(MpegEncContext *s,
|
||||
dc += diff;
|
||||
s->last_dc[component] = dc;
|
||||
block[0] = dc*quant_matrix[0];
|
||||
dprintf(s->avctx, "dc=%d diff=%d\n", dc, diff);
|
||||
av_dlog(s->avctx, "dc=%d diff=%d\n", dc, diff);
|
||||
i = 0;
|
||||
{
|
||||
OPEN_READER(re, &s->gb);
|
||||
@@ -1012,7 +1012,7 @@ static inline int mpeg2_decode_block_intra(MpegEncContext *s,
|
||||
dc += diff;
|
||||
s->last_dc[component] = dc;
|
||||
block[0] = dc << (3 - s->intra_dc_precision);
|
||||
dprintf(s->avctx, "dc=%d\n", block[0]);
|
||||
av_dlog(s->avctx, "dc=%d\n", block[0]);
|
||||
mismatch = block[0] ^ 1;
|
||||
i = 0;
|
||||
if (s->intra_vlc_format)
|
||||
@@ -1386,7 +1386,7 @@ static void mpeg_decode_sequence_extension(Mpeg1Context *s1)
|
||||
s1->frame_rate_ext.num = get_bits(&s->gb, 2)+1;
|
||||
s1->frame_rate_ext.den = get_bits(&s->gb, 5)+1;
|
||||
|
||||
dprintf(s->avctx, "sequence extension\n");
|
||||
av_dlog(s->avctx, "sequence extension\n");
|
||||
s->codec_id= s->avctx->codec_id= CODEC_ID_MPEG2VIDEO;
|
||||
s->avctx->sub_id = 2; /* indicates MPEG-2 found */
|
||||
|
||||
@@ -1477,7 +1477,7 @@ static int load_matrix(MpegEncContext *s, uint16_t matrix0[64], uint16_t matrix1
|
||||
|
||||
static void mpeg_decode_quant_matrix_extension(MpegEncContext *s)
|
||||
{
|
||||
dprintf(s->avctx, "matrix extension\n");
|
||||
av_dlog(s->avctx, "matrix extension\n");
|
||||
|
||||
if(get_bits1(&s->gb)) load_matrix(s, s->chroma_intra_matrix, s->intra_matrix, 1);
|
||||
if(get_bits1(&s->gb)) load_matrix(s, s->chroma_inter_matrix, s->inter_matrix, 0);
|
||||
@@ -1551,15 +1551,15 @@ static void mpeg_decode_picture_coding_extension(Mpeg1Context *s1)
|
||||
}
|
||||
|
||||
/* composite display not parsed */
|
||||
dprintf(s->avctx, "intra_dc_precision=%d\n", s->intra_dc_precision);
|
||||
dprintf(s->avctx, "picture_structure=%d\n", s->picture_structure);
|
||||
dprintf(s->avctx, "top field first=%d\n", s->top_field_first);
|
||||
dprintf(s->avctx, "repeat first field=%d\n", s->repeat_first_field);
|
||||
dprintf(s->avctx, "conceal=%d\n", s->concealment_motion_vectors);
|
||||
dprintf(s->avctx, "intra_vlc_format=%d\n", s->intra_vlc_format);
|
||||
dprintf(s->avctx, "alternate_scan=%d\n", s->alternate_scan);
|
||||
dprintf(s->avctx, "frame_pred_frame_dct=%d\n", s->frame_pred_frame_dct);
|
||||
dprintf(s->avctx, "progressive_frame=%d\n", s->progressive_frame);
|
||||
av_dlog(s->avctx, "intra_dc_precision=%d\n", s->intra_dc_precision);
|
||||
av_dlog(s->avctx, "picture_structure=%d\n", s->picture_structure);
|
||||
av_dlog(s->avctx, "top field first=%d\n", s->top_field_first);
|
||||
av_dlog(s->avctx, "repeat first field=%d\n", s->repeat_first_field);
|
||||
av_dlog(s->avctx, "conceal=%d\n", s->concealment_motion_vectors);
|
||||
av_dlog(s->avctx, "intra_vlc_format=%d\n", s->intra_vlc_format);
|
||||
av_dlog(s->avctx, "alternate_scan=%d\n", s->alternate_scan);
|
||||
av_dlog(s->avctx, "frame_pred_frame_dct=%d\n", s->frame_pred_frame_dct);
|
||||
av_dlog(s->avctx, "progressive_frame=%d\n", s->progressive_frame);
|
||||
}
|
||||
|
||||
static void exchange_uv(MpegEncContext *s){
|
||||
@@ -2200,7 +2200,7 @@ static int mpeg_decode_frame(AVCodecContext *avctx,
|
||||
Mpeg1Context *s = avctx->priv_data;
|
||||
AVFrame *picture = data;
|
||||
MpegEncContext *s2 = &s->mpeg_enc_ctx;
|
||||
dprintf(avctx, "fill_buffer\n");
|
||||
av_dlog(avctx, "fill_buffer\n");
|
||||
|
||||
if (buf_size == 0 || (buf_size == 4 && AV_RB32(buf) == SEQ_END_CODE)) {
|
||||
/* special case for last picture */
|
||||
@@ -2524,7 +2524,7 @@ static av_cold int mpeg_mc_decode_init(AVCodecContext *avctx){
|
||||
if( !(avctx->slice_flags & SLICE_FLAG_CODED_ORDER) )
|
||||
return -1;
|
||||
if( !(avctx->slice_flags & SLICE_FLAG_ALLOW_FIELD) ){
|
||||
dprintf(avctx, "mpeg12.c: XvMC decoder will work better if SLICE_FLAG_ALLOW_FIELD is set\n");
|
||||
av_dlog(avctx, "mpeg12.c: XvMC decoder will work better if SLICE_FLAG_ALLOW_FIELD is set\n");
|
||||
}
|
||||
mpeg_decode_init(avctx);
|
||||
|
||||
|
||||
@@ -890,7 +890,7 @@ static void mpeg1_encode_block(MpegEncContext *s,
|
||||
next_coef:
|
||||
#if 0
|
||||
if (level != 0)
|
||||
dprintf(s->avctx, "level[%d]=%d\n", i, level);
|
||||
av_dlog(s->avctx, "level[%d]=%d\n", i, level);
|
||||
#endif
|
||||
/* encode using VLC */
|
||||
if (level != 0) {
|
||||
|
||||
+11
-11
@@ -352,7 +352,7 @@ static av_cold int decode_init(AVCodecContext * avctx)
|
||||
scale_factor_mult[i][0] = MULLx(norm, FIXR(1.0 * 2.0), FRAC_BITS);
|
||||
scale_factor_mult[i][1] = MULLx(norm, FIXR(0.7937005259 * 2.0), FRAC_BITS);
|
||||
scale_factor_mult[i][2] = MULLx(norm, FIXR(0.6299605249 * 2.0), FRAC_BITS);
|
||||
dprintf(avctx, "%d: norm=%x s=%x %x %x\n",
|
||||
av_dlog(avctx, "%d: norm=%x s=%x %x %x\n",
|
||||
i, norm,
|
||||
scale_factor_mult[i][0],
|
||||
scale_factor_mult[i][1],
|
||||
@@ -457,7 +457,7 @@ static av_cold int decode_init(AVCodecContext * avctx)
|
||||
k = i & 1;
|
||||
is_table_lsf[j][k ^ 1][i] = FIXR(f);
|
||||
is_table_lsf[j][k][i] = FIXR(1.0);
|
||||
dprintf(avctx, "is_table_lsf %d %d: %x %x\n",
|
||||
av_dlog(avctx, "is_table_lsf %d %d: %x %x\n",
|
||||
i, j, is_table_lsf[j][0][i], is_table_lsf[j][1][i]);
|
||||
}
|
||||
}
|
||||
@@ -986,7 +986,7 @@ static int mp_decode_layer2(MPADecodeContext *s)
|
||||
else
|
||||
bound = sblimit;
|
||||
|
||||
dprintf(s->avctx, "bound=%d sblimit=%d\n", bound, sblimit);
|
||||
av_dlog(s->avctx, "bound=%d sblimit=%d\n", bound, sblimit);
|
||||
|
||||
/* sanity check */
|
||||
if( bound > sblimit ) bound = sblimit;
|
||||
@@ -1309,7 +1309,7 @@ static int huffman_decode(MPADecodeContext *s, GranuleDef *g,
|
||||
|
||||
exponent= exponents[s_index];
|
||||
|
||||
dprintf(s->avctx, "region=%d n=%d x=%d y=%d exp=%d\n",
|
||||
av_dlog(s->avctx, "region=%d n=%d x=%d y=%d exp=%d\n",
|
||||
i, g->region_size[i] - j, x, y, exponent);
|
||||
if(y&16){
|
||||
x = y >> 5;
|
||||
@@ -1377,7 +1377,7 @@ static int huffman_decode(MPADecodeContext *s, GranuleDef *g,
|
||||
last_pos= pos;
|
||||
|
||||
code = get_vlc2(&s->gb, vlc->table, vlc->bits, 1);
|
||||
dprintf(s->avctx, "t=%d code=%d\n", g->count1table_select, code);
|
||||
av_dlog(s->avctx, "t=%d code=%d\n", g->count1table_select, code);
|
||||
g->sb_hybrid[s_index+0]=
|
||||
g->sb_hybrid[s_index+1]=
|
||||
g->sb_hybrid[s_index+2]=
|
||||
@@ -1735,7 +1735,7 @@ static int mp_decode_layer3(MPADecodeContext *s)
|
||||
|
||||
for(gr=0;gr<nb_granules;gr++) {
|
||||
for(ch=0;ch<s->nb_channels;ch++) {
|
||||
dprintf(s->avctx, "gr=%d ch=%d: side_info\n", gr, ch);
|
||||
av_dlog(s->avctx, "gr=%d ch=%d: side_info\n", gr, ch);
|
||||
g = &s->granules[ch][gr];
|
||||
g->part2_3_length = get_bits(&s->gb, 12);
|
||||
g->big_values = get_bits(&s->gb, 9);
|
||||
@@ -1776,7 +1776,7 @@ static int mp_decode_layer3(MPADecodeContext *s)
|
||||
/* compute huffman coded region sizes */
|
||||
region_address1 = get_bits(&s->gb, 4);
|
||||
region_address2 = get_bits(&s->gb, 3);
|
||||
dprintf(s->avctx, "region1=%d region2=%d\n",
|
||||
av_dlog(s->avctx, "region1=%d region2=%d\n",
|
||||
region_address1, region_address2);
|
||||
ff_init_long_region(s, g, region_address1, region_address2);
|
||||
}
|
||||
@@ -1788,7 +1788,7 @@ static int mp_decode_layer3(MPADecodeContext *s)
|
||||
g->preflag = get_bits1(&s->gb);
|
||||
g->scalefac_scale = get_bits1(&s->gb);
|
||||
g->count1table_select = get_bits1(&s->gb);
|
||||
dprintf(s->avctx, "block_type=%d switch_point=%d\n",
|
||||
av_dlog(s->avctx, "block_type=%d switch_point=%d\n",
|
||||
g->block_type, g->switch_point);
|
||||
}
|
||||
}
|
||||
@@ -1797,7 +1797,7 @@ static int mp_decode_layer3(MPADecodeContext *s)
|
||||
const uint8_t *ptr = s->gb.buffer + (get_bits_count(&s->gb)>>3);
|
||||
assert((get_bits_count(&s->gb) & 7) == 0);
|
||||
/* now we get bits from the main_data_begin offset */
|
||||
dprintf(s->avctx, "seekback: %d\n", main_data_begin);
|
||||
av_dlog(s->avctx, "seekback: %d\n", main_data_begin);
|
||||
//av_log(NULL, AV_LOG_ERROR, "backstep:%d, lastbuf:%d\n", main_data_begin, s->last_buf_size);
|
||||
|
||||
memcpy(s->last_buf + s->last_buf_size, ptr, EXTRABYTES);
|
||||
@@ -1831,7 +1831,7 @@ static int mp_decode_layer3(MPADecodeContext *s)
|
||||
/* MPEG1 scale factors */
|
||||
slen1 = slen_table[0][g->scalefac_compress];
|
||||
slen2 = slen_table[1][g->scalefac_compress];
|
||||
dprintf(s->avctx, "slen1=%d slen2=%d\n", slen1, slen2);
|
||||
av_dlog(s->avctx, "slen1=%d slen2=%d\n", slen1, slen2);
|
||||
if (g->block_type == 2) {
|
||||
n = g->switch_point ? 17 : 18;
|
||||
j = 0;
|
||||
@@ -1964,7 +1964,7 @@ static int mp_decode_frame(MPADecodeContext *s,
|
||||
if (s->error_protection)
|
||||
skip_bits(&s->gb, 16);
|
||||
|
||||
dprintf(s->avctx, "frame %d:\n", s->frame_count);
|
||||
av_dlog(s->avctx, "frame %d:\n", s->frame_count);
|
||||
switch(s->layer) {
|
||||
case 1:
|
||||
s->avctx->frame_size = 384;
|
||||
|
||||
@@ -91,20 +91,20 @@ int ff_mpegaudio_decode_header(MPADecodeHeader *s, uint32_t header)
|
||||
}
|
||||
|
||||
#if defined(DEBUG)
|
||||
dprintf(NULL, "layer%d, %d Hz, %d kbits/s, ",
|
||||
av_dlog(NULL, "layer%d, %d Hz, %d kbits/s, ",
|
||||
s->layer, s->sample_rate, s->bit_rate);
|
||||
if (s->nb_channels == 2) {
|
||||
if (s->layer == 3) {
|
||||
if (s->mode_ext & MODE_EXT_MS_STEREO)
|
||||
dprintf(NULL, "ms-");
|
||||
av_dlog(NULL, "ms-");
|
||||
if (s->mode_ext & MODE_EXT_I_STEREO)
|
||||
dprintf(NULL, "i-");
|
||||
av_dlog(NULL, "i-");
|
||||
}
|
||||
dprintf(NULL, "stereo");
|
||||
av_dlog(NULL, "stereo");
|
||||
} else {
|
||||
dprintf(NULL, "mono");
|
||||
av_dlog(NULL, "mono");
|
||||
}
|
||||
dprintf(NULL, "\n");
|
||||
av_dlog(NULL, "\n");
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ static av_cold int MPA_encode_init(AVCodecContext *avctx)
|
||||
s->sblimit = ff_mpa_sblimit_table[table];
|
||||
s->alloc_table = ff_mpa_alloc_tables[table];
|
||||
|
||||
dprintf(avctx, "%d kb/s, %d Hz, frame_size=%d bits, table=%d, padincr=%x\n",
|
||||
av_dlog(avctx, "%d kb/s, %d Hz, frame_size=%d bits, table=%d, padincr=%x\n",
|
||||
bitrate, freq, s->frame_size, table, s->frame_frac_incr);
|
||||
|
||||
for(i=0;i<s->nb_channels;i++)
|
||||
|
||||
@@ -64,7 +64,7 @@ static int pcm_bluray_parse_header(AVCodecContext *avctx,
|
||||
uint8_t channel_layout = header[2] >> 4;
|
||||
|
||||
if (avctx->debug & FF_DEBUG_PICT_INFO)
|
||||
dprintf(avctx, "pcm_bluray_parse_header: header = %02x%02x%02x%02x\n",
|
||||
av_dlog(avctx, "pcm_bluray_parse_header: header = %02x%02x%02x%02x\n",
|
||||
header[0], header[1], header[2], header[3]);
|
||||
|
||||
/* get the sample depth and derive the sample format from it */
|
||||
@@ -112,7 +112,7 @@ static int pcm_bluray_parse_header(AVCodecContext *avctx,
|
||||
avctx->bits_per_coded_sample;
|
||||
|
||||
if (avctx->debug & FF_DEBUG_PICT_INFO)
|
||||
dprintf(avctx,
|
||||
av_dlog(avctx,
|
||||
"pcm_bluray_parse_header: %d channels, %d bits per sample, %d kHz, %d kbit\n",
|
||||
avctx->channels, avctx->bits_per_coded_sample,
|
||||
avctx->sample_rate, avctx->bit_rate);
|
||||
@@ -291,7 +291,7 @@ static int pcm_bluray_decode_frame(AVCodecContext *avctx,
|
||||
|
||||
retval = src - avpkt->data;
|
||||
if (avctx->debug & FF_DEBUG_BITSTREAM)
|
||||
dprintf(avctx, "pcm_bluray_decode_frame: decoded %d -> %d bytes\n",
|
||||
av_dlog(avctx, "pcm_bluray_decode_frame: decoded %d -> %d bytes\n",
|
||||
retval, *data_size);
|
||||
return retval;
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ static int decode_rle(AVCodecContext *avctx, AVSubtitle *sub,
|
||||
return -1;
|
||||
}
|
||||
|
||||
dprintf(avctx, "Pixel Count = %d, Area = %d\n", pixel_count, sub->rects[0]->w * sub->rects[0]->h);
|
||||
av_dlog(avctx, "Pixel Count = %d, Area = %d\n", pixel_count, sub->rects[0]->w * sub->rects[0]->h);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -253,7 +253,7 @@ static void parse_palette_segment(AVCodecContext *avctx,
|
||||
YUV_TO_RGB1(cb, cr);
|
||||
YUV_TO_RGB2(r, g, b, y);
|
||||
|
||||
dprintf(avctx, "Color %d := (%d,%d,%d,%d)\n", color_id, r, g, b, alpha);
|
||||
av_dlog(avctx, "Color %d := (%d,%d,%d,%d)\n", color_id, r, g, b, alpha);
|
||||
|
||||
/* Store color in palette */
|
||||
ctx->clut[color_id] = RGBA(r,g,b,alpha);
|
||||
@@ -282,7 +282,7 @@ static void parse_presentation_segment(AVCodecContext *avctx,
|
||||
int w = bytestream_get_be16(&buf);
|
||||
int h = bytestream_get_be16(&buf);
|
||||
|
||||
dprintf(avctx, "Video Dimensions %dx%d\n",
|
||||
av_dlog(avctx, "Video Dimensions %dx%d\n",
|
||||
w, h);
|
||||
if (av_image_check_size(w, h, 0, avctx) >= 0)
|
||||
avcodec_set_dimensions(avctx, w, h);
|
||||
@@ -317,7 +317,7 @@ static void parse_presentation_segment(AVCodecContext *avctx,
|
||||
|
||||
/* TODO If cropping, cropping_x, cropping_y, cropping_width, cropping_height (all 2 bytes).*/
|
||||
|
||||
dprintf(avctx, "Subtitle Placement x=%d, y=%d\n", x, y);
|
||||
av_dlog(avctx, "Subtitle Placement x=%d, y=%d\n", x, y);
|
||||
|
||||
if (x > avctx->width || y > avctx->height) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Subtitle out of video bounds. x = %d, y = %d, video width = %d, video height = %d.\n",
|
||||
@@ -433,7 +433,7 @@ static int decode(AVCodecContext *avctx, void *data, int *data_size,
|
||||
segment_type = bytestream_get_byte(&buf);
|
||||
segment_length = bytestream_get_be16(&buf);
|
||||
|
||||
dprintf(avctx, "Segment Length %d, Segment Type %x\n", segment_length, segment_type);
|
||||
av_dlog(avctx, "Segment Length %d, Segment Type %x\n", segment_length, segment_type);
|
||||
|
||||
if (segment_type != DISPLAY_SEGMENT && segment_length > buf_end - buf)
|
||||
break;
|
||||
|
||||
+3
-3
@@ -431,7 +431,7 @@ static int decode_frame(AVCodecContext *avctx,
|
||||
goto fail;
|
||||
tag32 = bytestream_get_be32(&s->bytestream);
|
||||
tag = av_bswap32(tag32);
|
||||
dprintf(avctx, "png: tag=%c%c%c%c length=%u\n",
|
||||
av_dlog(avctx, "png: tag=%c%c%c%c length=%u\n",
|
||||
(tag & 0xff),
|
||||
((tag >> 8) & 0xff),
|
||||
((tag >> 16) & 0xff),
|
||||
@@ -453,7 +453,7 @@ static int decode_frame(AVCodecContext *avctx,
|
||||
s->interlace_type = *s->bytestream++;
|
||||
crc = bytestream_get_be32(&s->bytestream);
|
||||
s->state |= PNG_IHDR;
|
||||
dprintf(avctx, "width=%d height=%d depth=%d color_type=%d compression_type=%d filter_type=%d interlace_type=%d\n",
|
||||
av_dlog(avctx, "width=%d height=%d depth=%d color_type=%d compression_type=%d filter_type=%d interlace_type=%d\n",
|
||||
s->width, s->height, s->bit_depth, s->color_type,
|
||||
s->compression_type, s->filter_type, s->interlace_type);
|
||||
break;
|
||||
@@ -517,7 +517,7 @@ static int decode_frame(AVCodecContext *avctx,
|
||||
s->width);
|
||||
s->crow_size = s->pass_row_size + 1;
|
||||
}
|
||||
dprintf(avctx, "row_size=%d crow_size =%d\n",
|
||||
av_dlog(avctx, "row_size=%d crow_size =%d\n",
|
||||
s->row_size, s->crow_size);
|
||||
s->image_buf = p->data[0];
|
||||
s->image_linesize = p->linesize[0];
|
||||
|
||||
+5
-5
@@ -246,7 +246,7 @@ static int rv10_decode_picture_header(MpegEncContext *s)
|
||||
if(!marker) av_log(s->avctx, AV_LOG_ERROR, "marker missing\n");
|
||||
pb_frame = get_bits1(&s->gb);
|
||||
|
||||
dprintf(s->avctx, "pict_type=%d pb_frame=%d\n", s->pict_type, pb_frame);
|
||||
av_dlog(s->avctx, "pict_type=%d pb_frame=%d\n", s->pict_type, pb_frame);
|
||||
|
||||
if (pb_frame){
|
||||
av_log(s->avctx, AV_LOG_ERROR, "pb frame not supported\n");
|
||||
@@ -265,7 +265,7 @@ static int rv10_decode_picture_header(MpegEncContext *s)
|
||||
s->last_dc[0] = get_bits(&s->gb, 8);
|
||||
s->last_dc[1] = get_bits(&s->gb, 8);
|
||||
s->last_dc[2] = get_bits(&s->gb, 8);
|
||||
dprintf(s->avctx, "DC:%d %d %d\n", s->last_dc[0],
|
||||
av_dlog(s->avctx, "DC:%d %d %d\n", s->last_dc[0],
|
||||
s->last_dc[1], s->last_dc[2]);
|
||||
}
|
||||
}
|
||||
@@ -561,7 +561,7 @@ static int rv10_decode_packet(AVCodecContext *avctx,
|
||||
ff_er_frame_start(s);
|
||||
}
|
||||
|
||||
dprintf(avctx, "qscale=%d\n", s->qscale);
|
||||
av_dlog(avctx, "qscale=%d\n", s->qscale);
|
||||
|
||||
/* default quantization values */
|
||||
if(s->codec_id== CODEC_ID_RV10){
|
||||
@@ -600,7 +600,7 @@ static int rv10_decode_packet(AVCodecContext *avctx,
|
||||
for(s->mb_num_left= mb_count; s->mb_num_left>0; s->mb_num_left--) {
|
||||
int ret;
|
||||
ff_update_block_index(s);
|
||||
dprintf(avctx, "**mb x=%d y=%d\n", s->mb_x, s->mb_y);
|
||||
av_dlog(avctx, "**mb x=%d y=%d\n", s->mb_x, s->mb_y);
|
||||
|
||||
s->mv_dir = MV_DIR_FORWARD;
|
||||
s->mv_type = MV_TYPE_16X16;
|
||||
@@ -655,7 +655,7 @@ static int rv10_decode_frame(AVCodecContext *avctx,
|
||||
int slice_count;
|
||||
const uint8_t *slices_hdr = NULL;
|
||||
|
||||
dprintf(avctx, "*****frame %d size=%d\n", avctx->frame_number, buf_size);
|
||||
av_dlog(avctx, "*****frame %d size=%d\n", avctx->frame_number, buf_size);
|
||||
|
||||
/* no supplementary picture */
|
||||
if (buf_size == 0) {
|
||||
|
||||
@@ -305,7 +305,7 @@ static int shorten_decode_frame(AVCodecContext *avctx,
|
||||
s->bitstream_size= buf_size;
|
||||
|
||||
if(buf_size < s->max_framesize){
|
||||
//dprintf(avctx, "wanna more data ... %d\n", buf_size);
|
||||
//av_dlog(avctx, "wanna more data ... %d\n", buf_size);
|
||||
*data_size = 0;
|
||||
return input_buf_size;
|
||||
}
|
||||
|
||||
+1
-1
@@ -180,7 +180,7 @@ int ff_vaapi_common_end_frame(MpegEncContext *s)
|
||||
struct vaapi_context * const vactx = s->avctx->hwaccel_context;
|
||||
int ret = -1;
|
||||
|
||||
dprintf(s->avctx, "ff_vaapi_common_end_frame()\n");
|
||||
av_dlog(s->avctx, "ff_vaapi_common_end_frame()\n");
|
||||
|
||||
if (commit_slices(vactx) < 0)
|
||||
goto done;
|
||||
|
||||
@@ -227,7 +227,7 @@ static int start_frame(AVCodecContext *avctx,
|
||||
VAPictureParameterBufferH264 *pic_param;
|
||||
VAIQMatrixBufferH264 *iq_matrix;
|
||||
|
||||
dprintf(avctx, "start_frame()\n");
|
||||
av_dlog(avctx, "start_frame()\n");
|
||||
|
||||
vactx->slice_param_size = sizeof(VASliceParameterBufferH264);
|
||||
|
||||
@@ -289,7 +289,7 @@ static int end_frame(AVCodecContext *avctx)
|
||||
{
|
||||
H264Context * const h = avctx->priv_data;
|
||||
|
||||
dprintf(avctx, "end_frame()\n");
|
||||
av_dlog(avctx, "end_frame()\n");
|
||||
return ff_vaapi_common_end_frame(&h->s);
|
||||
}
|
||||
|
||||
@@ -302,7 +302,7 @@ static int decode_slice(AVCodecContext *avctx,
|
||||
MpegEncContext * const s = &h->s;
|
||||
VASliceParameterBufferH264 *slice_param;
|
||||
|
||||
dprintf(avctx, "decode_slice(): buffer %p, size %d\n", buffer, size);
|
||||
av_dlog(avctx, "decode_slice(): buffer %p, size %d\n", buffer, size);
|
||||
|
||||
/* Fill in VASliceParameterBufferH264. */
|
||||
slice_param = (VASliceParameterBufferH264 *)ff_vaapi_alloc_slice(avctx->hwaccel_context, buffer, size);
|
||||
|
||||
@@ -44,7 +44,7 @@ static int vaapi_mpeg2_start_frame(AVCodecContext *avctx, av_unused const uint8_
|
||||
VAIQMatrixBufferMPEG2 *iq_matrix;
|
||||
int i;
|
||||
|
||||
dprintf(avctx, "vaapi_mpeg2_start_frame()\n");
|
||||
av_dlog(avctx, "vaapi_mpeg2_start_frame()\n");
|
||||
|
||||
vactx->slice_param_size = sizeof(VASliceParameterBufferMPEG2);
|
||||
|
||||
@@ -111,7 +111,7 @@ static int vaapi_mpeg2_decode_slice(AVCodecContext *avctx, const uint8_t *buffer
|
||||
GetBitContext gb;
|
||||
uint32_t start_code, quantiser_scale_code, intra_slice_flag, macroblock_offset;
|
||||
|
||||
dprintf(avctx, "vaapi_mpeg2_decode_slice(): buffer %p, size %d\n", buffer, size);
|
||||
av_dlog(avctx, "vaapi_mpeg2_decode_slice(): buffer %p, size %d\n", buffer, size);
|
||||
|
||||
/* Determine macroblock_offset */
|
||||
init_get_bits(&gb, buffer, 8 * size);
|
||||
|
||||
@@ -47,7 +47,7 @@ static int vaapi_mpeg4_start_frame(AVCodecContext *avctx, av_unused const uint8_
|
||||
VAIQMatrixBufferMPEG4 *iq_matrix;
|
||||
int i;
|
||||
|
||||
dprintf(avctx, "vaapi_mpeg4_start_frame()\n");
|
||||
av_dlog(avctx, "vaapi_mpeg4_start_frame()\n");
|
||||
|
||||
vactx->slice_param_size = sizeof(VASliceParameterBufferMPEG4);
|
||||
|
||||
@@ -125,7 +125,7 @@ static int vaapi_mpeg4_decode_slice(AVCodecContext *avctx, const uint8_t *buffer
|
||||
MpegEncContext * const s = avctx->priv_data;
|
||||
VASliceParameterBufferMPEG4 *slice_param;
|
||||
|
||||
dprintf(avctx, "vaapi_mpeg4_decode_slice(): buffer %p, size %d\n", buffer, size);
|
||||
av_dlog(avctx, "vaapi_mpeg4_decode_slice(): buffer %p, size %d\n", buffer, size);
|
||||
|
||||
/* video_plane_with_short_video_header() contains all GOBs
|
||||
* in-order, and this is what VA API (Intel backend) expects: only
|
||||
|
||||
@@ -138,7 +138,7 @@ static int vaapi_vc1_start_frame(AVCodecContext *avctx, av_unused const uint8_t
|
||||
struct vaapi_context * const vactx = avctx->hwaccel_context;
|
||||
VAPictureParameterBufferVC1 *pic_param;
|
||||
|
||||
dprintf(avctx, "vaapi_vc1_start_frame()\n");
|
||||
av_dlog(avctx, "vaapi_vc1_start_frame()\n");
|
||||
|
||||
vactx->slice_param_size = sizeof(VASliceParameterBufferVC1);
|
||||
|
||||
@@ -308,7 +308,7 @@ static int vaapi_vc1_decode_slice(AVCodecContext *avctx, const uint8_t *buffer,
|
||||
MpegEncContext * const s = &v->s;
|
||||
VASliceParameterBufferVC1 *slice_param;
|
||||
|
||||
dprintf(avctx, "vaapi_vc1_decode_slice(): buffer %p, size %d\n", buffer, size);
|
||||
av_dlog(avctx, "vaapi_vc1_decode_slice(): buffer %p, size %d\n", buffer, size);
|
||||
|
||||
/* Current bit buffer is beyond any marker for VC-1, so skip it */
|
||||
if (avctx->codec_id == CODEC_ID_VC1 && IS_MARKER(AV_RB32(buffer))) {
|
||||
|
||||
+4
-4
@@ -217,13 +217,13 @@ int ff_wma_init(AVCodecContext *avctx, int flags2)
|
||||
high_freq = high_freq * 0.5;
|
||||
}
|
||||
}
|
||||
dprintf(s->avctx, "flags2=0x%x\n", flags2);
|
||||
dprintf(s->avctx, "version=%d channels=%d sample_rate=%d bitrate=%d block_align=%d\n",
|
||||
av_dlog(s->avctx, "flags2=0x%x\n", flags2);
|
||||
av_dlog(s->avctx, "version=%d channels=%d sample_rate=%d bitrate=%d block_align=%d\n",
|
||||
s->version, s->nb_channels, s->sample_rate, s->bit_rate,
|
||||
s->block_align);
|
||||
dprintf(s->avctx, "bps=%f bps1=%f high_freq=%f bitoffset=%d\n",
|
||||
av_dlog(s->avctx, "bps=%f bps1=%f high_freq=%f bitoffset=%d\n",
|
||||
bps, bps1, high_freq, s->byte_offset_bits);
|
||||
dprintf(s->avctx, "use_noise_coding=%d use_exp_vlc=%d nb_block_sizes=%d\n",
|
||||
av_dlog(s->avctx, "use_noise_coding=%d use_exp_vlc=%d nb_block_sizes=%d\n",
|
||||
s->use_noise_coding, s->use_exp_vlc, s->nb_block_sizes);
|
||||
|
||||
/* compute the scale factor band sizes for each MDCT block size */
|
||||
|
||||
+16
-16
@@ -288,8 +288,8 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
||||
s->bits_per_sample = AV_RL16(edata_ptr);
|
||||
/** dump the extradata */
|
||||
for (i = 0; i < avctx->extradata_size; i++)
|
||||
dprintf(avctx, "[%x] ", avctx->extradata[i]);
|
||||
dprintf(avctx, "\n");
|
||||
av_dlog(avctx, "[%x] ", avctx->extradata[i]);
|
||||
av_dlog(avctx, "\n");
|
||||
|
||||
} else {
|
||||
av_log_ask_for_sample(avctx, "Unknown extradata size\n");
|
||||
@@ -582,7 +582,7 @@ static int decode_tilehdr(WMAProDecodeCtx *s)
|
||||
int i;
|
||||
int offset = 0;
|
||||
for (i = 0; i < s->channel[c].num_subframes; i++) {
|
||||
dprintf(s->avctx, "frame[%i] channel[%i] subframe[%i]"
|
||||
av_dlog(s->avctx, "frame[%i] channel[%i] subframe[%i]"
|
||||
" len %i\n", s->frame_num, c, i,
|
||||
s->channel[c].subframe_len[i]);
|
||||
s->channel[c].subframe_offset[i] = offset;
|
||||
@@ -781,7 +781,7 @@ static int decode_coeffs(WMAProDecodeCtx *s, int c)
|
||||
const uint16_t* run;
|
||||
const float* level;
|
||||
|
||||
dprintf(s->avctx, "decode coefficients for channel %i\n", c);
|
||||
av_dlog(s->avctx, "decode coefficients for channel %i\n", c);
|
||||
|
||||
vlctable = get_bits1(&s->gb);
|
||||
vlc = &coef_vlc[vlctable];
|
||||
@@ -1066,7 +1066,7 @@ static int decode_subframe(WMAProDecodeCtx *s)
|
||||
}
|
||||
}
|
||||
|
||||
dprintf(s->avctx,
|
||||
av_dlog(s->avctx,
|
||||
"processing subframe with offset %i len %i\n", offset, subframe_len);
|
||||
|
||||
/** get a list of all channels that contain the estimated block */
|
||||
@@ -1093,7 +1093,7 @@ static int decode_subframe(WMAProDecodeCtx *s)
|
||||
s->parsed_all_subframes = 1;
|
||||
|
||||
|
||||
dprintf(s->avctx, "subframe is part of %i channels\n",
|
||||
av_dlog(s->avctx, "subframe is part of %i channels\n",
|
||||
s->channels_for_cur_subframe);
|
||||
|
||||
/** calculate number of scale factor bands and their offsets */
|
||||
@@ -1204,7 +1204,7 @@ static int decode_subframe(WMAProDecodeCtx *s)
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
dprintf(s->avctx, "BITSTREAM: subframe header length was %i\n",
|
||||
av_dlog(s->avctx, "BITSTREAM: subframe header length was %i\n",
|
||||
get_bits_count(&s->gb) - s->subframe_offset);
|
||||
|
||||
/** parse coefficients */
|
||||
@@ -1218,7 +1218,7 @@ static int decode_subframe(WMAProDecodeCtx *s)
|
||||
sizeof(*s->channel[c].coeffs) * subframe_len);
|
||||
}
|
||||
|
||||
dprintf(s->avctx, "BITSTREAM: subframe length was %i\n",
|
||||
av_dlog(s->avctx, "BITSTREAM: subframe length was %i\n",
|
||||
get_bits_count(&s->gb) - s->subframe_offset);
|
||||
|
||||
if (transmit_coeffs) {
|
||||
@@ -1294,7 +1294,7 @@ static int decode_frame(WMAProDecodeCtx *s)
|
||||
if (s->len_prefix)
|
||||
len = get_bits(gb, s->log2_frame_size);
|
||||
|
||||
dprintf(s->avctx, "decoding frame with length %x\n", len);
|
||||
av_dlog(s->avctx, "decoding frame with length %x\n", len);
|
||||
|
||||
/** decode tile information */
|
||||
if (decode_tilehdr(s)) {
|
||||
@@ -1313,7 +1313,7 @@ static int decode_frame(WMAProDecodeCtx *s)
|
||||
/** read drc info */
|
||||
if (s->dynamic_range_compression) {
|
||||
s->drc_gain = get_bits(gb, 8);
|
||||
dprintf(s->avctx, "drc_gain %i\n", s->drc_gain);
|
||||
av_dlog(s->avctx, "drc_gain %i\n", s->drc_gain);
|
||||
}
|
||||
|
||||
/** no idea what these are for, might be the number of samples
|
||||
@@ -1324,18 +1324,18 @@ static int decode_frame(WMAProDecodeCtx *s)
|
||||
/** usually true for the first frame */
|
||||
if (get_bits1(gb)) {
|
||||
skip = get_bits(gb, av_log2(s->samples_per_frame * 2));
|
||||
dprintf(s->avctx, "start skip: %i\n", skip);
|
||||
av_dlog(s->avctx, "start skip: %i\n", skip);
|
||||
}
|
||||
|
||||
/** sometimes true for the last frame */
|
||||
if (get_bits1(gb)) {
|
||||
skip = get_bits(gb, av_log2(s->samples_per_frame * 2));
|
||||
dprintf(s->avctx, "end skip: %i\n", skip);
|
||||
av_dlog(s->avctx, "end skip: %i\n", skip);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dprintf(s->avctx, "BITSTREAM: frame header length was %i\n",
|
||||
av_dlog(s->avctx, "BITSTREAM: frame header length was %i\n",
|
||||
get_bits_count(gb) - s->frame_offset);
|
||||
|
||||
/** reset subframe states */
|
||||
@@ -1505,7 +1505,7 @@ static int decode_packet(AVCodecContext *avctx,
|
||||
|
||||
/** get number of bits that need to be added to the previous frame */
|
||||
num_bits_prev_frame = get_bits(gb, s->log2_frame_size);
|
||||
dprintf(avctx, "packet[%d]: nbpf %x\n", avctx->frame_number,
|
||||
av_dlog(avctx, "packet[%d]: nbpf %x\n", avctx->frame_number,
|
||||
num_bits_prev_frame);
|
||||
|
||||
/** check for packet loss */
|
||||
@@ -1527,14 +1527,14 @@ static int decode_packet(AVCodecContext *avctx,
|
||||
/** append the previous frame data to the remaining data from the
|
||||
previous packet to create a full frame */
|
||||
save_bits(s, gb, num_bits_prev_frame, 1);
|
||||
dprintf(avctx, "accumulated %x bits of frame data\n",
|
||||
av_dlog(avctx, "accumulated %x bits of frame data\n",
|
||||
s->num_saved_bits - s->frame_offset);
|
||||
|
||||
/** decode the cross packet frame if it is valid */
|
||||
if (!s->packet_loss)
|
||||
decode_frame(s);
|
||||
} else if (s->num_saved_bits - s->frame_offset) {
|
||||
dprintf(avctx, "ignoring %x previously saved bits\n",
|
||||
av_dlog(avctx, "ignoring %x previously saved bits\n",
|
||||
s->num_saved_bits - s->frame_offset);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user