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)

jpeg2000-p0_09.src.png (123 bytes ) - added by Pierre-Anthony Lemieux 2 years ago.

Download all attachments as: .zip

Change History (10)

by Pierre-Anthony Lemieux, 2 years ago

Attachment: jpeg2000-p0_09.src.png added

comment:1 by Balling, 2 years ago

Is that HTJ2K codestream too?

comment:2 by Pierre-Anthony Lemieux, 2 years ago

comment:3 by Balling, 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...

Last edited 5 weeks ago by Balling (previous) (diff)

comment:4 by MasterQuestionable, 7 months ago

Cc: MasterQuestionable 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 Balling, 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:7 by Pierre-Anthony Lemieux, 5 weeks ago

There is a bug in the patch, which Osamu has fixed should post shortly.

comment:8 by Osamu Watanabe, 4 weeks ago

Last edited 4 weeks ago by Osamu Watanabe (previous) (diff)

comment:9 by Pierre-Anthony Lemieux, 4 weeks ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.