OSDN Git Service

android-x86/external-ffmpeg.git
9 years agojack: Check memory allocation
Vittorio Giovara [Wed, 3 Jun 2015 13:16:48 +0000 (14:16 +0100)]
jack: Check memory allocation

CC: libav-stable@libav.org
Bug-Id: CID 1292520

9 years agoaudiointerleave: Always initialize new_pkt
Vittorio Giovara [Wed, 3 Jun 2015 13:16:47 +0000 (14:16 +0100)]
audiointerleave: Always initialize new_pkt

CC: libav-stable@libav.org
Bug-Id: CID 609333

9 years agosctp: Always initialize outmsg struct
Vittorio Giovara [Wed, 3 Jun 2015 13:16:45 +0000 (14:16 +0100)]
sctp: Always initialize outmsg struct

CC: libav-stable@libav.org
Bug-Id: CID 1302711

9 years agompjpgdec: free AVIOContext leak on early probe fail
Janne Grunau [Mon, 8 Jun 2015 11:31:04 +0000 (13:31 +0200)]
mpjpgdec: free AVIOContext leak on early probe fail

9 years agompegvideo: Move OutFormat enum to mpegutils.h
Vittorio Giovara [Sun, 31 May 2015 13:49:55 +0000 (15:49 +0200)]
mpegvideo: Move OutFormat enum to mpegutils.h

It is necessary to avoid circular header dependencies.

9 years agompegvideo: Split picture allocation for encoding and decoding
Vittorio Giovara [Sun, 31 May 2015 13:49:54 +0000 (15:49 +0200)]
mpegvideo: Split picture allocation for encoding and decoding

The main ff_alloc_picture() function is made more generic with all the
parameters necessary as arguments. This will allows to move most of the
related functions to a separate file later.

Right now wrappers are provided to try and minimize the number of
changes in the code.

9 years agompegvideo: Rework frame_size_alloc function
Vittorio Giovara [Sun, 31 May 2015 13:49:53 +0000 (15:49 +0200)]
mpegvideo: Rework frame_size_alloc function

Use more generic arguments and remove its static attribute since it will
be moved to a separate file.

9 years agompegvideo: Move various temporary buffers to a separate context
Vittorio Giovara [Sun, 31 May 2015 13:49:52 +0000 (15:49 +0200)]
mpegvideo: Move various temporary buffers to a separate context

9 years agoconfigure: Support MSVC 2015
Luca Barbato [Fri, 5 Jun 2015 13:07:06 +0000 (15:07 +0200)]
configure: Support MSVC 2015

The C runtime C99 compatibility had been improved a lot and it now
rejects some of the compatibility defines provided for the older
versions.

Many thanks to Ray for the time spent testing.

Bug-Id: 864
CC: libav-stable@libav.org
9 years agoaac: Wait to know the channels before allocating frame
Luca Barbato [Thu, 4 Jun 2015 08:19:50 +0000 (10:19 +0200)]
aac: Wait to know the channels before allocating frame

The channel configuration can be delivered only by the PCE,
try to parse it first and not try to decode until a channel
configuration is set.

CC: libav-stable@libav.org
9 years agoaac: Support channel configurations 11 and 12
Sebastian Dröge [Thu, 4 Jun 2015 13:35:51 +0000 (15:35 +0200)]
aac: Support channel configurations 11 and 12

These are defined in ISO/IEC 14496-3:2009/PDAM 4 for 6.1 and 7.1.
It also defines another 7.1 layout with configuration 14, that one
is not added here for now.

11: 3/3.1    FC FL+FR BL+BR BC LFE
12: 3/2/2.1  FC FL+FR SiL+SiR BL+BR LFE

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agoaac: correctly map 7.1ch-wide AAC from FDK AAC encoder
nu774 [Thu, 4 Jun 2015 05:42:08 +0000 (14:42 +0900)]
aac: correctly map 7.1ch-wide AAC from FDK AAC encoder

FDK AAC encoder outputs SCE(front)+CPE(front)+CPE(back)+CPE(back) on
MODE_7_1_REAR_SURROUND configuration.
Since decoder couldn't properly map 4 back channels, decoding failed
unless -request_channel_layout 0x8000000000000000 has been specified.
Now we treat first CPE(back) as CPE(side) on channel mapping.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agoavio: Add avio_put_str16be
Luca Barbato [Fri, 5 Jun 2015 21:21:18 +0000 (23:21 +0200)]
avio: Add avio_put_str16be

