Commit Graph

41842 Commits

Author SHA1 Message Date
Luca Barbato eecd29b3fd ppc: vsx: Implement float_dsp 2015-05-31 12:07:11 +02:00
Luca Barbato 7d07ee5a9b ppc: cpu: Add support for VSX and POWER8 extensions 2015-05-31 12:07:11 +02:00
Luca Barbato da60b99a88 ppc: Restrict some Altivec implementations to Big Endian
In Little Endian the vec_ld/vec_st operations work as
expected only for byte-vectors.
2015-05-31 12:07:11 +02:00
Luca Barbato f22ebd2555 ppc: configure: Support ISA 2.06 and later
POWER 7 and POWER 8 support VSX and ldbrx.

POWER 8 supports additional extended VSX instructions introduced
with ISA 2.07.
2015-05-31 12:07:10 +02:00
Luca Barbato 3058872c29 ppc: Clarify and extend the cpuid check
Add POWER entries.
2015-05-31 12:07:10 +02:00
Luca Barbato baa94563fe ppc: linux: Check altivec using the auxv
Should prevent trying to use altivec when it is disabled by the kernel.
2015-05-31 12:07:10 +02:00
Luca Barbato 7014b65995 ppc: pixblockdsp: Use the abriged vector types 2015-05-31 12:07:10 +02:00
Luca Barbato 72cebae0d9 ppc: avutil: Use the abriged vector types 2015-05-31 12:07:10 +02:00
Luca Barbato 254eb5b6fa ppc: avutil: Drop a potentially dangerous workaround
The compiler is free to optimize such expressions in any sort of way.
2015-05-31 12:07:10 +02:00
wm4 881b80b329 network: prevent SIGPIPE on OSX
OSX does not know MSG_NOSIGNAL. BSD (which OSX is based on) has got
the socket option SO_NOSIGPIPE (even if modern BSDs also support
MSG_NOSIGNAL).

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-31 10:10:16 +03:00
Luca Barbato 0181ae9af2 h264: Make sure reinit failures mark the context as not initialized
Bug-Id: CVE-2015-3417
CC: libav-stable@libav.org
2015-05-30 16:28:32 +02:00
Luca Barbato 5ecabd3c54 msrle: Use FFABS to determine the frame size in msrle_decode_pal4
As done in msrle_decode_8_16_24_32.

Bug-Id: CVE-2015-3395
CC: libav-stable@libav.org
2015-05-30 16:28:32 +02:00
Martin Storsjö b2f0f37d24 rtmpdh: Generate the whole private exponent using av_get_random_seed() with nettle/gmp
Don't use a PRNG for generating it; that defies the intended use
within the cryptograhic handshake.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-29 23:33:03 +03:00
Martin Storsjö e9e86d9ef6 rtmpdh: Create sufficiently long private keys for gcrypt/nettle
There was a misunderstanding betewen bits and bytes for the parameter
value for generating random big numbers.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-29 09:42:41 +03:00
Martin Storsjö 8016a1bd3b rtmpdh: Remove an unnecessary check in the gcrypt/nettle dh_compute_key
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-29 09:42:38 +03:00
Martin Storsjö 063f7467e4 rtmpdh: Add fate test for the DH handshake routine
This helps if these functions need to be implemented using another
crypto API.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-29 09:42:35 +03:00
Martin Storsjö 0508faaa11 rtmpdh: Pass the actual buffer size of the output secret key
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-29 09:42:32 +03:00
Martin Storsjö 9f1b3050d9 rtmpdh: Check the output buffer size in the openssl version of dh_compute_key
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-29 09:42:30 +03:00
Martin Storsjö 127d813bcb rtmpdh: Fix a local variable name in the nettle/gcrypt codepath
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-29 09:42:28 +03:00
Martin Storsjö 78efc69e7c rtmpdh: Make sure ret is initialized in the nettle version of bn_hex2bn
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-29 09:42:24 +03:00
wm4 a64a5773ea pixfmt: remove misleading and broken documentation
This was probably broken some time ago. The breakage is now part of the
ABI. For example, we have:

    AV_PIX_FMT_XYZ12BE
    AV_PIX_FMT_NV16
    AV_PIX_FMT_NV20LE

