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>
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>
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>
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>
Avoid use of uninitialized and uncomputed linear least square models
during ff_lpc_calc_coefs() for FF_LPC_TYPE_CHOLESKY. Fixes running
make fate-flac-16-lpc-cholesk with valgrind --undef-value-errors=yes.
Start and end index are multiple of 2, therefore guaranteeing aligned access.
Also, this allows to generate 4 floats per loop, keeping the alignment all
along.
Timing:
- 32 bits: 326c -> 172c
- 64 bits: 323c -> 156c
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Some shells, e.g. minix3, have a broken 'test' builtin which fails
if the first operand of a binary operator looks like a unary operator.
Prefixing the values with 'x' prevents this from happening.
Signed-off-by: Mans Rullgard <mans@mansr.com>
The def files are used for generating import libraries for
other toolchains (in particular, for generating import libraries
for MSVC for DLLs built with mingw).
The def files produced by mingw/gcc contains ordinals for each
exported function. When MSVC tools generate import libraries
from such a def file, MSVC links to the DLL by the ordinals
instead of linking by name.
Since the def files aren't maintained by hand, the ordinal
numbers are assigned (more or less) randomly and any caller
linking to the libs by ordinals will break as soon as the libraries
export more/fewer functions.
Therefore, strip out the ordinals from the generated def files,
to make users link to the libraries by name.
Callers linking to the DLLs using the gcc provided import library
link by name as they should.
Signed-off-by: Martin Storsjö <martin@martin.st>