9 years agompjpeg: Initial implementation
Luca Barbato [Sat, 16 May 2015 15:03:28 +0000 (17:03 +0200)]
mpjpeg: Initial implementation

Support only streams with Content-Length.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agoaac: Correctly map multichannel ADTS AAC with non-zero channel_config + PCE
nu774 [Wed, 3 Jun 2015 05:01:32 +0000 (14:01 +0900)]
aac: Correctly map multichannel ADTS AAC with non-zero channel_config + PCE

The decoder assigns channels using default channel configuration
for 5.1ch when it parses an ADTS frame header using consecutive
channel ids.

When a PCE comes, it reassigns channels using PCE configuration
using directly the ids provided. They can be arbitrary.

Always use consecutive channel ids to avoid decoding glitches due
spurious reconfigurations due the channel ids mismatch between the
two otherwise-identical channel maps.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agobink: Factorize bink put_pixel
Luca Barbato [Wed, 3 Jun 2015 00:09:31 +0000 (02:09 +0200)]
bink: Factorize bink put_pixel

And make sure to check INTER_BLOCK as had been fixed by Michael
Niedermayer.

Reported-By: Andreas Cadhalpun
CC: libav-stable@libav.org
9 years agoconfigure: Check for DXVA2_ConfigPictureDecode instead of LPDIRECT3DSURFACE9
Martin Storsjö [Tue, 2 Jun 2015 07:15:57 +0000 (10:15 +0300)]
configure: Check for DXVA2_ConfigPictureDecode instead of LPDIRECT3DSURFACE9

Checking this struct is a bit more natural for this dependency.

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agoconfigure: Remove unnecessary tests for d3d11va
Martin Storsjö [Tue, 2 Jun 2015 07:12:51 +0000 (10:12 +0300)]
configure: Remove unnecessary tests for d3d11va

These are only necessary once/if avconv gets support for this hwaccel.
While that obviously is desireable, we don't have it yet, and they
currently only are a distraction.

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agoconfigure: Don't run "export $e" for an empty string
Martin Storsjö [Tue, 2 Jun 2015 19:55:52 +0000 (22:55 +0300)]
configure: Don't run "export $e" for an empty string

This fixes the side effect of printing the whole environment,
if no --env parameter was provided.

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agoconfigure: don't enable tls protocols if network is disabled
James Almer [Tue, 2 Jun 2015 16:24:21 +0000 (13:24 -0300)]
configure: don't enable tls protocols if network is disabled

This was a regression introduced with d8ffb2055f0e0fcb5d025bab72eb19c2a886c125.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agoconfigure: Use pkg-config for fdk-aac
Luca Barbato [Sun, 10 May 2015 18:52:30 +0000 (20:52 +0200)]
configure: Use pkg-config for fdk-aac

Makes the life of the people already setting PKG_CONFIG_PATH simpler.

9 years agoconfigure: Provide an option to override the environment
Luca Barbato [Wed, 6 May 2015 11:37:31 +0000 (13:37 +0200)]
configure: Provide an option to override the environment

Useful to have `make config` work with custom pkgconf path.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agoconfigure: Support the extended pkgconf syntax
Luca Barbato [Sun, 31 May 2015 14:47:46 +0000 (16:47 +0200)]
configure: Support the extended pkgconf syntax

Make possible to require a combination of
packages and/or pin specific versions.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agoconfigure: Remove some unnecessary exported config items
Martin Storsjö [Mon, 1 Jun 2015 10:46:40 +0000 (13:46 +0300)]
configure: Remove some unnecessary exported config items

The only need to be listed if they are to be used in ifdefs from
within the code - config items used as dependencies only within
configure don't need to be exported.

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agoconfigure: Require LPDIRECT3DSURFACE9 for dxva2
Martin Storsjö [Mon, 1 Jun 2015 09:06:08 +0000 (12:06 +0300)]
configure: Require LPDIRECT3DSURFACE9 for dxva2

This fixes dxva2 detection (i.e. correctly realizes that it isn't
available) for WinRT, where dxva2api.h does exist, but these definitions
are omitted (when targeting the API subsets).