AV_PIX_FMT_NV20LE is wrong. It has the value 113, but as little-endian
format it should be even. This must have been quite obvious when these
formats were added (because of the AV_PIX_FMT_XYZ12BE entry), but
nobody cared or knew about this.

The future libavutil major bump will also break this additionally,
because disabling FF_API_VDPAU will remove an odd number of entries from
the middle of the enum.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-05-28 18:40:40 +02:00
Michael Niedermayer e4610300de x86: cavs: Remove an unneeded scratch buffer
Simplifies the code and makes it build on certain compilers
running out of registers on x86.

CC: libav-stable@libav.org
Reported-By: mudler
2015-05-28 18:40:40 +02:00
Anton Khirnov 1b1bb2c4ef rl: Add error checking to ff_rl_init(). 2015-05-28 15:38:43 +01:00
Anton Khirnov 324e50ee95 rl: Add a function for freeing dynamically allocated tables.
Such tables are not used anywhere currently, but that should change.
2015-05-28 15:38:43 +01:00
Anton Khirnov 6f57375d70 rl: Rename ff_*_rl() to ff_rl_*() 2015-05-28 15:38:43 +01:00
Anton Khirnov fa1923f182 mpegvideo: Move ff_*_rl functions to a separate file 2015-05-28 15:38:43 +01:00
Vittorio Giovara 419e3404d0 mpegvideo: Drop exchange_uv() function and use its code directly
Code is small enough that there is no advantage in a separate function.
2015-05-28 15:38:43 +01:00
Martin Storsjö d4d90504a6 tls_gnutls: Add missing includes for the gcrypt thread safety callbacks
This fixes building with gcrypt-backed gnutls versions, broken
in 57cde2b180.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-28 15:05:52 +03:00
Timothy Gu dd4d709be7 x86inc: Clear __SECT__
Silences warning(s) like:

    libavcodec/x86/fft.asm:93: warning: section flags ignored on
    section redeclaration

The cause of this warning is that because `struc` and `endstruc`
attempts to revert to the previous section state [1].

The section state is stored in the macro __SECT__, defined by
x86inc.asm to be `.note.GNU-stack ...`, through the `SECTION`
directive [2].

Thus, the `.note.GNU-stack` section is defined twice
(once in x86inc.asm, once during `endstruc`), causing the warning.

That is the first part of the commit: using the primitive `[section]` format
for .note.GNU-stack etc., which does not update `__SECT__` [2].

That fixes only half of the problem. Even without any `SECTION` directives,
`__SECT__` is predefined as `.text`, which conflicting with the later
`SECTION_TEXT` (which expands to `.text align=16`).

