[FFmpeg-devel] [PATCH 1/3] mpegvideo_parser: implement parsing of the picture structure field

Jan Ekström jeebjp at gmail.com
Mon Feb 12 03:13:46 EET 2018

On Mon, Feb 12, 2018 at 12:23 AM, Michael Niedermayer
<michael at niedermayer.cc> wrote:
> I think a better API is needed to export the picture_structure correctly.

I might be misunderstanding the problem at hand, but I'm not sure if a
better API is required right now in the sense that if we define that:
* the demuxer and/or parser should return a decode'able coding unit
(whether or not it can actually be decoded depends on the state of
things). In case of field coded pictures this would be one coded
field, if I understand correctly.
* and, if the decoder then needs two coded field pictures to generate
a combed together "frame" - so be it. The new decoding/encoding APIs
let you have a non-synchronized amount of input VS output.

The primary part of course being that we shouldn't be ignoring the
other field picture in the parser if they are in the same PES packet,
for example.

> With the API here, i think unspecified is better than delcaring field pictures
> to be frames. The field value is also what decoders would use, they have to
> 2 field pics arent the same as a frame picture

Yes, if we are not going to be separating them in the parser as two
decode'able units, then we at the very least would have to parse both
and set the field order flags for that packet of two field pictures

More information about the ffmpeg-devel mailing list