summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>2014-05-06 13:08:28 +0200
committerXiang, Haihao <haihao.xiang@intel.com>2014-06-16 11:53:35 +0800
commit99075c5cc755a767e8904777d3a98bd8c222a03b (patch)
tree6c3ca3a7d45b84b726e133f496bf61aadb949ff9
parent1ae22a0549d30dd24991c4c2c9902e7b7a8d935e (diff)
downloadlibva-intel-driver-99075c5cc755a767e8904777d3a98bd8c222a03b.tar.gz
libva-intel-driver-99075c5cc755a767e8904777d3a98bd8c222a03b.tar.bz2
libva-intel-driver-99075c5cc755a767e8904777d3a98bd8c222a03b.zip
decoder: h264: don't deallocate surface storage of older frames.
Drop the optimization whereby surfaces that are no longer marked as reference and that were already displayed are to be destroyed. This is wrong mainly for two reasons: 1. The surface was displayed... once but it may still be needed for subsequent operations like displaying it again, using it for a transcode pipeline (encode) for instance, etc. 2. The new set of ReferenceFrames[] correspond to the active set of reference frames used for decoding the current slice. In presence of Multiview Coding (MVC), that could correspond to the current view, in view order index, but the surface may still be needed for decoding the next view with the same view_id, while also decoding other views with another set of reference frames for them. Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com> (cherry picked from commit 77af916b44da04e3424490506a7e5bef39c80c7c)
-rw-r--r--src/i965_decoder_utils.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/i965_decoder_utils.c b/src/i965_decoder_utils.c
index ae5fd76..2b4651e 100644
--- a/src/i965_decoder_utils.c
+++ b/src/i965_decoder_utils.c
@@ -451,15 +451,6 @@ intel_update_avc_frame_store_index(VADriverContextP ctx,
/* remove it from the internal DPB */
if (!found) {
- struct object_surface *obj_surface = frame_store[i].obj_surface;
-
- obj_surface->flags &= ~SURFACE_REFERENCED;
-
- if ((obj_surface->flags & SURFACE_ALL_MASK) == SURFACE_DISPLAYED) {
- obj_surface->flags &= ~SURFACE_REF_DIS_MASK;
- i965_destroy_surface_storage(obj_surface);
- }
-
frame_store[i].surface_id = VA_INVALID_ID;
frame_store[i].frame_store_id = -1;
frame_store[i].obj_surface = NULL;