ffmpeg: make reading packets from thread blocking.

If a packet is not ready on the input selected by ffmpeg,
it will read from another input instead. If that happens
repeatedly, frames will accumulate somewhere later in the
processing to ensure streams synchronization. It can happen
in particular when reading from a slow medium or an
expensive lavfi filter graph.

Make reading from normal demuxers on non-streamed data and
from the lavfi pseudo-device blocking to avoid that.

Should fix trac ticket #3079.
x86: dsputil: Use correct file name as multiple inclusion guard
avcodec: Consistently name encoder init functions foo_encode_init
mpeg4video_parser: Drop pointless av_-prefix from static function
h264: avoid undefined behavior in chroma motion compensation

Makes fate-h264 pass under valgrind --undef-value-errors=yes with
-cpuflags none. {avg,put}_h264_chroma_mc8_8 approximately 5% faster,
{avg,put}_h264_chroma_mc4_8 2% faster both on x86 and arm.
dca: replace some memcpy by AV_COPY128

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
x86: float dsp: unroll SSE versions

vector_fmul and vector_fmac_scalar are guaranteed that they can process in
batch of 16 elements, but their SSE versions only does 8 at a time.

Therefore, unroll them a bit.
299 to 261c for 256 elements in vector_fmac_scalar on Arrandale/Win64.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
Merge commit '017a06a9ee86b047079166c2694c9c655ff03356'

* commit '017a06a9ee86b047079166c2694c9c655ff03356':
  x86: dsputil: Use correct file name as multiple inclusion guard

Merged-by: Michael Niedermayer <michaelni@gmx.at>
aarch64: use EXTERN_ASM consistently for exported symbols

Based on e3fec3f095ab5ea08ee662942d98526aaf5e3635 for arm.
Merge commit '984e3398662d460e15904f9e4a6df9ef759070cb'

* commit '984e3398662d460e15904f9e4a6df9ef759070cb':
  avcodec: Consistently name encoder init functions foo_encode_init

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  mpeg4video_parser: Drop pointless av_-prefix from static function

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge remote-tracking branch 'cigaes/master'

* cigaes/master:
  ffmpeg: make reading packets from thread blocking.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
avformat/mov: make invalid sampledelta error more verbose

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
configure: Move inet_aton check into network function check block
configure: Move cpunop into ARCH_EXT_LIST_X86

It is a processor feature, so it belongs there.
configure: Add usan to the toolchain presets

clang-3.4 and gcc-4.9 have it.
avconv: Do not divide by zero
h264: Lower bound check for slice offsets

And use the value from the specification.

Sample-Id: 00000451-google
Found-by: Mateusz j00ru Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Merge commit '982b596ea6640bfe218a31f6c3fc542d9fe61c31'

* commit '982b596ea6640bfe218a31f6c3fc542d9fe61c31':
  h264: avoid undefined behavior in chroma motion compensation

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'ef010f08ae53479c54e2f16be5a7e1a809a9e268'

* commit 'ef010f08ae53479c54e2f16be5a7e1a809a9e268':
  dca: replace some memcpy by AV_COPY128

See: 5a48caa34b0c2a2641ea3bd522802fa1df2c8866
Merged-by: Michael Niedermayer <michaelni@gmx.at>