mpeg2: allocate dummy picture for first field based I-frame.
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>
Mon, 2 Apr 2012 09:29:53 +0000 (11:29 +0200)
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>
Mon, 2 Apr 2012 09:36:56 +0000 (11:36 +0200)
commit5975def8ab076e52919c9249c8f47ac3d6300ae4
tree93034b015753085fa301da27139dee4f0d580c9a
parent99932049e45d4e4bbd229926f4fa31b56dbf6f43
mpeg2: allocate dummy picture for first field based I-frame.

In P-pictures, prediction shall be made from the two most recently
decoded reference fields. However, when the first I-frame is a field,
the next field of the current picture could be a P-picture but only a
single field was decoded so far. In this case, create a dummy picture
with POC = -1 that will be used as reference.

Some VA drivers would error out if P-pictures don't have a forward
reference picture. This is true in general but not in this very specific
initial case.
gst-libs/gst/vaapi/gstvaapidecoder_dpb.c
gst-libs/gst/vaapi/gstvaapidecoder_dpb.h
gst-libs/gst/vaapi/gstvaapidecoder_mpeg2.c