parisc: work around bug in gcc 4.3 and later

A bug in tail call optimisation in gcc 4.3 and later on parisc causes
numerous tests to fail.  Disabling this optimisation gives a working
build.  See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55023

Signed-off-by: Mans Rullgard <mans@mansr.com>
lavr: fix the decision for writing directly to the output buffer

If there are any samples remaining in the output fifo from previous conversion
calls, we have to output those samples first instead of doing direct output
of the current samples.
x86: lavr: fix stack allocation for 7 and 8 channel downmixing on x86-32

Fixes crashes on Win32 and stack overruns on x86-32 in general.
mjpegdec: reset h/v_count, fix assertion failure.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Fix possible NULL-pointer dereference when decoding mov files.

Fixes CID743440, introduced in 850e5c0.
build: set -U__STRICT_ANSI__ for newlib

This is (erroneously) required to enable various things in the
newlib headers.  As cygwin uses newlib, it is covered by this.

Signed-off-by: Mans Rullgard <mans@mansr.com>
configure: add basic support for ARM AArch64

Signed-off-by: Mans Rullgard <mans@mansr.com>
configure: Refactor CPPFLAGS settings for glibc/uclibc

Signed-off-by: Mans Rullgard <mans@mansr.com>
img2enc: remove dead code

Nothing in lavc sets extradata for such codec and this is wrong place
for it anyway.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
ast: check bit depth too

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  x86: lavr: fix stack allocation for 7 and 8 channel downmixing on x86-32
  lavr: fix the decision for writing directly to the output buffer
  parisc: work around bug in gcc 4.3 and later

Merged-by: Michael Niedermayer <michaelni@gmx.at>
iff: recognise more DEEP colorspaces

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
iff: process DEEP DLOC chunk to obtain image dimensions

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
lavf: let av_find_best_stream use bitrate info if available

I guess the user expects to see the stream with the highest bitrate, not with
the most frames, this is especially useful for multi bitrate streams.

This patch changes av_find_best_stream to select the stream based on a number
of conditions, the first condition has the highest priority, the last condition
has the lowest:

1) Select the stream with the highest FFMIN(5, codec_info_nb_frames) value
2) Select the stream with the highest bitrate
3) Select the stream with the highest codec_info_nb_frames
4) Select the first stream

Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
h264: Skip odd NALs in extradata, prevent undefined behavior

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
iff: decode HAM8 images with masking correctly.

Fixes ticket #967.

Reviewed-by: Peter Ross
lavfi/drawtext: implement more generic expansion.

The new expansion mechanism uses the %{...} notation.
For compatibility reasons, it must be enabled explicitly,
but a warning is printed if a conflict is likely to happen.
pp: add various const for pointers.
pp: add auto detection cpu flag.
lavfi/mp/pp: use PP_CPU_CAPS_AUTO.