Opened 11 years ago

Closed 11 years ago

#1999 closed defect (fixed)

fax 2d decompression bug

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

Description

there must be some error (maybe off by one) in fax decoding code

attached files have normal FillOrder and were created with tiffcp

tiffcp -f msb2lsb -c g3:2d test.tif g3_2d_msb2lsb.tif

tiffcp -f msb2lsb -c g4 test.tif g4_msb2lsb.tif

(-c g3:1d decodes ok)

C:\>ffmpeg -i g3_2d_msb2lsb.tif -f null -
ffmpeg version N-47325-gb90e795 Copyright (c) 2000-2012 the FFmpeg developers
  built on Dec  1 2012 02:23:25 with gcc 4.5.0 (GCC) 20100414 (Fedora MinGW 4.5.
0-1.fc14)
  configuration: --prefix=/var/www/users/research/ffmpeg/snapshots/build --arch=
x86 --target-os=mingw32 --cross-prefix=i686-pc-mingw32- --cc='ccache i686-pc-min
gw32-gcc' --enable-w32threads --enable-memalign-hack --enable-runtime-cpudetect
--enable-cross-compile --enable-static --disable-shared --extra-libs='-lws2_32 -
lwinmm -lpthread' --extra-cflags='--static -I/var/www/users/research/ffmpeg/snap
shots/build/include' --extra-ldflags='-static -L/var/www/users/research/ffmpeg/s
napshots/build/lib' --enable-bzlib --enable-zlib --enable-gpl --enable-version3
--enable-nonfree --enable-libx264 --enable-libspeex --enable-libtheora --enable-
libvorbis --enable-libfaac --enable-libxvid --enable-libopencore-amrnb --enable-
libopencore-amrwb --enable-libmp3lame --enable-libvpx --disable-decoder=libvpx
  libavutil      52. 10.100 / 52. 10.100
  libavcodec     54. 78.100 / 54. 78.100
  libavformat    54. 41.100 / 54. 41.100
  libavdevice    54.  3.101 / 54.  3.101
  libavfilter     3. 23.104 /  3. 23.104
  libswscale      2.  1.103 /  2.  1.103
  libswresample   0. 17.101 /  0. 17.101
  libpostproc    52.  2.100 / 52.  2.100
[tiff @ 0x1eec9e0] Run overrun
    Last message repeated 6 times
Input #0, image2, from 'g3_2d_msb2lsb.tif':
  Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: tiff, monob, 1024x768, 25 tbr, 25 tbn, 25 tbc
Output #0, null, to 'pipe:':
  Metadata:
    encoder         : Lavf54.41.100
    Stream #0:0: Video: rawvideo (B0W1 / 0x31573042), monob, 1024x768, q=2-31, 2
00 kb/s, 90k tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (tiff -> rawvideo)
Press [q] to stop, [?] for help
[tiff @ 0x1eec9e0] Run overrun
    Last message repeated 6 times
[null @ 0x1fc5da0] Encoder did not produce proper pts, making some up.
frame=    1 fps=0.0 q=0.0 Lsize=       0kB time=00:00:00.04 bitrate=   0.0kbits/
s
video:0kB audio:0kB subtitle:0 global headers:0kB muxing overhead -100.000000%
C:\>ffmpeg -i g4_msb2lsb.tif -f null -
ffmpeg version N-47325-gb90e795 Copyright (c) 2000-2012 the FFmpeg developers
  built on Dec  1 2012 02:23:25 with gcc 4.5.0 (GCC) 20100414 (Fedora MinGW 4.5.
0-1.fc14)
  configuration: --prefix=/var/www/users/research/ffmpeg/snapshots/build --arch=
x86 --target-os=mingw32 --cross-prefix=i686-pc-mingw32- --cc='ccache i686-pc-min
gw32-gcc' --enable-w32threads --enable-memalign-hack --enable-runtime-cpudetect
--enable-cross-compile --enable-static --disable-shared --extra-libs='-lws2_32 -
lwinmm -lpthread' --extra-cflags='--static -I/var/www/users/research/ffmpeg/snap
shots/build/include' --extra-ldflags='-static -L/var/www/users/research/ffmpeg/s
napshots/build/lib' --enable-bzlib --enable-zlib --enable-gpl --enable-version3
--enable-nonfree --enable-libx264 --enable-libspeex --enable-libtheora --enable-
libvorbis --enable-libfaac --enable-libxvid --enable-libopencore-amrnb --enable-
libopencore-amrwb --enable-libmp3lame --enable-libvpx --disable-decoder=libvpx
  libavutil      52. 10.100 / 52. 10.100
  libavcodec     54. 78.100 / 54. 78.100
  libavformat    54. 41.100 / 54. 41.100
  libavdevice    54.  3.101 / 54.  3.101
  libavfilter     3. 23.104 /  3. 23.104
  libswscale      2.  1.103 /  2.  1.103
  libswresample   0. 17.101 /  0. 17.101
  libpostproc    52.  2.100 / 52.  2.100
[tiff @ 0x1eec9e0] Run overrun
Input #0, image2, from 'g4_msb2lsb.tif':
  Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: tiff, monob, 1024x768, 25 tbr, 25 tbn, 25 tbc
Output #0, null, to 'pipe:':
  Metadata:
    encoder         : Lavf54.41.100
    Stream #0:0: Video: rawvideo (B0W1 / 0x31573042), monob, 1024x768, q=2-31, 2
00 kb/s, 90k tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (tiff -> rawvideo)
Press [q] to stop, [?] for help
[tiff @ 0x1eec9e0] Run overrun
[null @ 0x1fc5da0] Encoder did not produce proper pts, making some up.
frame=    1 fps=0.0 q=0.0 Lsize=       0kB time=00:00:00.04 bitrate=   0.0kbits/
s
video:0kB audio:0kB subtitle:0 global headers:0kB muxing overhead -100.000000%

Attachments (3)

g3_2d_msb2lsb.tif (304.0 KB ) - added by ami_stuff 11 years ago.
g4_msb2lsb.tif (287.3 KB ) - added by ami_stuff 11 years ago.
fax.diff (397 bytes ) - added by ami_stuff 11 years ago.

Download all attachments as: .zip

Change History (6)

by ami_stuff, 11 years ago

Attachment: g3_2d_msb2lsb.tif added

by ami_stuff, 11 years ago

Attachment: g4_msb2lsb.tif added

comment:1 by Carl Eugen Hoyos, 11 years ago

Component: undeterminedavcodec
Keywords: tif added
Reproduced by developer: set
Status: newopen
Version: unspecifiedgit-master

Artefacts are visible for both samples.

by ami_stuff, 11 years ago

Attachment: fax.diff added

comment:2 by ami_stuff, 11 years ago

The problem seems to be with size of buffer, see attached hack.

comment:3 by Michael Niedermayer, 11 years ago

Resolution: fixed
Status: openclosed
Note: See TracTickets for help on using tickets.