ffmpeg.git
3 years agolavc/atrac3plusdsp: change pow(2,x) to exp2f(x)
Ganesh Ajjanagadde [Fri, 15 Jan 2016 18:38:43 +0000 (13:38 -0500)]
lavc/atrac3plusdsp: change pow(2,x) to exp2f(x)

Much faster generation possible; but array is small so don't want to bloat
the binary.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agolavc/wma: add av_warn_unused_result to ff_wma_init
Ganesh Ajjanagadde [Thu, 21 Jan 2016 02:52:40 +0000 (08:22 +0530)]
lavc/wma: add av_warn_unused_result to ff_wma_init

May help to prevent incidents like 19e456d48c90a1e3ceeb9e6241383384cc73dfdf.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agofate: add 1 and 15BPP rawvideo in avi tests
Michael Niedermayer [Fri, 22 Jan 2016 12:06:46 +0000 (13:06 +0100)]
fate: add 1 and 15BPP rawvideo in avi tests

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavfilter: add convolution filter
Paul B Mahol [Fri, 22 Jan 2016 10:52:58 +0000 (11:52 +0100)]
avfilter: add convolution filter

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavfilter/avf_showwaves: add logarithmic amplitude scaler
Paul B Mahol [Thu, 21 Jan 2016 19:07:12 +0000 (20:07 +0100)]
avfilter/avf_showwaves: add logarithmic amplitude scaler

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agocabac_functions: Allow more functions to be overridden
John Cox [Wed, 20 Jan 2016 17:59:30 +0000 (17:59 +0000)]
cabac_functions: Allow more functions to be overridden

Allow more of the cabac functions to be overridden and avoid generating any
code for unwanted refill functions.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agocabac_functions: Count zeros with ctz if it is fast
John Cox [Wed, 20 Jan 2016 17:56:30 +0000 (17:56 +0000)]
cabac_functions: Count zeros with ctz if it is fast

When refilling the low bit buffer after get_cabac count the bits with ctz
if the processor has a fast version.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agocabac: Ensure 2-byte cabac loads are on 2-byte boundry
John Cox [Wed, 20 Jan 2016 17:48:30 +0000 (17:48 +0000)]
cabac: Ensure 2-byte cabac loads are on 2-byte boundry

Ensure that cabac init sets the bitstream pointer to an even value.
It is often faster to load from an aligned boundry

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoAdd missing conversions from side data enum to name
Neil Birkbeck [Thu, 21 Jan 2016 18:34:29 +0000 (10:34 -0800)]
Add missing conversions from side data enum to name

Add names for recently added enums to av_frame_side_data_name.

Signed-off-by: Neil Birkbeck <neil.birkbeck@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agobuild: make out-of-tree builds bit-identical to in-tree builds
Andreas Cadhalpun [Mon, 28 Dec 2015 21:00:39 +0000 (22:00 +0100)]
build: make out-of-tree builds bit-identical to in-tree builds

Previously the full source path was embedded inconsistently in the debug
information between in-tree/out-of-tree builds.

The 'vpath %.inc' becomes necessary for finding
libavfilter/all_channel_layouts.inc in out-of-tree builds.

The full source path is still embedded in the debug information, but
it's now independent of whether building in-tree or out-of-tree.

The biggest improvement of this patch is that gdb now always searches
for the path relative to the source directory. It still also searches
for the full path.
Previously it searched only for the full path in out-of-tree builds,
making the debug information generated by Debian's buildds rather hard
to use.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
3 years agoavcodec/mjpegdec: Check for end for both bytes in unescaping
Michael Niedermayer [Thu, 21 Jan 2016 20:01:47 +0000 (21:01 +0100)]
avcodec/mjpegdec: Check for end for both bytes in unescaping

Fixes assertion failure
Fixes: c40c779601b77dc6e19aaea0b04b9751/signal_sigabrt_7ffff6ae7cb7_5769_b94f6ec70caecb2d3d76b4771b109ac1.avi

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agox86inc: Add debug symbols indicating sizes of compiled functions
Geza Lore [Mon, 12 Oct 2015 12:13:00 +0000 (13:13 +0100)]
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.

3 years agox86inc: Avoid creating unnecessary local labels
Henrik Gramner [Fri, 16 Oct 2015 19:28:49 +0000 (21:28 +0200)]
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.

3 years agox86inc: Simplify AUTO_REP_RET
Henrik Gramner [Thu, 15 Oct 2015 15:42:49 +0000 (17:42 +0200)]
x86inc: Simplify AUTO_REP_RET

