codecs: mpeg2decoder: Creating the field based on its arriving time.
authorHe Junyan <junyan.he@intel.com>
Wed, 30 Dec 2020 15:14:01 +0000 (23:14 +0800)
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Mon, 4 Jan 2021 13:09:01 +0000 (13:09 +0000)
commit41d2edc964cb165f8c1c365415594201ec7a4213
tree01a4e42589a8b26de0c39e776d138bd140485e02
parentb2b0483d03b0ae08e6df54dc2bf24f4e387bd72b
codecs: mpeg2decoder: Creating the field based on its arriving time.

Spec says:
In a frame picture top_field_first being set to ‘1’ indicates that the
top field of the reconstructed frame is the first field output by the
decoding process. top_field_first being set to ‘0’ indicates that the
bottom field of the reconstructed frame is the first field output by
decoding process.

Here, the "output" should be interpreted just as the output order, not
including the decoding order. The field should be decoded as the order
they comes in the stream. Namely, no matter top_field_first is 0 or 1,
the first coming field is the first one to be decoded.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1929>
gst-libs/gst/codecs/gstmpeg2decoder.c