summaryrefslogtreecommitdiff
path: root/src/gen75_mfd.c
diff options
context:
space:
mode:
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>2014-05-09 15:08:05 +0200
committerXiang, Haihao <haihao.xiang@intel.com>2014-06-16 11:53:35 +0800
commitda8a7e9accb5f8e1913440fdd2d662af6a0b7ef1 (patch)
tree123eb593e8dae92896e16a7bc9da8269661dd2dd /src/gen75_mfd.c
parentaeef40157a7d3349ea8afc5dca0c198055027601 (diff)
surface: drop SURFACE_DISPLAYED flag.
The optimization by which the VA surface storage is deallocated after it is displayed and not used for reference or vaDeriveImage() purposes cannot be implemented safely. We need to honour explicit lifetimes defined by the upper codec layer. Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com> (cherry picked from commit 84926ace7a2c5b88df1ada167a1c273128469aad)
Diffstat (limited to 'src/gen75_mfd.c')
-rw-r--r--src/gen75_mfd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gen75_mfd.c b/src/gen75_mfd.c
index aaee807..a1d004b 100644
--- a/src/gen75_mfd.c
+++ b/src/gen75_mfd.c
@@ -1051,8 +1051,10 @@ gen75_mfd_avc_decode_init(VADriverContextP ctx,
/* Current decoded picture */
obj_surface = decode_state->render_object;
- obj_surface->flags &= ~SURFACE_REF_DIS_MASK;
- obj_surface->flags |= (pic_param->pic_fields.bits.reference_pic_flag ? SURFACE_REFERENCED : 0);
+ if (pic_param->pic_fields.bits.reference_pic_flag)
+ obj_surface->flags |= SURFACE_REFERENCED;
+ else
+ obj_surface->flags &= ~SURFACE_REFERENCED;
avc_ensure_surface_bo(ctx, decode_state, obj_surface, pic_param);
gen75_mfd_init_avc_surface(ctx, pic_param, obj_surface);