cpuflags is never undefined any more, it's set to 0 instead.

Also fix an incorrect comment.

3 years agox86inc: Use more consistent indentation
Henrik Gramner [Mon, 12 Oct 2015 19:55:11 +0000 (21:55 +0200)]
x86inc: Use more consistent indentation

3 years agox86inc: Preserve arguments when allocating stack space
Henrik Gramner [Mon, 12 Oct 2015 18:15:18 +0000 (20:15 +0200)]
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.

3 years agox86inc: Improve FMA instruction handling
Henrik Gramner [Sat, 16 Jan 2016 23:25:47 +0000 (00:25 +0100)]
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.

3 years agox86inc: Be more verbose in assertion failures
Henrik Gramner [Sun, 11 Oct 2015 20:31:53 +0000 (22:31 +0200)]
x86inc: Be more verbose in assertion failures

3 years agox86/intmath: disable sse av_clip functions when using ICC
James Almer [Thu, 21 Jan 2016 03:02:09 +0000 (00:02 -0300)]
x86/intmath: disable sse av_clip functions when using ICC

It seems to miscompile them

Should fix fate-ra-288 and fate-twinvq

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavfilter/avf_showwaves: color support
Paul B Mahol [Tue, 19 Jan 2016 21:09:55 +0000 (22:09 +0100)]
avfilter/avf_showwaves: color support

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agofate: Add test for colorkey
Michael Niedermayer [Thu, 21 Jan 2016 16:11:47 +0000 (17:11 +0100)]
fate: Add test for colorkey

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agodiracdec: fix original Dirac Low Delay profile
Rostislav Pehlivanov [Thu, 21 Jan 2016 16:46:41 +0000 (16:46 +0000)]
diracdec: fix original Dirac Low Delay profile

The version structure in the main decoder context was not (and
apparently has never been) populated since it was added.
Still, having VC-2 break the existing Dirac Low Delay mode was odd and
easily avoidable had the specifications authors noticed/cared.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
3 years agodirac: add more parse codes from the specifications
Rostislav Pehlivanov [Thu, 21 Jan 2016 16:43:58 +0000 (16:43 +0000)]
dirac: add more parse codes from the specifications

The specs define some more overlapping and some rarely used parse codes
which were missing.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
3 years agoavcodec/diracdsp: use av_clip_uintp2
James Almer [Thu, 21 Jan 2016 16:13:54 +0000 (13:13 -0300)]
avcodec/diracdsp: use av_clip_uintp2

Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agodirac_parser: add exceptions for Dirac inter parse codes
Rostislav Pehlivanov [Thu, 21 Jan 2016 15:29:28 +0000 (15:29 +0000)]
dirac_parser: add exceptions for Dirac inter parse codes

Forgotten from previous commit.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
3 years agocheckasm: add videodsp emulated_edge_mc test.
Ronald S. Bultje [Sun, 17 Jan 2016 21:22:26 +0000 (16:22 -0500)]
checkasm: add videodsp emulated_edge_mc test.

3 years agodirac_parser: Improve parsing and silence pointless warnings
Rostislav Pehlivanov [Thu, 21 Jan 2016 15:14:10 +0000 (15:14 +0000)]
dirac_parser: Improve parsing and silence pointless warnings

The parser scans for "BBCD" to appear in the bitstream which indicate a
parse info header and once that happens, checks if the parse offsets are
sane. Since random BBCD strings might appear in the bitstream the parser
will emit a pointless warning if that happens.

This commit improves parsing by checking for a valid parse code as well
as keeping the original checks for valid parse offsets. The warnings
were removed as they serve no real purpose.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
3 years agoavcodec/mpegvideo_enc: Check for integer overflow in ff_mpv_reallocate_putbitbuffer()
Michael Niedermayer [Thu, 21 Jan 2016 14:39:43 +0000 (15:39 +0100)]
avcodec/mpegvideo_enc: Check for integer overflow in ff_mpv_reallocate_putbitbuffer()

Fixes assertion failure
Fixes: 6568d187979ce17878b6fe5fbbb89142/signal_sigabrt_7ffff6ae7cb7_7176_564bbc6741bdcf907f5c4e685c9a77a2.mpg

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agodiracdec: add support for 12 bit videos
Rostislav Pehlivanov [Thu, 21 Jan 2016 14:44:42 +0000 (14:44 +0000)]
diracdec: add support for 12 bit videos

