dsputil: make add_hfyu_left_prediction_sse4() support unaligned src.

This makes add_hfyu_left_prediction_sse4() handle sources that are not
16-byte aligned in its own function rather than by proxying the call to
add_hfyu_left_prediction_ssse3(). This fixes a crash on Win64, since the
sse4 version clobberes xmm6, but the ssse3 version (which uses MMX regs)
does not restore it, thus leading to XMM clobbering and RSP being off.

Fixes bug 342.
lagarith: pad RGB buffer by 1 byte.

For left HFYU prediction, we predict from the buffer buf+1 using 8- or
16-byte reads. This means that aligning the buffer by 16 bytes is in
itself not sufficient, because if the width itself is 16- or 8-byte
aligned, the buffer will not be padded, and thus a read of size 16 at
buf+1 will overflow boundaries at the right edge. Padding the buffer by
1 byte is sufficient to not overflow its boundaries.

Fixes bug 342.
lagarith: fix color plane inversion for YUY2 output.
wmapro: prevent division by zero when sample rate is unspecified

This fixes Bugzilla #327:

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Revert "wmapro: prevent division by zero when sample rate is unspecified"

This reverts commit 36936080239ba9e162f9f5d0f722ce579cb606cf. It was
already applied; no idea why it didn't error out while re-applying it.
x86: build: replace mmx2 by mmxext

Refactoring mmx2/mmxext YASM code with cpuflags will force renames.
So switching to a consistent naming scheme beforehand is sensible.
The name "mmxext" is more official and widespread and also the name
of the CPU flag, as reported e.g. by the Linux kernel.
x86: dct32: port to cpuflags
fft: 3dnow: fix register name typo in DECL_IMDCT macro

Signed-off-by: Diego Biurrun <diego@biurrun.de>
ARM: vp56: allow inline asm to build with clang

The clang integrated assembler does not support pre-UAL syntax,
while gcc requires pre-UAL syntax for ARM code.  A patch[1] for
clang to support the old syntax as well has been ignored since
January.

This patch chooses the syntax appropriate for each compiler,
allowing both to build the code.  Notably, this change allows
building for iphone with the latest Apple Xcode update.

[1] http://llvm.org/bugs/show_bug.cgi?id=11855

Signed-off-by: Mans Rullgard <mans@mansr.com>
ARMv6: vp8: fix stack allocation with Apple's assembler

In the GNU assembler, a relational expression, bizarrely, has the
value -1 if true, whereas in Apple's it is +1.  This patch makes
sure the correct expression is used in both cases.

Signed-off-by: Mans Rullgard <mans@mansr.com>
fate: add tests for lagarith lossless video codec.

Based on patch by Oana Stratulat <oanaandreeastratulat@gmail.com>.
fate: force pix_fmt in lagarith-rgb32 test

This makes big and little endian systems use the same output
format.

Signed-off-by: Mans Rullgard <mans@mansr.com>
h264: print num_reorder_frames in debug output

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
lavf: move has_decode_delay_been_guessed() up to make it accessible to earlier functions

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
has_decode_delay_been_guessed: adjust value for has_b_frames=0

needed for a mkv file

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
lavf: move nb_decoded_frames out of info.

This way the variable is available outside find_stream_info

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
compute_pkt_fields: do not attempt to calculate dts when the delay hasnt been estimated.

Fixes ticket1242

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
lavr: fix handling of custom mix matrices

Adds some validation for changing parameters after setting the matrix and
fixes a bug in the conversion path setup.
mpegdemux: remove redundant dvd audio code

This is almost a revert of: (the file from the report still works)

commit 80e58c6153249a40e47a20326b7626cbe0fcabd3
Author: Benoit Fouet <benoit.fouet@free.fr>
Date:   Wed Feb 11 11:09:36 2009 +0000

    Allow demuxing of audio substreams stored as 0x06 type.
    Fixes issue 725: MPEG2 PS with PCM audio.
    On behalf of Jai.

    Originally committed as revision 17150 to svn://svn.ffmpeg.org/ffmpeg/trunk

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
mpegdemux: move private stream 1 handling out of mpegps_read_pes_header

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>