[FFmpeg-devel] [PATCH v4 1/3] avcodec/jpeg2000dec: Add support for CAP and CPF markers

Pierre-Anthony Lemieux pal at sandflow.com
Fri Jul 12 22:51:30 EEST 2024


On Thu, Jul 11, 2024 at 10:28 PM Tomas Härdin <git at haerdin.se> wrote:
>
> > +            if (s->in_tile_headers == 1 && s->isHT && (!s-
> > >Ccap15_b11))
> > +                av_log(s->avctx, AV_LOG_WARNING, "COD marker is
> > found in HOMOGENEOUS HT set\n");
>
> How bad is this and the other markers being present in this case?

At the very least, it means that signaling is inconsistent within the
codestream since the standard states that:
"""
The HOMOGENEOUS set is the set of HTJ2K codestreams where:
• none of the functional marker segments, e.g., COD, COC, RGN, QCD,
QCC, and POC, are present in any
tile-part header; and
• no PPT marker segment is present.
"""

The point of signalling that a codestream is "HOMOGENEOUS" is to allow
decoders to configure themselves solely based on information retrieved
entirely from the main header.

Since, AFAIK, FFMPEG does not rely on the HOMOGENEOUS to short-circuit
configuration, incorrect HOMOGENEOUS signalling will likely not impact
FFMPEG.

This condition may impact downstream decoders and might signal
something deeply wrong with the codestream.

In any case, maybe the case ought to be clarified to something along
the lines of: "Non-conformant codestream: a COD marker is present in a
tile-part header even though the codestream is marked as HOMOGENEOUS."

> Should we perhaps error out?
>
> /Tomas
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-devel mailing list