Opened 8 years ago

Closed 13 months ago

Last modified 13 months ago

#5360 closed defect (fixed)

Errors shown when correctly decoding jpeg2000 frames

Reported by: Carl Eugen Hoyos Owned by:
Priority: minor Component: avcodec
Version: git-master Keywords: j2k regression
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Errors are shown when decoding jpeg2000 frames since a85b02dcf70f62a6a433a607143f1f78fa5648bb

$ ffmpeg -f lavfi -i testsrc=d=1 -pred 1 -vframes 1 out.j2k
$ ffmpeg -i out.j2k -f crc -
ffmpeg version N-79105-gdf34b70 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl
  libavutil      55. 19.100 / 55. 19.100
  libavcodec     57. 28.103 / 57. 28.103
  libavformat    57. 28.102 / 57. 28.102
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 39.102 /  6. 39.102
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
[jpeg2000 @ 0x2011960] bpno became negative
    Last message repeated 365 times
Input #0, j2k_pipe, from 'out.j2k':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: jpeg2000 (JPEG 2000 codestream restriction 0), rgb24, 320x240, lossless, 25 tbr, 25 tbn, 25 tbc
Output #0, crc, to 'pipe:':
  Metadata:
    encoder         : Lavf57.28.102
    Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 320x240, q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc
    Metadata:
      encoder         : Lavc57.28.103 rawvideo
Stream mapping:
  Stream #0:0 -> #0:0 (jpeg2000 (native) -> rawvideo (native))
Press [q] to stop, [?] for help
[jpeg2000 @ 0x202e0a0] bpno became negative
    Last message repeated 365 times
CRC=0x0d00d19b
frame=    1 fps=0.0 q=-0.0 Lsize=       0kB time=00:00:00.04 bitrate=   3.0kbits/s speed=1.74x
video:225kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

Decoding is still bit-exact.

Change History (3)

comment:1 by Balling, 3 years ago

Status: newopen

It now prints bpno became invalid after c579ceffbe30d048c7448c5e9238fc52094de630.

comment:2 by Balling, 3 years ago

Decoding is still bit-exact.

That may be the case (and IS), but the lossless (by default) file produced by

ffmpeg -f lavfi -i testsrc=d=1 -c:v libopenjpeg -vframes 1 out1.j2k

after fix for lossless (look here https://trac.ffmpeg.org/ticket/4653#comment:7) does not cause any problems when you do

ffmpeg -i out.j2k -f crc -

while native jpeg2000 encoder does... So it is a problem!!! Those warnings are just overflow checks though.

Also NOTE: file created by native encoder is bigger 22408 vs 18916 bytes.

Last edited 3 years ago by Balling (previous) (diff)

comment:3 by Balling, 13 months ago

Resolution: fixed
Status: openclosed

Native (and only native, nonnative decoder was removed, BOOOO!!!) encoder is fixed in 816676085e3d32f27d4001d9b95590046c487eb6, but please note that even before it was still lossless, even now when encoder produces different file it still decodes to image data with CRC 0x0d00d19 with both after the fix and before the fix.

Old files will still print bpno became invalid.

Last edited 13 months ago by Balling (previous) (diff)
Note: See TracTickets for help on using tickets.