Opened 4 years ago

Closed 14 months ago

#1211 closed enhancement (fixed)

jpeg2000: incorrect output

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

Description

attached images (saved with qt) decodes with wrong colors/incorrectly compared to the output which comes from libopenjpeg

C:\>ffmpeg -strict -2 -i 24bpp.jp2 out.bmp
ffmpeg version N-39787-gcca9528 Copyright (c) 2000-2012 the FFmpeg developers
  built on Apr 14 2012 02:20:31 with gcc 4.5.0 20100414 (Fedora MinGW 4.5.0-1.fc
14)
  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' --extra-cflags='--static -I/var/www/users/research/ffmpeg/snapshots/buil
d/include' --extra-ldflags='-static -L/var/www/users/research/ffmpeg/snapshots/b
uild/lib' --enable-bzlib --enable-zlib --enable-gpl --enable-version3 --enable-n
onfree --enable-libx264 --enable-libspeex --enable-libtheora --enable-libvorbis
--enable-libfaac --enable-libxvid --enable-libopencore-amrnb --enable-libopencor
e-amrwb --enable-libmp3lame --enable-libvpx --disable-decoder=libvpx
  libavutil      51. 46.100 / 51. 46.100
  libavcodec     54. 14.101 / 54. 14.101
  libavformat    54.  3.100 / 54.  3.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 69.101 /  2. 69.101
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 11.100 /  0. 11.100
  libpostproc    52.  0.100 / 52.  0.100
Input #0, image2, from '24bpp.jp2':
  Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: j2k, rgb24, 1024x768, 25 tbr, 25 tbn, 25 tbc
Incompatible pixel format 'rgb24' for codec 'bmp', auto-selecting format 'bgr24'

[buffer @ 0x1dc4a80] w:1024 h:768 pixfmt:rgb24 tb:1/1000000 sar:0/1 sws_param:fl
ags=2
[buffersink @ 0x1dc4d80] auto-inserting filter 'auto-inserted scale 0' between t
he filter 'src' and the filter 'out'
[scale @ 0x1dc4fa0] w:1024 h:768 fmt:rgb24 sar:0/1 -> w:1024 h:768 fmt:bgr24 sar
:0/1 flags:0x4
Output #0, image2, to 'out.bmp':
  Metadata:
    encoder         : Lavf54.3.100
    Stream #0:0: Video: bmp, bgr24, 1024x768, q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (j2k -> bmp)
Press [q] to stop, [?] for help
frame=    1 fps=0.9 q=0.0 Lsize=       0kB time=00:00:00.04 bitrate=   0.0kbits/
s
video:2304kB audio:0kB global headers:0kB muxing overhead -100.000000%

Attachments (6)

8bpp.jp2 (300.3 KB) - added by ami_stuff 4 years ago.
8bpp_lossless.jp2 (373.7 KB) - added by ami_stuff 4 years ago.
24bpp.jp2 (258.0 KB) - added by ami_stuff 4 years ago.
24bpp_lossless.jp2 (808.3 KB) - added by ami_stuff 4 years ago.
32bpp.jp2 (244.0 KB) - added by ami_stuff 4 years ago.
32bpp_lossless.jp2 (808.4 KB) - added by ami_stuff 4 years ago.

Change History (11)

Changed 4 years ago by ami_stuff

Changed 4 years ago by ami_stuff

Changed 4 years ago by ami_stuff

Changed 4 years ago by ami_stuff

Changed 4 years ago by ami_stuff

Changed 4 years ago by ami_stuff

comment:1 Changed 4 years ago by cehoyos

  • Component changed from undetermined to avcodec
  • Keywords j2k added
  • Priority changed from normal to wish
  • Reproduced by developer set
  • Status changed from new to open
  • Type changed from defect to enhancement
  • Version changed from unspecified to git-master

Lossless images are broken, the others look not bad, but the colours are not sufficiently saturated afaict.

comment:2 Changed 3 years ago by cehoyos

All images look visually fine since 582f533 (ticket #2612), the lossless images are not bitexact yet.

comment:3 Changed 14 months ago by michael

Can someone post the expected lossless output for comparing if decoding is lossless ?
this might have been fixed by the recent commits

comment:4 Changed 14 months ago by michael

  • Cc michael added

comment:5 Changed 14 months ago by cehoyos

  • Resolution set to fixed
  • Status changed from open to closed
Note: See TracTickets for help on using tickets.