Commit Graph

7573 Commits

Author SHA1 Message Date
Paul B Mahol
72270d5bd0 avfilter/af_afir: optimize code a little more
Avoid memset.
2018-12-30 17:50:44 +01:00
Paul B Mahol
a53a9f1c8d avfilter/af_afir: implement non-uniform partitioned convolution
Using multiple frequency delay lines.
2018-12-30 13:40:29 +01:00
Paul B Mahol
300dc45fdc avfilter/af_afir: properly split IR into multiple segments 2018-12-29 10:57:58 +01:00
Paul B Mahol
3c3eb4930e avfilter/af_afir: make part_index values per channel 2018-12-29 10:46:25 +01:00
Paul B Mahol
31c9d693aa avfilter/af_afir: make number of segments extendable 2018-12-29 10:39:19 +01:00
Paul B Mahol
6095356d5b avfilter/af_afir: use AVFrame for coeff too 2018-12-29 10:17:39 +01:00
Paul B Mahol
1ba909fabe avfilter/af_afir: use segment pointer 2018-12-29 08:35:23 +01:00
Paul B Mahol
30bf54b9f3 avfilter/af_afir: introduce uninit_segment() and use it 2018-12-29 08:35:23 +01:00
Paul B Mahol
8007e8fc67 avfilter/af_afir: fix minp/maxp range and change default value for maxp 2018-12-29 08:35:23 +01:00
Paul B Mahol
c343e81ffd avfilter/af_afir: introduce init_segment() and use it 2018-12-29 08:35:23 +01:00
Paul B Mahol
e57053417a avfilter/af_afir: move allocation stuff where it belongs 2018-12-29 08:35:23 +01:00
Paul B Mahol
7312e027d6 avfilter/af_afir: introduce AudioFIRSegment structure and use it 2018-12-29 08:35:23 +01:00
Paul B Mahol
dbf43ace21 afilter/af_afir: remove invalid delay 2018-12-27 18:02:31 +01:00
Paul B Mahol
f266d2ac90 avfilter/af_afir: remove not needed nb_samples from filter context 2018-12-27 14:11:12 +01:00
Paul B Mahol
ff0b4d5af7 avfilter/af_afir: remove not needed operations 2018-12-27 12:55:07 +01:00
Paul B Mahol
b5e0a0fe3a avfilter/af_sofalizer: use av_log2() 2018-12-27 12:31:01 +01:00
Paul B Mahol
aece1eb1e9 avfilter/af_headphone: use av_log2() 2018-12-27 12:30:04 +01:00
Paul B Mahol
d702600350 avfilter/af_afir: remove dead store variable 2018-12-26 22:30:10 +01:00
Paul B Mahol
8443462e4a avfilter/af_afir: remove unused variable 2018-12-26 21:57:59 +01:00
Paul B Mahol
9ce96a744d avfilter/af_headphone: fix regression after 7c201e420 2018-12-26 10:41:41 +01:00
Paul B Mahol
92ed9316bb avfilter/af_sofalizer: fix regression after 7ea4b928a2 2018-12-26 10:18:19 +01:00
Paul B Mahol
60e9007be2 avfilter/af_sofalizer: fix typo in comments 2018-12-26 10:01:06 +01:00
Paul B Mahol
8e4e2c9e40 avfilter/af_sofalizer: use float constants 2018-12-26 10:01:06 +01:00
Paul B Mahol
530fc345ec avfilter/af_sofalizer: add fltp sample format support 2018-12-26 10:01:06 +01:00
Paul B Mahol
6c7eb0708e avfilter/af_headphone: speed up fast convolution
Do IFFT only once per output channel.
2018-12-25 19:17:25 +01:00
Paul B Mahol
8d0b8c50bd avfilter/af_sofalizer: speed up fast convolution
Do inverse FFT only once per output channel.
2018-12-25 18:56:55 +01:00
Paul B Mahol
d6fc20a3ba avfilter/af_surround: fix code indentation 2018-12-24 20:58:12 +01:00
Paul B Mahol
3bc711a267 avfilter/af_headphone: do not reduce LFE gain too much 2018-12-24 15:24:20 +01:00
Paul B Mahol
84d1adb118 avfilter/af_sofalizer: do not reduce LFE by 6dB
It is already reduced enough.
2018-12-24 15:24:20 +01:00
Paul B Mahol
7d5bb3a4d3 avfilter/af_sofalizer: fix memory leaks 2018-12-23 21:49:30 +01:00
Paul B Mahol
ee64b64c02 avfilter/af_sofalizer: set delays when interpolation is disabled 2018-12-23 21:40:07 +01:00
Paul B Mahol
4096c670ab avfilter/af_sofalizer: stop using easy API
Easy API is not flexible enough for our needs.
2018-12-23 18:29:53 +01:00
Paul B Mahol
d360a79c0a avfilter/af_sofalizer: reset FFT pointers back to NULL 2018-12-23 11:30:01 +01:00
Paul B Mahol
0c3481b43a avfilter/af_sofalizer: pick IR length after loading sofa
Instead of picking it in preloading stage.
2018-12-23 11:02:34 +01:00
Paul B Mahol
b13fe6477d avfilter/af_sofalizer: increase range for lfegain
Fixes #7634.
2018-12-23 10:00:44 +01:00
Paul B Mahol
7c201e420a avfilter/af_headphone: fix filtering of non-power of 2 length IRs in time domain 2018-12-22 20:47:02 +01:00
Paul B Mahol
7ea4b928a2 avfilter/af_sofalizer: fix non-power of 2 IR length filtering in time domain 2018-12-22 16:19:21 +01:00
Paul B Mahol
47ba085472 avfilter/af_headphone: use fabsf() instead of fabs() 2018-12-21 12:06:03 +01:00
Paul B Mahol
c49307e784 avfilter/af_sofalizer: use fabsf() instead of fabs() 2018-12-21 11:53:44 +01:00
Paul B Mahol
d6951e595a avfilter/af_sofalizer: add framesize option 2018-12-20 20:30:07 +01:00
Paul B Mahol
1ead98ffd9 avfilter/af_sofalizer: increase max radius 2018-12-20 19:20:30 +01:00
Paul B Mahol
4b5977fc50 avfilter/af_sofalizer: add printing of license back 2018-12-20 13:46:49 +01:00
Michael Niedermayer
568e1b229b avfilter/scene_sad: Fix funtions typos
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-12-18 14:18:05 +01:00
Paul B Mahol
d54276f9de avfilter/af_apad: add pad_dur and whole_dur options 2018-12-17 19:14:36 +01:00
Carl Eugen Hoyos
826655d8d1 lavfi/program_opencl: Do not use format specifier "z" on Windows. 2018-12-17 14:44:10 +01:00
Carl Eugen Hoyos
32601fb821 lavfi/signalstats: Cast the return value of AV_RN16() to int.
It is unsigned at least on arm, fixes the following warnings:
libavfilter/vf_signalstats.c:833:21: warning: taking the absolute value of unsigned type 'unsigned int' has no effect
            dify += abs(yuv - AV_RN16(prev->data[0] + pw + i * 2));
