[libav-api] High CPU load of the avcodec_decode_video2() function

Ondřej Perutka perutka.ondrej at gmail.com
Thu Mar 14 15:32:02 CET 2013

After some time of googling I found a very similar problem with AVX. It's
discussed here:


and the problem is probably in mixing SSE and AVX instructions. According
to Intel, there should be a VZEROALL or a VZEROUPPER instruction between
every SSE <-> AVX transition. For more information look here:


or here (page 103):


I don't expect Libav mixes AVX and SSE but since I link it from java, there
is a chance java uses SSEs. So is it possible to surround Libav AVX code by
the VZEROALL or the VZEROUPPER instruction?

More information about the libav-api mailing list