Ticket #214 (closed defect: fixed)

Opened 2 years ago

Last modified 17 months ago

1bpp interlaced png (without filter) decodes incorrectly

Reported by: ami_stuff Owned by:
Priority: normal Component: avcodec
Version: git-master Keywords: png
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

the file is png 1bpp interlaced without any filter, decodes incorrectly

C:\>ffmpeg -i "1bpp_interlaced_none.png"
ffmpeg version git-N-29961-g9763420, Copyright (c) 2000-2011 the FFmpeg develope
rs
  built on May 16 2011 18:13:11 with gcc 4.5.3
  configuration: --enable-gpl --enable-version3 --enable-memalign-hack --enable-
runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libo
pencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --
enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger
 --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enabl
e-libx264 --enable-libxavs --enable-libxvid --enable-zlib --pkg-config=pkg-confi
g
  libavutil    51.  2. 1 / 51.  2. 1
  libavcodec   53.  5. 0 / 53.  5. 0
  libavformat  53.  1. 0 / 53.  1. 0
  libavdevice  53.  0. 0 / 53.  0. 0
  libavfilter   2.  5. 0 /  2.  5. 0
  libswscale    0. 14. 0 /  0. 14. 0
  libpostproc  51.  2. 0 / 51.  2. 0
Input #0, image2, from '1bpp_interlaced_none.png':
  Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
    Stream #0.0: Video: png, monob, 1023x767, 25 tbr, 25 tbn, 25 tbc
At least one output file must be specified

Attachments

1bpp_interlaced_none.png Download (47.8 KB) - added by ami_stuff 2 years ago.

Change History

Changed 2 years ago by ami_stuff

comment:1 Changed 2 years ago by ami_stuff

1bpp interlaced with paeth and sub filters also decodes incorrectly, but maybe fix of this ticket will fix them as well

comment:2 Changed 2 years ago by cehoyos

  • Status changed from new to open
  • Version changed from unspecified to git-master
  • Component changed from undetermined to avcodec
  • Reproduced by developer set

comment:3 Changed 2 years ago by saste

Hi,

that's really a libsdl ancient bug, libsdl is not able to cope with files with odd width.

I wonder how should we deal with it, if rescaling or failing. Best solution would be to report the bug upstream and get it hopefully fixed.

comment:4 follow-up: ↓ 5 Changed 2 years ago by ami_stuff

There are two problems:

ffmpeg converts the file incorrectly

and

ffplay displays the file incorrectly (add black line) because of libsdl bug,

but the real problem here is that ffmpeg can't convert correctly png interlaced files.

comment:5 in reply to: ↑ 4 Changed 2 years ago by saste

Replying to ami_stuff:

There are two problems:

ffmpeg converts the file incorrectly

and

ffplay displays the file incorrectly (add black line) because of libsdl bug,

but the real problem here is that ffmpeg can't convert correctly png interlaced files.

Indeed, I was misled by the libsdl bug, I confirm the bug.

A complete review of the png decoder would be nice, also for adding support of the missing features but I don't think I'll have time for this in the next future.

comment:6 Changed 21 months ago by michael

  • Status changed from open to closed
  • Resolution set to fixed

Fixed locally will push soon

comment:7 Changed 17 months ago by cehoyos

  • Keywords png added
Note: See TracTickets for help on using tickets.