configure: Don't try to enable the log2 function on msvcrt

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>
configure: Add --disable-inline-asm command line option

This can come in handy for testing and possibly other purposes.
configure: Adjust the xgetbv instrinsic check

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>
file: Use a normal private context for storing the file descriptor

Previously the file descriptor was stored in the priv_data pointer.

Signed-off-by: Martin Storsjö <martin@martin.st>
flvdec: always set AVFMTCTX_NOHEADER.

New streams may be created at any time, e.g. on codec change.
avplay: fix prototypes for option callbacks.

They have been wrong since 11d957fbd81288e64408e79ed369446346000b29
avplay: get rid of ugly casts in the options table
x86: dsputil: Move specific optimization settings out of global init function

They belong in the init functions specific to each CPU capability.
rtpdec_jpeg: Add support for default quantizers

Generate quantization tables when they are not present in the
first chunk.

Signed-off-by: Martin Storsjö <martin@martin.st>
configure: indentation cosmetics
configure: Only disable aligned stack on MSVC on 32 bit

On 64 bit, the stack seems to be aligned enough for our needs.

Signed-off-by: Martin Storsjö <martin@martin.st>
avserver: Add missing #include for av_gettime()
utvideoenc: Add missing AV_ prefix to codec ID
rtpdec_jpeg: Write the DHT section properly

Currently the size header of the generated DHT section is
incorrect, making the mjpeg decoder just skip it. Since the
written huffman tables are the default ones, this failure had
gone undetected.

Signed-off-by: Martin Storsjö <martin@martin.st>
rtpdec_jpeg: Merge two if statements

This makes the code more readable and robust.

Signed-off-by: Martin Storsjö <martin@martin.st>
rtpdec_jpeg: Simplify writing of the jpeg header

Generalize writing of any number of qtables. Don't manually write
16 bit values in two separate calls.

Signed-off-by: Martin Storsjö <martin@martin.st>
rtpdec_jpeg: Don't needlessly use a bitstream writer for the header

Everything written with this bitstream writer is 8/16 bit units
(except for a pair of 4 bit values), so using a bitstream writer
isn't necessary.

Signed-off-by: Martin Storsjö <martin@martin.st>
rtpdec_jpeg: Don't use a bitstream writer for the EOI marker

Signed-off-by: Martin Storsjö <martin@martin.st>
rtpdec_jpeg: Clarify where the subsampling magic numbers come from

Write out the numbers the way they are constructed, not just the
final values.

Signed-off-by: Martin Storsjö <martin@martin.st>
rtpdec_jpeg: Add more comments about the fields in the SOF0 section

Signed-off-by: Martin Storsjö <martin@martin.st>