1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-10-07 10:21:53 +02:00

pngdec: cosmetics, reformat.

Also remove a commented out line.
This commit is contained in:
Anton Khirnov 2012-12-08 12:58:46 +01:00
parent edb2426b75
commit 9221c0af77

View File

@ -88,6 +88,7 @@ static void png_put_interlaced_row(uint8_t *dst, int width,
mask = ff_png_pass_mask[pass];
dsp_mask = png_pass_dsp_mask[pass];
switch (bits_per_pixel) {
case 1:
/* we must initialize the line to zero before writing to it */
@ -242,7 +243,9 @@ static void png_filter_row(PNGDSPContext *dsp, uint8_t *dst, int filter_type,
}
}
static av_always_inline void convert_to_rgb32_loco(uint8_t *dst, const uint8_t *src, int width, int loco)
static av_always_inline void convert_to_rgb32_loco(uint8_t *dst,
const uint8_t *src,
int width, int loco)
{
int j;
unsigned int r, g, b, a;
@ -386,12 +389,12 @@ static int decode_frame(AVCodecContext *avctx,
void *data, int *got_frame,
AVPacket *avpkt)
{
PNGDecContext * const s = avctx->priv_data;
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
PNGDecContext * const s = avctx->priv_data;
AVFrame *picture = data;
AVFrame *p;
uint8_t *crow_buf_base = NULL;
AVFrame *p;
uint32_t tag, length;
int ret;
@ -406,9 +409,8 @@ static int decode_frame(AVCodecContext *avctx,
return -1;
bytestream2_init(&s->gb, buf + 8, buf_size - 8);
s->y=
s->state=0;
// memset(s, 0, sizeof(PNGDecContext));
s->y = s->state = 0;
/* init the zlib */
s->zstream.zalloc = ff_png_zalloc;
s->zstream.zfree = ff_png_zfree;
@ -445,7 +447,8 @@ static int decode_frame(AVCodecContext *avctx,
s->interlace_type = bytestream2_get_byte(&s->gb);
bytestream2_skip(&s->gb, 4); /* crc */
s->state |= PNG_IHDR;
av_dlog(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;
@ -626,7 +629,8 @@ static int decode_frame(AVCodecContext *avctx,
goto the_end;
}
static av_cold int png_dec_init(AVCodecContext *avctx){
static av_cold int png_dec_init(AVCodecContext *avctx)
{
PNGDecContext *s = avctx->priv_data;
s->current_picture = &s->picture1;