The DSP lacked a function needed to convert signed to unsigned. This was
ignored when originally adding support and templating for bit depths
greater than 8. The 10 bit function was used for 12 bit pictures and
resulted in an improper conversion.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
3 years agodoc/filters: fix afftfilt example
Paul B Mahol [Thu, 21 Jan 2016 13:42:09 +0000 (14:42 +0100)]
doc/filters: fix afftfilt example

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavfilter: add afftfilter
Paul B Mahol [Sat, 16 Jan 2016 14:09:25 +0000 (15:09 +0100)]
avfilter: add afftfilter

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavformat/nutenc: implement deinit()
Michael Niedermayer [Thu, 21 Jan 2016 12:07:07 +0000 (13:07 +0100)]
avformat/nutenc: implement deinit()

Should prevent some leaks if header writing fails

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoAAC encoder: check for NaNs/inf in TNS gain
Claudio Freire [Thu, 21 Jan 2016 06:32:49 +0000 (03:32 -0300)]
AAC encoder: check for NaNs/inf in TNS gain

Can happen in cases where's there's zero autocorrelation (pulses),
and it also implies NaN/inf coeffs

3 years agoconfigure: add missing library deps for showcqt_filter
James Almer [Thu, 21 Jan 2016 03:49:02 +0000 (00:49 -0300)]
configure: add missing library deps for showcqt_filter

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agolavf/riff: Support reading vlc's rawvideo fourccs.
Carl Eugen Hoyos [Thu, 21 Jan 2016 02:38:33 +0000 (03:38 +0100)]
lavf/riff: Support reading vlc's rawvideo fourccs.

Reported by Bob, no6b no6b com

3 years agolavf/nut: Add forgotten fourccs for YUV4xxP9.
Carl Eugen Hoyos [Thu, 21 Jan 2016 02:35:49 +0000 (03:35 +0100)]
lavf/nut: Add forgotten fourccs for YUV4xxP9.

3 years agoavformat/avformat: Replace some references to filenames by urls
Michael Niedermayer [Wed, 20 Jan 2016 20:01:08 +0000 (21:01 +0100)]
avformat/avformat: Replace some references to filenames by urls

Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/wmaenc: Check ff_wma_init() for failure
Michael Niedermayer [Thu, 21 Jan 2016 01:38:05 +0000 (02:38 +0100)]
avcodec/wmaenc: Check ff_wma_init() for failure

Fixes null pointer dereference
Fixes: c4faf8280ba366bf00a79d425f2910a8/signal_sigsegv_1f96477_5177_1448ba7e4125faceb966f44ceb69abfa.qcp
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/mpeg12enc: Move high resolution thread check to before initializing threads
Michael Niedermayer [Wed, 20 Jan 2016 23:36:51 +0000 (00:36 +0100)]
avcodec/mpeg12enc: Move high resolution thread check to before initializing threads

Cleaner solution is welcome!

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agolavc,lavfi: use avutil/thread.h instead of redundant conditional includes
Clément Bœsch [Wed, 20 Jan 2016 20:36:10 +0000 (21:36 +0100)]
lavc,lavfi: use avutil/thread.h instead of redundant conditional includes

This was somehow forgotten in a8bb81a05c519dd3f36cc341e5fb448f6d17fa73.

3 years agoffplay: update docs after previous changes in ffplay mouse behaviour
Vittorio Gambaletta (VittGam) [Tue, 19 Jan 2016 23:17:11 +0000 (00:17 +0100)]
ffplay: update docs after previous changes in ffplay mouse behaviour

Signed-off-by: Vittorio Gambaletta <ffmpeg-dev@vittgam.net>
Signed-off-by: Marton Balint <cus@passwd.hu>
3 years agoavformat/img2dec: Use AVOpenCallback
Michael Niedermayer [Wed, 20 Jan 2016 01:35:56 +0000 (02:35 +0100)]
avformat/img2dec: Use AVOpenCallback

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/aacenc: Check all coefficients for finiteness
Michael Niedermayer [Wed, 20 Jan 2016 14:05:38 +0000 (15:05 +0100)]
avcodec/aacenc: Check all coefficients for finiteness

This is needed as near infinite values on the input side result in only some
output to be non finite.
Also it may still be insufficient if subsequent computations overflow

Fixes null pointer dereference
Fixes: ae66c0f6c12ac1cd5c2c237031240f57/signal_sigsegv_2618c99_9516_6007026f2185a26d7afea895fbed6e38.ogg

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Reviewed-by: Claudio Freire <klaussfreire@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/avio: Limit url option parsing to the documented cases
Michael Niedermayer [Wed, 20 Jan 2016 08:43:54 +0000 (09:43 +0100)]
avformat/avio: Limit url option parsing to the documented cases

