<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - VdpPresentationQueueGetTime does not return a monotonic time"
href="https://bugs.freedesktop.org/show_bug.cgi?id=77208">77208</a>
</td>
</tr>
<tr>
<th>Assignee</th>
<td>mesa-dev@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Summary</th>
<td>VdpPresentationQueueGetTime does not return a monotonic time
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Reporter</th>
<td>nfxjfg@gmail.com
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Version</th>
<td>9.0
</td>
</tr>
<tr>
<th>Component</th>
<td>Other
</td>
</tr>
<tr>
<th>Product</th>
<td>Mesa
</td>
</tr></table>
<p>
<div>
<pre>It appears VdpPresentationQueueGetTime does not always return a monotonic,
steady (i.e. no jumps) time. This can be a bit of a problem since the API
basically assumes a reliable timer.
The unreliable timer causes two basic problems:
1. VdpPresentationQueueDisplay is unreliable. Since between retrieving the
current vdpau time, calculating the presentation time, and calling
VdpPresentationQueueDisplay the timer could jump, the function becomes
essentially useless, unless you pass 0 to it.
2. The presentation time returned by VdpPresentationQueueQuerySurfaceStatus is
useless. Since the timer could jump at any time, the application can't really
use the first_presentation_time value for anything.
At least the video players mplayer2 and mpv have trouble with this. They try to
queue frames at vsync intervals, and the framedropping code is involved with it
too.
Jumps have been reported in the following situations:
1. Moving the window with the vdpau context to another display
2. Pausing/unpausing mpv. I'm unsure why this would happen, since
pausing/unpausing is obviously not part of the vdpau API - but I don't know
what triggers it. Maybe it happens when the presentation queue becomes empty?
For what it's worth, I can't personally test with vdpau/Mesa. Unless there's
some kind of software emulation of vdpau?</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>