Mercurial > libavcodec.hg
comparison png.c @ 3177:8d1b2cc2a75b libavcodec
(f)printf --> av_log conversion
taken from a patch by Steve L'Homme
author | diego |
---|---|
date | Wed, 08 Mar 2006 11:43:10 +0000 |
parents | 0b546eab515d |
children | 82277c821113 |
comparison
equal
deleted
inserted
replaced
3176:babf844e1308 | 3177:8d1b2cc2a75b |
---|---|
505 if (length > 0x7fffffff) | 505 if (length > 0x7fffffff) |
506 goto fail; | 506 goto fail; |
507 tag32 = get32(&s->bytestream); | 507 tag32 = get32(&s->bytestream); |
508 tag = bswap_32(tag32); | 508 tag = bswap_32(tag32); |
509 #ifdef DEBUG | 509 #ifdef DEBUG |
510 printf("png: tag=%c%c%c%c length=%u\n", | 510 av_log(avctx, AV_LOG_DEBUG, "png: tag=%c%c%c%c length=%u\n", |
511 (tag & 0xff), | 511 (tag & 0xff), |
512 ((tag >> 8) & 0xff), | 512 ((tag >> 8) & 0xff), |
513 ((tag >> 16) & 0xff), | 513 ((tag >> 16) & 0xff), |
514 ((tag >> 24) & 0xff), length); | 514 ((tag >> 24) & 0xff), length); |
515 #endif | 515 #endif |
529 s->filter_type = *s->bytestream++; | 529 s->filter_type = *s->bytestream++; |
530 s->interlace_type = *s->bytestream++; | 530 s->interlace_type = *s->bytestream++; |
531 crc = get32(&s->bytestream); | 531 crc = get32(&s->bytestream); |
532 s->state |= PNG_IHDR; | 532 s->state |= PNG_IHDR; |
533 #ifdef DEBUG | 533 #ifdef DEBUG |
534 printf("width=%d height=%d depth=%d color_type=%d compression_type=%d filter_type=%d interlace_type=%d\n", | 534 av_log(avctx, AV_LOG_DEBUG, "width=%d height=%d depth=%d color_type=%d compression_type=%d filter_type=%d interlace_type=%d\n", |
535 s->width, s->height, s->bit_depth, s->color_type, | 535 s->width, s->height, s->bit_depth, s->color_type, |
536 s->compression_type, s->filter_type, s->interlace_type); | 536 s->compression_type, s->filter_type, s->interlace_type); |
537 #endif | 537 #endif |
538 break; | 538 break; |
539 case MKTAG('I', 'D', 'A', 'T'): | 539 case MKTAG('I', 'D', 'A', 'T'): |
587 s->bits_per_pixel, | 587 s->bits_per_pixel, |
588 s->width); | 588 s->width); |
589 s->crow_size = s->pass_row_size + 1; | 589 s->crow_size = s->pass_row_size + 1; |
590 } | 590 } |
591 #ifdef DEBUG | 591 #ifdef DEBUG |
592 printf("row_size=%d crow_size =%d\n", | 592 av_log(avctx, AV_LOG_DEBUG, "row_size=%d crow_size =%d\n", |
593 s->row_size, s->crow_size); | 593 s->row_size, s->crow_size); |
594 #endif | 594 #endif |
595 s->image_buf = p->data[0]; | 595 s->image_buf = p->data[0]; |
596 s->image_linesize = p->linesize[0]; | 596 s->image_linesize = p->linesize[0]; |
597 /* copy the palette if needed */ | 597 /* copy the palette if needed */ |