[FFmpeg-trac] #172(undetermined:new): PNG 1bpp grayscale image decodes incorrectly
FFmpeg
trac at avcodec.org
Sun May 8 13:02:46 CEST 2011
#172: PNG 1bpp grayscale image decodes incorrectly
--------------------------+--------------------------
Reporter: ami_stuff | Type: defect
Status: new | Priority: normal
Component: undetermined | Version: unspecified
Keywords: | Blocked By:
Blocking: | Reproduced: 0
Analyzed: 0 |
--------------------------+--------------------------
Issue 1416
{{{
Author: ami_stuff Date: 2009-09-25.23:20:46
Attached PNG image is 1bpp grayscale and decodes incorrectly.
This color mode (1bpp grayscale) seems to to be supported by FFmpeg.
pngdec.c:
"else if (s->bit_depth == 1 &&
s->color_type == PNG_COLOR_TYPE_GRAY) {
avctx->pix_fmt = PIX_FMT_MONOBLACK;"
PS. I have also PNG 4bpp color/grayscale images which decodes incorrectly.
If
there is a need I can upload.
--------
C:\>ffmpeg -i Test_1bpp_grayscale.png
FFmpeg version SVN-r19926, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --enable-memalign-hack --prefix=/mingw --cross-
prefix=i686-ming
w32- --cc=ccache-i686-mingw32-gcc --target-os=mingw32 --arch=i686
--cpu=i686 --e
nable-avisynth --enable-gpl --enable-zlib --enable-bzlib --enable-libgsm
--enabl
e-libfaad --enable-pthreads --enable-libvorbis --enable-libtheora
--enable-libsp
eex --enable-libmp3lame --enable-libopenjpeg --enable-libxvid --enable-
libschroe
dinger --enable-libx264
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.35. 0 / 52.35. 0
libavformat 52.38. 0 / 52.38. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 7. 1 / 0. 7. 1
built on Sep 20 2009 04:03:00, gcc: 4.2.4
Input #0, image2, from 'Test_1bpp_grayscale.png':
Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
Stream #0.0: Video: png, pal8, 1024x768, 25 tbr, 25 tbn, 25 tbc
At least one output file must be specified
}}}
{{{
Author: kostya Date: 2009-09-28.05:57:15
quite probably PNG file says "palettized data with 1 bit per entry"
and lavc PNG decoder still treats it as 8 bit per entry, so that
condition you cited is not triggered because of different s-
>color_type
}}}
--
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/172>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list