This feature is not know much or used much AFAIK, and it might be helpfull in
exploits.
No specific case is known where it can be used in an exploit though
subsequent commits depend on this commit though

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agolavu: add pthread asserts if ASSERT_LEVEL>1
Clément Bœsch [Tue, 22 Dec 2015 19:41:46 +0000 (20:41 +0100)]
lavu: add pthread asserts if ASSERT_LEVEL>1

3 years agoavcodec/wavpackenc: use put_sbits
James Almer [Mon, 18 Jan 2016 21:38:18 +0000 (18:38 -0300)]
avcodec/wavpackenc: use put_sbits

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agotests/fate/aac: remove unneeded strict arguments from the encoder tests
Rostislav Pehlivanov [Wed, 20 Jan 2016 17:02:51 +0000 (17:02 +0000)]
tests/fate/aac: remove unneeded strict arguments from the encoder tests

Leftover from the experimental flag removal.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
3 years agoaacenc: remove FAAC-like coder
Rostislav Pehlivanov [Wed, 20 Jan 2016 16:56:53 +0000 (16:56 +0000)]
aacenc: remove FAAC-like coder

Has been marked for removal for over a month and has not been improved
or touched at all since it was implemented.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
3 years agoaacenc: mark LTP mode as experimental
Rostislav Pehlivanov [Wed, 20 Jan 2016 16:49:55 +0000 (16:49 +0000)]
aacenc: mark LTP mode as experimental

Too many crashes observed. Can't be helped until the autocorrelation
function is massively checked for sanity.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
3 years agovf_scale: eval, param0 and param1 documentation
Bela Bodecs [Wed, 20 Jan 2016 14:29:13 +0000 (15:29 +0100)]
vf_scale: eval, param0 and param1 documentation

Documentation of eval, param0 and param1 parameters

Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/img2dec: do not interpret the filename by default if a IO context has been...
Michael Niedermayer [Wed, 20 Jan 2016 10:21:44 +0000 (11:21 +0100)]
avformat/img2dec: do not interpret the filename by default if a IO context has been opened

With this, user applications which use custom IO and have set a IO context will not have
their already opened IO context ignored and glob/seq being interpreted

Comments and tests from maintainers of user apps are welcome!

Liked-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agolibkvazaar: Set frame rate as a rational number
Arttu Ylä-Outinen [Fri, 15 Jan 2016 11:47:10 +0000 (13:47 +0200)]
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>
3 years agoavcodec/ass_split: Fix null pointer dereference in ff_ass_style_get()
Michael Niedermayer [Sun, 17 Jan 2016 14:39:11 +0000 (15:39 +0100)]
avcodec/ass_split: Fix null pointer dereference in ff_ass_style_get()

Fixes: 55d71971da50365d542ed14b65565fe1/signal_sigsegv_4765a4_8499_f146af090a94f591d6254515c7700ef5.mkv

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agomov: Add an option to toggle dref opening
Derek Buitenhuis [Fri, 15 Jan 2016 17:03:49 +0000 (17:03 +0000)]
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: Michael Niedermayer <michael@niedermayer.cc>
3 years agovf_scale: Detecting changes of incoming frame properties and dinamically evaluate...
Bela Bodecs [Mon, 18 Jan 2016 17:44:09 +0000 (18:44 +0100)]
vf_scale: Detecting changes of incoming frame properties and dinamically evaluate width and height expressions

Currently scale filter accepts expressions in its width and height
parameters but evaluates them only once at init and replaces them with
their actual values. Later on, if any parameter of incoming frames
changes - ie those were used in the original size expressions -  then
they new values will not have any affect for width and heigth values.
They remain the same. This patch makes possible that width and height
expressions be evaluated frame-by-frame basis if width/height/sar/format
properties of incoming frame would change. To retain the current
behaviour and not to break any earlier app, a new config parameter has
been introduced. Its name is "eval" and it has two distinct values:
"init" and "frame". The default value is "init".
This feature is very usefull in case of DVBT mpeg-ts streams where SAR
may change time-by-time from 4/3 to 16/9 and vica-versa and the size
remains the same and you want to create a variable sized output with 1/1
SAR.

Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agovf_overlay: handles expression evaluation of frame size change in frame-by-frame...
Bela Bodecs [Tue, 19 Jan 2016 19:22:06 +0000 (20:22 +0100)]
vf_overlay: handles expression evaluation of frame size change in frame-by-frame evalutaion mode

