The 64 bit cl.exe version 16.00.30319.01 crashes with an internal
compiler error on the current check (and thus deduces it isn't
supported, even if the actual usage in libavuil/x86/cpu.c works
fine), but by assigning the value from the intrinsic to a variable,
or returning it, it works fine.
This error is fixed in cl.exe version 16.00.40219.01.
Signed-off-by: Martin Storsjö <martin@martin.st>
Some msvcrt versions (the static 64 bit libc in MSVC 10) have
a log2 function, but there is no declaration for it in the headers.
Therefore, the normal configure check might find it, but it can fail
during build or at runtime, depending on whether implicit function
declarations are an error or not.
Therefore simply ignore this function on this platform.
Signed-off-by: Martin Storsjö <martin@martin.st>
This reverts parts of e0c6cce447. There is external mmx asm that
requires this alignment.
This fixes crashes when using swscale in builds with external mmx,
without inline assembly.
Signed-off-by: Martin Storsjö <martin@martin.st>
If regularly parsing new chan atoms (as in rtpdec_qt), but the
chan atoms don't actually contain any channel layout, don't reset
the value that the caller has filled in (by guessing).
Signed-off-by: Martin Storsjö <martin@martin.st>
For some reason add_hfyu_median_prediction_cmov is only selected
on 3Dnow-capable CPUs, even though it uses no 3Dnow instructions.
This patch allows it to be selected on any cpu with cmov with the
possibility of being overridden by the mmxext version.
Signed-off-by: Mans Rullgard <mans@mansr.com>
This fixes crashes when called from rtpdec_qt, where
AVFormatContext->pb is null, a crash present since 3bab7cd128.
Signed-off-by: Martin Storsjö <martin@martin.st>
It calculates the sum of power of two series, which can be done in one step.
Suggested by Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
That division can be replaced with a comparison:
((c->value - c->low) << 1) + 1 >= range
By expanding 'range' definition and simplifying this inequation we obtain
the final expression.
Suggested by Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
Prevents dangling pointers and makes access after free more obvious.
Setting AVFrame.qscale_table to NULL is required for successfully
allocating a previously freed Picture with ff_alloc_picture().
This disables the following warnings:
C4100: unreferenced formal parameter
(1035 occurrances)
C4214: nonstandard extension used : bit field types other than int
(609 occurances)
C4996: 'avpriv_snprintf': This function or variable may be unsafe.
Consider using _snprintf_s instead. To disable deprecation,
use _CRT_SECURE_NO_WARNINGS. See online help for details.
(351 occurrances)
Signed-off-by: Martin Storsjö <martin@martin.st>
Using ranlib is not required but prevents using the libraries with
msvc.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
It is possible in various error paths as well as gap handling
that this has already been allocated. It is not clear why that
would be a problem with the current code, thus disable the
assert to avoid a common assert failure when asserts are enabled.
Signed-off-by: Martin Storsjö <martin@martin.st>