<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Am 17.10.2016 um 21:40 schrieb Julien
      Isorce:<br>
    </div>
    <blockquote
cite="mid:CAHWPjbVR2HWDZ4eXX3HGtV3PX2hmb+xvZrEYv3ACE6BzHT0abw@mail.gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <br>
      <br>
      On Monday, 17 October 2016, Mark Thompson <<a
        moz-do-not-send="true" href="mailto:sw@jkqxz.net">sw@jkqxz.net</a>>
      wrote:<br>
      <blockquote class="gmail_quote" style="margin:0 0 0
        .8ex;border-left:1px #ccc solid;padding-left:1ex">On 17/10/16
        17:33, Julien Isorce wrote:<br>
        > As specified in va.h, default value should be set on
        attributes<br>
        > not present in the input list.<br>
        ><br>
        > Signed-off-by: Julien Isorce <<a moz-do-not-send="true"
          href="javascript:;" onclick="_e(event, 'cvml',
          'j.isorce@samsung.com')">j.isorce@samsung.com</a>><br>
        > ---<br>
        >  src/gallium/state_trackers/va/<wbr>config.c  | 9 +++++++++<br>
        >  src/gallium/state_trackers/va/<wbr>surface.c | 5 +++--<br>
        >  2 files changed, 12 insertions(+), 2 deletions(-)<br>
        ><br>
        > diff --git a/src/gallium/state_trackers/<wbr>va/config.c
        b/src/gallium/state_trackers/<wbr>va/config.c<br>
        > index 2f96eb6..fb236f1 100644<br>
        > --- a/src/gallium/state_trackers/<wbr>va/config.c<br>
        > +++ b/src/gallium/state_trackers/<wbr>va/config.c<br>
        > @@ -195,6 +195,11 @@ vlVaCreateConfig(<wbr>VADriverContextP
        ctx, VAProfile profile, VAEntrypoint entrypoin<br>
        >              }<br>
        >           }<br>
        >        }<br>
        > +<br>
        > +      /* Default value if not specified in the input
        attributes. */<br>
        > +      if (!config->rt_format)<br>
        > +        config->rt_format = VA_RT_FORMAT_YUV420 |
        VA_RT_FORMAT_RGB32;<br>
        <br>
        Indent should be three spaces.<br>
        <br>
        > +<br>
        >        pipe_mutex_lock(drv->mutex);<br>
        >        *config_id = handle_table_add(drv->htab, config);<br>
        >        pipe_mutex_unlock(drv->mutex);<br>
        > @@ -256,6 +261,10 @@ vlVaCreateConfig(<wbr>VADriverContextP
        ctx, VAProfile profile, VAEntrypoint entrypoin<br>
        >        }<br>
        >     }<br>
        ><br>
        > +   /* Default value if not specified in the input
        attributes. */<br>
        > +   if (!config->rt_format)<br>
        > +     config->rt_format = VA_RT_FORMAT_YUV420;<br>
        <br>
        And here.</blockquote>
      <div><br>
      </div>
      <div>Oh I forgot :) , cheers.</div>
      <div><br>
      </div>
      <blockquote class="gmail_quote" style="margin:0 0 0
        .8ex;border-left:1px #ccc solid;padding-left:1ex">
        <br>
        > +<br>
        >     pipe_mutex_lock(drv->mutex);<br>
        >     *config_id = handle_table_add(drv->htab, config);<br>
        >     pipe_mutex_unlock(drv->mutex);<br>
        > diff --git a/src/gallium/state_trackers/<wbr>va/surface.c
        b/src/gallium/state_trackers/<wbr>va/surface.c<br>
        > index 5e92980..f8513d9 100644<br>
        > --- a/src/gallium/state_trackers/<wbr>va/surface.c<br>
        > +++ b/src/gallium/state_trackers/<wbr>va/surface.c<br>
        > @@ -419,7 +419,7 @@ vlVaQuerySurfaceAttributes(<wbr>VADriverContextP
        ctx, VAConfigID config_id,<br>
        >     /* vlVaCreateConfig returns PIPE_VIDEO_PROFILE_UNKNOWN<br>
        >      * only for VAEntrypointVideoProc. */<br>
        >     if (config->profile == PIPE_VIDEO_PROFILE_UNKNOWN) {<br>
        > -      if (config->rt_format == VA_RT_FORMAT_RGB32) {<br>
        > +      if (config->rt_format & VA_RT_FORMAT_RGB32) {<br>
        >           for (j = 0; j < ARRAY_SIZE(vpp_surface_<wbr>formats);
        ++j) {<br>
        >              attribs[i].type = VASurfaceAttribPixelFormat;<br>
        >              attribs[i].value.type =
        VAGenericValueTypeInteger;<br>
        > @@ -427,7 +427,8 @@ vlVaQuerySurfaceAttributes(<wbr>VADriverContextP
        ctx, VAConfigID config_id,<br>
        >              attribs[i].value.value.i =
        PipeFormatToVaFourcc(vpp_<wbr>surface_formats[j]);<br>
        >              i++;<br>
        >           }<br>
        > -      } else if (config->rt_format ==
        VA_RT_FORMAT_YUV420) {<br>
        > +      }<br>
        > +      if (config->rt_format & VA_RT_FORMAT_YUV420)
        {<br>
        >           attribs[i].type = VASurfaceAttribPixelFormat;<br>
        >           attribs[i].value.type =
        VAGenericValueTypeInteger;<br>
        >           attribs[i].flags = VA_SURFACE_ATTRIB_GETTABLE |
        VA_SURFACE_ATTRIB_SETTABLE;<br>
        ><br>
        <br>
        Actual code LGTM, and tested.<br>
        <br>
        Reviewed-by: Mark Thompson <<a moz-do-not-send="true"
          href="javascript:;" onclick="_e(event, 'cvml',
          'sw@jkqxz.net')">sw@jkqxz.net</a>></blockquote>
      <div><br>
      </div>
      <div>Thx, will push it soon.</div>
    </blockquote>
    <br>
    If you haven't already pushed it with the fixes Mark mentioned the
    patch is Reviewed-by: Christian König
    <a class="moz-txt-link-rfc2396E" href="mailto:christian.koenig@amd.com"><christian.koenig@amd.com></a> as well.<br>
    <br>
    Regards,<br>
    Christian.<br>
    <br>
    <blockquote
cite="mid:CAHWPjbVR2HWDZ4eXX3HGtV3PX2hmb+xvZrEYv3ACE6BzHT0abw@mail.gmail.com"
      type="cite">
      <div>Julien</div>
      <div> </div>
      <blockquote class="gmail_quote" style="margin:0 0 0
        .8ex;border-left:1px #ccc solid;padding-left:1ex">
        <br>
        Thanks,<br>
        <br>
        - Mark<br>
        <br>
        ______________________________<wbr>_________________<br>
        mesa-dev mailing list<br>
        <a moz-do-not-send="true" href="javascript:;" onclick="_e(event,
          'cvml', 'mesa-dev@lists.freedesktop.org')">mesa-dev@lists.freedesktop.org</a><br>
        <a moz-do-not-send="true"
          href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev"
          target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
      </blockquote>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>