vf_overlay video filter accepts expressions in its parameters. In
'frame-by-frame' evaluation mode it recalculates them regularly, but
incoming video frame size changes did not reflect in their values. So if
you used width or height of any source videos in expressions as
parameters, they stayed on their initial values. This patch corrects
this bug.

Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
Reviewed-by: Paul B Mahol <onemda@gmail.com
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoyuv2rgb: Document the color space coefficients
Vittorio Giovara [Tue, 19 Jan 2016 22:12:39 +0000 (23:12 +0100)]
yuv2rgb: Document the color space coefficients

Based on the original documentation found in mpeg2dec (1995).

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
3 years agoffplay: toggle full screen when double-clicking the video window with the left mouse...
Vittorio Gambaletta (VittGam) [Mon, 18 Jan 2016 23:57:38 +0000 (00:57 +0100)]
ffplay: toggle full screen when double-clicking the video window with the left mouse button

Now that the seek only happens with the right mouse button, it makes
sense to toggle full screen when double-clicking with the left mouse
button, like other video players do.

Signed-off-by: Vittorio Gambaletta <ffmpeg-dev@vittgam.net>
Signed-off-by: Marton Balint <cus@passwd.hu>
3 years agoffplay: seek only when pressing the right mouse button on the video window
Vittorio Gambaletta (VittGam) [Mon, 18 Jan 2016 23:57:38 +0000 (00:57 +0100)]
ffplay: seek only when pressing the right mouse button on the video window

Seeking by clicking on the video window can be annoying, because
the user might click on it accidentally while eg. trying to get
focus on it, and ffplay seeks instead.

This commit changes that behaviour to seek only when the right
mouse button is used to click and drag on the window.

Signed-off-by: Vittorio Gambaletta <ffmpeg-dev@vittgam.net>
Signed-off-by: Marton Balint <cus@passwd.hu>
3 years agoavfilter/af_dynaudnorm: call uninit() from config_input()
Paul B Mahol [Mon, 18 Jan 2016 18:55:40 +0000 (19:55 +0100)]
avfilter/af_dynaudnorm: call uninit() from config_input()

Should help dynamic filtergraph reconfiguration.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavformat/hls: Require the file extension to be m3u / m3u8 for probing to succeed
Michael Niedermayer [Sat, 16 Jan 2016 16:28:34 +0000 (17:28 +0100)]
avformat/hls: Require the file extension to be m3u / m3u8 for probing to succeed

If the filename isnt set by the user application then the code behaves like before

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agolibavutil: add mastering display metadata sidedata
Neil Birkbeck [Sun, 17 Jan 2016 00:19:38 +0000 (16:19 -0800)]
libavutil: add mastering display metadata sidedata

Adding mastering display metadata struct to avutil. The mastering display metadata contains information
about the mastering display color volume (SMPTE 2086:2014).

This info comes from HEVC in the SEI_TYPE_MASTERING_DISPLAY_INFO and is soon to be included in MKV:
https://mailarchive.ietf.org/arch/search/?email_list=cellar&gbt=1&index=sZyfPTM-QY69P-0omfOIiTN622o
so it is similar to SEI FPA / stereo_mode in MKV and as such this patch follows how AVStereo3D is implemented.

I'll add support to HEVC in a follow-up (and MKV when spec is approved).

Signed-off-by: Neil Birkbeck <neil.birkbeck@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/ccaption_dec: Fix mixed declarations and code
Michael Niedermayer [Tue, 19 Jan 2016 12:11:37 +0000 (13:11 +0100)]
avcodec/ccaption_dec: Fix mixed declarations and code

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agolavf/qtpalette: Fix incorrect palettes
Mats Peterson [Tue, 19 Jan 2016 02:38:15 +0000 (03:38 +0100)]
lavf/qtpalette: Fix incorrect palettes

This patch corrects the colors of the 2 and 4 bpp palettes.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoape: Show more information for loglevel verbose.
Carl Eugen Hoyos [Tue, 19 Jan 2016 10:02:14 +0000 (11:02 +0100)]
ape: Show more information for loglevel verbose.

Requested by Andy E, fixes bug 687.

3 years agoMerge commit '7570c9e04f010c9b3bfdeb4338d330f2cdd25278'
Hendrik Leppkes [Tue, 19 Jan 2016 07:58:55 +0000 (08:58 +0100)]
Merge commit '7570c9e04f010c9b3bfdeb4338d330f2cdd25278'

