decoder: h264: improve AVC_REF_IDX_STATE for MVC.
decoder: h264: improve AVC_REF_IDX_STATE for MVC.

Each Reference List Entry has Bit 6 set to one if the reference
picture is to be used as a long-term reference picture. However,
the H.264 standard, and subsequently the VA-API specs, makes it
possible to mark the picture as "used for short-term reference",
as "used for long-term reference", or even none of those flags.

This means we have to handle a minimum of 3 states. This doesn't
fit the range of a single bit. Let's examine how this could be
fixed from known practices.

There are cases where the picture is added to RefPicListX[] even
if it is not marked as "used for short-term reference" or "used
for long-term reference": MVC with inter-view reference components
or inter-view only reference components [H.8.4]. Ultimately, this
has an incidence on the value of colZeroFlag (8.4.1.2.2). Since
there is no way to program that, and that it depends on the picture
to be marked as "used for short-term reference" or not, then it
looks reasonable to imply Bit 6 (LongTermPicFlag) as a picture
that is *not* "used for short-term reference", i.e. thus including
genuine long-term reference pictures, and those that are neither
long-term reference nor short-term reference pictures.

In practice, this fixes MVCNV-2.264.

Signed-off-by: Gwenole Beauchesne <729713629d9640cc095f1c77c692e1881f8093c4@intel.com>
(cherry picked from commit edbdc0e87919d8b7261d882a32b2d3c271660931)

chenxianqin/vaapi-intel-driver,01org/iotg-lin-gfx-va-driver,01org/iotg-lin-gfx-va-driver,uartie/vaapi-intel-driver,01org/iotg-lin-gfx-va-driver,gbeauchesne/libva-intel-driver,gbeauchesne/libva-intel-driver,chenxianqin/vaapi-intel-driver,gbeauchesne/libva-intel-driver,uartie/vaapi-intel-driver,uartie/vaapi-intel-driver,chenxianqin/vaapi-intel-driver,chenxianqin/vaapi-intel-driver,01org/iotg-lin-gfx-va-driver,uartie/vaapi-intel-driver,gbeauchesne/libva-intel-driver,chenxianqin/vaapi-intel-driver,gbeauchesne/libva-intel-driver,01org/iotg-lin-gfx-va-driver,uartie/vaapi-intel-driver