Commit Graph

5726 Commits

Author SHA1 Message Date
Michael Niedermayer
908d010b12 avfilter/af_sidechaincompress: Free out frame on error
Fix memleak
Fixes CID1197065 part 2

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-03 17:09:24 +01:00
Paul B Mahol
c1b23e158c avfilter/vf_nnedi: fix ISO C90 warnings
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-02-03 09:38:11 +01:00
Paul B Mahol
79991b2288 avfilter: add nnedi filter
Port of nnedi3 vapoursynth filter.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-02-01 13:16:15 +01:00
Paul B Mahol
0a7379d9cf avfilter/vf_yadif: make use of ctx pointer
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-02-01 11:59:17 +01:00
Timothy Gu
180f9a0958 all: Make header guard names consistent 2016-01-31 15:44:11 -08:00
Timothy Gu
014e4e4499 vf_phase: Reduce the scope of several variables
Reviewed-by: Paul B Mahol <onemda@gmail.com>
2016-01-31 15:34:09 -08:00
Paul B Mahol
4ab4793c15 avfilter/avf_showfreqs: properly handle pts
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-31 22:18:12 +01:00
Timothy Gu
44304ae322 all: Add missing header guards 2016-01-28 19:49:48 -08:00
Derek Buitenhuis
dbbfbde085 Merge commit 'e8bc642202c10beda1ea4e93ec8492b1e39805e5'
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-01-27 16:46:58 +00:00
Derek Buitenhuis
21f9468402 avutil: Rename FF_CEIL_COMPAT to AV_CEIL_COMPAT
Libav, for some reason, merged this as a public API function. This will
aid in future merges.

