[Mesa-dev] [PATCH 1/8] st/va: remove nonesense HEVC picture id handling
Christian König
deathsimple at vodafone.de
Mon Dec 14 01:55:49 PST 2015
Yeah, at least that looks sane, but I don't think just continuing with
the loop is the right things to do here.
E.g. if we just continue h265.ref[i] will never be initialized to
something. It's either NULL, a value from the last decode or some random
data.
vlVaGetReferenceFrame() can handle VA_INVALID_SURFACE, so that isn't
much of a problem. I'm just not sure what to do with
VA_PICTURE_HEVC_INVALID.
Regards,
Christian.
On 14.12.2015 09:46, Julien Isorce wrote:
> Hi, shouldn't the check be the following condition instead:
> hevc->ReferenceFrames[i].flags & VA_PICTURE_HEVC_INVALID ||
> hevc->ReferenceFrames[i].picture_id == VA_INVALID_SURFACE
> ?
>
> On 11 December 2015 at 12:33, Christian König <deathsimple at vodafone.de
> <mailto:deathsimple at vodafone.de>> wrote:
>
> From: Christian König <christian.koenig at amd.com
> <mailto:christian.koenig at amd.com>>
>
> The picture id in this case is a VA-API surface handle, checking
> for a certain value can't be correct.
>
> Signed-off-by: Christian König <christian.koenig at amd.com
> <mailto:christian.koenig at amd.com>>
> ---
> src/gallium/state_trackers/va/picture_hevc.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/src/gallium/state_trackers/va/picture_hevc.c
> b/src/gallium/state_trackers/va/picture_hevc.c
> index dc66b0f..28743ee 100644
> --- a/src/gallium/state_trackers/va/picture_hevc.c
> +++ b/src/gallium/state_trackers/va/picture_hevc.c
> @@ -159,11 +159,6 @@ void
> vlVaHandlePictureParameterBufferHEVC(vlVaDriver *drv, vlVaContext
> *context,
> for (i = 0 ; i < 15 ; i++) {
> context->desc.h265.PicOrderCntVal[i] =
> hevc->ReferenceFrames[i].pic_order_cnt;
>
> - unsigned int index = hevc->ReferenceFrames[i].picture_id &
> 0x7F;
> -
> - if (index == 0x7F)
> - continue;
> -
> vlVaGetReferenceFrame(drv,
> hevc->ReferenceFrames[i].picture_id, &context->desc.h265.ref[i]);
>
> if ((hevc->ReferenceFrames[i].flags &
> VA_PICTURE_HEVC_RPS_ST_CURR_BEFORE) && (iBefore < 8)) {
> --
> 2.5.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org <mailto:mesa-dev at lists.freedesktop.org>
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20151214/16223fb0/attachment.html>
More information about the mesa-dev
mailing list