<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [radeonsi] playing back videos with VDPAU exhibits deinterlacing/anti-aliasing issues not visible with VA-API"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=97988#c8">Comment # 8</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [radeonsi] playing back videos with VDPAU exhibits deinterlacing/anti-aliasing issues not visible with VA-API"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=97988">bug 97988</a>
              from <span class="vcard"><a class="email" href="mailto:greg@chown.ath.cx" title="Grigori Goronzy <greg@chown.ath.cx>"> <span class="fn">Grigori Goronzy</span></a>
</span></b>
        <pre>Here's a bit of background:

Earlier, mpv used interop with OutputSurfaces. That is, it rendered the video
into an RGB surface and then used that for its own procesing (scaling,
rendering OSD on top, etc.).

Now recently, mpv has switched to interop with VideoSurfaces. That is, it maps
four fields of luma/chroma planes. These are split up into top and bottom
field, just as the spec for the interop extension says:

<a href="https://www.opengl.org/registry/specs/NV/vdpau_interop.txt">https://www.opengl.org/registry/specs/NV/vdpau_interop.txt</a>

mpv then weaves the fields and does color space conversion, scaling, etc.


Things get wrong with the weaving, and I found some very suspicious code in
Mesa:

<a href="https://cgit.freedesktop.org/mesa/mesa/tree/src/mesa/state_tracker/st_vdpau.c#n82">https://cgit.freedesktop.org/mesa/mesa/tree/src/mesa/state_tracker/st_vdpau.c#n82</a>

Here a sampler is returned based on texture name index, and the same plane
sampler is used for top and bottom field. That can't be right at all. Is the
sampler possibly mangled somewhere else to make it point to the right fields?
It does not look like it, but maybe I'm just missing something.

This really makes me wonder whether VideoSurface interop ever worked correctly.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>