decoder: h264: fix submission of AVC_REF_IDX_STATE command.
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>
Sun, 4 May 2014 22:05:06 +0000 (00:05 +0200)
committerXiang, Haihao <haihao.xiang@intel.com>
Mon, 16 Jun 2014 03:53:35 +0000 (11:53 +0800)
commitdcd97d032e4a236954f142d2adeed2f57ac65079
tree81f35bde8db21ad4b3cb5cf4a034d5aa7723ee83
parentd2e843eed7fa31d86e196fb0e07b9cd3c377c969
decoder: h264: fix submission of AVC_REF_IDX_STATE command.

If the RefPicListX[] entry has no valid picture_id associated to it,
then set the resulting state to 0xff. If that entry has no surface
buffer storage either, then compose a valid state that maps to the
first item in the reference frames list, as mandated by the PRM.

v2: dropped the superfluous "found" variable [Yakui]

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
(cherry picked from commit 151b8851c3a9309e87712651a3697e20a7bdb6c9)
src/i965_decoder_utils.c