Opened 19 months ago

Last modified 10 months ago

#5523 open defect

mjpeg: fix decoding of lead jpeg lossless

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

Description

probably fields should be swapped

C:\>ffmpeg -i lead_jpeg_lossless.avi out.png
ffmpeg version N-79791-g03fceb7 Copyright (c) 2000-2016 the FFmpeg developers
  built 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-pthreads --enable-memalign-hack --enable-runtime-cpudetect --
enable-cross-compile --enable-static --disable-shared --extra-libs='-lws2_32 -lw
inmm -lpthread' --extra-cflags='--static -I/var/www/users/research/ffmpeg/snapsh
ots/build/include' --extra-ldflags='-static -L/var/www/users/research/ffmpeg/sna
pshots/build/lib' --enable-bzlib --enable-zlib --enable-gpl --enable-version3 --
enable-nonfree --enable-libx264 --enable-libspeex --enable-libtheora --enable-li
bvorbis --enable-libfaac --enable-libxvid --enable-libopencore-amrnb --enable-li
bopencore-amrwb --enable-libmp3lame --enable-libfreetype --enable-libvpx --disab
le-decoder=libvpx
  libavutil      55. 24.100 / 55. 24.100
  libavcodec     57. 39.100 / 57. 39.100
  libavformat    57. 36.100 / 57. 36.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 45.100 /  6. 45.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
Input #0, avi, from 'lead_jpeg_lossless.avi':
  Duration: 00:00:00.10, start: 0.000000, bitrate: 121139 kb/s
    Stream #0:0: Video: mjpeg (Ljpg / 0x67706A4C), bgr24(bt470bg/unknown/unknown
), 1024x768, 10 fps, 10 tbr, 10 tbn
[image2 @ 0x2c38fc0] Using AVStream.codec to pass codec parameters to muxers is
deprecated, use AVStream.codecpar instead.
Output #0, image2, to 'out.png':
  Metadata:
    encoder         : Lavf57.36.100
    Stream #0:0: Video: png, rgb24, 1024x768, q=2-31, 200 kb/s, 10 fps, 10 tbn
    Metadata:
      encoder         : Lavc57.39.100 png
Stream mapping:
  Stream #0:0 -> #0:0 (mjpeg (native) -> png (native))
Press [q] to stop, [?] for help
frame=    1 fps=0.0 q=-0.0 Lsize=N/A time=00:00:00.10 bitrate=N/A speed=0.64x

video:1667kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing
overhead: unknown

Attachments (2)

lead_jpeg_lossless.avi (1.4 MB) - added by ami_stuff 19 months ago.
lead_jpeg_lossless_2.avi (1.6 MB) - added by ami_stuff 19 months ago.

Change History (6)

Changed 19 months ago by ami_stuff

Changed 19 months ago by ami_stuff

comment:1 Changed 19 months ago by ami_stuff

"lead_jpeg_lossless_2.avi" decodes correctly with ffmpeg - all of the attached samples decodes correctly with the original lead codec

comment:2 Changed 19 months ago by cehoyos

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

The first byte of the AVI1 chunk is not read, it contains the polarity, 0 for progressive.
Initial patch sent.

Note: See TracTickets for help on using tickets.