2018-12-12 23:54:14 +01:00
Paul B Mahol
dd7d6034f1 avfilter/vf_paletteuse: fix flags for alpha_threshold option 2018-12-11 17:55:05 +01:00
Jun Zhao
a271025215 lavfi/vf_scale_vaapi: add scaling mode setting support.
before this change, scale_vaapi hard coding the scaling mode, add a
new option "mode" to setting the scaling mode, it can be use to change
scaling algorithm for performance/quality trade off.

Note: VA_FILTER_SCALING_NL_ANAMORPHIC(nolinear ananorphic scaling
algorithm) doesn't support by i965/iHD driver now, add this just for
completeness.

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-12-10 15:24:47 +08:00
Paul B Mahol
8be56ee211 avfilter/vf_showinfo: allow checksums calculation to be disabled
Fixes #6987.
2018-12-09 18:46:36 +01:00
Jun Zhao
5ecd4f24f0 lavfi/buffersink: fix abuffersink flag setting issue
abuffersink need to setting AV_OPT_FLAG_AUDIO_PARAM flag.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-12-09 23:13:55 +08:00
Paul B Mahol
8440835dbe avfilter/vf_overlay: fix filtering with negative y 2018-12-03 10:32:59 +01:00
Ruiling Song
416dc9a5e8 lavf: add transpose_opencl filter
Signed-off-by: Ruiling Song <ruiling.song@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2018-12-02 23:39:37 +00:00
Carl Eugen Hoyos
1893c72086 lavfi/fps: Avoid duplicating Closed Captions when increasing frame rate. 2018-11-27 18:38:03 +01:00
Jun Zhao
e002ec332b lavfi/buffersrc: Indent the code.
commit b0012de420 missed reindent.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-11-27 10:45:25 +08:00
Mark Harris
8108064043 avfilter/vf_chromashift: Fix mixed declaration and code
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-11-26 23:47:29 +01:00
James Almer
3913d6f734 x86/scene_sad: fix link errors when HAVE_X86ASM is not defined
Reviewed-by: Haihao Xiang <haihao.xiang@intel.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-11-21 22:26:07 -03:00
Peter Ross
1ee4b4006b avfilter/graphmonitor: use SIZE_SPECIFIER for size_t type 2018-11-21 23:26:29 +11:00
Paul B Mahol
57815cfad5 avfilter/vf_overlay: fix crash with negative y 2018-11-20 23:18:47 +01:00
Marton Balint
972ded33c0 avfilter/vf_freezedetect: add filter to detect frozen input
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-11-19 22:11:42 +01:00
Paul B Mahol
6da439219d avfilter: add rgbashift filter 2018-11-19 14:55:49 +01:00
Paul B Mahol
cfd421226c avfilter: add chromashift filter 2018-11-19 14:46:45 +01:00
Paul B Mahol
ead0d2eb76 avfilter/vf_limiter: remove unused header 2018-11-18 22:20:34 +01:00
Paul B Mahol
f3d8a4ea46 avfilter/vf_limiter: always limit min/max to format depth 2018-11-18 22:20:34 +01:00
Paul B Mahol
72482363d1 avfilter/f_drawgraph: use av_sscanf() 2018-11-18 21:21:18 +01:00
Paul B Mahol
c834f52c00 avfilter/af_aecho: use av_sscanf() 2018-11-18 21:21:18 +01:00
Paul B Mahol
f79750bc32 avfilter/af_ladspa: use av_sscanf() 2018-11-18 21:21:18 +01:00
Paul B Mahol
2de165a92b avfilter/vf_mix: use av_sscanf() 2018-11-18 21:21:18 +01:00
Paul B Mahol
9b2c325060 avfilter/af_sofalizer: use av_sscanf() 2018-11-18 21:21:18 +01:00
Paul B Mahol
80265dba3d avfilter/af_afftdn: use av_sscanf() 2018-11-18 21:21:18 +01:00
Paul B Mahol
0c7fb6e4a0 avfilter/af_adelay: use av_sscanf() 2018-11-18 21:21:18 +01:00
Paul B Mahol
a5b28b271a avfilter/af_acrossover: use av_strtod() to parse single number 2018-11-18 20:44:27 +01:00
Martin Vignali
d3621b2321 avfilter: use av_clip_uintp2 instead of av_clip for 10b and 12b 2018-11-17 18:06:58 +01:00
Paul B Mahol
fbea2ea76e avfilter/vf_neighbor: fix >8 bit deflate/inflate 2018-11-17 11:09:37 +01:00
Carl Eugen Hoyos
21dd05ee6a lavfi/minterpolate: Remove declaration of two unused variables. 2018-11-16 21:45:49 +01:00
Paul B Mahol
395508d9b6 avfilter/vf_dedot: initizalize ret variable 2018-11-16 21:39:37 +01:00
Paul B Mahol
4902780d2b avfilter/vf_lut3d: use av_sscanf 2018-11-16 20:24:52 +01:00
Paul B Mahol
7a73cca254 avfilter: add dedot video filter 2018-11-16 20:19:08 +01:00
Marton Balint
aecd63b926 avfilter/af_afade: fix duration maximum
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-11-15 22:16:32 +01:00
Paul B Mahol
662120f2b2 avfilter/vf_convolution: use sqrtf as its faster 2018-11-15 19:09:20 +01:00
Paul B Mahol
1342ec526e avfilter/vf_blend: add 12bit support 2018-11-15 15:03:05 +01:00
Paul B Mahol
c98a32e4ad avfilter/vf_blend: add 10bit support 2018-11-15 14:44:24 +01:00
Paul B Mahol
02809e7b06 avfilter/vf_lut2: implement support for different input depths 2018-11-15 11:47:58 +01:00
Philip Langdale
1096614c42 avfilter/vf_bwdif: Use common yadif frame management logic
After adding field type management to the common yadif logic, we can
remove the duplicate copy of that logic from bwdif.
2018-11-14 17:41:01 -08:00
Philip Langdale
fa74e4aef2 avfilter/yadif_common: Add field type tracking to help bwdif
The bwdif filter can use common yadif frame management if we track
when a field is the first or last field in a sequence. While this
information is not used by yadif, the added benefit of removing the
duplicated frame management logic makes it worth tracking this state
in the common code.
2018-11-14 17:41:01 -08:00
Philip Langdale
19d3d0c057 avutil/hwcontext_cuda: Define and use common CHECK_CU()
We have a pattern of wrapping CUDA calls to print errors and
normalise return values that is used in a couple of places. To
avoid duplication and increase consistency, let's put the wrapper
implementation in a shared place and use it everywhere.

Affects:

* avcodec/cuviddec
* avcodec/nvdec
* avcodec/nvenc
* avfilter/vf_scale_cuda
* avfilter/vf_scale_npp
* avfilter/vf_thumbnail_cuda
* avfilter/vf_transpose_npp
* avfilter/vf_yadif_cuda
2018-11-14 17:39:42 -08:00
Paul B Mahol
23f589e073 avfilter/vf_alphamerge: do not check for ret value if all wanted frames are present
It is not needed and may be uninitialized.
2018-11-12 22:07:13 +01:00
Mark Harris
ae4323548a avfilter/vf_fade: fix start/duration max value
A fade out (usually at the end of a video) can easily start beyond
INT32_MAX (about 36 minutes).  Regression since d40dc64173.
2018-11-12 12:42:42 +01:00
Paul B Mahol
e96742dd3b avfilter/af_afftfilt: use first input frame timestamp 2018-11-12 12:35:24 +01:00
Paul B Mahol
29f2893318 avfilter/vf_alphamerge: switch to activate 2018-11-12 10:47:50 +01:00
Paul B Mahol
0f2cfa3d80 avfilter/af_headphone: do not leak input frames on error 2018-11-12 09:38:30 +01:00
Paul B Mahol
a09411a0ee avfilter/af_afftfilt: calculate all channels FFT values upfront 2018-11-12 09:27:08 +01:00
Paul B Mahol
d03030c071 avfilter/af_afftfilt: add more window types 2018-11-11 21:23:24 +01:00
Paul B Mahol
bdc66c50dd avfilter/af_afftfilt: extend filter functionality 2018-11-11 21:23:24 +01:00
Marton Balint
936d18fb42 avfilter/vf_minterpolate: use common scene sad functions
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-11-11 20:30:50 +01:00
Marton Balint
7748f395de avfilter/vf_select: use common scene sad functions
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-11-11 20:30:50 +01:00
Marton Balint
6c2a7a8e9a avfilter/vf_framerate: factorize SAD functions which compute SAD for a whole frame
Also add SIMD which works on lines because it is faster then calculating it on
8x8 blocks using pixelutils.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-11-11 20:30:50 +01:00
Paul B Mahol
8860d30731 avfilter/vf_lut3d: ignore last whitespace when comparing LUT size string
In some situations it might be tab character and in others normal space.
2018-11-11 13:36:45 +01:00
Paul B Mahol
c47b48c0a6 avfilter/vf_lut3d: add spline 1D interpolation 2018-11-10 22:08:42 +01:00
Paul B Mahol
0bc2326b90 avfilter/vf_lut3d: add cosine 1D interpolation 2018-11-10 21:44:35 +01:00
Martin Vignali
75625c555c avfilter/af_headphone : fix mem leak
report by coverity
CID 1439934
CID 1439935
2018-11-09 21:55:32 +01:00
Paul B Mahol
29fdaaa80d avfilter/af_afir: fix hang because video is first requested 2018-11-09 18:51:21 +01:00
Paul B Mahol
16d91b7e99 avfilter/af_afir: kill useless code which increases latency for no reason 2018-11-09 10:40:16 +01:00
Paul B Mahol
36348d77b8 avfilter/af_afir: add minp/maxp options to control latency and speed 2018-11-08 22:07:14 +01:00
Paul B Mahol
698e67bef2 avfilter/af_afir: do not leak frame and clear pointer to freed frame 2018-11-08 21:34:49 +01:00
Paul B Mahol
70463b7026 avfilter/avf_showspectrum: add terrain color map 2018-11-08 17:59:48 +01:00
Paul B Mahol
09fdfc11b7 avfilter/avf_showspectrum: add cividis colormap 2018-11-08 15:08:43 +01:00
Paul B Mahol
0f0f840716 avfilter/af_aiir: implement rate option 2018-11-08 13:05:08 +01:00
Paul B Mahol
1d9fe1fdf6 avfilter/af_afir: implement rate option 2018-11-08 13:05:08 +01:00
Paul B Mahol
8dc5eb43b0 avfilter/af_afir: return early when giving video frame 2018-11-08 13:05:08 +01:00
Paul B Mahol
fcbde5e6a4 avfilter/af_afir: remove redundant code 2018-11-08 11:14:04 +01:00
Paul B Mahol
0c6d4e7ba4 avfilter/avf_showspectrum: add plasma color map 2018-11-07 18:56:21 +01:00
Paul B Mahol
ed58db4237 avfilter/avf_showspectrum: add viridis color map 2018-11-07 17:55:34 +01:00
Paul B Mahol
975510758c avfilter/avf_showspectrum: improve magma colors 2018-11-07 17:18:44 +01:00
Zhong Li
d96ae9d5ea lavc/qsv_overlay: suppress code scan complain
Suppress the complain "variables 'pix_fmt' is used but maybe
uninitialized".

Signed-off-by: Zhong Li <zhong.li@intel.com>
2018-11-06 17:42:31 +08:00
Paul B Mahol
63fbec7477 avfilter/af_afade: remove unused code 2018-11-04 15:01:56 +01:00
Paul B Mahol
242f7bf202 avfilter/split: use ff_outlink_get_status() 2018-11-03 18:24:35 +01:00
Paul B Mahol
c8625e5c6f avfilter/af_afade: do not use framequeue directly 2018-11-03 18:24:35 +01:00
Paul B Mahol
4b82b71041 avfilter/af_amerge: use ff_inlink_queued_samples() 2018-11-03 18:24:35 +01:00
Paul B Mahol
decc008929 avfilter/af_amultiply: make use of ff_inlink_queued_samples() 2018-11-03 18:24:35 +01:00
Paul B Mahol
639694eaa5 avfilter/vf_extractplanes: use ff_outlink_get_status() 2018-11-03 18:24:19 +01:00
Philip Langdale
8e50215b5e avfilter/vf_cuda_yadif: Avoid new syntax for vector initialisation
This requires a newer version of CUDA than we want to require.
2018-11-02 14:34:38 -07:00
Philip Langdale
d5272e94ab avfilter/vf_yadif_cuda: CUDA accelerated yadif deinterlacer
This is a cuda implementation of yadif, which gives us a way to
do deinterlacing when using the nvdec hwaccel. In that scenario
we don't have access to the nvidia deinterlacer.
2018-11-02 11:26:30 -07:00
Philip Langdale
598f0f3927 libavfilter/vf_yadif: Make frame management logic and options shareable
I'm writing a cuda implementation of yadif, and while this
obviously has a very different implementation of the actual
filtering, all the frame management is unchanged. To avoid
duplicating that logic, let's make it shareable.