A define is left for backwards compat, just in case some person
used it, since it is in a public header.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-01-27 16:36:46 +00:00
Paul B Mahol
ce404b4d7c avfilter/af_afade: do not duplicate curve option
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-27 11:11:51 +01:00
Paul B Mahol
df7b165e87 avfilter/vf_zscale: make it possible to override input frame parameters
Mostly useful when there is no such parameters present at all.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-26 23:13:16 +01:00
Andreas Cadhalpun
38622007c4 vf_libopencv: add support for opencv 3
It dropped the old headers, but the replacements are already available
with opencv 2.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-25 23:49:22 +01:00
Vittorio Giovara
4709f72115 lavfi: Use AV_CEIL_RSHIFT where needed 2016-01-25 12:09:48 -05:00
Paul B Mahol
f42eae96b2 avfilter/vf_zoompan: fix pts handling
Now output pts have some sense.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-24 20:29:19 +01:00
Paul B Mahol
8a34344379 avfilter/vf_zoompan: unbreak filtering with video input
Inserting fifo appears to be working solution to not get
filter_frame request we do not want.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-24 19:17:39 +01:00
Paul B Mahol
3b9f41a9c6 avfilter/vf_zoompan: rewrite so it doesn't cache all output frames
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-24 17:49:23 +01:00
Ronald S. Bultje
9cf81e573c lavfi: recognize GBR9-14P as RGB in ff_fill_rgba_map(). 2016-01-24 11:45:53 -05:00
Clément Bœsch
17d41220d8 lavfi/pthread: fix perameters/parameters typo 2016-01-24 14:41:11 +01:00
Paul B Mahol
547d412078 avfilter: update some comments
start_frame is no more, samplesref argument is now frame argument.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-24 14:32:14 +01:00
Michael Niedermayer
d863785379 avfilter/vf_convolution: Use av_clip_uint8()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-23 18:29:48 +01:00
Paul B Mahol
805563c814 avfilter/af_ladspa: accepts ' ' as command separator too
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-22 21:41:11 +01:00
Paul B Mahol
8a5d4a51ff avfilter/vf_convolution: add timeline support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-22 17:54:44 +01:00
Paul B Mahol
1c02af307a avfilter: add convolution filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-22 12:06:54 +01:00
Paul B Mahol
b18467a943 avfilter/avf_showwaves: add logarithmic amplitude scaler
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-22 11:11:06 +01:00
Paul B Mahol
6ed3a10f64 avfilter/avf_showwaves: color support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-21 20:48:28 +01:00
Paul B Mahol
fa04ec728d avfilter: add afftfilter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-21 14:31:38 +01:00
Clément Bœsch
a362015641 lavc,lavfi: use avutil/thread.h instead of redundant conditional includes
This was somehow forgotten in a8bb81a05c.
2016-01-20 21:36:54 +01:00
Bela Bodecs
868a2ed568 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>
2016-01-20 13:32:00 +01:00
Bela Bodecs
cc83177db4 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>
2016-01-19 23:30:36 +01:00
Paul B Mahol
307b848218 avfilter/af_dynaudnorm: call uninit() from config_input()
Should help dynamic filtergraph reconfiguration.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-19 20:14:14 +01:00
Paul B Mahol
4e17efd852 avfilter/avf_showfreqs/showspectrum: rename skip_samples to hop_size
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-18 19:38:14 +01:00
Paul B Mahol
d4ce63a1bf avfilter/af_sidechaincompress & af_agate: use audio fifo from lavu
Fixes regression causing segfault.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-15 21:49:42 +01:00
Paul B Mahol
7d76294ce0 avfilter: add ahistogram multimedia filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-15 19:10:46 +01:00
Michael Niedermayer
48f5244df7 avfilter/vaf_spectrumsynth: Fix mixed declaration and statment
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-15 16:51:54 +01:00
Paul B Mahol
d6f1abe9ce avfilter/vf_fftfilt: this is video filter so use pixels instead of samples
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-14 22:20:25 +01:00
Paul B Mahol
2bbc7e9625 avfilter/vf_fftfilt: use the name 's' for the pointer to the private context
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-14 22:19:52 +01:00
Paul B Mahol
653f9d84ae avfilter: add spectrumsynth filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-14 20:51:20 +01:00
Paul B Mahol
70df51112c avfilter/af_dynaudnorm: fix possible null pointer dereference
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-14 14:30:36 +01:00
Paul B Mahol
57df71eaf7 avfilter/avf_showspectrum: reduce number of operations
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-12 21:21:50 +01:00
Paul B Mahol
2009d922db avfilter/avf_showspectrum: add posibility to display phase
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-12 21:21:50 +01: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
Timothy Gu
53d6bf6627 avf_showspectrum: Silence "deprecated pixel format" warning 2016-01-09 15:32:31 -08:00
Paul B Mahol
cbad37e5bf avfilter/avf_showspectrum: set color range to frame
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-09 20:09:52 +01:00
Paul B Mahol
a69cf50dca avfilter/avf_showspectrum: add cool color map
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-08 18:01:11 +01:00
Paul B Mahol
b7b4d99a18 avfilter/avf_showfreqs: fix possible null pointer dereference
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-08 14:58:43 +01:00
Hendrik Leppkes
53ada3af62 x86/vf_w3fdif: 32-bit compatibility for w3fdif_simple_high 2016-01-08 11:56:43 +01:00
Paul B Mahol
08aec7c1bd avfilter/avf_showspectrum: add option to draw legend
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-08 11:51:46 +01:00
Ganesh Ajjanagadde
2fbdc4faf1 lavfi/avf_showspectrum: replace pow(x, 0.25) by sqrt(sqrt(x))
This is faster; precision assured as result is a float.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2016-01-07 16:57:20 -08:00
Clément Bœsch
90cd02059b lavfi/deshake: use FF_CEIL_RSHIFT() 2016-01-07 22:27:54 +01:00
Paul B Mahol
9f17d4ae7e avfilter/formats: fix leak of formats on error
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-07 09:58:55 +01:00
Andrey Turkin
149b1f7cca avfilter/vf_pad: fix direct padding
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-06 16:41:50 +01:00
Ganesh Ajjanagadde
fc703f53cf lavfi/af_compensationdelay: replace pow(x,0.5) by sqrt(x)
sqrt is faster, and is sometimes more accurate depending on the libm.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2016-01-05 19:07:19 -08:00
Paul B Mahol
206f65b06d avfilter/avf_avectorscope: add line drawing support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-05 15:01:55 +01:00
Paul B Mahol
c13216ac08 avfilter/window_func: add tukey window function
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-05 11:37:11 +01:00
Paul B Mahol
c31fa1d7b4 avfilter/avf_showspectrum: use av_clip/lrintf
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-05 10:07:59 +01:00
Paul B Mahol
0d3b31ae89 avfilter/avf_showspectrum: add yet another color map
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-05 10:07:58 +01:00
Paul B Mahol
6defda1cdb avfilter/avf_showspectrum: add option to set gain for calculating color intensity
Inspired by Sonic Visualizer.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-04 14:06:51 +01:00
Paul B Mahol
0a451082c7 avfilter/avf_showspectrum: finally fix log scaler
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-03 23:09:43 +01:00
Paul B Mahol
14caf9667e avfilter/avf_showspectrum: switch to FFT
Rationale: supports >16 bit audio, more than 96dB SNR.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-03 23:09:43 +01:00
Carl Eugen Hoyos
ae9f2e6f28 lavfi/drawtext: Fix microsecond display.
Fixes ticket #4792.
2016-01-03 22:55:31 +01:00
Nicolas George
962727acb4 lavfi/vf_decimate: do not compare the first frame to itself.
This is a waste of computing power and will result to 0,
making it always dropped.
Use maximum difference values instead.
2016-01-03 15:50:51 +01:00
James Almer
35b0c7efda x86/vf_stereo3d: remove a few unnecessary movas
Signed-off-by: James Almer <jamrial@gmail.com>
2016-01-03 02:09:02 -03:00
Paul B Mahol
af018d802d avfilter/avf_showspectrum: add 4th and 5th root scaler
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-02 18:53:09 +01:00
Paul B Mahol
2b172cb625 avfilter/avf_showspectrum: make some helper functions
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-02 18:53:09 +01:00
Paul B Mahol
d35c029cbf avfilter/avf_showspectrum: fix null pointer dereference if allocation fails
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-02 18:53:09 +01:00
Paul B Mahol
9b06e7befa avfilter/avf_showspectrum: add fiery color map
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-02 18:53:09 +01:00
Paul B Mahol
72280d1c6c avfilter: add showspectrumpic filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-02 18:53:09 +01:00
Paul B Mahol
7f7a9dd782 avfilter/avf_showspectrum: store win_size in private context and calculate it only once
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-02 18:53:09 +01:00
Paul B Mahol
8bcd1997ea avfilter/vf_zoompan: do not free frame we pushed to lavfi
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-02 18:51:11 +01:00
Ganesh Ajjanagadde
9dba3f8f09 lavfi/af_sofalizer: remove exp2 and replace clz by ff_clz
ff_clz is faster, and uses an intrinsic (at the moment on GCC). exp2 is
a wasteful function for a simple integer exponentiation.

