<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Major artifacts in mpeg2 vaapi hw decoding"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=110257">110257</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Major artifacts in mpeg2 vaapi hw decoding
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>major
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Drivers/Gallium/radeonsi
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>dri-devel@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>67b0226d@casix.org
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>dri-devel@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=143787" name="attach_143787" title="hardware-decoded screenshot">attachment 143787</a> <a href="attachment.cgi?id=143787&action=edit" title="hardware-decoded screenshot">[details]</a></span>
hardware-decoded screenshot

Hi,

on latest Mesa I still get tons of artifacts when decoding MPEG2 on my AMD card
via VAAPI, to the point where it is not usable for video decoding at all to be
honest.
I've attached sample screenshots to show the problem - one software-decoded and
one hardware-decoded via libva in mpv.
The sample video is taken from <a href="https://www.w6rz.net/1080p25.zip">https://www.w6rz.net/1080p25.zip</a> but the
artifacts are visible more or less on any MPEG2 video including DVDs.

There is this older bug report:
<a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - radeonsi vaapi mpeg2 decode slightly corrupt or asserts."
   href="show_bug.cgi?id=93760">https://bugs.freedesktop.org/show_bug.cgi?id=93760</a> but I'm not sure it's
related because I do not get any assertion failure and it vaguely reads like it
has been fixed?

For clarification, I see no artifacts with VDPAU.

Tested with Mesa-19.1.0-devel (git-bea540173c), libva 2.5.0-pre1
(git-c98b06d2b8), FFmpeg N-93467-g54655623a8
VAAPI driver string: Mesa Gallium driver 19.1.0-devel for Radeon RX 580 Series
(POLARIS10, DRM 3.27.0, 4.20.13-arch1-1-ARCH, LLVM 7.0.1)

I verified this with mpv, gstreamer and Kodi.
mpv seems to have disabled mpeg2 hw decoding by default due to this problem:
<a href="https://github.com/mpv-player/mpv/commit/3dd59dbe">https://github.com/mpv-player/mpv/commit/3dd59dbe</a>
In Kodi we cannot go this route because we want to support low-end hardware
that might have trouble decoding 1080p in software out-of-the-box.
I want to avoid having to blacklist the radeon vaapi driver for mpeg2 if
possible.</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>