summaryrefslogtreecommitdiff
path: root/src/gen6_mfc_common.c
diff options
context:
space:
mode:
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>2014-06-05 21:36:33 +0200
committerXiang, Haihao <haihao.xiang@intel.com>2014-06-16 11:53:35 +0800
commit143c53900943c660390122f7fa4a1c5705798fdd (patch)
treeb6af55d593976e900b46d57c7bdeaaed2fa143bc /src/gen6_mfc_common.c
parentd2262e37a4737d0d03004c0b34165180ddb1d956 (diff)
downloadlibva-intel-driver-143c53900943c660390122f7fa4a1c5705798fdd.tar.gz
libva-intel-driver-143c53900943c660390122f7fa4a1c5705798fdd.tar.bz2
libva-intel-driver-143c53900943c660390122f7fa4a1c5705798fdd.zip
decoder: h264: fix frame store logic for MVC.
In strict MVC decoding mode, when only the necessary set of inter-view reference pictures are passed to the ReferenceFrames array for decoding the current picture, we should not re-use a frame store id that might be needed for decoding another view component in the same access unit. One way to solve this problem is to track when the VA surface in a specified frame store id was last referenced. So, a "ref_age" field is introduced to the GenFrameStore struct and is updated whenever the surface is being referenced. Additionally, the list of retired refs candidates (free_refs) is kept ordered by increasing ref_age. That way, we can immediately know what is the oldest frame store id to recycle. Let deltaAge = CurrAge - RefAge: If deltaAge > 1, we know for sure that the VA surface is gone ; If deltaAge = 1, the surface could be re-used for inter prediction ; If deltaAge = 0, the surface could be re-used for inter-view prediction. The ref_age in each Frame Store entry is always current, i.e. it is the same for all reference frames that intervened in the decoding process of all inter view components of the previous access unit. The age tracks access units. v2: used a more correct representation of age, instead of POC [Yakui] v3: minor optimization for detecting changes of access unit [Haihao] Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com> (cherry picked from commit 3b5eb0522fbfe1220dcd0c0bb093a93cfc25e22c)
Diffstat (limited to 'src/gen6_mfc_common.c')
0 files changed, 0 insertions, 0 deletions