<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body dir="auto">
I think Carl’s point is interesting. It could be something funky with sleep which if I remember right is a Linux/ Debian based call. Maybe try a different method of making your program hang and see if the problem persists. 
<div><br>
</div>
<div>All my best,</div>
<div><br>
</div>
<div>Paul <br>
<br>
<div id="AppleMailSignature" dir="ltr">Sent from the top a castle using a moderately sized European swallow </div>
<div dir="ltr"><br>
On 1 Jun 2019, at 16:17, Lukas Bommes <<a href="mailto:lukas.bommes@gmx.de">lukas.bommes@gmx.de</a>> wrote:<br>
<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div dir="auto">
<div>I'm just buffled because OpenCV uses the same code <span style="font-family: sans-serif;"> (in fact I copied the retrieveFrame funtion from the videoio module 1:1)</span> and it does not show this weird behaviour. There, the runtime of sws_scale is constant
 regardless of the calling frequency and retrieving one frame takes always around 1.3 ms.</div>
<div dir="auto">However, my OpenCV build (version 4.1) uses FFMPEG 3.4.6, not 4.1. So, I'm gonna try building my code with FFMPEG 3.4.6 and see if the problem persists. </div>
<div dir="auto">Alternatively, I add a function to the OpenCV videoio module which retrieves frame + motion vectors. However, altering the OpenCV API brings a lot of other challenges.</div>
<div dir="auto"><br>
</div>
<div dir="auto">But maybe someone else has noticed a similar issue with sws_scale in FFMPEG 4.1 before.</div>
<div dir="auto"><br>
<div class="gmail_extra" dir="auto">Lukas</div>
<div class="gmail_extra" dir="auto"><br>
</div>
<div class="gmail_extra" dir="auto"><br>
<div class="gmail_quote">On 1 Jun 2019 7:04 pm, Carl Eugen Hoyos <<a href="mailto:ceffmpeg@gmail.com">ceffmpeg@gmail.com</a>> wrote:<br type="attribution">
<blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<p dir="ltr">Am Do., 30. Mai 2019 um 11:59 Uhr schrieb lukas <<a href="mailto:lukas.bommes@gmx.de">lukas.bommes@gmx.de</a>>:</p>
<p dir="ltr">> I wrote a program which extracts motion vectors from a video stream and<br>
> encountered the problem that the runtime of sws_scale changes depending<br>
> on whether I put a sleep command in the main loop of the caller.</p>
<p dir="ltr">Shouldn't you ask this your CPU provider?</p>
<p dir="ltr">Carl Eugen<br>
_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
<a href="https://ffmpeg.org/mailman/listinfo/libav-user">https://ffmpeg.org/mailman/listinfo/libav-user</a></p>
<p dir="ltr">To unsubscribe, visit link above, or email<br>
<a href="mailto:libav-user-request@ffmpeg.org">libav-user-request@ffmpeg.org</a> with subject "unsubscribe".</p>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</blockquote>
<blockquote type="cite">
<div dir="ltr"><span>_______________________________________________</span><br>
<span>Libav-user mailing list</span><br>
<span><a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a></span><br>
<span><a href="https://ffmpeg.org/mailman/listinfo/libav-user">https://ffmpeg.org/mailman/listinfo/libav-user</a></span><br>
<span></span><br>
<span>To unsubscribe, visit link above, or email</span><br>
<span><a href="mailto:libav-user-request@ffmpeg.org">libav-user-request@ffmpeg.org</a> with subject "unsubscribe".</span></div>
</blockquote>
</div>
</body>
</html>