Commit Graph

42745 Commits

Author SHA1 Message Date
Vittorio Giovara 9d3ea5cbf5 imgconvert: Drop outdated comment block 2016-01-21 15:33:19 -05:00
Luca Barbato e93aa2c9e7 configure: Force-enable select_any dependencies only on --enable
Unbreak --enable-gnutls enabling tls_openssl_protocol

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2016-01-21 21:24:33 +01:00
Derek Buitenhuis 65d29dd274 mov: Add an option to toggle dref opening
This feature is mostly only used by NLE software, and is
both of dubious value being enabled by default, and a
possible security risk.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2016-01-21 14:32:39 +01:00
James Darnley 883ad2c59c fate: add 10-bit v210 encoder tests
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2016-01-21 11:18:42 +01:00
Luca Barbato 8e7bea6dc6 configure: Improve requesting specific features
Before this patch trying to enable only https by issuing

    --disable-protocols --enable-protocol=https --enable-gnutls

does not enable https, and

    --disable-all --enable-protocols

does not enable libavformat and the protocols component.

Now the default-enabled options are set after the explicitly
disabled/enabled options are evaluated.

If an explicitly enabled option cannot be enabled configure
will fail printing an error message.
2016-01-21 01:04:24 +01:00
Vittorio Giovara e9175634ec yuv2rgb: Document the color space coefficients
Based on the original documentation found in mpeg2dec (1995).

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-01-20 11:18:31 -05:00
Arttu Ylä-Outinen 472d488ebc libkvazaar: Set frame rate as a rational number
Updates libkvazaar to pass the exact frame rate to Kvazaar by setting
the numerator and denominator separately instead of a single floating
point number. The exact frame rate is needed for writing timing info to
the bitstream.

Requires Kvazaar version 0.8.1.

Signed-off-by: Arttu Ylä-Outinen <arttu.yla-outinen@tut.fi>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2016-01-19 20:47:49 +01:00
Arttu Ylä-Outinen 7486418683 lavc: Make sure that the effective timebase would not overflow
In the unlikely situation the user decides to set ticks_per_frame
and timebase to a value large enough to overflow.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2016-01-19 20:47:49 +01:00
Luca Barbato e59708bb9d configure: mips: Support both-endian compilers
Use mips{,64}eb to force big endian and mips{,64}el to force little
endian.
2016-01-19 20:47:49 +01:00
Luca Barbato c4de754d4d mathops: mips: Correctly enable loongson-specific assembly
The code wrongly assumed that the instructions used are supported
on mips64, while it is supported only on loongson cpus.
2016-01-19 20:47:49 +01:00
Luca Barbato 8fd361f53b configure: Use pkg-config to check for openssl 2016-01-19 20:47:49 +01:00
Martin Storsjö e4eb13ca77 flvdec: Add sanity checking of the last packet size
For http, this avoids spurious warnings about failed requests (e.g.
HTTP error 416 Requested Range Not Satisfiable), if the last packet
is truncated and the size read is bogus.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-01-19 14:24:35 +02:00
Michael Niedermayer 09f4822e4e flvdec: perform duration search just once
When loading a truncated flv file, it would previously try to do a seek to
the end of every packet read. For some input protocols (such as http), such
repeated seek attempts are cripple the reading performance.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-01-19 14:24:34 +02:00
Diego Biurrun 03ef89faf2 x86: build: Group all encoder objects together 2016-01-18 14:47:58 +01:00
Diego Biurrun 4f22b13888 x86: ac3dsp: Drop forward declaration for nonexisting function 2016-01-18 11:55:38 +01:00
Andreas Cadhalpun b06cb15b9d dca: fix misaligned access in ff_dca_convert_bitstream
The function is used on unaligned buffers (such as those provided
by AVPacket), accessing them as uint16_t causes SIGBUS crashes on
architectures like SPARC.

This fixes ubsan runtime error: load of misaligned address for type
'const uint16_t', which requires 2 byte alignment

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2016-01-15 13:47:11 +01:00
Andreas Cadhalpun 9cdddb93bb nutdec: only copy the header if it exists
Fixes runtime error: null pointer passed as argument 2, which is
declared to never be null

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-01-13 09:44:44 +01:00
Andreas Cadhalpun 8431629dd1 xwddec: prevent overflow of lsize * avctx->height
This is used to check if the input buffer is larger enough, so if this
overflows it can cause a false negative leading to a segmentation fault
in bytestream2_get_bufferu.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-01-13 09:39:13 +01:00
Andreas Cadhalpun 5b83b24ccb nuv: sanitize negative fps rate
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-01-13 09:37:11 +01:00
Andreas Cadhalpun 2884cf205a on2avc: limit number of bits to 30 in get_egolomb
More don't fit into the integer output.

Also use get_bits_long, since get_bits only supports reading up to 25
bits, while get_bits_long supports the full integer range.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-01-13 09:33:09 +01:00
Anton Khirnov c59fec783d nvenc: generate dts properly
When there is a non-zero decoding delay due to reordering, the first dts
should be lower than the first pts (since the first packet fed to the
decoder does not produce any output).

