summaryrefslogtreecommitdiff
path: root/src/gen7_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/gen7_mfd.c
parentaeef40157a7d3349ea8afc5dca0c198055027601 (diff)
downloadlibva-intel-driver-da8a7e9accb5f8e1913440fdd2d662af6a0b7ef1.tar.gz
libva-intel-driver-da8a7e9accb5f8e1913440fdd2d662af6a0b7ef1.tar.bz2
libva-intel-driver-da8a7e9accb5f8e1913440fdd2d662af6a0b7ef1.zip
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/gen7_mfd.c')
-rwxr-xr-xsrc/gen7_mfd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gen7_mfd.c b/src/gen7_mfd.c
index db35abf..97f9705 100755
--- a/src/gen7_mfd.c
+++ b/src/gen7_mfd.c
@@ -748,8 +748,10 @@ gen7_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);
gen7_mfd_init_avc_surface(ctx, pic_param, obj_surface);