Commit Graph

42776 Commits

Author SHA1 Message Date
Anton Khirnov 68395f8c99 qsvenc: fix a typo
Introduced in 0e6c853221.
2016-01-23 21:03:31 +01:00
Geza Lore cc602061ee x86inc: Add debug symbols indicating sizes of compiled functions
Some debuggers/profilers use this metadata to determine which function a
given instruction is in; without it they get can confused by local labels
(if you haven't stripped those). On the other hand, some tools are still
confused even with this metadata. e.g. this fixes `gdb`, but not `perf`.

Currently only implemented for ELF.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-01-23 20:46:28 +01:00
Henrik Gramner 002c47798d x86inc: Avoid creating unnecessary local labels
The REP_RET workaround is only needed on old AMD cpus, and the labels clutter
up the symbol table and confuse debugging/profiling tools, so use EQU to
create SHN_ABS symbols instead of creating local labels. Furthermore, skip
the workaround completely in functions that definitely won't run on such cpus.

Note that EQU is just creating a local label when using nasm instead of yasm.
This is probably a bug, but at least it doesn't break anything.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-01-23 20:44:25 +01:00
Henrik Gramner fd6ecac38e x86inc: Simplify AUTO_REP_RET
cpuflags is never undefined any more, it's set to 0 instead.

Also fix an incorrect comment.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-01-23 20:43:39 +01:00
Henrik Gramner 5ca8e195e5 x86inc: Use more consistent indentation
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-01-23 20:42:59 +01:00
Henrik Gramner 91ed050f42 x86inc: Preserve arguments when allocating stack space
When allocating stack space with a larger alignment than the known stack
alignment a temporary register is used for storing the stack pointer.
Ensure that this isn't one of the registers used for passing arguments.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-01-23 20:41:59 +01:00
Henrik Gramner 715eb7ca24 x86inc: Improve FMA instruction handling
* Correctly handle FMA instructions with memory operands.
 * Print a warning if FMA instructions are used without the correct cpuflag.
 * Simplify the instantiation code.
 * Clarify documentation.

Only the last operand in FMA3 instructions can be a memory operand. When
converting FMA4 instructions to FMA3 instructions we can utilize the fact
that multiply is a commutative operation and reorder operands if necessary
to ensure that a memory operand is used only as the last operand.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-01-23 20:30:30 +01:00
Henrik Gramner f60f06d989 x86inc: Be more verbose in assertion failures
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-01-23 20:30:07 +01:00
Henrik Gramner 7adcd4e841 x86inc: Make cpuflag() and notcpuflag() return 0 or 1
Makes it possible to use them in arithmetic expressions.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-01-23 20:19:19 +01:00
Anton Khirnov d336bfcf69 pixdesc: fix and extend doxy for av_pix_fmt_get_chroma_sub_sample()
The parameters in the docs are currently swapped.
2016-01-23 20:16:42 +01:00
Luca Barbato c0c4d7a0a5 configure: Correctly add openssl cflags and libs 2016-01-23 14:34:06 +01:00
Martin Storsjö 87a814fdce libavcodec: Add missing AVClass pointers
This fixes crashes since 243df1351.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-01-22 17:08:08 +02:00
Vittorio Giovara 0e9c4fe254 lavc: Move pre_me to codec private options
This option is only used by mpegvideoenc.
It is a very codec-specific option, so deprecate the global variant.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-01-21 15:40:28 -05:00
Vittorio Giovara 5b6f42da98 lavc: Move me_penalty_compensation to codec private options
This option is only used by mpegvideoenc.
It is a very codec-specific options, so deprecate the global variant.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-01-21 15:33:19 -05:00
Vittorio Giovara 2862b63783 lavc: Move prediction_method to codec private options
This options is only used by huffyuv, ffvhuv, jpegls, mjpeg,
mpegvideoenc, png, utvideo.
It is a very codec-specific options, so deprecate the global variant.
Set proper limits to the maximum allowed values, and update utvideoenc
tests to use the new option name.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-01-21 15:33:19 -05:00
Vittorio Giovara 243df1351d lavc: Move {min,max}_prediction_order to codec private options
These options are only used by alac and flac.
They are very codec-specific options, so deprecate the global variants.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-01-21 15:33:19 -05:00
Vittorio Giovara 936f0d98f8 lavc: Move rtp_payload_size to codec private options
This option is only used by mpegvideoenc and openh264.
It is a very codec-specific option, so deprecate the global variant.

The openh264 option is dropped altogether since it is just a fallback
for -max_nal_size anyway.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-01-21 15:33:19 -05:00
Vittorio Giovara d749615333 lavc: Move timecode_frame_start to codec private options
This option is only used by mpeg2.
It is a very codec-specific option, so deprecate the global variant.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-01-21 15:33:19 -05:00
Vittorio Giovara 96c373c770 lavc: Move context_model to codec private options
This option is only used by ffv1 and ffvhuff.
It is a very codec-specific option, so deprecate the global variant.
Improve documentation a little.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-01-21 15:33:19 -05:00
Vittorio Giovara 12b4976922 lavc: Move mpeg_quant to codec private options
This option is only used by mpegvideoenc, and xvid.
It is a very codec-specific option, so deprecate the global variant.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-01-21 15:33:19 -05:00
Vittorio Giovara 1482aff204 lavc: Move noise_reduction to codec private options
This option is only used by mpegvideoenc, x264, xavs, and vpx.
It is a very codec-specific option, so deprecate the global variant.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-01-21 15:33:19 -05:00
Vittorio Giovara 7c79587d74 lavc: Move scenechange_threshold to codec private options
This option is only used by mpegvideoenc, x264, and xavs.
It is a very codec-specific option, so deprecate the global variant.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-01-21 15:33:19 -05:00
Vittorio Giovara 5764d38173 lavc: Move chromaoffset to codec private options
This option is only used by x264 and xavs.
It is a very codec-specific option, so deprecate the global variant.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-01-21 15:33:19 -05:00
Vittorio Giovara 0ac9f33a9e lavc: Move frame_skip_* to codec private options
These options are only used by mpegvideoenc and vpx.
They are very codec-specific options, so deprecate the global variants.

Add an allowed value to the private options for frame_skip_cmp which
seems to have been forgotten, but perfectly working.

The libvpx frame dropping feature uses one of such option
(frame_skip_threshold) without the other three. For this reason rename
the option to something more consistent with the other libvpx variables.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-01-21 15:33:19 -05:00
Vittorio Giovara 84c4714f39 lavc: Move brd_scale to codec private options
This option is only used by mpegvideoenc,
It is a very codec-specific option, so deprecate the global variant.
Set proper limits to the maximum allowed values.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-01-21 15:33:19 -05:00
Vittorio Giovara 0e6c853221 lavc: Move b_frame_strategy and b_sensitivity to codec private options
The b_frame_strategy option is only used by mpegvideoenc, qsv, x264, and
xavs, while b_sensitivity is only used by mpegvideoenc.

These are very codec-specific options, so deprecate the global variants.
Set proper limits to the maximum allowed values.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-01-21 15:33:19 -05:00
Piotr Bandurski 55c7e5bf7c riff: add C210 FourCC (Canopus C210) 2016-01-21 15:33:19 -05:00
Piotr Bandurski 7c4059ae1e riff: add YUYV FourCC (Drastic YUYV) 2016-01-21 15:33:19 -05:00
Vittorio Giovara d43a165bda imgconvert: Add the proper API guards to a deprecated function 2016-01-21 15:33:19 -05:00
Vittorio Giovara f7168d7016 imgconvert: Move AVPicture-related static function to the deprecated section 2016-01-21 15:33:19 -05:00
Vittorio Giovara 892f037c55 imgconvert: Move the shrink functions only where needed 2016-01-21 15:33:19 -05:00
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