matroska: implement support for ALAC

Support Matroska native formatting.

On demuxing reconstruct the 36-bytes QuickTime atom that the ALAC
decoder expects by prepending the "atom size", "tag" and
"tag version" fields missing from the Matroska's CodecPrivate
element.

On muxing remove the initial 12 bytes

Sample files are available:
http://www.bunkus.org/videotools/mkvtoolnix/samples/alac/alac-in-matroska.mka
and the CoreAudio file it was created from with today's mkvmerge:
http://www.bunkus.org/videotools/mkvtoolnix/samples/alac/alac-in-matroska-source.caf

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
matroskadec: split laces parsing
matroskadec: properly support BlockDuration
matroskadec: validate lace_size when parsed

Stricter validation, explicitly exit on misparsing and some error
forwarding from the ebml parsing functions used.
matroska: implement support for ProRes

Support Matroska native formatting.

On demuxing prepend a Frame container atom (32bit big endian encoded
frame size and 'icpf' string).
On muxing remove it.
matroskadec: split frame parsing
mov: support random access point grouping

Frames described by this grouping are the starter of a closed or
an open GOP.
This is useful for open GOP of H.264 stream which is not described
by sync sample atom.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
libx264: add support for nal-hrd, required for Blu-ray streams.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
mp3dec: use named constants for Xing header flags
mp3dec: read Xing frame TOC index
motion_est: fix use of inline on extern functions

Inline functions declared without extern do not provide an external
definition in standard C99.  This code only works because most
compilers do not implement the inline semantics correctly.  With a
stricter compiler, linking fails with unresolved references to these
functions.

Declaring the functions extern inline works correctly with some
compilers while some others still fail to create external definitions.

For maximum portability, create a static inline version with an
externally visible wrapper for ff_get_mb_score.  ff_epzs_motion_search
is so large that no sane compiler inlines it anyway, so there the
inline keyword can simply be dropped with no effect.

Signed-off-by: Mans Rullgard <mans@mansr.com>
lavf probe: prevent codec probe with no data at all seen

This occurs with fuzzed mpeg-ts files. set_codec_from_probe_data() is
called with a zeroed AVProbeData since no packet made through for
specific stream.
configure: update tms470 detection for latest version

v5.0 of the TI ARM compiler changes the version string.
This updates the detection to check for both the old and
the new strings.

Signed-off-by: Mans Rullgard <mans@mansr.com>
ARM: swap source operands in some add instructions

This allows using a 16-bit opcode when generating Thumb2 code.

Signed-off-by: Mans Rullgard <mans@mansr.com>
lavfi/select: make lavc dependency optional.
Merge commit '870e75524aa0d00ebcd1d15589c8d29b84af1565'

* commit '870e75524aa0d00ebcd1d15589c8d29b84af1565':
  matroskadec: validate lace_size when parsed

Merged-by: Michael Niedermayer <michaelni@gmx.at>
matroskadec: fix typo

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '117d8c6d1f1c187ffc6098d9618457e00534e013'

* commit '117d8c6d1f1c187ffc6098d9618457e00534e013':
  matroska: implement support for ProRes
  matroska: implement support for ALAC

Conflicts:
	libavformat/matroskaenc.c

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

* commit 'c831ebf61629d219ebcaa9f02d262e67aad09d83':
  matroskadec: split frame parsing
  matroskadec: split laces parsing

Conflicts:
	libavformat/matroskadec.c

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

* qatar/master:
  mp3dec: read Xing frame TOC index
  mp3dec: use named constants for Xing header flags
  libx264: add support for nal-hrd, required for Blu-ray streams.
  mov: support random access point grouping
  matroskadec: properly support BlockDuration

Conflicts:
	libavcodec/libx264.c
	libavformat/isom.h
	libavformat/matroskadec.c
	libavformat/mov.c
	libavformat/mp3dec.c

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