Ideally we should rather check for e.g. DXVA2_ConfigPictureDecode,
but configure might fail to find that definition due to _WIN32_WINNT
not being set to the right value during configure. (libavcodec/dxva2.h
manually overrides the _WIN32_WINNT define.)

This allows removing hardcoded --disable-dxva2 from such build
configurations.

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agodxva2: Add ifdefs around structs that might not be available
Martin Storsjö [Mon, 1 Jun 2015 09:16:51 +0000 (12:16 +0300)]
dxva2: Add ifdefs around structs that might not be available

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agodxva2: Fix build when only D3D11 or DXVA2 is used
Steve Lhomme [Tue, 26 May 2015 06:45:44 +0000 (08:45 +0200)]
dxva2: Fix build when only D3D11 or DXVA2 is used

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agoconfigure: Check if ID3D11VideoDecoder exists, not just the header to enable d3d11va
Steve Lhomme [Tue, 26 May 2015 06:45:43 +0000 (08:45 +0200)]
configure: Check if ID3D11VideoDecoder exists, not just the header to enable d3d11va

Fixes build with some mingw-w64 versions, that have got the header
but not the interface declaration.

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agoh264: Fix HWACCEL_MAX for D3D11
Michael Niedermayer [Tue, 26 May 2015 06:45:42 +0000 (08:45 +0200)]
h264: Fix HWACCEL_MAX for D3D11

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agohevc: Fix HWACCEL_MAX for D3D11
Michael Niedermayer [Tue, 26 May 2015 06:45:41 +0000 (08:45 +0200)]
hevc: Fix HWACCEL_MAX for D3D11

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agortmpdh: Use GMP functions directly, instead of nettle wrappers
Martin Storsjö [Sun, 31 May 2015 20:46:56 +0000 (23:46 +0300)]
rtmpdh: Use GMP functions directly, instead of nettle wrappers

mpz_import and mpz_export were added in GMP 4.1, in 2002.

This simplifies the DH code by clarifying that it only uses pure
bignum functions, no other parts of nettle/hogweed.

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agortmpdh: Fix the indentation in a struct
Martin Storsjö [Sat, 30 May 2015 19:19:35 +0000 (22:19 +0300)]
rtmpdh: Fix the indentation in a struct

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agonvenc: H264 and HEVC encoders
Luca Barbato [Sat, 30 May 2015 14:40:13 +0000 (16:40 +0200)]
nvenc: H264 and HEVC encoders

Partially based on the work of Timo Rothenpieler <timo@rothenpieler.org>

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agoxsub: Check memory allocation
Vittorio Giovara [Sun, 31 May 2015 12:55:44 +0000 (14:55 +0200)]
xsub: Check memory allocation

9 years agowma: Check memory allocation
Vittorio Giovara [Sun, 31 May 2015 12:55:35 +0000 (14:55 +0200)]
wma: Check memory allocation

9 years agotruemotion2: Check memory allocation
Vittorio Giovara [Sun, 31 May 2015 12:55:27 +0000 (14:55 +0200)]
truemotion2: Check memory allocation

9 years agosvq1: Check memory allocation
Vittorio Giovara [Sun, 31 May 2015 12:55:19 +0000 (14:55 +0200)]
svq1: Check memory allocation

9 years agoratecontrol: Check memory allocation
Vittorio Giovara [Sun, 31 May 2015 12:55:12 +0000 (14:55 +0200)]
ratecontrol: Check memory allocation

9 years agopthread: Check memory allocation
Vittorio Giovara [Sun, 31 May 2015 12:55:06 +0000 (14:55 +0200)]
pthread: Check memory allocation

9 years agopsymodel: Check memory allocation
Vittorio Giovara [Sun, 31 May 2015 12:54:55 +0000 (14:54 +0200)]
psymodel: Check memory allocation

9 years agoxvid: Check memory allocation
Vittorio Giovara [Sun, 31 May 2015 12:54:48 +0000 (14:54 +0200)]
xvid: Check memory allocation

9 years agox264: Check memory allocation
Vittorio Giovara [Sun, 31 May 2015 12:54:39 +0000 (14:54 +0200)]
x264: Check memory allocation

9 years agolibtheora: Check memory allocation
Vittorio Giovara [Sun, 31 May 2015 12:54:29 +0000 (14:54 +0200)]
libtheora: Check memory allocation

