rtmp: Factorize the code by adding handle_server_bw

Signed-off-by: Martin Storsjö <martin@martin.st>
rtmp: Factorize the code by adding handle_client_bw

Signed-off-by: Martin Storsjö <martin@martin.st>
rtmp: Factorize the code by adding handle_ping

Signed-off-by: Martin Storsjö <martin@martin.st>
rtmp: Factorize the code by adding handle_chunk_size

Signed-off-by: Martin Storsjö <martin@martin.st>
rtmp: Factorize the code by adding handle_invoke

Signed-off-by: Martin Storsjö <martin@martin.st>
dsputil_mmx: fix incorrect assembly code

In ff_put_pixels_clamped_mmx(), there are two assembly code blocks.
In the first block (in the unrolled loop), the instructions
"movq 8%3, %%mm1 \n\t", and so forth, have problems.

From above instruction, it is clear what the programmer wants: a load from
p + 8. But this assembly code doesn’t guarantee that. It only works if the
compiler puts p in a register to produce an instruction like this:
"movq 8(%edi), %mm1". During compiler optimization, it is possible that the
compiler will be able to constant propagate into p. Suppose p = &x[10000].
Then operand 3 can become 10000(%edi), where %edi holds &x. And the instruction
becomes "movq 810000(%edx)". That is, it will stride by 810000 instead of 8.

This will cause a segmentation fault.

This error was fixed in the second block of the assembly code, but not in
the unrolled loop.

How to reproduce:
    This error is exposed when we build using Intel C++ Compiler, with
    IPO+PGO optimization enabled. Crashed when decoding an MJPEG video.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
x86/dsputil: put inline asm under HAVE_INLINE_ASM.

This allows compiling with compilers that don't support gcc-style
inline assembly.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
vp3: don't use calls to inline asm in yasm code.

Mixing yasm and inline asm is a bad idea, since if either yasm or inline
asm is not supported by your toolchain, all of the asm stops working.
Thus, better to use either one or the other alone.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
vp8: Replace x*155/100 by x*101581>>16.

Idea stolen from webp (by Pascal Massimino) - because it's Cool.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
lavr: x86: add missing vzeroupper in ff_mix_1_to_2_fltp_flt()
rtmp: Return proper error codes in handle_chunk_size

Signed-off-by: Martin Storsjö <martin@martin.st>
rtmp: Return proper error code in handle_client_bw

Signed-off-by: Martin Storsjö <martin@martin.st>
rtmp: Return proper error code in handle_server_bw

Signed-off-by: Martin Storsjö <martin@martin.st>
rtmp: Return an error when the client bandwidth is incorrect

Signed-off-by: Martin Storsjö <martin@martin.st>
Support urlencoded http authentication credentials

It should be possible to specify usernames in http requests containing
urlencoded characters. This patch adds support for decoding the auth
strings.

Signed-off-by: Antti Seppälä <a.seppala@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
vf_overlay: prevent premature freeing of cur_buf

Signed-off-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
vf_overlay: ensure the overlay frame does not get leaked.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
vf_yadif: unset cur_buf on the input link.

The buffer is stored internally, so this prevents it from being unreffed
automatically.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Fix typo in v410 decoder.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
libopenjpeg: support YUV and deep RGB pixel formats

Based on FFmpeg version from
commit 3275981207e30e140cffaea334ac390f1a04266a

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>