[1]: http://www.nasm.us/doc/nasmdoc6.html#section-6.4
[2]: http://www.nasm.us/doc/nasmdoc6.html#section-6.3

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-05-28 11:40:15 +02:00
wm4 57cde2b180 lavf: move TLS-related ifdeffery to library specific files
There is no need to have this mess in network.c.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-26 21:48:51 +03:00
wm4 d8ffb2055f lavf: split tls.c
Move the OpenSSL and GnuTLS implementations to their own files. Other
than the connection code (including options) and some boilerplate, no
code is actually shared.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-26 21:48:32 +03:00
Sebastian Ramacher cf1f3d837e doc: Fix spelling of 'Transmission'
Signed-off-by: Sebastian Ramacher <sramacher@debian.org>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-05-26 13:41:44 +02:00
Steve Lhomme d8039ef8d2 D3D11va: add a Direct3D11 video decoder similar to DXVA2
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-05-25 11:47:08 +02:00
Vittorio Giovara 4e17946f10 mpegvideo: Rework various functions not to use MpegEncContext directly 2015-05-22 15:34:39 +01:00
Vittorio Giovara a3f4c930ac mpegvideo: Have ff_mpeg_ref_picture use AVCodecContext directly 2015-05-22 15:34:39 +01:00
Vittorio Giovara d528045558 mpegvideo: Have ff_mpeg_unref_picture use AVCodecContext directly
This skips setting the memory to 0 but allows for reuse on different
contextes. Oracle did not report any unsual activity because of it.
2015-05-22 15:34:39 +01:00
Vittorio Giovara 6f54dc43ce mpegvideo: Drop stream_codec_tag
The field is unused.
2015-05-22 15:34:39 +01:00
Vittorio Giovara 9c1db92ad3 mpegvideo: Drop err_recognition
It is just a duplicate of an AVCodecContext member so use it instead.
2015-05-22 15:34:39 +01:00
Vittorio Giovara 848e86f74d mpegvideo: Drop flags and flags2
They are just duplicates of AVCodecContext members so use those instead.
2015-05-22 15:34:39 +01:00
James Almer 29216d7fd1 tls: fix compilation when both gnutls and openssl are enabled
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-22 12:21:38 +03:00
Martin Storsjö 94599a6de3 tls: Remove all the local polling loops
These aren't necessary any longer.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-22 00:06:11 +03:00
Martin Storsjö d13b124eaf tls: Remove the nonblocking code
Since the underlying URLContext read functions are used,
they handle interruption, without having to handle it at
this level.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-22 00:05:01 +03:00
Martin Storsjö d15eec4d6b tls: Use custom IO to read from the URLContext
This avoids hijacking the fd, by reading using the normal
URLContext functions instead. This allowing reading data that has
been buffered in the underlying URLContext.

This avoids using the libraries own send functions that can
cause SIGPIPE.

The fd is still used for polling the lowlevel socket, for
waiting for retries.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-22 00:04:32 +03:00
wm4 3efe0393e4 hevc: make avcodec_decode_video2() fail if get_format() fails
Personally, I need the decoder to back out if get_format() returns no
usable pixel format. This didn't work because the error code was not
propagated down the call chain. This in turn happened because the
variable declaration removed in this patch shadowed the variable, whose
value is returned at the end of the function. Consequently, failures of
decode_nal_unit() were ignored in this place.

Reviewed-by:  Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-19 18:59:06 +01:00
Vittorio Giovara 7046bd9bc9 lavfi: Move avcodec header to the only filter needing it
af_ashowinfo, due to the enum AVAudioServiceType use.
2015-05-19 18:56:40 +01:00
Vittorio Giovara eafbc6716c vmnc: Delay pixel size check
Some clients incorrectly set 24 as bits_per_coded_sample, while
the actual value is preserved in one of the codec headers.
In order to work around this, delay the check until decode_frame().

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-05-19 18:55:30 +01:00
Timothy Gu 732dd65868 doc: Add $branch to FATE config template
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-05-16 17:06:35 +02:00
Stefano Pigozzi e7c5e17d4f vda: Make output CVPixelBuffer format configurable
This is useful for client programs to ask for nv12 surfaces instead of the
current default (uyvy), since those are more efficient to decode to.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-05-13 17:39:37 +02:00
Gopu Govindaswamy 3b5e5e6a29 libx265: Use the Multi-library Interface
Use the Multi-library interface to load at runtime x265 libraries
supporting alternative bit depths (e.g. 8bit and 16bit).

The linked library will try to load the library supporting the
pixel format if it is not supported by itself.

Fallback requesting the native library (passing 0 to x265_api_get) if
a library supporting the requested bit depth is not available.

Signed-off-by: Gopu Govindaswamy <gopu@multicorewareinc.com>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-05-13 17:14:50 +02:00
Shiina Hideaki 85ca012ba6 mjpegenc: Fix JFIF header byte ordering
The header had a wrong version description.

Bug-Id: 808
Signed-off-by: Shiina Hideaki <shiina@yndrd.com>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-05-12 16:30:48 +01:00