9 years agolcl: Check memory allocation
Vittorio Giovara [Sun, 31 May 2015 12:54:21 +0000 (14:54 +0200)]
lcl: Check memory allocation

9 years agojpegls: Check memory allocation
Vittorio Giovara [Sun, 31 May 2015 12:54:11 +0000 (14:54 +0200)]
jpegls: Check memory allocation

9 years agohuffyuv: Check memory allocation
Vittorio Giovara [Sun, 31 May 2015 12:54:03 +0000 (14:54 +0200)]
huffyuv: Check memory allocation

9 years agoeatgv: Check memory allocation
Vittorio Giovara [Sun, 31 May 2015 12:53:51 +0000 (14:53 +0200)]
eatgv: Check memory allocation

9 years agodct: Check memory allocation
Vittorio Giovara [Sun, 31 May 2015 12:53:31 +0000 (14:53 +0200)]
dct: Check memory allocation

9 years agoasv: Check memory allocation
Vittorio Giovara [Sun, 31 May 2015 12:50:21 +0000 (14:50 +0200)]
asv: Check memory allocation

9 years agoaacpsy: Check memory allocation
Vittorio Giovara [Sun, 31 May 2015 12:45:54 +0000 (14:45 +0200)]
aacpsy: Check memory allocation

9 years agompegvideo: Move MotionEstContext and function declarations to a separate header
Vittorio Giovara [Fri, 29 May 2015 18:44:05 +0000 (19:44 +0100)]
mpegvideo: Move MotionEstContext and function declarations to a separate header

9 years agompegvideo: mpeg12: Move function declarations
Vittorio Giovara [Fri, 29 May 2015 18:44:04 +0000 (19:44 +0100)]
mpegvideo: mpeg12: Move function declarations

9 years agompegvideo: Move tables to a separate file
Vittorio Giovara [Fri, 29 May 2015 18:44:03 +0000 (19:44 +0100)]
mpegvideo: Move tables to a separate file

9 years agompegvideo: msmpeg4: Move function declarations
Vittorio Giovara [Fri, 29 May 2015 18:44:02 +0000 (19:44 +0100)]
mpegvideo: msmpeg4: Move function declarations

9 years agompegvideo: wmv2: Move function declarations
Vittorio Giovara [Fri, 29 May 2015 18:44:01 +0000 (19:44 +0100)]
mpegvideo: wmv2: Move function declarations

9 years agodxva2_hevc: re-write reference frame handling
Hendrik Leppkes [Thu, 28 May 2015 16:25:37 +0000 (18:25 +0200)]
dxva2_hevc: re-write reference frame handling

The old logic required an explicit clearing of the lists first and was
prone to overflow the DXVA2 struct in some circumstances.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agodxva2_hevc: fix 32x32 scaling lists
Hendrik Leppkes [Thu, 28 May 2015 16:25:36 +0000 (18:25 +0200)]
dxva2_hevc: fix 32x32 scaling lists

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agomov: always check avio_read return value
Andreas Cadhalpun [Tue, 26 May 2015 13:24:39 +0000 (14:24 +0100)]
mov: always check avio_read return value

If avio_read fails, the buffer can contain uninitialized data.

This fixes 'Conditional jump or move depends on uninitialised value(s)'
valgrind warnings, and addresses a few memleaks.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agoavio: Add avio_read wrapper to simplify error checking
Vittorio Giovara [Tue, 26 May 2015 13:24:38 +0000 (14:24 +0100)]
avio: Add avio_read wrapper to simplify error checking

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agomov: reject zero bytes_per_frame with non-zero samples_per_frame
Andreas Cadhalpun [Tue, 26 May 2015 13:24:37 +0000 (14:24 +0100)]
mov: reject zero bytes_per_frame with non-zero samples_per_frame

In this case the mov demuxer can return a large number of empty packets.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agomov: abort on EOF in ff_mov_read_chan
Andreas Cadhalpun [Tue, 26 May 2015 13:24:35 +0000 (14:24 +0100)]
mov: abort on EOF in ff_mov_read_chan

Otherwise the loop can take a lot of time if num_descr is very large.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agomov: Correctly allocate ctts_data
Luca Barbato [Sun, 31 May 2015 10:28:33 +0000 (12:28 +0200)]
mov: Correctly allocate ctts_data

It can be reallocated.

