avpicture: Don't assume a valid pix fmt in avpicture_get_size

When called from the v4l2 input device, pix_fmt can be
AV_PIX_FMT_NONE (for jpeg formats). Before 50ba57e0, this wasn't
an issue for avpicture_get_size, but after that commit, this
lead to crashes.

Signed-off-by: Martin Storsjö <martin@martin.st>
arm: fix use of uninitialised value in ff_fft_fixed_init_arm()

When initialising an FFTContext for a plain FFT, mdct_bits is not set
and can contain a garbage value.  Since nbits is always valid and for
MDCT operation is mdct_bits - 2 checking this instead avoids using an
uninitialised value while having the same effect.

Signed-off-by: Mans Rullgard <mans@mansr.com>
snow: fix build after 594d4d5df3c70404168701dd5c90b7e6e5587793
dct-test: arm: indicate required cpu features for optimised funcs

Signed-off-by: Mans Rullgard <mans@mansr.com>
configure: clean up check_inline_asm and check_as functions

The check_inline_asm function should check the actual C compiler,
not the one used for assembly files.  Usually these are the same,
but they might be different, typically when using a compiler other
than gcc.

The check_as should, as its name suggests, test the type of input
the AS command is used with, i.e. a standalond assembly (.S) file.

Finally, check for gnu assembler using the modified check_as as
this reflects actual usage.

Signed-off-by: Mans Rullgard <mans@mansr.com>
arm: use HAVE*_INLINE/EXTERNAL macros for conditional compilation

These macros reflect the actual capabilities required here.

Signed-off-by: Mans Rullgard <mans@mansr.com>
configure: do not bypass cpuflags section if --cpu not given

This will allow arch-specific ways of determining the target
variant when none is specified on the command line.

Signed-off-by: Mans Rullgard <mans@mansr.com>
configure: arm: detect toolchain default arch version

Probe for the toolchain default architecture version if no --cpu flag
is present or an unknown cpu is specified.  Works with gcc, clang and
armcc.

This allows configuring based on the arch version even if it is not
explicitly specified to configure.  It also causes an explicit -march
flag to be added to CFLAGS and ASFLAGS, which in turn lets us do
proper instruction set tests with the assembler.

Signed-off-by: Mans Rullgard <mans@mansr.com>
configure: arm: set fast_clz and fast_unaligned in cpuflags section

These are properties of the targeted core and do not depend on
specific assembly support in the toolchain which if missing will
render the controlling options here disabled.

Signed-off-by: Mans Rullgard <mans@mansr.com>
configure: add check_insn function

The check_insn function tests an instruction in both inline asm and
standalone assembly, and sets _external/_inline config properties
accordingly.

Signed-off-by: Mans Rullgard <mans@mansr.com>
configure: arm: check inline and external asm support for extensions

This tests instruction set support in both inline and external asm.
If both fail, the base config option is disabled.

Signed-off-by: Mans Rullgard <mans@mansr.com>
configure: arm: make _inline arch ext symbols depend on inline_asm

This makes --disable-inline-asm work as expected.

Signed-off-by: Mans Rullgard <mans@mansr.com>
arm: detect cpu features at runtime on Linux

This allows compiling optimised functions for features not enabled
in the core build and selecting these at runtime if the system has
the necessary support.

Signed-off-by: Mans Rullgard <mans@mansr.com>
arm: rename ARMVFP config symbol to VFP

This is consistent with usual ARM nomenclature as well as with the
VFPV3 and NEON symbols which both lack the ARM prefix.

Signed-off-by: Mans Rullgard <mans@mansr.com>
bitstream: add get_bits64() to support reading more than 32 bits at once

Also remove a duplicate function in the MPEG-TS demuxer.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
parser: fix large overreads

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
tak: demuxer, parser, and decoder

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
lavc: check dimensions for video encoders

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
takdec: fix initialisation of LOCAL_ALIGNED array

When LOCAL_ALIGNED uses manual alignment initialisation is not
possible.

Signed-off-by: Mans Rullgard <mans@mansr.com>
takdec: fix initialisation of LOCAL_ALIGNED array

When LOCAL_ALIGNED uses manual alignment initialisation is not
possible.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>