* commit '7570c9e04f010c9b3bfdeb4338d330f2cdd25278':
  swfdec: support compressed swf

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
3 years agoMerge commit '34d45b36164eee044cfe55d22488b2b65e387872'
Hendrik Leppkes [Tue, 19 Jan 2016 07:53:58 +0000 (08:53 +0100)]
Merge commit '34d45b36164eee044cfe55d22488b2b65e387872'

* commit '34d45b36164eee044cfe55d22488b2b65e387872':
  asfdec: Fix typo in comment

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
3 years agoMerge commit '40d43d25e76ca078e7665752e815fc8d96252f06'
Hendrik Leppkes [Tue, 19 Jan 2016 07:53:43 +0000 (08:53 +0100)]
Merge commit '40d43d25e76ca078e7665752e815fc8d96252f06'

* commit '40d43d25e76ca078e7665752e815fc8d96252f06':
  APIchanges: Add missing av_pix_fmt_get_chroma_sub_sample entry

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
3 years agoMerge commit '73c8c0341cce9e1a6c4169721f5123f97fc4be2f'
Hendrik Leppkes [Tue, 19 Jan 2016 07:51:12 +0000 (08:51 +0100)]
Merge commit '73c8c0341cce9e1a6c4169721f5123f97fc4be2f'

* commit '73c8c0341cce9e1a6c4169721f5123f97fc4be2f':
  arm: Fix vfp dead code elimination with have_vfp_vm

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
3 years agoMerge commit 'fec76cd430f3c865183a6e5b4caec0743e055605'
Hendrik Leppkes [Tue, 19 Jan 2016 07:50:44 +0000 (08:50 +0100)]
Merge commit 'fec76cd430f3c865183a6e5b4caec0743e055605'

* commit 'fec76cd430f3c865183a6e5b4caec0743e055605':
  checkasm: Check register clobbering on aarch64

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
3 years agoMerge commit '26ec75aec3576daea691dee53a78ec67c0dc4040'
Hendrik Leppkes [Tue, 19 Jan 2016 07:49:27 +0000 (08:49 +0100)]
Merge commit '26ec75aec3576daea691dee53a78ec67c0dc4040'

* commit '26ec75aec3576daea691dee53a78ec67c0dc4040':
  checkasm: Check register clobbering on arm

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
3 years agoMerge commit 'fa463aa83a4920b0eed47ad1f79775dfc53d21ec'
Hendrik Leppkes [Tue, 19 Jan 2016 07:48:03 +0000 (08:48 +0100)]
Merge commit 'fa463aa83a4920b0eed47ad1f79775dfc53d21ec'

* commit 'fa463aa83a4920b0eed47ad1f79775dfc53d21ec':
  avpacket: fix size check in packet_alloc

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
3 years agoMerge commit '066281372d90d63ca021b659abcb8faefd6bc4a6'
Hendrik Leppkes [Tue, 19 Jan 2016 07:47:48 +0000 (08:47 +0100)]
Merge commit '066281372d90d63ca021b659abcb8faefd6bc4a6'

* commit '066281372d90d63ca021b659abcb8faefd6bc4a6':
  asfdec: Remove unused function parameters

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
3 years agoMerge commit '2aec600ae7af7d46a4877b5ccc263b39f05a91cb'
Hendrik Leppkes [Tue, 19 Jan 2016 07:45:48 +0000 (08:45 +0100)]
Merge commit '2aec600ae7af7d46a4877b5ccc263b39f05a91cb'

* commit '2aec600ae7af7d46a4877b5ccc263b39f05a91cb':
  asfdec: reject size > INT64_MAX in asf_read_unknown

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
3 years agoMerge commit 'c69461d73797e02e7a3ab4316050c241fa91f53f'
Hendrik Leppkes [Tue, 19 Jan 2016 07:45:38 +0000 (08:45 +0100)]
Merge commit 'c69461d73797e02e7a3ab4316050c241fa91f53f'

* commit 'c69461d73797e02e7a3ab4316050c241fa91f53f':
  asfdec: only set asf_pkt->data_size after sanity checks

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
3 years agoMerge commit 'd1cd20e4e33f8139e150034b3c457302312d81bd'
Hendrik Leppkes [Tue, 19 Jan 2016 07:44:50 +0000 (08:44 +0100)]
Merge commit 'd1cd20e4e33f8139e150034b3c457302312d81bd'

