From da8a7e9accb5f8e1913440fdd2d662af6a0b7ef1 Mon Sep 17 00:00:00 2001 From: Gwenole Beauchesne Date: Fri, 9 May 2014 15:08:05 +0200 Subject: 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 (cherry picked from commit 84926ace7a2c5b88df1ada167a1c273128469aad) --- src/gen6_mfd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/gen6_mfd.c') diff --git a/src/gen6_mfd.c b/src/gen6_mfd.c index e22e57a..437ad3b 100755 --- a/src/gen6_mfd.c +++ b/src/gen6_mfd.c @@ -830,8 +830,10 @@ gen6_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); gen6_mfd_init_avc_surface(ctx, pic_param, obj_surface); -- cgit v1.2.3