Opened 2 years ago
Closed 4 weeks ago
#10123 closed defect (fixed)
j2k decoder fails on on conformance codestream p0_09.j2k when bitexact is used
Reported by: | Pierre-Anthony Lemieux | Owned by: | |
---|---|---|---|
Priority: | minor | Component: | avcodec |
Version: | git-master | Keywords: | j2k |
Cc: | MasterQuestionable | Blocked By: | |
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
The jpeg2000 decoder fails to accurately decode the p0_09.j2k image from the ISO/ITU conformance codestream set when bitexact is set.
Compare:
ffmpeg -i p0_09.j2k p0_09.png
and
ffmpeg -flags +bitexact -i p0_09.j2k p0_09.exact.png
with the reference image (attached) generated from c1p0_09-0.pgx.
Attachments (1)
Change History (10)
by , 2 years ago
Attachment: | jpeg2000-p0_09.src.png added |
---|
comment:1 by , 2 years ago
comment:2 by , 2 years ago
It is not an HTJ2K codestream. Description at https://gitlab.com/wg1/htj2k-codestreams/-/blob/master/descriptions_profile0/p0_09syntax.txt
comment:3 by , 2 years ago
Why are you using bitexact here?
Interesting,
by decoding to .yuv (rawvideo (Y800 / 0x30303859), gray(progressive)) you can indeed see it is different with +bitexact. Ha
On the other hand this sample is lossy...
comment:4 by , 7 months ago
Cc: | added |
---|
͏ https://trac.ffmpeg.org/wiki/colorspace#bitexact
͏ .
͏ Take care the "stochastic" part.
͏ Does JPEG 2000 use such technique? and for decoding..?
͏ Sounds unpractical.
comment:6 by , 5 weeks ago
Please apply the https://patchwork.ffmpeg.org/project/ffmpeg/patch/20240912085158.2565620-1-owatanab@es.takushoku-u.ac.jp/
It does not matter that they are "larger after the patch", our encoder is terrible compared to Kakadu used in Photoshop. The files produced are very big, and that is well known.
We need this so that we have optimal
ISO/IEC 15444-4 | Rec. ITU-T T.803 (J2K conformance testing) specifies tolerances for decoding of lossy codestreams.
comment:8 by , 4 weeks ago
The fixed patch has been sent to ffmpeg-devel.
https://patchwork.ffmpeg.org/project/ffmpeg/patch/20241103044837.1667397-2-owatanab@es.takushoku-u.ac.jp/
comment:9 by , 4 weeks ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Is that HTJ2K codestream too?