[Libav-user] Real time camera IP RTSP H264

Robin Stevens rdstevens at gmail.com
Tue Feb 10 11:00:35 CET 2015


Could be.

With JPEG, if you wanted to go crazy, you could perhaps decompress each
macroblock on a separate thread...

On Tue, Feb 10, 2015 at 9:46 AM, Renaud BOBIN <renaud.bobin at subsea-tech.com>
wrote:

> That’s is why on MJPEG there is no latency ?
>
> Frame N doesn’t depend on N-1 nor N+1 so  each thread is independent ?
>
>
>
>
>
> *De :* libav-user-bounces at ffmpeg.org [mailto:libav-user-bounces at ffmpeg.org]
> *De la part de* Robin Stevens
> *Envoyé :* mardi 10 février 2015 10:33
> *À :* This list is about using libavcodec, libavformat, libavutil,
> libavdevice and libavfilter.
> *Objet :* Re: [Libav-user] Real time camera IP RTSP H264
>
>
>
>
>
> On Tuesday, February 10, 2015, Maziar Mehrabi <maziar.mehrabi at gmail.com>
> wrote:
>
> Hi,
>
> I wonder why multithreading causes latency.
>
> My understanding is that having concurrent threads should improve
> performance.
>
> Is there any explanation for this?
>
> Thanks,
>
>
>
>
>
> Without any knowledge of the code in question: concurrency can increase
> overall throughput (for particular kinds of task) but increased latency is
> a common payoff.
>
>
>
> Imagine each thread as a separate decoder with carefully controlled access
> to some common data/state. To fully decode the Nth frame probably requires
> at least a partial decode (possibly a complete decode) of the N-1 frame.
> Therefore although the decoding for the Nth frame may happen on a separate
> processor core, it's likely not truly independent of the other cores.
>
>
>
> So if you have 4 threads, T4 is waiting on T3, which is waiting on T2 and
> on T1. Even though T1 may have finished frame 1, it probably can't fully
> decode frame 5 until 4 is available from T4...
>
>
>
> But that's just my guess!
>
>
> ------------------------------
>    <http://www.avast.com/>
>
> Ce courrier électronique ne contient aucun virus ou logiciel malveillant
> parce que la protection Antivirus avast! <http://www.avast.com/> est
> active.
>
>
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20150210/94c3c8c7/attachment.html>


More information about the Libav-user mailing list