X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fpng.c;h=70a080e29e3326d8b85db65e3b9c398fef2a605c;hb=4da6d194e5b00404f4d545adcaa8e206592ae746;hp=2af7700630611f9dc5a21cdb7fd92dfcff52adc9;hpb=b958a7f1114a49b0a0e36479ba96c83c4fe4c3b3;p=ffmpeg diff --git a/libavcodec/png.c b/libavcodec/png.c index 2af77006306..70a080e29e3 100644 --- a/libavcodec/png.c +++ b/libavcodec/png.c @@ -1,21 +1,21 @@ /* * PNG image format - * Copyright (c) 2003 Fabrice Bellard. + * Copyright (c) 2003 Fabrice Bellard * - * This file is part of FFmpeg. + * This file is part of Libav. * - * FFmpeg is free software; you can redistribute it and/or + * Libav is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * FFmpeg is distributed in the hope that it will be useful, + * Libav is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software + * License along with Libav; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "avcodec.h" @@ -23,6 +23,7 @@ #include "png.h" const uint8_t ff_pngsig[8] = {137, 80, 78, 71, 13, 10, 26, 10}; +const uint8_t ff_mngsig[8] = {138, 77, 78, 71, 13, 10, 26, 10}; /* Mask to determine which y pixels are valid in a pass */ const uint8_t ff_png_pass_ymask[NB_PASSES] = { @@ -30,12 +31,12 @@ const uint8_t ff_png_pass_ymask[NB_PASSES] = { }; /* minimum x value */ -const uint8_t ff_png_pass_xmin[NB_PASSES] = { +static const uint8_t ff_png_pass_xmin[NB_PASSES] = { 0, 4, 0, 2, 0, 1, 0 }; /* x shift to get row width */ -const uint8_t ff_png_pass_xshift[NB_PASSES] = { +static const uint8_t ff_png_pass_xshift[NB_PASSES] = { 3, 3, 2, 2, 1, 1, 0 }; @@ -80,13 +81,3 @@ int ff_png_pass_row_size(int pass, int bits_per_pixel, int width) pass_width = (width - xmin + (1 << shift) - 1) >> shift; return (pass_width * bits_per_pixel + 7) >> 3; } - -int ff_png_common_init(AVCodecContext *avctx){ - PNGContext *s = avctx->priv_data; - - avcodec_get_frame_defaults((AVFrame*)&s->picture); - avctx->coded_frame= (AVFrame*)&s->picture; -// s->avctx= avctx; - - return 0; -}