Opened 11 years ago

Closed 11 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 11 years ago.
12bpp_extended.jpg (712.4 KB ) - added by ami_stuff 11 years ago.
12bpp_extended.pgm (1.5 MB ) - added by Carl Eugen Hoyos 11 years ago.
12bpp_progressive.pgm (1.5 MB ) - added by Carl Eugen Hoyos 11 years ago.
12bpp_extended_broken.pnm (1.5 MB ) - added by Carl Eugen Hoyos 11 years ago.
12bpp_progressive_broken.pnm (1.5 MB ) - added by Carl Eugen Hoyos 11 years ago.

Change History (12)

by ami_stuff, 11 years ago

Attachment: 12bpp_progressive.jpg added

by ami_stuff, 11 years ago

Attachment: 12bpp_extended.jpg added

comment:1 by Carl Eugen Hoyos, 11 years ago

Component: undeterminedavcodec
Keywords: mjpeg added
Priority: normalwish
Type: defectenhancement
Version: unspecifiedgit-master

Which application can decode this image?

comment:2 by ami_stuff, 11 years ago

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 by Carl Eugen Hoyos, 11 years ago

Reproduced by developer: set
Status: newopen

Decoding to palletized gif works fine with libjpeg v6b.

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

by Carl Eugen Hoyos, 11 years ago

Attachment: 12bpp_extended.pgm added

by Carl Eugen Hoyos, 11 years ago

Attachment: 12bpp_progressive.pgm added

in reply to:  3 comment:4 by Carl Eugen Hoyos, 11 years ago

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.

by Carl Eugen Hoyos, 11 years ago

Attachment: 12bpp_extended_broken.pnm added

by Carl Eugen Hoyos, 11 years ago

comment:5 by Carl Eugen Hoyos, 11 years ago

Samples made with libjpeg v6b uploaded for reference.

comment:6 by Carl Eugen Hoyos, 11 years ago

Resolution: fixed
Status: openclosed

Fixed by Michael in bcd1c20.

Note: See TracTickets for help on using tickets.