Use the same scheme used in mpegvideo_enc (which comes from x264
originally) -- wait for first two timestamps and extrapolate linearly to
the past to produce the first dts value.
2016-01-12 09:23:38 +01:00
Anton Khirnov 9d36cab4c0 nvenc: fix encoding with B-frames
When B-frames are enabled and the encoder returns success, all currently
pending buffers immediately become valid and can be returned to the
caller. We can only return one packet at a time, so all the other
pending buffers should be transferred to a new 'ready' fifo, from where
they can be returned in subsequent calls (in which the encoder does not
produce any new output). This bug was hidden by the incorrect testing of
the encoder return value (the return value was overwritten before it was
tested).
2016-01-12 09:23:38 +01:00
Anton Khirnov aac7d6b284 nvenc: flush the encoder before closing it, as required by the docs
Otherwise, closing the encoder can crash.
2016-01-12 09:23:38 +01:00
Anton Khirnov ee359c72ef nvenc: rename encoders
Change 'nvenc_<codec>' to '<codec>_nvenc', which is consistent with
other similar decoders and encoders (QSV, MMAL).
2016-01-12 09:23:34 +01:00
Anton Khirnov 39571e86cb nvenc: better error handling
Return proper error codes and print more descriptive error messages.
2016-01-12 09:12:40 +01:00
Anton Khirnov 9cce011b1d movenc-test: stop setting the GLOBAL_HEADER codec flag
This test does no encoding, setting the flag was done just to silence
the warning removed in the previous commit.
2016-01-12 09:12:24 +01:00
Anton Khirnov 521dc78366 mux: drop the warning about global headers
The AVStream codec context is often not (and should not be) the actual
encoding context, so this warning will be spurious in many cases.
2016-01-12 09:12:24 +01:00
Andreas Cadhalpun fa66237b69 lavc: Use get_bitsz where needed
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2016-01-11 21:51:11 +01:00
Andreas Cadhalpun 62825236db lavc: Add get_bitsz()
get_bit variant supporting 0-bits reads.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2016-01-11 21:51:11 +01:00
Vittorio Giovara 81737f42c2 sunrastenc: Properly load codec private options
Initialize the private class field and give the class a more
appropriate name. Add a class member to the codec context.
2016-01-11 15:32:57 -05:00
Kieran Kunhya 46350db737 get_bits: Support max_depth > 2 in GET_RL_VLC_INTERNAL 2016-01-11 15:32:57 -05:00
Clément Bœsch e8bc642202 lavu: add AV_CEIL_RSHIFT and use it in various places
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-01-11 15:32:56 -05:00
Clément Bœsch 7570c9e04f swfdec: support compressed swf
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-01-11 15:32:56 -05:00
Alexandra Hájková 34d45b3616 asfdec: Fix typo in comment
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2016-01-11 21:00:49 +01:00
Luca Barbato 40d43d25e7 APIchanges: Add missing av_pix_fmt_get_chroma_sub_sample entry 2016-01-11 20:53:12 +01:00
Martin Storsjö 73c8c0341c arm: Fix vfp dead code elimination with have_vfp_vm
This fixes builds with --disable-vfp.

Checking for the armv6 cpu flag is incorrect, since vfpv2 isn't
armv6 specific.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-01-08 23:52:59 +02:00
Martin Storsjö fec76cd430 checkasm: Check register clobbering on aarch64
This is disabled on iOS, since iOS uses a slightly different ABI
for vararg parameters.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-01-07 09:33:24 +02:00
Martin Storsjö 26ec75aec3 checkasm: Check register clobbering on arm
Use two separate functions, depending on whether VFP/NEON is available.

This is set to require armv5te - it uses blx, which is only available
since armv5t, but we don't have a separate configure item for that.
(It also uses ldrd, which requires armv5te, but this could be avoided
if necessary.)

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-01-07 09:33:24 +02:00
Andreas Cadhalpun fa463aa83a avpacket: fix size check in packet_alloc
The previous check only caught sizes from -AV_INPUT_BUFFER_PADDING_SIZE
to -1.

This fixes ubsan runtime error: signed integer overflow: 2147483647 + 32
cannot be represented in type 'int'

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-01-07 08:20:21 +01:00
Alexandra Hájková 066281372d asfdec: Remove unused function parameters
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-01-07 08:20:21 +01:00
Andreas Cadhalpun 2aec600ae7 asfdec: reject size > INT64_MAX in asf_read_unknown
Both avio_skip and detect_unknown_subobject use int64_t for the size
parameter.

This fixes a segmentation fault due to infinite recursion.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Alexandra Hájková <alexandra.khirnova@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-01-07 08:20:21 +01:00
Andreas Cadhalpun c69461d737 asfdec: only set asf_pkt->data_size after sanity checks
Otherwise invalid values are used unchecked in the next run.
This can cause NULL pointer dereferencing.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Alexandra Hájková <alexandra.khirnova@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-01-07 08:20:21 +01:00
Anton Khirnov d1cd20e4e3 qsvenc: split encoding frames and reading from the async FIFO
This makes sure all the frames are returned at the end.

Found-By: Maxym Dmytrychenko <maxym.dmytrychenko@intel.com>
2016-01-07 08:20:21 +01:00
Maxym Dmytrychenko a6259a6ecb qsvenc: properly handle the warning from MFXVideoCORE_SyncOperation
Same as what is done in 3b6473b43e.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-01-07 08:20:21 +01:00
Luca Barbato 63f7f8d1db avconv: Drop an impossible check
EAGAIN is already managed in poll_filters().

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2016-01-04 16:58:32 +01:00
Luca Barbato 7ebf1b4ada avconv: Simplify poll_filters() return value check
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2016-01-04 16:58:32 +01:00
Diego Biurrun 2080bea4a7 h264_refs: Remove broken trace debug code 2016-01-03 22:49:56 +01:00
Diego Biurrun 58170b0271 lavc: Add missing #includes for ff_dlog() 2016-01-03 22:49:55 +01:00
Maxym Dmytrychenko 3b6473b43e qsvdec: properly handle the warning from MFXVideoCORE_SyncOperation
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-01-01 16:09:14 +01:00
Maxym Dmytrychenko a43905f4ae qsvenc_hevc: improve the default settings
Use 8 B-frames and modify the GOP size to be a multiple of the B-frame
count.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-01-01 16:09:14 +01:00