Opened 5 years ago

Closed 5 years ago

#2812 closed enhancement (fixed)

jpeg: support 12bpp grayscale

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

Description

C:\>ffmpeg -i 12bpp_progressive.jpg
ffmpeg version N-54924-g5156d48 Copyright (c) 2000-2013 the FFmpeg developers
  built on Jul 25 2013 09:14:26 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-libvpx --disable-decoder=libvpx
  libavutil      52. 40.100 / 52. 40.100
  libavcodec     55. 19.100 / 55. 19.100
  libavformat    55. 12.102 / 55. 12.102
  libavdevice    55.  3.100 / 55.  3.100
  libavfilter     3. 81.103 /  3. 81.103
  libswscale      2.  4.100 /  2.  4.100
  libswresample   0. 17.103 /  0. 17.103
  libpostproc    52.  3.100 / 52.  3.100
[mjpeg @ 0x20e64c0] only 8 bits/component accepted
[image2 @ 0x200a920] decoding for stream 0 failed
[image2 @ 0x200a920] Could not find codec parameters for stream 0 (Video: mjpeg)
: unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
12bpp_progressive.jpg: could not find codec parameters

Attachments (6)

12bpp_progressive.jpg (693.6 KB) - added by ami_stuff 5 years ago.
12bpp_extended.jpg (712.4 KB) - added by ami_stuff 5 years ago.
12bpp_extended.pgm (1.5 MB) - added by cehoyos 5 years ago.
12bpp_progressive.pgm (1.5 MB) - added by cehoyos 5 years ago.
12bpp_extended_broken.pnm (1.5 MB) - added by cehoyos 5 years ago.
12bpp_progressive_broken.pnm (1.5 MB) - added by cehoyos 5 years ago.

Change History (12)

Changed 5 years ago by ami_stuff

Changed 5 years ago by ami_stuff

comment:1 Changed 5 years ago by cehoyos

  • Component changed from undetermined to avcodec
  • Keywords mjpeg added
  • Priority changed from normal to wish
  • Type changed from defect to enhancement
  • Version changed from unspecified to git-master

Which application can decode this image?

comment:2 Changed 5 years ago by ami_stuff

According to the last post from this thread libjpeg (with some edits of config files) should be able to decode attached samples (but I didn't test):

http://forums.nekochan.net/viewtopic.php?f=7&t=16724688

comment:3 follow-up: Changed 5 years ago by cehoyos

  • Reproduced by developer set
  • Status changed from new to open

Decoding to palletized gif works fine with libjpeg v6b.

Decoding to pnm produces a file that neither FFmpeg nor ImageMagick? can read.

Changed 5 years ago by cehoyos

Changed 5 years ago by cehoyos

comment:4 in reply to: ↑ 3 Changed 5 years ago by cehoyos

Replying to cehoyos:

Decoding to pnm produces a file that neither FFmpeg nor ImageMagick? can read.

This was a bug in libjpeg that was fixed in 2009, no release was made since:
http://libjpeg.cvs.sourceforge.net/viewvc/libjpeg/libjpeg/wrppm.c?r1=1.1&r2=1.2

Working pgm files attached for reference.

Changed 5 years ago by cehoyos

Changed 5 years ago by cehoyos

comment:5 Changed 5 years ago by cehoyos

Samples made with libjpeg v6b uploaded for reference.

comment:6 Changed 5 years ago by cehoyos

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

Fixed by Michael in bcd1c20.

Note: See TracTickets for help on using tickets.