Opened 2 years ago
Closed 6 months ago
#10121 closed enhancement (fixed)
jpeg2000 decoder fails on conformance codestream p0_10.j2k
Reported by: | Pierre-Anthony Lemieux | Owned by: | |
---|---|---|---|
Priority: | wish | Component: | avcodec |
Version: | git-master | Keywords: | j2k |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
The jpeg2000 decoder fails to accurately decode the p0_10.j2k image from the ISO/ITU conformance codestream set:
- the error message
bpno became invalid
is emitted - there are significant errors in the lower left quadrant when compared to the reference image
c1p0_10-{1,2,3}.pgx
A description of the codestream is available at p0_10syntax.txt
How to reproduce:
ffmpeg -flags +bitexact -i p0_10.j2k p0_10.png ffmpeg version eef763c7057a7f5f4b7dae7855d07b2a6da8b537
Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.
Change History (11)
comment:1 by , 2 years ago
Keywords: | j2k added; jpeg2000 removed |
---|---|
Priority: | normal → wish |
Type: | defect → enhancement |
Version: | unspecified → git-master |
comment:3 by , 2 years ago
It is not an HTJ2K codestream. Description at https://gitlab.com/wg1/htj2k-codestreams/-/blob/master/descriptions_profile0/p0_10syntax.txt
That one is a bug in -c:v jpeg2000 native encoder and still decodes bitperfectly.
I encountered the bug using the native decoder on the master branch. What do you mean by bitperfectly?
comment:4 by , 2 years ago
What do you mean by bitperfectly?
The bug there is in the lossless native encoder. Compared to openjpeg that decoder does not warn upon. It is still lossless though.
comment:5 by , 2 years ago
The bug there is in the lossless native encoder.
Two different encoders are not expected to produce the same codestreams.
The native encoder might therefore be good, but create a codestream that results in a different code path in the native decoder, which triggers the bpno warning.
comment:6 by , 2 years ago
Status: | new → open |
---|
The native encoder might therefore be good, but create a codestream that results in a different code path
It is also creates bigger file. Quite bigger.
BTW, openjpeg triggers this line on the sample https://github.com/uclouvain/openjpeg/blob/0bda7188b7b545232a341f1d978b1e4feda46fc2/src/bin/common/color.c#L432
which also blocks -c:v libopenjpeg
Kakadu works the same as openjpeg still, lower left quadrant is indeed different.
follow-up: 8 comment:7 by , 21 months ago
the error message bpno became invalid is emitted
Is there any chance this file was created using ffmpeg and thus it is a bug in fixed #5360?
comment:8 by , 21 months ago
comment:9 by , 7 months ago
comment:10 by , 6 months ago
comment:11 by , 6 months ago
Resolution: | → fixed |
---|---|
Status: | open → closed |
Fixed in 6f4a95cfb8e6ed97fdd1027251181caded44860f.
Appears to be different with #5360. That one is a bug in -c:v jpeg2000 native encoder and still decodes bitperfectly.
Also, that is HTJ2K codestreams, no? That patch is not yet apllied: https://patchwork.ffmpeg.org/project/ffmpeg/patch/20221215190033.19251-1-etemesicaleb@gmail.com/