<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Yeah, at least that looks sane, but I
      don't think just continuing with the loop is the right things to
      do here.<br>
      <br>
      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.<br>
      <br>
      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.<br>
      <br>
      Regards,<br>
      Christian.<br>
      <br>
      On 14.12.2015 09:46, Julien Isorce wrote:<br>
    </div>
    <blockquote
cite="mid:CAHWPjbVtwVrf=akOjA9kvoSD8Lz7Jw7XuG-QK+YGoJOP4Ky03A@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi, shouldn't the check be the following condition
        instead:<br>
        hevc->ReferenceFrames[i].flags & VA_PICTURE_HEVC_INVALID
        ||<br>
        hevc->ReferenceFrames[i].picture_id == VA_INVALID_SURFACE<br>
        ?<br>
        <div class="gmail_extra"><br>
          <div class="gmail_quote">On 11 December 2015 at 12:33,
            Christian König <span dir="ltr"><<a
                moz-do-not-send="true"
                href="mailto:deathsimple@vodafone.de" target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:deathsimple@vodafone.de">deathsimple@vodafone.de</a></a>></span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">From:
              Christian König <<a moz-do-not-send="true"
                href="mailto:christian.koenig@amd.com">christian.koenig@amd.com</a>><br>
              <br>
              The picture id in this case is a VA-API surface handle,
              checking<br>
              for a certain value can't be correct.<br>
              <br>
              Signed-off-by: Christian König <<a
                moz-do-not-send="true"
                href="mailto:christian.koenig@amd.com"><a class="moz-txt-link-abbreviated" href="mailto:christian.koenig@amd.com">christian.koenig@amd.com</a></a>><br>
              ---<br>
               src/gallium/state_trackers/va/picture_hevc.c | 5 -----<br>
               1 file changed, 5 deletions(-)<br>
              <br>
              diff --git a/src/gallium/state_trackers/va/picture_hevc.c
              b/src/gallium/state_trackers/va/picture_hevc.c<br>
              index dc66b0f..28743ee 100644<br>
              --- a/src/gallium/state_trackers/va/picture_hevc.c<br>
              +++ b/src/gallium/state_trackers/va/picture_hevc.c<br>
              @@ -159,11 +159,6 @@ void
              vlVaHandlePictureParameterBufferHEVC(vlVaDriver *drv,
              vlVaContext *context,<br>
                  for (i = 0 ; i < 15 ; i++) {<br>
                     context->desc.h265.PicOrderCntVal[i] =
              hevc->ReferenceFrames[i].pic_order_cnt;<br>
              <br>
              -      unsigned int index =
              hevc->ReferenceFrames[i].picture_id & 0x7F;<br>
              -<br>
              -      if (index == 0x7F)<br>
              -         continue;<br>
              -<br>
                     vlVaGetReferenceFrame(drv,
              hevc->ReferenceFrames[i].picture_id,
              &context->desc.h265.ref[i]);<br>
              <br>
                     if ((hevc->ReferenceFrames[i].flags &
              VA_PICTURE_HEVC_RPS_ST_CURR_BEFORE) && (iBefore
              < 8)) {<br>
              <span class="HOEnZb"><font color="#888888">--<br>
                  2.5.0<br>
                  <br>
                  _______________________________________________<br>
                  mesa-dev mailing list<br>
                  <a moz-do-not-send="true"
                    href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
                  <a moz-do-not-send="true"
                    href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev"
                    rel="noreferrer" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
                </font></span></blockquote>
          </div>
          <br>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>