* commit 'd1cd20e4e33f8139e150034b3c457302312d81bd':
  qsvenc: split encoding frames and reading from the async FIFO

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
3 years agoMerge commit 'a6259a6ecbad18d58085e4ab23f56151e98d7b53'
Hendrik Leppkes [Tue, 19 Jan 2016 07:43:03 +0000 (08:43 +0100)]
Merge commit 'a6259a6ecbad18d58085e4ab23f56151e98d7b53'

* commit 'a6259a6ecbad18d58085e4ab23f56151e98d7b53':
  qsvenc: properly handle the warning from MFXVideoCORE_SyncOperation

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
3 years agoMerge commit '63f7f8d1dbf6ce27440fdd56ef38c822fb11b9c2'
Hendrik Leppkes [Tue, 19 Jan 2016 07:41:32 +0000 (08:41 +0100)]
Merge commit '63f7f8d1dbf6ce27440fdd56ef38c822fb11b9c2'

* commit '63f7f8d1dbf6ce27440fdd56ef38c822fb11b9c2':
  avconv: Drop an impossible check

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
3 years agoMerge commit '7ebf1b4adad40e2b0d88ebd5cfde821a7a0ceab2'
Hendrik Leppkes [Tue, 19 Jan 2016 07:40:32 +0000 (08:40 +0100)]
Merge commit '7ebf1b4adad40e2b0d88ebd5cfde821a7a0ceab2'

* commit '7ebf1b4adad40e2b0d88ebd5cfde821a7a0ceab2':
  avconv: Simplify poll_filters() return value check

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
3 years agoconfigure: disable -Wunused-const-variable
James Almer [Mon, 18 Jan 2016 19:25:11 +0000 (16:25 -0300)]
configure: disable -Wunused-const-variable

The option became too aggressive with GCC 6, generating nearly 500
warnings from static const variables defined in assorted headers

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec/gif: Fix lzw buffer size
Michael Niedermayer [Mon, 18 Jan 2016 18:20:03 +0000 (19:20 +0100)]
avcodec/gif: Fix lzw buffer size

Fixes out of array access
Fixes: aaa479088e6fb40b04837b3119f47b04/asan_heap-oob_e38c68_8576_9d653078b2470700e2834636f12ff557.tga

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/put_bits: Assert buf_ptr in flush_put_bits()
Michael Niedermayer [Mon, 18 Jan 2016 16:13:55 +0000 (17:13 +0100)]
avcodec/put_bits: Assert buf_ptr in flush_put_bits()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavfilter/avf_showfreqs/showspectrum: rename skip_samples to hop_size
Paul B Mahol [Mon, 18 Jan 2016 18:38:14 +0000 (19:38 +0100)]
avfilter/avf_showfreqs/showspectrum: rename skip_samples to hop_size

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agovideodsp: fix 1-byte overread in top/bottom READ_NUM_BYTES iterations.
Ronald S. Bultje [Sat, 16 Jan 2016 19:44:28 +0000 (14:44 -0500)]
videodsp: fix 1-byte overread in top/bottom READ_NUM_BYTES iterations.

This can overread (either before start or beyond end) of the buffer in
Nx1 (i.e. height=1) images.

Fixes mozilla bug 1240080.

3 years agolavc/rawdec: Use AV_PIX_FMT_PAL8 for 1-bit raw QuickTime video
Mats Peterson [Sun, 17 Jan 2016 21:27:52 +0000 (22:27 +0100)]
lavc/rawdec: Use AV_PIX_FMT_PAL8 for 1-bit raw QuickTime video

Match the use of AV_PIX_FMT_PAL8 for 1-bit QuickTime Animation in
lavc/qtrle. To reiterate, 1-bit video is not necessary black & white in
QuickTime, merely bi-level. The two colors can be any color. The palette,
either included in the sample description, or the default Macintosh
palette (black & white for 1-bit video) will be set in lavf/qtpalette.
See the QuickTime File Format Specification for details.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agodoc/filters: add yet another fftfilt example
Paul B Mahol [Sun, 17 Jan 2016 10:13:33 +0000 (11:13 +0100)]
doc/filters: add yet another fftfilt example

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavcodec/tiff: Check subsample & rps values more completely
Michael Niedermayer [Mon, 18 Jan 2016 02:31:25 +0000 (03:31 +0100)]
avcodec/tiff: Check subsample & rps values more completely

Fixes out of array access
Fixes: 83aedfb29af669c4d6e10f1bfad974d2/asan_heap-oob_1ab42fe_4984_9f6ec14462f8d8a00ea24b320572a963.tif

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agolavf/icodec: Improve autodetection.
Carl Eugen Hoyos [Sun, 17 Jan 2016 23:36:44 +0000 (00:36 +0100)]
lavf/icodec: Improve autodetection.