CC: libav-stable@libav.org
9 years agomov: Fix two memleaks
Andreas Cadhalpun [Tue, 26 May 2015 13:24:36 +0000 (14:24 +0100)]
mov: Fix two memleaks

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
CC: libav-stable@libav.org
9 years agovp9: Parse subsampling and report missing feature
Vittorio Giovara [Wed, 27 May 2015 14:06:57 +0000 (15:06 +0100)]
vp9: Parse subsampling and report missing feature

9 years agox86: check for AV_CPU_FLAG_AVXSLOW where useful
James Almer [Tue, 26 May 2015 17:29:08 +0000 (14:29 -0300)]
x86: check for AV_CPU_FLAG_AVXSLOW where useful

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agox86: Add helper macros to check for slow cpuflags
James Almer [Tue, 26 May 2015 17:29:07 +0000 (14:29 -0300)]
x86: Add helper macros to check for slow cpuflags

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agox86: add AV_CPU_FLAG_AVXSLOW flag
James Almer [Tue, 26 May 2015 17:29:06 +0000 (14:29 -0300)]
x86: add AV_CPU_FLAG_AVXSLOW flag

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agoppc: vsx: Implement diff_pixels and get_pixels
Luca Barbato [Tue, 12 May 2015 00:38:56 +0000 (02:38 +0200)]
ppc: vsx: Implement diff_pixels and get_pixels

Use a macro to abstract the endianness.

9 years agoppc: vsx: Implement float_dsp
Luca Barbato [Mon, 11 May 2015 00:44:10 +0000 (02:44 +0200)]
ppc: vsx: Implement float_dsp

9 years agoppc: cpu: Add support for VSX and POWER8 extensions
Luca Barbato [Sun, 10 May 2015 02:15:59 +0000 (04:15 +0200)]
ppc: cpu: Add support for VSX and POWER8 extensions

9 years agoppc: Restrict some Altivec implementations to Big Endian
Luca Barbato [Sun, 10 May 2015 21:22:17 +0000 (23:22 +0200)]
ppc: Restrict some Altivec implementations to Big Endian

In Little Endian the vec_ld/vec_st operations work as
expected only for byte-vectors.

9 years agoppc: configure: Support ISA 2.06 and later
Luca Barbato [Sun, 10 May 2015 00:47:31 +0000 (02:47 +0200)]
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.

9 years agoppc: Clarify and extend the cpuid check
Luca Barbato [Sat, 9 May 2015 22:49:51 +0000 (00:49 +0200)]
ppc: Clarify and extend the cpuid check

Add POWER entries.

9 years agoppc: linux: Check altivec using the auxv
Luca Barbato [Fri, 3 Apr 2015 13:31:32 +0000 (15:31 +0200)]
ppc: linux: Check altivec using the auxv

Should prevent trying to use altivec when it is disabled by the kernel.

9 years agoppc: pixblockdsp: Use the abriged vector types
Luca Barbato [Mon, 11 May 2015 22:45:37 +0000 (00:45 +0200)]
ppc: pixblockdsp: Use the abriged vector types

9 years agoppc: avutil: Use the abriged vector types
Luca Barbato [Sun, 10 May 2015 02:37:50 +0000 (04:37 +0200)]
ppc: avutil: Use the abriged vector types

9 years agoppc: avutil: Drop a potentially dangerous workaround
Luca Barbato [Sun, 10 May 2015 20:48:30 +0000 (22:48 +0200)]
ppc: avutil: Drop a potentially dangerous workaround

The compiler is free to optimize such expressions in any sort of way.

9 years agonetwork: prevent SIGPIPE on OSX
wm4 [Thu, 28 May 2015 16:23:27 +0000 (18:23 +0200)]
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>
9 years agoh264: Make sure reinit failures mark the context as not initialized
Luca Barbato [Mon, 25 May 2015 20:30:10 +0000 (22:30 +0200)]
h264: Make sure reinit failures mark the context as not initialized

