[FFmpeg-devel] [PATCH] avcodec/jpeg2000dec: support of 2 fields in 1 AVPacket
Tomas Härdin
git at haerdin.se
Mon Feb 5 02:19:38 EET 2024
> > > > > The logic that scans the packet for two SOI markers shouldn't
> > > > > be
> > > > > necessary if the relevant information is carried over from
> > > > > the
> > > > > MXF
> > > > > demuxer.
> > > >
> > > > As far as I know there is nothing in the MXF file saying where
> > > > is
> > > > the
> > > > second field in the packet, at which MXF metadata do you think?
> > >
> > > Well, FrameLayout == SEPARATE_FIELDS, EditRate = 30000/1001 and
> > > FieldDominance == 2. DisplayHeight is the field height as S377
> > > says
> > > it
> > > should be for SEPARATE_FIELDS.
> >
> > It should also be said that what this patch effectively does is
> > silently convert SEPARATE_FIELDS to MIXED_FIELDS. What if I want to
> > transcode J2K to lower bitrate but keep it SEPARATE_FIELDS?
>
> See attached table from SMPTE ST 422, which specifies wrapping of J2K
> in MXF.
Which entry in the table would the provided file correspond to? To me
it seems none of them fit. There's two fields, meaning two j2k
codestreams, in each corresponding essence element KLV packet (I think,
unless CP packets get reassembled somewhere else). Entry I2 seems
closest but it specifies FULL_FRAME. I1 is otherwise tempting, but
there SampleRate should equal the field rate whereas the file has
SampleRate = 30000/1001.
Aside: I didn't realize one could use SampleRate like this, but Annex
G.2.2 is explicit about it.
I'm tempted to say this file has been muxed improperly. Too bad there's
no software or version information in the file. What made it?
/Tomas
More information about the ffmpeg-devel
mailing list