Avoids misdetection of MPEG (B-)frames.

Reviewed-by: Michael Bradshaw
3 years agoavcodec/v210: guard new avx2 functions from old assemblers
James Darnley [Sun, 17 Jan 2016 20:20:25 +0000 (21:20 +0100)]
avcodec/v210: guard new avx2 functions from old assemblers

3 years agoswscale/swscale: Add some sanity checks for srcSlice* parameters
Michael Niedermayer [Sun, 17 Jan 2016 17:57:01 +0000 (18:57 +0100)]
swscale/swscale: Add some sanity checks for srcSlice* parameters

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/libaacplus: Cleanup in case of init failure
Michael Niedermayer [Sun, 17 Jan 2016 17:01:33 +0000 (18:01 +0100)]
avcodec/libaacplus: Cleanup in case of init failure

Fixes: memleak
Fixes: 6b343214a0c12d94c1ea0ae9c3102dba/signal_sigsegv_262857d_8792_71ba605ad9ca9068b8218a6ce3628c25.mov

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoconfigure: The XMA decoders depend on wmapro.
Carl Eugen Hoyos [Sun, 17 Jan 2016 17:37:01 +0000 (18:37 +0100)]
configure: The XMA decoders depend on wmapro.

Fixes compilation with --disable-fft.

3 years agoavcodec/diracdec: Fix qfactor/offset tables
Michael Niedermayer [Wed, 13 Jan 2016 22:51:47 +0000 (23:51 +0100)]
avcodec/diracdec: Fix qfactor/offset tables

It seems the previous tables where calculated with 32bit integers ignoring
overflows.
Also check for the max qindex, the value is choosen so that the qfactor/offset
fit in int32.

Fixes: 070b7914fd5dfe8f93248bea71363410/asan_static-oob_c8d034_2764_258e20f4a3c79158aecddb61a833d756.drc
Fixes out of array reads

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agolibavcodec/aacenc_tnc.c: remove unused variable w2
Claudio Freire [Sun, 17 Jan 2016 16:14:24 +0000 (13:14 -0300)]
libavcodec/aacenc_tnc.c: remove unused variable w2

No longer needed since previous commit

3 years agoAAC encoder: TNS fixes on short windows
Claudio Freire [Sun, 17 Jan 2016 02:02:41 +0000 (23:02 -0300)]
AAC encoder: TNS fixes on short windows

TNS was computing filter coefficients incorrectly for short windows
due to a few coefficient addressing bugs. Fixing them fixes lots of
instability with transients (short windows).

3 years agoAAC encoder: use signed coeffs when measuring IS energy
Claudio Freire [Sat, 16 Jan 2016 23:47:00 +0000 (20:47 -0300)]
AAC encoder: use signed coeffs when measuring IS energy

I/S energy, especially when it comes to phase cancellations,
needs to use signed coefficients as input, yet it was using
abs'd coefficients. That was a slight bug.

3 years agoAAC encoder: enforce SF delta in PNS and IS SFs
Claudio Freire [Sat, 16 Jan 2016 23:44:36 +0000 (20:44 -0300)]
AAC encoder: enforce SF delta in PNS and IS SFs

Make sure to properly enforce maximum scalefactor delta in PNS
and I/S, not as an absolute range but relative to the previous
and first scalefactor, the latter important since PNS uses an
implicit inicial scalefactor derived from the global gain, and
encoded in a different way, which makes a big difference in the
allowed range.

3 years agoavcodec/v210: document the requirement for sample_factor
James Darnley [Fri, 15 Jan 2016 18:53:28 +0000 (19:53 +0100)]
avcodec/v210: document the requirement for sample_factor

The sample factor must be the same for both 8- and 10-bit functions chosen
otherwise the output will be incorrect.

3 years agoavcodec/v210: add avx2 version of the 10-bit line encoder
James Darnley [Fri, 15 Jan 2016 18:30:03 +0000 (18:30 +0000)]
avcodec/v210: add avx2 version of the 10-bit line encoder

Around 25% faster than the ssse3 version.

3 years agoavcodec/v210: add avx2 version of the 8-bit line encoder
James Darnley [Wed, 30 Dec 2015 17:20:59 +0000 (17:20 +0000)]
avcodec/v210: add avx2 version of the 8-bit line encoder

Around 35% faster than the avx version.

Signed-off-by: Henrik Gramner <henrik@gramner.com>