[FFmpeg-trac] #5670(undetermined:new): PBM image decoding regression since 3.0.2
FFmpeg
trac at avcodec.org
Mon Jun 27 16:14:25 CEST 2016
#5670: PBM image decoding regression since 3.0.2
-------------------------------------+-------------------------------------
Reporter: zmwangx | Type: defect
Status: new | Priority: normal
Component: | Version: git-
undetermined | master
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Some recent changes since 3.0.2 seems to have broken decoding for certain
PBM images.
The PBM image in question is very simple. Here is its full content:
{{{
P1
6 10
0 0 0 0 1 0
0 0 0 0 1 0
0 0 0 0 1 0
0 0 0 0 1 0
0 0 0 0 1 0
0 0 0 0 1 0
1 0 0 0 1 0
0 1 1 1 0 0
0 0 0 0 0 0
0 0 0 0 0 0
}}}
It is also attached as `in.pbm`.
On latest git master (d693392), it can't be decoded:
{{{
% ffmpeg -report -v 9 -loglevel 99 -i in.pbm out.bmp
ffmpeg started on 2016-06-27 at 21:36:16
Report written to "ffmpeg-20160627-213616.log"
Command line:
ffmpeg -report -v 9 -loglevel 99 -i in.pbm out.bmp
ffmpeg version 3.0.git Copyright (c) 2000-2016 the FFmpeg developers
built with Apple LLVM version 7.3.0 (clang-703.0.29)
configuration: --prefix=/usr/local/Cellar/ffmpeg/HEAD --enable-shared
--enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables
--enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-
opencl --enable-libx264 --enable-libmp3lame --enable-libxvid --disable-
lzma --enable-vda
libavutil 55. 27.100 / 55. 27.100
libavcodec 57. 48.101 / 57. 48.101
libavformat 57. 40.101 / 57. 40.101
libavdevice 57. 0.102 / 57. 0.102
libavfilter 6. 46.102 / 6. 46.102
libavresample 3. 0. 0 / 3. 0. 0
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
libpostproc 54. 0.100 / 54. 0.100
Splitting the commandline.
Reading option '-report' ... matched as option 'report' (generate a
report) with argument '1'.
Reading option '-v' ... matched as option 'v' (set logging level) with
argument '9'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging
level) with argument '99'.
Reading option '-i' ... matched as input file with argument 'in.pbm'.
Reading option 'out.bmp' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option report (generate a report) with argument 1.
Applying option v (set logging level) with argument 9.
Applying option loglevel (set logging level) with argument 99.
Successfully parsed a group of options.
Parsing a group of options: input file in.pbm.
Successfully parsed a group of options.
Opening an input file: in.pbm.
[file @ 0x7fd819e00380] Setting default whitelist 'file,crypto'
[pbm_pipe @ 0x7fd81a801000] Format pbm_pipe probed with size=2048 and
score=52
[pbm_pipe @ 0x7fd81a801000] Before avformat_find_stream_info() pos: 0
bytes read:128 seeks:0 nb_streams:1
[pbm_pipe @ 0x7fd81a801000] After avformat_find_stream_info() pos: 128
bytes read:128 seeks:0 frames:1
Input #0, pbm_pipe, from 'in.pbm':
Duration: N/A, bitrate: N/A
Stream #0:0, 1, 1/25: Video: pbm, 1 reference frame, monow, 6x10
(0x0), 0/1, 25 tbr, 25 tbn, 25 tbc
Successfully opened the file.
Parsing a group of options: output file out.bmp.
Successfully parsed a group of options.
Opening an output file: out.bmp.
Successfully opened the file.
detected 8 logical cores
[graph 0 input from stream 0:0 @ 0x7fd819e01ac0] Setting 'video_size' to
value '6x10'
[graph 0 input from stream 0:0 @ 0x7fd819e01ac0] Setting 'pix_fmt' to
value '9'
[graph 0 input from stream 0:0 @ 0x7fd819e01ac0] Setting 'time_base' to
value '1/25'
[graph 0 input from stream 0:0 @ 0x7fd819e01ac0] Setting 'pixel_aspect' to
value '0/1'
[graph 0 input from stream 0:0 @ 0x7fd819e01ac0] Setting 'sws_param' to
value 'flags=2'
[graph 0 input from stream 0:0 @ 0x7fd819e01ac0] Setting 'frame_rate' to
value '25/1'
[graph 0 input from stream 0:0 @ 0x7fd819e01ac0] w:6 h:10 pixfmt:monow
tb:1/25 fr:25/1 sar:0/1 sws_param:flags=2
[format @ 0x7fd819e02280] compat: called with
args=[bgra|bgr24|rgb565le|rgb555le|rgb444le|rgb8|bgr8|rgb4_byte|bgr4_byte|gray|pal8|monob]
[format @ 0x7fd819e02280] Setting 'pix_fmts' to value
'bgra|bgr24|rgb565le|rgb555le|rgb444le|rgb8|bgr8|rgb4_byte|bgr4_byte|gray|pal8|monob'
[auto-inserted scaler 0 @ 0x7fd819e02760] Setting 'flags' to value
'bicubic'
[auto-inserted scaler 0 @ 0x7fd819e02760] w:iw h:ih flags:'bicubic'
interl:0
[format @ 0x7fd819e02280] auto-inserting filter 'auto-inserted scaler 0'
between the filter 'Parsed_null_0' and the filter 'format'
[AVFilterGraph @ 0x7fd819e01040] query_formats: 4 queried, 2 merged, 1
already done, 0 delayed
[auto-inserted scaler 0 @ 0x7fd819e02760] picking monob out of 12
ref:monow alpha:0
[swscaler @ 0x7fd81a813e00] Forcing full internal H chroma due to input
having non subsampled chroma
[swscaler @ 0x7fd81a813e00] full chroma interpolation for destination
format 'monob' not yet implemented
[auto-inserted scaler 0 @ 0x7fd819e02760] w:6 h:10 fmt:monow sar:0/1 ->
w:6 h:10 fmt:monob sar:0/1 flags:0x4
[image2 @ 0x7fd81a801c00] Using AVStream.codec to pass codec parameters to
muxers is deprecated, use AVStream.codecpar instead.
Output #0, image2, to 'out.bmp':
Metadata:
encoder : Lavf57.40.101
Stream #0:0, 0, 1/25: Video: bmp, 1 reference frame, monob, 6x10, 0/1,
q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc
Metadata:
encoder : Lavc57.48.101 bmp
Stream mapping:
Stream #0:0 -> #0:0 (pbm (native) -> bmp (native))
Press [q] to stop, [?] for help
cur_dts is invalid (this is harmless if it occurs once at the start per
stream)
Error while decoding stream #0:0: Invalid data found when processing input
cur_dts is invalid (this is harmless if it occurs once at the start per
stream)
cur_dts is invalid (this is harmless if it occurs once at the start per
stream)
cur_dts is invalid (this is harmless if it occurs once at the start per
stream)
[output stream 0:0 @ 0x7fd819e01fe0] EOF on sink link output stream
0:0:default.
No more output streams to write to, finishing.
frame= 0 fps=0.0 q=0.0 Lsize=N/A time=00:00:00.00 bitrate=N/A speed=
0x
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: unknown
Input file #0 (in.pbm):
Input stream #0:0 (video): 1 packets read (18 bytes); 0 frames decoded;
Total: 1 packets (18 bytes) demuxed
Output file #0 (out.bmp):
Output stream #0:0 (video): 0 frames encoded; 0 packets muxed (0 bytes);
Total: 0 packets (0 bytes) muxed
Output file is empty, nothing was encoded (check -ss / -t / -frames
parameters if used)
0 frames successfully decoded, 1 decoding errors
[AVIOContext @ 0x7fd819e004c0] Statistics: 128 bytes read, 0 seeks
Conversion failed!
}}}
Same thing happens for the 3.1 release.
On the other hand, the 3.0.2 release decodes it just fine:
{{{
% ffmpeg -report -v 9 -loglevel 99 -i in.pbm out.bmp
ffmpeg started on 2016-06-27 at 21:39:16
Report written to "ffmpeg-20160627-213916.log"
Command line:
ffmpeg -report -v 9 -loglevel 99 -i in.pbm out.bmp
ffmpeg version 3.0.2 Copyright (c) 2000-2016 the FFmpeg developers
built with Apple LLVM version 7.3.0 (clang-703.0.29)
configuration: --prefix=/usr/local/Cellar/ffmpeg/3.0.2 --enable-shared
--enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables
--enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-
opencl --enable-libx264 --enable-libmp3lame --enable-libxvid --enable-
libfreetype --enable-libtheora --enable-libvorbis --enable-libvpx
--enable-librtmp --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libass --enable-ffplay --enable-libspeex --enable-libschroedinger
--enable-libfdk-aac --enable-openssl --enable-libopus --enable-frei0r
--enable-libcaca --enable-libvidstab --enable-libx265 --enable-libopenjpeg
--disable-decoder=jpeg2000 --extra-
cflags=-I/usr/local/Cellar/openjpeg/1.5.2_1/include/openjpeg-1.5 --enable-
nonfree --enable-vda
libavutil 55. 17.103 / 55. 17.103
libavcodec 57. 24.102 / 57. 24.102
libavformat 57. 25.100 / 57. 25.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 31.100 / 6. 31.100
libavresample 3. 0. 0 / 3. 0. 0
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Splitting the commandline.
Reading option '-report' ... matched as option 'report' (generate a
report) with argument '1'.
Reading option '-v' ... matched as option 'v' (set logging level) with
argument '9'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging
level) with argument '99'.
Reading option '-i' ... matched as input file with argument 'in.pbm'.
Reading option 'out.bmp' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option report (generate a report) with argument 1.
Applying option v (set logging level) with argument 9.
Applying option loglevel (set logging level) with argument 99.
Successfully parsed a group of options.
Parsing a group of options: input file in.pbm.
Successfully parsed a group of options.
Opening an input file: in.pbm.
[file @ 0x7fd1a3600ee0] Setting default whitelist 'file,crypto'
[image2 @ 0x7fd1a5008c00] Format image2 probed with size=2048 and score=50
[image2 @ 0x7fd1a5008c00] Before avformat_find_stream_info() pos: 0 bytes
read:128 seeks:0
[image2 @ 0x7fd1a5008c00] After avformat_find_stream_info() pos: 128 bytes
read:128 seeks:0 frames:1
Input #0, image2, from 'in.pbm':
Duration: 00:00:00.04, start: 0.000000, bitrate: 25 kb/s
Stream #0:0, 1, 1/25: Video: pbm, 1 reference frame, monow, 6x10
(0x0), 1/25, 25 tbr, 25 tbn, 25 tbc
Successfully opened the file.
Parsing a group of options: output file out.bmp.
Successfully parsed a group of options.
Opening an output file: out.bmp.
Successfully opened the file.
detected 8 logical cores
[graph 0 input from stream 0:0 @ 0x7fd1a36014e0] Setting 'video_size' to
value '6x10'
[graph 0 input from stream 0:0 @ 0x7fd1a36014e0] Setting 'pix_fmt' to
value '9'
[graph 0 input from stream 0:0 @ 0x7fd1a36014e0] Setting 'time_base' to
value '1/25'
[graph 0 input from stream 0:0 @ 0x7fd1a36014e0] Setting 'pixel_aspect' to
value '0/1'
[graph 0 input from stream 0:0 @ 0x7fd1a36014e0] Setting 'sws_param' to
value 'flags=2'
[graph 0 input from stream 0:0 @ 0x7fd1a36014e0] Setting 'frame_rate' to
value '25/1'
[graph 0 input from stream 0:0 @ 0x7fd1a36014e0] w:6 h:10 pixfmt:monow
tb:1/25 fr:25/1 sar:0/1 sws_param:flags=2
[format @ 0x7fd1a3601f20] compat: called with
args=[bgra|bgr24|rgb565le|rgb555le|rgb444le|rgb8|bgr8|rgb4_byte|bgr4_byte|gray|pal8|monob]
[format @ 0x7fd1a3601f20] Setting 'pix_fmts' to value
'bgra|bgr24|rgb565le|rgb555le|rgb444le|rgb8|bgr8|rgb4_byte|bgr4_byte|gray|pal8|monob'
[auto-inserted scaler 0 @ 0x7fd1a3602c80] Setting 'flags' to value
'bicubic'
[auto-inserted scaler 0 @ 0x7fd1a3602c80] w:iw h:ih flags:'bicubic'
interl:0
[format @ 0x7fd1a3601f20] auto-inserting filter 'auto-inserted scaler 0'
between the filter 'Parsed_null_0' and the filter 'format'
[AVFilterGraph @ 0x7fd1a3700940] query_formats: 4 queried, 2 merged, 1
already done, 0 delayed
[auto-inserted scaler 0 @ 0x7fd1a3602c80] picking monob out of 12
ref:monow alpha:0
[swscaler @ 0x7fd1a501b200] Forcing full internal H chroma due to input
having non subsampled chroma
[swscaler @ 0x7fd1a501b200] full chroma interpolation for destination
format 'monob' not yet implemented
[auto-inserted scaler 0 @ 0x7fd1a3602c80] w:6 h:10 fmt:monow sar:0/1 ->
w:6 h:10 fmt:monob sar:0/1 flags:0x4
Output #0, image2, to 'out.bmp':
Metadata:
encoder : Lavf57.25.100
Stream #0:0, 0, 1/25: Video: bmp, 1 reference frame, monob, 6x10,
1/25, q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc
Metadata:
encoder : Lavc57.24.102 bmp
Stream mapping:
Stream #0:0 -> #0:0 (pbm (native) -> bmp (native))
Press [q] to stop, [?] for help
cur_dts is invalid (this is harmless if it occurs once at the start per
stream)
Clipping frame in rate conversion by 0.000008
[file @ 0x7fd1a3704400] Setting default whitelist 'file,crypto'
[AVIOContext @ 0x7fd1a34001e0] Statistics: 0 seeks, 1 writeouts
[output stream 0:0 @ 0x7fd1a3601c40] EOF on sink link output stream
0:0:default.
No more output streams to write to, finishing.
frame= 1 fps=0.0 q=-0.0 Lsize=N/A time=00:00:00.04 bitrate=N/A
speed=23.1x
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: unknown
Input file #0 (in.pbm):
Input stream #0:0 (video): 1 packets read (128 bytes); 1 frames decoded;
Total: 1 packets (128 bytes) demuxed
Output file #0 (out.bmp):
Output stream #0:0 (video): 1 frames encoded; 1 packets muxed (102
bytes);
Total: 1 packets (102 bytes) muxed
1 frames successfully decoded, 0 decoding errors
[AVIOContext @ 0x7fd1a3600c20] Statistics: 128 bytes read, 0 seeks
}}}
Unfortunately I did not bisect to find the questionable commit.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/5670>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list