Bug-Id: CVE-2015-3417
CC: libav-stable@libav.org
9 years agomsrle: Use FFABS to determine the frame size in msrle_decode_pal4
Luca Barbato [Mon, 25 May 2015 19:53:26 +0000 (21:53 +0200)]
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
9 years agortmpdh: Generate the whole private exponent using av_get_random_seed() with nettle/gmp
Martin Storsjö [Fri, 29 May 2015 07:14:39 +0000 (10:14 +0300)]
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>
9 years agortmpdh: Create sufficiently long private keys for gcrypt/nettle
Martin Storsjö [Thu, 28 May 2015 08:42:44 +0000 (11:42 +0300)]
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>
9 years agortmpdh: Remove an unnecessary check in the gcrypt/nettle dh_compute_key
Martin Storsjö [Thu, 28 May 2015 08:39:45 +0000 (11:39 +0300)]
rtmpdh: Remove an unnecessary check in the gcrypt/nettle dh_compute_key

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agortmpdh: Add fate test for the DH handshake routine
Martin Storsjö [Thu, 28 May 2015 07:54:11 +0000 (10:54 +0300)]
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>
9 years agortmpdh: Pass the actual buffer size of the output secret key
Martin Storsjö [Thu, 28 May 2015 07:11:27 +0000 (10:11 +0300)]
rtmpdh: Pass the actual buffer size of the output secret key

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agortmpdh: Check the output buffer size in the openssl version of dh_compute_key
Martin Storsjö [Thu, 28 May 2015 07:08:27 +0000 (10:08 +0300)]
rtmpdh: Check the output buffer size in the openssl version of dh_compute_key

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agortmpdh: Fix a local variable name in the nettle/gcrypt codepath
Martin Storsjö [Thu, 28 May 2015 07:03:39 +0000 (10:03 +0300)]
rtmpdh: Fix a local variable name in the nettle/gcrypt codepath

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agortmpdh: Make sure ret is initialized in the nettle version of bn_hex2bn
Martin Storsjö [Thu, 28 May 2015 06:47:44 +0000 (09:47 +0300)]
rtmpdh: Make sure ret is initialized in the nettle version of bn_hex2bn

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agopixfmt: remove misleading and broken documentation
wm4 [Thu, 28 May 2015 14:26:20 +0000 (16:26 +0200)]
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>
9 years agox86: cavs: Remove an unneeded scratch buffer
Michael Niedermayer [Thu, 28 May 2015 10:38:35 +0000 (12:38 +0200)]
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
9 years agorl: Add error checking to ff_rl_init().
Anton Khirnov [Fri, 22 May 2015 18:50:14 +0000 (19:50 +0100)]
rl: Add error checking to ff_rl_init().

9 years agorl: Add a function for freeing dynamically allocated tables.
Anton Khirnov [Fri, 22 May 2015 18:50:13 +0000 (19:50 +0100)]
rl: Add a function for freeing dynamically allocated tables.

Such tables are not used anywhere currently, but that should change.

9 years agorl: Rename ff_*_rl() to ff_rl_*()
Anton Khirnov [Fri, 22 May 2015 18:50:12 +0000 (19:50 +0100)]
rl: Rename ff_*_rl() to ff_rl_*()

9 years agompegvideo: Move ff_*_rl functions to a separate file
Anton Khirnov [Fri, 22 May 2015 18:50:11 +0000 (19:50 +0100)]
mpegvideo: Move ff_*_rl functions to a separate file

9 years agompegvideo: Drop exchange_uv() function and use its code directly
Vittorio Giovara [Fri, 22 May 2015 18:50:10 +0000 (19:50 +0100)]
mpegvideo: Drop exchange_uv() function and use its code directly

Code is small enough that there is no advantage in a separate function.

9 years agotls_gnutls: Add missing includes for the gcrypt thread safety callbacks
Martin Storsjö [Thu, 28 May 2015 07:18:49 +0000 (10:18 +0300)]
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>
9 years agox86inc: Clear __SECT__
Timothy Gu [Mon, 25 May 2015 23:00:43 +0000 (16:00 -0700)]
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>
9 years agolavf: move TLS-related ifdeffery to library specific files
wm4 [Tue, 26 May 2015 17:25:42 +0000 (19:25 +0200)]
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>
9 years agolavf: split tls.c
wm4 [Tue, 26 May 2015 17:25:41 +0000 (19:25 +0200)]
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>
9 years agodoc: Fix spelling of 'Transmission'
Sebastian Ramacher [Tue, 26 May 2015 02:37:13 +0000 (04:37 +0200)]
doc: Fix spelling of 'Transmission'

Signed-off-by: Sebastian Ramacher <sramacher@debian.org>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>