[Mesa-users] r600 vdpau h.264 truncated/corrupt keyframes

Andrew Tonner rakslice at gmail.com
Fri Jun 30 22:37:39 UTC 2017


I'm running into an issue playing back H.264 video on my laptop with
Mobility Radeon HD 3650 (rv635) using vdpau through mpv or vlc. I'm using
debian 9 (stretch)'s included mesa 13.0.6.

The problem:

Usually I get this: The first row of macroblocks in the keyframe is fine,
and the rest is a green mess -- like the keyframe is getting
truncated/corrupted.

Sometimes I get normal video playback.  I can't tell what factor causes the
difference.

It seems like the same r600 issue reported here, based on the description
and the example garbled output:
https://bugs.freedesktop.org/show_bug.cgi?id=73457

I'm not sure how to proceed. Should I try building a different version of
mesa from source? Is there some logging I can turn on and investigate? Is
there more info I should collect?  Is there a spec for r600/uvd I can
compare against the code to look for problems?  Should I try to find
another rv635 somewhere to confirm this isn't a hardware problem?

My further investigations so far:

The problem is inconsistent from login session to login session, after a
certain amount of activity in a login session the problem sometimes goes
away, but a simple logout/login makes the problem reappear again.

Testing with Twitch streams via libmpv in Orion
https://github.com/alamminsalo/orion (/plug ;), to easily get a number of
different resolutions of h.264 stream, I found that in a given login
session, the problem affects all the resolutions from a given resolution
down, sometimes all the way from the source stream, and sometimes not.

Based on the discussion of dpb_size on that bug 73457, I rebuilt mesa from
the source package and then added output with of the selected dpb_size and
a hack to override it from an env var. Using a higher dpb_size sometimes
makes the problem go away. Bisecting dpb_size values, I have found that in
some login sessions there is a consistent boundary down to the byte between
an increased dpb_size that gives working video playback and the one lower
dpb_size that gives the green mess; however in other login sessions the
behaviour for given dpb_size values is not consistent so there is no
bisectable boundary, and even when there is a consistent boundary in a
given session it isn't consistent with other login sessions.  This seems
like a bit of a red herring in that maybe the dpb_size is actually fine in
the absence of whatever the underlying fault is (maybe a missing
initialisation somewhere?)

-AT
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-users/attachments/20170630/4f5fed68/attachment.html>


More information about the mesa-users mailing list