From the perspective of the existing filter, the only real change
is introducing a function pointer for the filter() function so it
can be specified for the specific filter.
2018-11-02 11:24:05 -07:00
Paul B Mahol
ef1aadffc7 avfilter/f_loop: switch to activate 2018-11-02 12:32:34 +01:00
Paul B Mahol
4620e4c7ad avfilter/f_loop: make sure duration of frame is never zero 2018-11-02 11:20:30 +01:00
Paul B Mahol
97e9e3504d avfilter: add tpad filter 2018-11-02 09:32:52 +01:00
Michael Niedermayer
517573a670 Bump minor version for master after 4.1 branchpoint
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-11-02 00:53:07 +01:00
Michael Niedermayer
780d5e30a0 Bump minor versions for branching 4.1
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-11-02 00:15:32 +01:00
Paul B Mahol
323c2cfd38 avfilter: add (a)graphmonitor filter(s) 2018-10-31 11:49:39 +01:00
Paul B Mahol
e95987f6ca avfilter/af_afftdn: fix memory leaks reported by coverity 2018-10-28 22:33:20 +01:00
Paul B Mahol
0c8b5cb369 avfilter/af_afftdn: add alias for sample_noise end
Added the same one as one mentioned in documentation.
2018-10-28 15:00:34 +01:00
Paul B Mahol
bb54c0ae71 avfilter/af_afftdn: switch to activate 2018-10-28 14:31:03 +01:00
Michael Niedermayer
cd34c6a57e avfilter/vf_pixdesctest: Use 32bit read/write
This is needed for processing 32bit floats

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-10-27 22:39:27 +02:00
Paul B Mahol
40ac622460 avfilter/window_func: add bohman window 2018-10-27 13:36:00 +02:00
Paul B Mahol
4fcfb9c4eb avfilter: add xstack filter 2018-10-26 12:40:54 +02:00
Paul B Mahol
963c16ed38 avfilter/vf_lut3d: do not error out if TITLE is after other lines 2018-10-25 23:23:51 +02:00
Paul B Mahol
bd02a6d7ed avfilter/af_adelay: switch to activate
Also use less memory in special case when all channels have common delay.
2018-10-25 23:11:37 +02:00
Mark Thompson
f370142ec0 lavfi/ebur128: Fix mixed declarations and code 2018-10-25 00:24:24 +01:00
Martin Vignali
66974311b1 avfilter/show_info : add print of color information (range, color_primaries, color_trc, colorspace) 2018-10-24 21:21:05 +02:00
Paul B Mahol
22d6d91649 avfilter/vf_waveform: abort early if there are no components to show 2018-10-24 18:33:52 +02:00
Paul B Mahol
d94d252731 avfilter/vf_waveform: add gratcicule to rgb input 2018-10-24 18:33:52 +02:00
Paul B Mahol
bc940cf95c avfilter/vf_datascope: fix rgba mapping for oscilloscope filter output 2018-10-24 17:39:51 +02:00
Josh de Kock
0ac82eed6f lavfi/vf_showinfo: support displaying S12M timecode sidedata 2018-10-23 15:46:30 +01:00
Paul B Mahol
b7b3e8c5c7 avfilter: add vibrance filter 2018-10-23 11:12:41 +02:00
Martin Vignali
6953ff714f avfilter/setparams : fix colorspace option 2018-10-22 11:26:31 +02:00
Martin Vignali
cfdbefdd90 avfilter/setfield, setrange : set color property to auto 2018-10-22 11:26:28 +02:00
Martin Vignali
997f03cd7e avfilter/setparams : update filter description 2018-10-22 11:26:24 +02:00
Timo Rothenpieler
2797bd5c81 avfilter/*_cuda: don't include internal header
It's not used, and pulls in the ffnvcodec header, which does not neccesarily have to exist to build these filters, since they include the full cuda.h.
2018-10-21 22:55:21 +02:00
Martin Vignali
8d3f364630 avfilter/setparam : add options to set color primaries, trc, space 2018-10-21 22:00:06 +02:00
Martin Vignali
02ad0416c0 avfilter/setparams : merge setfield and setrange filter to setparams filter
setfield and setrange filters are kept.
2018-10-21 22:00:01 +02:00
Paul B Mahol
18d391cffe avfilter: add chromahold filter 2018-10-21 12:57:58 +02:00
Paul B Mahol
0939c33b54 avfilter/af_afir: calculate group delay too 2018-10-21 12:47:07 +02:00
Paul B Mahol
8baaed7889 avfilter: add sinc source filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-10-19 17:43:29 +02:00
Paul B Mahol
2d9c290a2f avfilter/vf_lensfun: use av_malloc_array() 2018-10-18 11:36:20 +02:00
Paul B Mahol
0ce7005d34 avfilter/vf_lensfun: use av_freep 2018-10-18 11:30:11 +02:00
Paul B Mahol
bf5bdbdb92 avfilter/af_adelay: do not crash if allocation of chandelay failed 2018-10-18 10:24:16 +02:00
Paul B Mahol
936376f3f7 avfilter/af_silenceremove: use enum for threshold detection modes 2018-10-15 19:03:01 +02:00
Paul B Mahol
631994b62b avfilter/af_silenceremove: add enum for detection modes 2018-10-15 19:03:01 +02:00
Paul B Mahol
454ed32d56 avfilter/af_silenceremove: add options description 2018-10-15 19:03:01 +02:00
Paul B Mahol
a853623681 avfilter/af_silenceremove: prefer outlink instead of inlink 2018-10-15 19:03:01 +02:00
Paul B Mahol
346b23237b avfilter/af_silenceremove: add mode options
To control how threshold is calculated in multichannel audio.
2018-10-15 19:03:01 +02:00
Paul B Mahol
c07bc1d6ee avfilter/af_silenceremove: add options to keep min duration of silence 2018-10-15 19:03:01 +02:00
Zhong Li
a5e1cb9e96 lavu/hwcontext_qsv: Add support for AV_PIX_FMT_BGRA.
RGB32(AV_PIX_FMT_BGRA on intel platforms) format may be used as overlay with alpha blending.
So add AV_PIX_FMT_BGRA format support.

One example of alpha blending overlay: ffmpeg -hwaccel qsv -c:v h264_qsv -i BA1_Sony_D.jsv
-filter_complex 'movie=lena-rgba.png,hwupload=extra_hw_frames=16[a];[0:v][a]overlay_qsv=x=10:y=10'
-c:v h264_qsv -y out.mp4

Rename RGB32 to be BGRA to make it clearer as Mark Thompson's suggestion.

V2: Add P010 format support else will introduce HEVC 10bit encoding regression.
    Thanks for LinJie's discovery.

Signed-off-by: Zhong Li <zhong.li@intel.com>
Verified-by: Fu, Linjie <linjie.fu@intel.com>
2018-10-11 13:26:59 +08:00
Paul B Mahol
7a6d88ee62 avfilter/af_afir: remove again option, merge it with gtype 2018-10-10 20:04:25 +02:00
Daniel Molkentin
a628fa1fec libavfilter: bump micro version to 101 2018-10-10 19:28:00 +02:00
Daniel Molkentin
4069d2d087 libavfilter/ebur128: add scale parameter
This allows switching between absolute (LUFS) and relativ (LU) display
in the status line.

Signed-off-by: Daniel Molkentin <daniel@molkentin.de>
Signed-off-by: Conrad Zelck <c.zelck@imail.de>
2018-10-10 19:28:00 +02:00
Daniel Molkentin
d445bcb137 libavfilter/ebur128: introduce target range
This eases meeting the target level during live mixing.

Signed-off-by: Daniel Molkentin <daniel@molkentin.de>
Signed-off-by: Conrad Zelck <c.zelck@imail.de>
2018-10-10 19:26:41 +02:00
Daniel Molkentin
d587390988 libavfilter/ebur128: add gauge option
Allow to show short-term instead of momentary in gauge. Useful for monitoring
whilst live mixing.

Signed-off-by: Daniel Molkentin <daniel@molkentin.de>
Signed-off-by: Conrad Zelck <c.zelck@imail.de>
2018-10-10 19:26:38 +02:00
Daniel Molkentin
1cee8f03cf libavfilter/ebur128: add target value to statistics line
Signed-off-by: Daniel Molkentin <daniel@molkentin.de>
Signed-off-by: Conrad Zelck <c.zelck@imail.de>
2018-10-10 19:26:36 +02:00
Daniel Molkentin
d95c5b003c libavfilter/ebur128: add target level option for EBUR128 visualization filter
Signed-off-by: Daniel Molkentin <daniel@molkentin.de>
Signed-off-by: Conrad Zelck <c.zelck@imail.de>
2018-10-10 19:26:33 +02:00
Marton Balint
d6a1f711bc avfilter/af_asetnsamples: do not leak frame on ENOMEM
Fixes Coverity CID 1416352.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-10-09 21:46:28 +02:00
Marton Balint
4db291d764 avfilter/f_cue: always check the return value of ff_inlink_consume_frame
Fixes Coverity CID 1439936.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-10-09 21:46:28 +02:00
Paul B Mahol
e10fe34e7c avfilter/f_reverse: add packed sample format support to areverse 2018-10-08 13:38:05 +02:00
Paul B Mahol
3cbf37bf09 avfilter/af_silenceremove: fix max for duration options 2018-10-08 12:22:12 +02:00
Marton Balint
0e9a09793a avfilter/af_afade: fix crossfade duration maximum value
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-10-07 20:26:28 +02:00
Paul B Mahol
3d308746eb avfilter/af_afade: add logistic sigmoid curve 2018-10-07 17:38:22 +02:00
Paul B Mahol
9c120b4d42 avfilter/avf_showspectrum: add legend support to showspectrum filter 2018-10-07 12:18:55 +02:00
Michael Niedermayer
c07bbdbcf0 avfilter/vf_tonemap_opencl: Fix seperate typo
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-10-07 03:03:09 +02:00
Michael Niedermayer
6414415889 avfilter/af_biquads: Remove l from %lf in av_log environment
The l modifier does nothing in C99 and it was undefined in C89 for %f

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-10-07 03:03:09 +02:00
Michael Niedermayer
8dd7c2c6a7 avfilter/af_aiir: Remove l from %lf in av_log environment
The l modifier does nothing in C99 and it was undefined in C89 for %f

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-10-07 03:03:09 +02:00
Paul B Mahol
c98ffa086c avfilter/avf_showspectrum: switch to activate and add fps option 2018-10-06 20:30:12 +02:00
Jun Zhao
5a3ce4a92b lavfi/deshake: fix deshake crash issue.
Fixes ticket #7441.

for block contrast calculate, the block is like this:

|<---------------- stride-----------------------|
+----------------------------------------------->  X
|
|            w = 16
|    (cx,cy)+------+
|           |      |
|h=blocksize|      |
|           |      |
|           +------+
V

Y

so we calc the block contrast use:
   (cy + y) * stride + (cx + x)

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-10-06 21:30:18 +08:00
Paul B Mahol
50a2347b19 avfilter/avf_showspectrum: increase padding size for low sample rates 2018-10-05 15:23:02 +02:00
Paul B Mahol
fe447c0609 avfilter/avf_showspectrum: add zoom mode to showspectrumpic 2018-10-05 14:23:48 +02:00
Paul B Mahol
3e687be4fa avfilter/avf_showspectrum: add green color map 2018-10-05 12:00:57 +02:00
Pavel Koshevoy
03123e4053 lavfi/atempo: fix tempo range limit inconsistency
yae_set_tempo was overlooked when max tempo limit was raised to 100.

tested with:
./ffmpeg_g -i Delerium/SemanticSpaces/Gateway.mp3 \
-af asendcmd=f=asendcmd.cfg,atempo=1.0 -y /tmp/asendcmd-atempo.wav

where asendcmd.cfg was:
15.0-45.0 [enter] atempo tempo 2.0,
          [leave] atempo tempo 0.5;

60.0-300.0 [enter] atempo tempo 4.0,
           [leave] atempo tempo 1.0;
2018-10-04 21:09:41 -06:00
Paul B Mahol
d39fae0886 avfilter/avf_showspectrum: fix scaling in zoom mode 2018-10-05 00:15:26 +02:00
Paul B Mahol
196dd13c76 avfilter/avf_showspectrum: implement zoom mode 2018-10-04 23:51:22 +02:00
Paul B Mahol
0baca07759 avilter/af_afir: add irfmt option 2018-10-04 23:51:22 +02:00
Paul B Mahol
4901fa1fb8 avfilter/af_afir: use internal lavfi queue 2018-10-04 12:10:20 +02:00
Paul B Mahol
6725fd8b0f avfilter/af_headphone: use lavfi internal queue instead
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-10-04 12:10:20 +02:00
Paul B Mahol
ef3babb2c7 avfilter/af_asetnsamples: use lavfi internal queue 2018-10-04 12:10:20 +02:00
Paul B Mahol
7d65fe87e9 avfilter: add ff_inlink_queued_samples() 2018-10-04 12:10:20 +02:00
Marton Balint
7ca2ee059e avfilter/f_cue: use inlink fifo for queueing frames
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-10-03 22:09:49 +02:00
Marton Balint
8f14170b9a avfilter/filters: add ff_inlink_peek_frame and ff_inlink_queued_frames to access frames in the inlink fifo
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-10-03 22:09:49 +02:00
Paul B Mahol
9e45364a80 avfilter/af_afir: make IR gain control more flexible
For this reason introduce two more options.
2018-10-03 21:43:40 +02:00
Paul B Mahol
4c514edc5b avfilter/avfilter: fix typos in comments 2018-10-03 19:11:52 +02:00
Paul B Mahol
5ee4144701 avfilter/af_afftdn: add missing break 2018-09-26 22:23:28 +02:00
Paul B Mahol
efb65abedf avfilter: add audio denoising (afftdn) filter 2018-09-25 19:54:06 +02:00
Paul B Mahol
d6e50e0716 avfilter/vf_curves: add planar rgb support 2018-09-25 16:35:29 +02:00
Steven Liu
a7429d853d avfilter/buffersink.h: fix comment typo of av_buffersink_get_samples
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2018-09-25 11:11:37 +08:00
Paul B Mahol
54ca198e23 avfilter/vf_threshold: add slice threading 2018-09-24 20:21:17 +02:00
Steven Liu
4b00332203 avfilter/sr: process and output message when load_model is NULL
fix ticket: 7455

Reviewed-by: Pedro Arthur <bygrandao@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2018-09-24 22:02:54 +08:00
Paul B Mahol
a9485d7318 avfilter: document mono option of silencedetect filter
Also provide shorter option, and reorder options in documentation.
2018-09-23 23:10:51 +02:00
Pedro Arthur
1cb101f60d avfilter/vf_sr: Fix coverity CID 1439584 2018-09-21 11:22:06 -03:00
Zhao Zhili
cd732ac472 avfilter/dnn_backend_native: fix memleak
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2018-09-19 13:21:27 -03:00
Zhao Zhili
5dad514379 avfilter/dnn_backend_native: fix invalid free
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2018-09-19 13:21:27 -03:00
Zhao Zhili
0d7a75e848 avfilter/vf_sr: fix read out of bounds
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2018-09-19 13:21:27 -03:00
Sergey Lavrushkin
bd10c1e9a8 libavfilter: Removes stored DNN models. Adds support for native backend model file format in tf backend.
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2018-09-17 19:44:42 -03:00
Paul B Mahol
b0cfb2cfb9 avfilter/vf_colorspace: fix typo in comment 2018-09-17 12:51:59 +02:00
Paul B Mahol
c4774c5474 avfilter/af_astats: count zero crossings 2018-09-17 12:12:54 +02:00
Paul B Mahol
5109c38162 avfilter: add acrossover filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-09-16 12:06:37 +02:00
Paul B Mahol
83f7a5eb62 avfilter/avf_aphasemeter: check return value of ff_insert_outpad() 2018-09-15 21:59:01 +02:00
Paul B Mahol
11fc18994e avfilter/f_ebur128: check return value of ff_insert_outpad() 2018-09-15 21:59:01 +02:00
Paul B Mahol
e334765408 avfilter/af_anequalizer: check return value of ff_insert_outpad() 2018-09-15 21:59:01 +02:00
Paul B Mahol
876101cf41 avfilter/af_afir: switch to activate 2018-09-15 21:59:01 +02:00
Paul B Mahol
da7a0ac979 avfilter/af_afir: check return value of ff_insert_outpad() 2018-09-15 21:59:01 +02:00
Paul B Mahol
91cc3aa8b1 avfilter/avf_showspectrum: add magma color map 2018-09-15 14:08:49 +02:00
Tristan Matthews
f3b430e0e4 lavfi/silencedetect: fix spelling
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-09-14 01:52:29 +02:00
Paul B Mahol
e320f9576a avfilter/vf_bm3d: use av_clip_uintp2_c where clip is variable 2018-09-13 20:48:08 +02:00
Paul B Mahol
776cdd1dc8 avfilter/vf_remap: refactor code 2018-09-13 12:09:51 +02:00
Paul B Mahol
544fde1bf8 avfilter: add bm3d filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-09-13 11:22:22 +02:00
Paul B Mahol
ecf38be7c7 avfilter: add amultiply audio filter 2018-09-13 10:21:46 +02:00
James Almer
185aa5e896 Merge commit 'e05e5920a4e1f1f15cc8a7c843159d519f6ec18e'
* commit 'e05e5920a4e1f1f15cc8a7c843159d519f6ec18e':
  qsv: Error out if getting session handle failed in avfilter

Merged-by: James Almer <jamrial@gmail.com>
2018-09-11 13:41:07 -03:00
Paul B Mahol
492b312ddd avfilter/vf_datascope: reduce block height
So it match minimal input video size requirement.
2018-09-11 11:58:49 +02:00
Paul B Mahol
06e990ce89 avfilter/vf_limiter: add slice threading 2018-09-11 11:24:07 +02:00
Roman Arzumanyan
90ba17652a avfilter: add nvidia NPP based transpose filter
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2018-09-10 12:11:41 +02:00
Marton Balint
37caec3dc4 avfilter/vf_framerate: switch to activate
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-09-09 21:21:42 +02:00
Marton Balint
43d3b61abe avfilter/f_cue: add cue and acue filters
To delay filtering until a given wallclock timestamp.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-09-09 21:21:42 +02:00
Daniel Oberhoff
a75d805e6b avfilter/vf_remap: add slice threading
Signed-off-by: Daniel Oberhoff <daniel@danieloberhoff.de>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-09-09 19:57:14 +02:00
Paul B Mahol
bd6c57d532 avfilter: add support for gray14 format 2018-09-09 19:10:44 +02:00
Paul B Mahol
e70f6cb7e3 avfilter/vf_premultiply: add gray14 format 2018-09-09 18:36:41 +02:00
Paul B Mahol
e10846001d avfilter/vf_extractplanes: define higher depth formats with macro 2018-09-09 18:13:13 +02:00
Paul B Mahol
6c06389d6e avfilter/vf_extractplanes: define common 8-bit pixel formats 2018-09-09 18:06:22 +02:00
Paul B Mahol
43421386f2 avfilter/vf_extractplanes: fix 14bit format extraction 2018-09-09 17:56:43 +02:00
Paul B Mahol
c4cda4eb87 avfilter: add lut1d filter 2018-09-07 21:44:03 +02:00
Thomas Mundt
f4438e387e avfilter/vf_interlace: fix numerical options
Regression since 9c01cdb94e

Signed-off-by: Thomas Mundt <tmundt75@gmail.com>
2018-09-07 18:46:56 +02:00
Michael Niedermayer
6b1b5af024 avfilter/vf_frei0r: Remove duplicate }, fix build
Fixes regression from a3c6b7ff59

Reported-by: qq2225936589
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-08-30 17:12:25 +02:00
Raphael Graf
a3c6b7ff59 frei0r: handle string params
This is needed for some of the frei0r filters (facebl0r and facedetect) which accept string parameters.

Fixes the issue described here:
http://www.ffmpeg-archive.org/Unable-to-set-ffmpeg-frei0r-facedetect-filter-parameter-td4680190.html

Signed-off-by: Raphael Graf <r@undefined.ch>
2018-08-30 09:57:25 +02:00
Nicolas George
962c9313af lavfi/avf_concat: switch to activate.
Fix trac ticket #7351.
2018-08-26 12:16:48 +02:00
Zhong Li
e05e5920a4 qsv: Error out if getting session handle failed in avfilter
Solve some issues found by an automated code scansion.
Suppress the complain "variables 'handle' is used but maybe
uninitialized".

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2018-08-23 08:22:34 +02:00
Steven Liu
dcef44f136 avfilter/buffersrc.h: fix typo of the comment 2018-08-21 15:44:33 +08:00
Jun Zhao
fe06ed22e6 lavfi: fix can't dispaly "slice" sub-option in "ffmpeg -h full"
fix can't dispaly "slice" sub-option in "ffmpeg -h full" for
 AVFilter options.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-08-16 19:45:07 +08:00
Michael Niedermayer
2612431d1b avfilter/vf_hue: 10bit support
Tested-by: Tobias Rapp <t.rapp@noa-archive.com>
Tested-by: Reto Kromer <lists@reto.ch>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-08-16 00:07:59 +02:00
Mina
f5559dd869 lavfi/vf_colorconstancy: cosmetic update 2018-08-14 20:56:51 +02:00
Mina
729ebd3cd0 lavfi/vf_colorconstancy: change option ranges 2018-08-14 20:55:08 +02:00
Sergey Lavrushkin
1f18a633c6 libavfilter: Adds proper file descriptions to dnn_srcnn.h and dnn_espcn.h.
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2018-08-14 15:02:41 -03:00
Sergey Lavrushkin
95cb2127ad libavfilter/vf_sr.c: Removes uint8 -> float and float -> uint8 conversions.
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2018-08-14 15:02:27 -03:00
Sergey Lavrushkin
2ecf9d103a libavfilter/dnn_backend_tf.c: Fixes ff_dnn_free_model_tf.
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2018-08-14 15:02:09 -03:00
Danil Iashchenko
5423fe29da lavfi: add erosion_opencl, dilation_opencl filters
Add erosion_opencl, dilation_opencl filters. Behave like existing erosion and dilation filters.
2018-08-12 21:52:06 +01:00
Kyle Swanson
87cc7e8d4e lavfi/vf_libvmaf: update to use libvmaf v1.3.9
Signed-off-by: Kyle Swanson <kswanson@netflix.com>
2018-08-10 12:00:12 -07:00
Clément Bœsch
eb1860e017 lavfi/selectivecolor: fix neutral color filtering
Neutrals are supposed to be anything not black (0,0,0) and not white
(N,N,N).

Previous neutral filtering code was too strict by excluding colors with
any of its RGB component maxed instead of just the white color.

Reported-by: Royi Avital <royiavital@yahoo.com>
2018-08-09 19:56:26 +02:00
Mina
e0539f0349 lavfi/xbr: update filter url
Existing link is broken.
This patch updates the existing url with a working one.

Signed-off-by: Mina <minasamy_@hotmail.com>
Signed-off-by: Gyan Doshi <ffmpeg@gyani.pro>
2018-08-09 10:35:00 +05:30
Sergey Lavrushkin
a66e74306a libavfilter: Fixes warnings for unused variables in dnn_srcnn.h, dnn_espcn.h, dnn_backend_tf.c.
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2018-08-07 13:28:04 -03:00
Sergey Lavrushkin
9d87897ba8 libavfilter: Code style fixes for pointers in DNN module and sr filter.
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2018-08-07 11:58:34 -03:00
Sergey Lavrushkin
4eb63efbda libavfilter: Adds on the fly generation of default DNN models for tensorflow backend instead of storing binary model.
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2018-08-07 11:58:03 -03:00
Vittorio Giovara
aa8e5eecac vf_tonemap: Update hdr metadata with the new peak value
Less effective than the approach in vf_tonemap_opencl because there
is no peak detection, but it's still a good idea to implement this.
2018-08-06 18:35:52 +02:00
Vittorio Giovara
572ef567a5 vf_tonemap_opencl: Move update_metadata() to a shared file 2018-08-06 18:35:52 +02:00
Vittorio Giovara
e467179cfb vf_tonemap[_opencl]: Move determine_signal_peak() to a shared file
The two functions are identical. Use the shared LumaCoeffients type too.
2018-08-06 18:35:52 +02:00
Vittorio Giovara
ce7ca726b2 vf_tonemap: Fix logic for detecting the maximum peak of untagged sources
When there is no metadata attached to a frame, take into account both
the PQ and HLG transfers, and change the HLG default value to 10:
the value of 12 is the maximum range in scene referred light, but
the reference OOTF maps this from 0 to 1000 cd/m² on the ideal HLG
monitor.

This matches what vf_tonemap_opencl does.
2018-08-06 18:34:49 +02:00
Jan Ekström
eb94ec3257 lavfi/nlmeans: fix aarch64 assembly with clang
Clang is more strict about some things.
2018-07-28 17:41:19 +03:00
Mina
0bb5cd8c4d avfilter: Add colorconstancy filter
Signed-off-by: Mina <minasamy_@hotmail.com>
2018-07-23 22:34:52 +02:00
Carl Eugen Hoyos
9cb3d8fcb7 lavfi/af_afir,af_aiir: Remove a variable that is always -1.
Fixes two warnings:
libavfilter/af_afir.c:194:45: warning: assuming signed overflow does not occur when assuming that (X - c) > X is always false [-Wstrict-overflow]
     int dx = FFABS(x1-x0), sx = x0 < x1 ? 1 : -1;
                                 ~~~~~~~~~~~~^~~~
libavfilter/af_aiir.c:689:45: warning: assuming signed overflow does not occur when assuming that (X - c) > X is always false [-Wstrict-overflow]
     int dx = FFABS(x1-x0), sx = x0 < x1 ? 1 : -1;
                                 ~~~~~~~~~~~~^~~~
2018-07-19 23:13:24 +02:00
Paul B Mahol
5d8df3cc4a Update Changelog for lensfun addition and bump minor 2018-07-15 10:23:20 +02:00
Stephen Seo
0ea20124b7 Add lensfun filter
Lensfun is a library that applies lens correction to an image using a
database of cameras/lenses (you provide the camera and lens models, and
it uses the corresponding database entry's parameters to apply lens
correction). It is licensed under LGPL3.

The lensfun filter utilizes the lensfun library to apply lens
correction to videos as well as images.

This filter was created out of necessity since I wanted to apply lens
correction to a video and the lenscorrection filter did not work for me.

While this filter requires little info from the user to apply lens
correction, the flaw is that lensfun is intended to be used on indvidual
images. When used on a video, the parameters such as focal length is
constant, so lens correction may fail on videos where the camera's focal
length changes (zooming in or out via zoom lens). To use this filter
correctly on videos where such parameters change, timeline editing may
be used since this filter supports it.

Note that valgrind shows a small memory leak which is not from this
filter but from the lensfun library (memory is allocated when loading
the lensfun database but it somehow isn't deallocated even during
cleanup; it is briefly created in the init function of the filter, and
destroyed before the init function returns). This may have been fixed by
the latest commit in the lensfun repository; the current latest release
of lensfun is almost 3 years ago.

Bi-Linear interpolation is used by default as lanczos interpolation
shows more artifacts in the corrected image in my tests.

The lanczos interpolation is derived from lenstool's implementation of
lanczos interpolation. Lenstool is an app within the lensfun repository
which is licensed under GPL3.

v2 of this patch fixes license notice in libavfilter/vf_lensfun.c

v3 of this patch fixes code style and dependency to gplv3 (thanks to
Paul B Mahol for pointing out the mentioned issues).

v4 of this patch fixes more code style issues that were missed in
v3.

v5 of this patch adds line breaks to some of the documentation in
doc/filters.texi (thanks to Gyan Doshi for pointing out the issue).

v6 of this patch fixes more problems (thanks to Moritz Barsnick for
pointing them out).

v7 of this patch fixes use of sqrt() (changed to sqrtf(); thanks to
Moritz Barsnick for pointing this out). Also should be rebased off of
latest master branch commits at this point.

Signed-off-by: Stephen Seo <seo.disparate@gmail.com>
2018-07-15 10:07:54 +02:00
Gyan Doshi
1a31c2b5df avfilter/drawtext: fix box sizing
At present, box size is clipped to frame size before being drawn,
which can lead to the box not fully covering animated text which is
longer than one or both frame dimensions.

Since ff_blend_rectangle correctly takes care of clipping, it is skipped
here which results in correct box sizing
2018-07-13 10:11:15 +05:30
Danil Iashchenko
7cd58a8a8c lavfi/convolution_opencl: use CL_FAIL_ON_ERROR for error handling
Switch to use CL_FAIL_ON_ERROR for error handling
2018-07-12 23:28:46 +01:00
Danil Iashchenko
2bdb6b6496 lavfi/avgblur_opencl: fix using uninitialized value
Fixed using uninitialized value "global_work[0]" when calling "av_log".

Fixes CID #1437471.
2018-07-11 23:17:04 +01:00
Ruiling Song
923ee63d6c lavfi/vf_avgblur_opencl: remove useless clFinish().
The very last clFinish() should be ok.

Signed-off-by: Ruiling Song <ruiling.song@intel.com>
Reviewed-by: Danil Iashchenko <danyaschenko@gmail.com>
2018-07-11 23:05:02 +01:00
Ruiling Song
48a1abed13 lavfi/opencl: add macro for opencl error handling.
Signed-off-by: Ruiling Song <ruiling.song@intel.com>
2018-07-11 23:03:46 +01:00
Jun Zhao
eb776a16ea lavfi/minterpolate: fix blending calc issue.
the right blending calc is:
(alpha * Frame_2 + (MAX - alpha) * Frame_1 + 512) >> 10

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-07-08 23:05:34 +08:00
Gyan Doshi
c71e1e6030 avfilter/setpts: add FR shorthand for FRAME_RATE 2018-07-07 21:08:08 +05:30
Shlomi Fish
1ecdcb61b0 lavfi/weave: Refactor two near-identical clauses.
The changes contained in this patch are hereby placed under the Expat licence.

Reviewed-by: Paul B Mahol
2018-07-04 18:48:10 +02:00
Danil Iashchenko
581bafa83b lavfi: add sobel, prewitt, roberts filters
Add opencl version of sobel, prewitt, roberts filters.
2018-07-03 00:11:28 +01:00
Pedro Arthur
54b425a7fa libavfilter: vf_sr.c remove warnings 2018-07-02 13:45:38 -03:00
Sergey Lavrushkin
575b718990 Adds ESPCN super resolution filter merged with SRCNN filter.
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2018-07-02 10:47:14 -03:00
Mark Thompson
46fb150a81 lavfi/colorspace: Add namespace prefix to global functions 2018-06-28 16:14:35 +01:00
Mark Thompson
bd02b2c05d lavfi/vf_tonemap_opencl: Mark local tables static 2018-06-25 21:00:54 +01:00
Mark Thompson
d4d29052c3 lavfi/framesync: Add namespace prefix to framesync_get_class 2018-06-24 19:39:01 +01:00
Ruiling Song
649d7ca477 lavfi: make vf_colorspace use functions from colorspace.c
These functions are shared among colorspace related filters.

Signed-off-by: Ruiling Song <ruiling.song@intel.com>
2018-06-21 01:19:25 +01:00
Ruiling Song
8b8b0e2cd2 lavfi: add opencl tonemap filter
This filter does HDR(HDR10/HLG) to SDR conversion with tone-mapping.

An example command to use this filter with vaapi codecs:
FFMPEG -init_hw_device vaapi=va:/dev/dri/renderD128 -init_hw_device \
opencl=ocl@va -hwaccel vaapi -hwaccel_device va -hwaccel_output_format \
vaapi -i INPUT -filter_hw_device ocl -filter_complex \
'[0:v]hwmap,tonemap_opencl=t=bt2020:tonemap=linear:format=p010[x1]; \
[x1]hwmap=derive_device=vaapi:reverse=1' -c:v hevc_vaapi -profile 2 OUTPUT

Signed-off-by: Ruiling Song <ruiling.song@intel.com>
2018-06-21 01:19:18 +01:00
Danil Iashchenko
714da1fd89 lavfi: Add boxblur_opencl filter
Behaves like existing boxblur filter.
2018-06-21 00:31:42 +01:00
Danil Iashchenko
b41b6b3234 libavfilter/opencl: Add macro for setting opencl kernel arguments 2018-06-17 17:58:17 +01:00
Jun Zhao
483532bc72 lavfi/graphdump: Replace the number by macro for bprint init
Replace the number by macro for bprint init.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-06-17 09:59:33 +08:00
Jun Zhao
9809ac98bd lavfi/af_amerge: Replace the number by macro for bprint init
Replace the number by macro for bprint init.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-06-17 09:59:33 +08:00
Pavel Koshevoy
29cddc99cd lavfi/atempo: raise max tempo limit (v2) 2018-06-14 19:19:17 -06:00
Sergey Lavrushkin
648361c2fa libavfilter/dnn_interface.c: fix av_freep dnn_module.
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2018-06-08 10:26:08 -03:00
Sergey Lavrushkin
d29c35b4d8 libavfilter/vf_srcnn.c: adds DNN module backend AVOption, changes AV_LOG_INFO message to AV_LOG_VERBOSE.
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2018-06-08 10:26:08 -03:00
Jun Zhao
3161df5b0c lavfi/opencl: remove redundant header.
remove redundant header

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-06-07 19:38:58 +08:00
Sergey Lavrushkin
d8c0bbb0aa Adds TensorFlow backend for dnn inference module.
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2018-06-05 10:16:50 -03:00
Vishwanath Dixit
37abfe8c2d avfilter/drawtext: present 'hms' formatted 'pts' in 24h format
HMS is formatted as HH:MM:SS.mmm, but, HH part is not limited to
24 hours. For example, the the drawn text may look like this:
243029:20:30.342. To present the timestamp in more readable and
user friendly format, this patch provides an additional option
to limit the hour part in the range 0-23.

Note: Actually the above required format can be obtained with
format options 'localtime' and 'gmtime', but,  milliseconds part
is not supported in those formats.
2018-06-04 10:57:45 +05:30
Paul B Mahol
29e0879b29 avfilter/f_drawgraph: fix drawing of first point for non-first metadata key
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-06-03 18:50:04 +02:00
Paul B Mahol
9832885386 avfilter/vf_zoompan: do not increase VAR_IN twice, also count from 0
Fixes #7242.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-06-03 14:57:25 +02:00
Paul B Mahol
49eda27c6e avfilter/avf_showspectrum: also show sample rate and channel layout
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-06-03 12:43:43 +02:00
Paul B Mahol
9add1786ad avfilter/avf_showspectrum: avoid overwritting text
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-06-03 12:26:43 +02:00
Paul B Mahol
d0bf1aa3c5 avfilter/avf_showspectrum: improve axes drawing
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-06-03 12:06:35 +02:00
Paul B Mahol
af31084399 avfilter/vf_lut3d: unbreak haldclut with planar rgb formats
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-06-02 19:16:22 +02:00
Jan Ekström
76daf4529b lavfi/Makefile: move dnn_*.o under vf_srcnn
These files depend on libavformat, and the vf_srcnn filter
currently is the only thing utilizing these dnn_* files and
already happens to have a dependency on libavformat.

This fixes compilation in cases where libavformat is not a
dependency for libavfilter.

Reported by Kam_ on IRC.
2018-06-02 19:00:57 +03:00
Paul B Mahol
e28b1fa6e9 avfilter: add adeclick and adeclip audio filters
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-06-02 13:09:06 +02:00
John Cox
8d4fc2ea06 avfilter: use av_clip_uintp2_c where clip is variable
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-31 16:22:59 +02:00