<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 - VCE encoding slow when GPU is not stressed (HD 7970M)"
href="https://bugs.freedesktop.org/show_bug.cgi?id=97075">97075</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>VCE encoding slow when GPU is not stressed (HD 7970M)
</td>
</tr>
<tr>
<th>Product</th>
<td>DRI
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>DRM/Radeon
</td>
</tr>
<tr>
<th>Assignee</th>
<td>dri-devel@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>haagch@frickel.club
</td>
</tr></table>
<p>
<div>
<pre>This is on an intel + radeon laptop, so I need to run encoding with gstreamer
with DRI_PRIME=1.
Here is an example video:
<a href="http://www.sample-videos.com/video/mp4/720/big_buck_bunny_720p_1mb.mp4">http://www.sample-videos.com/video/mp4/720/big_buck_bunny_720p_1mb.mp4</a>
DRI_PRIME is doing a good job of waking up the GPU from runpm when needed for
encoding via VAAPI and OMX, but for comparison I'll run glxgears both times.
I'm encoding the mentioned example video with VAAPI with this exact command:
$ time DRI_PRIME=1 LIBVA_DRIVER_NAME=radeonsi gst-launch-1.0 -e filesrc
location=big_buck_bunny_720p_1mb.mp4 ! qtdemux ! h264parse ! avdec_h264 ! queue
! videoconvert ! queue ! video/x-raw,format=NV12 ! vaapih264enc ! h264parse !
matroskamux ! filesink location=output.mkv
For low GPU stress I run the gst pipeline while glxgears with vsync is running:
$ DRI_PRIME=1 glxgears
Result: 0.75s user 0.33s system 2% cpu 52.779 total
For higher GPU stress I run the gst pipeline while glxgears without vsync is
running:
$ DRI_PRIME=1 vblank_mode=0 glxgears
Result: 0.99s user 0.28s system 43% cpu 2.928 total
I also tried a very similar pipeline with OMX:
$ time DRI_PRIME=1 gst-launch-1.0 -e filesrc
location=big_buck_bunny_720p_1mb.mp4 ! qtdemux ! h264parse ! avdec_h264 ! queue
! videoconvert ! queue ! video/x-raw,format=NV12 ! omxh264enc ! h264parse !
matroskamux ! filesink location=output.mkv
Low GPU stress: 0.96s user 0.24s system 19% cpu 6.298 total
High GPU stress: 1.10s user 0.24s system 141% cpu 0.949 total
Overall OMX encoding does a lot better, but it's still a large difference and
still below "real time" for the 5 second video.</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>