Untested.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2016-01-01 12:12:10 -08:00
Paul B Mahol
15e1fd9883 avfilter/avf_showspectrum: add window overlap support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-31 12:29:58 +01:00
Paul B Mahol
b98c58573b avfilter/avf_showspectrum: add fire color map
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-31 11:44:18 +01:00
Paul B Mahol
4160900899 avfilter/trim: support all channel numbers in atrim filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-31 09:14:17 +01:00
Thomas Mundt
73ce8162f3 avfilter/vf_scale: set proper out frame color range
Prevents that following scalers in the filter chain will do unintentional color range conversions.
Fixes Ticket #5096

Signed-off-by: Thomas Mundt <loudmax@yahoo.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-31 02:08:20 +01:00
Paul B Mahol
0f387f2b62 avfilter/avf_showspectrum: add nebulae color map
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-30 21:28:52 +01:00
Paul B Mahol
2893dbfe2c avfilter/avf_showspectrum: add moreland color map
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-30 18:53:24 +01:00
Paul B Mahol
b0e23f2a37 avfilter/avf_showspectrum: add rainbow colormap
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-29 19:53:38 +01:00
Paul B Mahol
efa666e0da avfilter/avf_showspectrum: properly calculate w factor
It is used in calculating loudness of each frequency bin.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-29 12:11:33 +01:00
Paul B Mahol
e30e5c83ae avfilter/avf_showspectrum: add horizontal orientation support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-29 12:11:33 +01:00
Ganesh Ajjanagadde
9f4c7b4df7 lavfi/af_anequalizer: replace pow(x,-2) by 1/(x*x)
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-28 16:48:41 -08:00
Ganesh Ajjanagadde
59ac7ce4da lavfi/af_anequalizer: replace pow(10,x) by ff_exp10(x)
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-28 16:48:27 -08:00
Ganesh Ajjanagadde
63702014fa lavfi/af_anequalizer: remove cabs, cexp dependencies
Replaces by real arithmetic. Tested the validity of these transformations separately.
Numerical differences are ~1e-15, and should not matter: it is not even
clear which is more precise mathematically.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-28 16:47:23 -08:00
Paul B Mahol
a7bf5f4117 avfilter/avf_showspectrum: use FF_ARRAY_ELEMS()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-28 23:04:40 +01:00
James Almer
1817643d4f x86/vf_stereo3d: make ff_anaglyph_sse4 work on x86_32
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-12-28 17:20:24 -03:00
James Almer
6e243d17e9 x86/vf_stereo3d: optimize register usage
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-12-28 17:20:12 -03:00
Paul B Mahol
4020787b5b avfilter/avf_showspectrum: make colors for log scale more user friendly
Previosly output was almost useless because background noise, due to
windowing function picked and which is not actually present in audio,
had too much brightness.
Now output of sine wave matches more with SoX.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-28 20:38:06 +01:00
Paul B Mahol
f88546b426 avfilter/avf_showspectrum: use ff_generate_window_func
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-28 18:58:46 +01:00
Paul B Mahol
45b3e6e04e avfilter: move window function generation into separate file
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-28 18:54:55 +01:00
Paul B Mahol
67771ac4b8 avfilter/avf_showspectrum: add rscroll sliding mode
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-28 18:16:10 +01:00
Paul B Mahol
47aaebd63e avfilter/af_silenceremove: make size of window user configurable
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-28 12:23:59 +01:00
Paul B Mahol
b841fe002a avfilter/af_silenceremove: lower number of operations in for loop
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-28 12:23:59 +01:00
Paul B Mahol
1809894b2a avfilter/af_silenceremove: add peak detector
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-27 20:49:29 +01:00
Ganesh Ajjanagadde
3e2e303e4b lavfi/avf_showspectrum: replace rint by lrint
avoids float to int cast.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-26 20:29:22 -08:00
Ganesh Ajjanagadde
4e7cfefa16 lavfi/vf_hue: replace rint by lrint
avoids float to int cast.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-26 20:29:22 -08:00
Ganesh Ajjanagadde
421679dbf7 lavfi/af_compand: replace pow(10,x) by ff_exp10(x)
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-25 10:48:18 -08:00
Ganesh Ajjanagadde
6c360ca8a1 lavfi/af_volume: replace pow(10,x) by ff_exp10(x)
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-25 10:48:18 -08:00
Ganesh Ajjanagadde
e0024b9e5f lavfi/f_ebur128: replace pow(10,x) by ff_exp10(x)
Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-25 10:48:18 -08:00
Ganesh Ajjanagadde
86aa2e9f76 lavfi/vsrc_testsrc: replace pow(10,x) by ff_exp10(x)
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-25 10:48:18 -08:00
Paul B Mahol
c9b99494be avfilter/af_anequalizer: make cliping filter type actually useful
Previously result was ignored.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-25 15:03:46 +01:00