Commit Graph

7018 Commits

Author SHA1 Message Date
Paul B Mahol c8c2fb0977 avfilter/vf_convolution: unbreak roberts filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-03 11:29:51 +02:00
Paul B Mahol 3a96534ed9 avfilter/vf_convolution: add horizontal/row mode
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-03 10:55:10 +02:00
Paul B Mahol 0f0d468fbc avfilter/vf_overlay: exclude nv12/nv21 formats from x86 asm check
They are yet to be supported,

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-03 09:22:28 +02:00
Paul B Mahol ab1114a0f5 avfilter/vf_convolution: rewrite so it doesn't use temp buffers
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-03 00:09:01 +02:00
Paul B Mahol 6d7c63588c avfilter/vf_overlay: add x86 SIMD
Specifically for yuv444, yuv422, yuv420 format when main stream has no alpha, and alpha
is straight.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-02 23:58:21 +02:00
Paul B Mahol d176497cec avfilter/af_biquads: add slice threading
Helps with multi-channels audio. Otherwise use threads=1.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-01 16:00:19 +02:00
Paul B Mahol 2308a3c7e3 avfilter/af_biquads: change clipping detection from global to channel
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-01 15:26:20 +02:00
Paul B Mahol 5bfc433a6e avfilter/vf_neighbor: add slice threading
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-01 15:05:43 +02:00
Paul B Mahol ddf844d17c avfilter/vf_neighbor: simplify code little
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-01 14:50:48 +02:00
Paul B Mahol 273edb2fe4 avfilter/vf_neighbor: rewrite without using temp memory
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-01 13:12:50 +02:00
Marton Balint 7033654f7f Use AV_PIX_FMT_FLAG_ALPHA for detecting transparency where nb_components was used
Temporarily keep the old method for ffmpeg_filters.c choose_pix_fmt and
avfiltergraph.c pick_format() until a paletted pixel format without alpha is
introduced.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-04-30 21:51:31 +02:00
Paul B Mahol da55304caf avfilter/vf_mix: initialize last to silence possible warning
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-30 20:45:05 +02:00
Paul B Mahol c0f2abcc8d avfilter/vf_mix: make setting weights more user friendly
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-29 19:27:15 +02:00
Paul B Mahol ad16423704 avfilter/vf_fieldmatch: add support for >8 bit depth in ppsrc
Also fix leaks while here.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-29 15:01:32 +02:00
Paul B Mahol a5b2d85f18 avfilter/vf_fieldmatch: switch to activate
Unbreaks ppsrc filtering.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-29 15:01:32 +02:00
Paul B Mahol 889d858491 avfilter: add amplify filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-29 13:24:50 +02:00
Paul B Mahol 70d25b89db avfilter/vf_overlay: use slice_end in alpha_composite()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-29 10:02:57 +02:00
Paul B Mahol 29fd44adf1 avfilter/vf_fieldmatch: use correct subsamplings for y0a, y1a and startx
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-28 22:49:09 +02:00
Paul B Mahol d54014d157 avfilter/vf_overlay: add slice threading
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-28 18:54:12 +02:00
Paul B Mahol 4f484edaa7 avfilter/vf_convolution: make rdiv set to 0 more useful
Use 0 for signaling that rdiv will be calculated from sum
of all matrix elements.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-28 11:25:43 +02:00
Paul B Mahol b473e76876 avfilter/vf_mix: use correct linesizes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-27 19:15:55 +02:00
Paul B Mahol 309fce63d8 avfilter/vf_shuffleplanes: add support for timeline
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-27 17:18:22 +02:00
Paul B Mahol 2d7ba3a96f avfilter/vf_premultiply: add slice threading
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-27 12:25:32 +02:00
Paul B Mahol e0e75f93b9 avfilter/vf_maskedclamp: silence warning
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-27 11:36:34 +02:00
Paul B Mahol 9faec78b14 avfilter/vf_mix: add slice threading
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-27 11:32:50 +02:00
Paul B Mahol 6a955750d6 avfilter/vf_maskedclamp: add slice threading
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-27 00:08:04 +02:00
Paul B Mahol 356a33b20a avfilter/vf_atadenoise: do not abort if user specified invalid size
Update documentation with new size default.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-26 22:25:10 +02:00
Paul B Mahol 330215830e avfilter/vf_mix: clip output pixel values
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-26 16:44:15 +02:00
Paul B Mahol a5172dcab6 avfilter/vf_mix: add scale option
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-26 16:44:15 +02:00
Paul B Mahol 161e006cc0 avfilter: add tmix filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-26 16:44:15 +02:00
Paul B Mahol a12899ad9b avfiler/vf_mix: fix crash with >8 bit depth
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-25 14:08:21 +02:00
Vasile Toncu 9c01cdb94e avfilter/vf_interlace: remove duplicate code with same funcionality 2018-04-23 23:48:30 +02:00
Ruiling Song d865783b6c lavf/qsv: clone the frame which may be managed by framework
For filters based on framesync, the input frame was managed
by framesync, so we should not directly keep and destroy it,
instead we make a clone of it here, or else double-free will occur.
But for other filters not based on framesync, we still need to
free the input frame inside filter_frame.

Signed-off-by: Ruiling Song <ruiling.song@intel.com>
2018-04-21 19:00:43 +01:00
Ruiling Song f3341a0452 lavf: make overlay_qsv work based on framesync
The existing version which was cherry-picked from Libav does not work
with FFmpeg framework, because ff_request_frame() was totally
different between Libav (recursive) and FFmpeg (non-recursive).
The existing overlay_qsv implementation depends on the recursive version
of ff_request_frame to trigger immediate call to request_frame() on input pad.
But this has been removed in FFmpeg since "lavfi: make request_frame() non-recursive."
Now that we have handy framesync support in FFmpeg, so I make it work
based on framesync. Some other fixing which is also needed to make
overlay_qsv work are put in a separate patch.

Signed-off-by: Ruiling Song <ruiling.song@intel.com>
2018-04-21 19:00:43 +01:00
Paul B Mahol 21da248b5f avfilter: add deblock filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-21 11:34:49 +02:00
Paul B Mahol 396c019795 avfilter/avf_avectorscope: disable mirroring
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-18 18:14:35 +02:00
Paul B Mahol 2fc12f4971 avfilter: add lowshelf and highshelf filters
These are old bass and treble filters.
Make bass and treble filters better at boosting.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-17 12:40:27 +02:00
Paul B Mahol 6e05a11e89 avfilter/af_afir: make max IR length configurable
Also increase max allowed dry/wet value.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-16 19:11:35 +02:00
Paul B Mahol 9cf0079638 avfilter/af_headphone: switch to activate
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-16 18:29:34 +02:00
Michael Niedermayer 3c1ecb057d Bump minor versions after release/4.0 branching
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-16 12:35:12 +02:00
Michael Niedermayer 7e3a070d9a Bump minor versions for branching release/4.0
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-16 12:35:12 +02:00
Martin Vignali 56315df32c avfilter/showvolume : cosmetic move bracket after func declaration to a new line 2018-04-16 11:35:07 +02:00
Martin Vignali fd10a6e2f2 avfilter/showvolume : add persistent max display
draw a color line for the max level in the given duration
2018-04-16 11:35:03 +02:00
Martin Vignali cb2f52b6a7 avfilter/showvolume : add display scale option
linear (current behaviour) or log display (more close to classic audio meter)
2018-04-16 11:34:59 +02:00
Paul B Mahol e1c8bd2389 avfilter/af_headphone: fix type=time with hrir=multich
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-16 09:31:11 +02:00
Paul B Mahol 3e003a985f avfilter/af_headphone: add single hrir multichannel stream mode
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-15 16:08:28 +02:00
Paul B Mahol a56580b117 avfilter/af_headphone: fix memory leak and overread
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-14 19:42:16 +02:00
Paul B Mahol 8daca7697b avfilter/af_headphone: do not output invalid samples when flushing
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-14 18:38:54 +02:00
Paul B Mahol 01170e9db0 avfilter/af_headphone: fix flushing
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-14 17:51:26 +02:00
Paul B Mahol 2b0f821f51 avfilter/af_headphone: improve performance and reduce latency
Remove not needed code.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-14 17:28:26 +02:00
James Almer f790410b6b Merge commit 'cca5e4f040971db6de0bfe6968f00c021d8a9c42'
* commit 'cca5e4f040971db6de0bfe6968f00c021d8a9c42':
  qsv: adding Multi Frame Encode support

Merged-by: James Almer <jamrial@gmail.com>
2018-04-13 20:34:23 -03:00
James Almer ae7e66fb4b Merge commit '29a8ed766354c45c9be4b8512c5b2eb25a450cdc'
* commit '29a8ed766354c45c9be4b8512c5b2eb25a450cdc':
  lavf/qsvvpp: bypass vpp if not needed.

Merged-by: James Almer <jamrial@gmail.com>
2018-04-13 19:58:47 -03:00
Paul B Mahol 9e40632668 avfilter: add vfrdet filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-13 08:41:51 +02:00
Maxym Dmytrychenko cca5e4f040 qsv: adding Multi Frame Encode support
Starting from API 1.25 helps to improve performance of the simultaneous
encode, 1:N scenario, like:

./avconv  -y -hwaccel qsv -c:v h264_qsv -r 30000/1001 -i
~/bbb_sunflower_1080p_60fps_normal.mp4  -vframes 600 -an \
    -filter_complex "split=2[s1][s2]; [s1]scale_qsv=1280:720[o1];
[s2]scale_qsv=960:540[o2]" \
    -map [o1] -c:v h264_qsv -b:v 3200k -minrate 3200k -maxrate 3200k -f
rawvideo /tmp/3200a.264 \
    -map [o2] -c:v h264_qsv -b:v 1750k -minrate 1750k -maxrate 1750k -f
rawvideo /tmp/1750a.264

Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
2018-04-08 20:47:59 +02:00
Zhong Li 29a8ed7663 lavf/qsvvpp: bypass vpp if not needed.
Currently vpp pipeline is always created, even for the unnecessary
cases such as setting the option "vpp_qsv=w=1280:h=720" for an input
with native resolution 1280x720. Thus introduces unnecessary performance
dropping, so bypass vpp if not needed.

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
2018-04-08 20:47:59 +02:00
Josh de Kock 92fe0bf1e8 lavfi,lavd: add gitignore for generated static component lists
Signed-off-by: Josh de Kock <josh@itanimul.li>
2018-04-05 22:08:53 +01:00
Martin Vignali f3df42e81d avfilter/x86/vf_blend : add SIMD for 16 bit version of
grainextract
grainmerge
average
extremity
negation
2018-04-05 21:46:16 +02:00
Martin Vignali 8eb0bb1108 avfilter/x86/vf_blend : reorganize DIFFERENCE macro to reduce line duplication between 8bit and 16 bit version 2018-04-05 21:46:11 +02:00
wm4 d6fc031caf avutil/pixdesc: deprecate AV_PIX_FMT_FLAG_PSEUDOPAL
PSEUDOPAL pixel formats are not paletted, but carried a palette with the
intention of allowing code to treat unpaletted formats as paletted. The
palette simply mapped the byte values to the resulting RGB values,
making it some sort of LUT for RGB conversion.

It was used for 1 byte formats only: RGB4_BYTE, BGR4_BYTE, RGB8, BGR8,
GRAY8. The first 4 are awfully obscure, used only by some ancient bitmap
formats. The last one, GRAY8, is more common, but its treatment is
grossly incorrect. It considers full range GRAY8 only, so GRAY8 coming
from typical Y video planes was not mapped to the correct RGB values.
This cannot be fixed, because AVFrame.color_range can be freely changed
at runtime, and there is nothing to ensure the pseudo palette is
updated.

Also, nothing actually used the PSEUDOPAL palette data, except xwdenc
(trivially changed in the previous commit). All other code had to treat
it as a special case, just to ignore or to propagate palette data.

In conclusion, this was just a very strange old mechnaism that has no
real justification to exist anymore (although it may have been nice and
useful in the past). Now it's an artifact that makes the API harder to
use: API users who allocate their own pixel data have to be aware that
they need to allocate the palette, or FFmpeg will crash on them in
_some_ situations. On top of this, there was no API to allocate the
pseuo palette outside of av_frame_get_buffer().

This patch not only deprecates AV_PIX_FMT_FLAG_PSEUDOPAL, but also makes
the pseudo palette optional. Nothing accesses it anymore, though if it's
set, it's propagated. It's still allocated and initialized for
compatibility with API users that rely on this feature. But new API
users do not need to allocate it. This was an explicit goal of this
patch.

Most changes replace AV_PIX_FMT_FLAG_PSEUDOPAL with FF_PSEUDOPAL. I
first tried #ifdefing all code, but it was a mess. The FF_PSEUDOPAL
macro reduces the mess, and still allows defining FF_API_PSEUDOPAL to 0.

Passes FATE with FF_API_PSEUDOPAL enabled and disabled. In addition,
FATE passes with FF_API_PSEUDOPAL set to 1, but with allocation
functions manually changed to not allocating a palette.
2018-04-03 17:53:00 +02:00
Josh de Kock 89029bd2c7 lav*,tests: remove several register_all calls
avdevice_register_all() is still required to register devices into
lavf (this is required due to lavd being somewhat of a hack).

Signed-off-by: Josh de Kock <josh@itanimul.li>
2018-04-02 03:26:22 +01:00
James Almer f1805d160d avfilter: bump version for the latest API change
And fix the entry in doc/APIchanges

Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-01 23:22:18 -03:00
Paul B Mahol 8dff6c2844 avfilter/af_amix: add weights option
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-01 20:36:35 +02:00
Martin Vignali 78b6887da3 avfilter/showvolume : indent after prev commit and add comment 2018-04-01 15:40:05 +02:00
Martin Vignali e4cfb2c669 avfilter/showvolume : move width test for draw volume to the start of the loop 2018-04-01 15:40:01 +02:00
Martin Vignali 4152413dde avfilter/showvolume : move clear picture part to a func
and use it if fade == 0.
2018-04-01 15:39:57 +02:00
enctac be502ec6cd vf_libvmaf: Fix memory leak
Fixes ticket #6967
2018-03-31 20:58:09 -07:00
Michael Niedermayer 35eeff30ca avfilter/vf_signature: use av_strlcpy()
Fixes: out of array access

Found-by: Kira <kira_cxy@foxmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-01 02:58:51 +02:00
Josh de Kock 8f1382f80e lavfi: add new iteration API
Signed-off-by: Josh de Kock <josh@itanimul.li>
2018-03-31 23:26:30 +01:00
Paul B Mahol 0c25caa470 avfilter/avf_showvolume: let fade be also exactly 0
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-03-31 09:27:57 +02:00
Martin Vignali 328df2f712 avfilter/showvolume : indent after prev commit 2018-03-31 09:11:43 +02:00
Martin Vignali 25b22666a3 avfilter/showvolume : calculate fade only if fade < 1. 2018-03-31 09:11:39 +02:00
Martin Vignali 34304677c0 avfilter/showvolume : add comment for orientation condition 2018-03-31 09:11:34 +02:00
Nicolas Gaullier 759381d96b lavfi/silencedetect: Fix missing log at eos
Fixes ticket #6968
2018-03-29 15:45:27 +02:00
Nicolas Gaullier 5170ab20e1 lavfi/silencedetect: Fix silence_end accuracy 2018-03-29 15:45:24 +02:00
Nicolas Gaullier 56b2731aae lavfi/silencedetect: Fix silence_start accuracy 2018-03-29 15:45:20 +02:00
Nicolas Gaullier 3deb17f9fb lavfi/silencedetect: Fix when silence_start=0
0 is a valid value for silence_start
2018-03-29 15:44:47 +02:00
Nicolas Gaullier 95e47654bc lavfi/silencedetect: Add mono mode
In mono mode, silence is detected in any single channel instead of all
of them simultaneously
2018-03-29 15:40:58 +02:00
Marton Balint 084ef7d7d5 avfilter/af_pan: reject expressions referencing the same channel multiple times
Fixes parsing of expressions like c0=c0+c0 or c0=c0|c0=c1.  Previously no
error was thrown and for input channels, only the last gain factor was used,
for output channels the source channel gains were combined.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-03-29 00:07:39 +02:00
drfer3 29c663d50c avfilter/vf_avgblur_opencl: fix error when clSetKernelArg fails
Fixes Coverity CID 1430382.
2018-03-26 22:28:24 +01:00
Mark Thompson 213839edff vf_avgblur_opencl: Don't run kernel on pixels outside the image
The output frame size is larger than the image containing a subsampled
plane - use the actual size of the image being written rather than the
dimensions of the intended output frame.

Reviewed-by: Dylan Fernando <dylanf123@gmail.com>
2018-03-26 22:28:24 +01:00
Danil Iashchenko 9f17875134 libavfilter: Add OpenCL convolution filter
Behaves like existing convolution filter.

Signed-off-by: Mark Thompson <sw@jkqxz.net>
2018-03-26 22:26:35 +01:00
Paul B Mahol 78f8036c9c avfilter/af_mcompand: make error message more helpful
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-03-25 23:26:26 +02:00
Paul B Mahol 3e3d567761 avfilter/avf_showvolume: implement basic rms metering mode
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-03-23 22:53:13 +01:00
Paul B Mahol a8c2d375ca avfilter/avf_showwaves: add draw mode which controls how single sample is drawn
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-03-23 19:02:51 +01:00
Paul B Mahol fe0fdc51b5 avfilter/vf_convolution: disable fast path if rdiv/bias are different from defaults
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-03-23 16:21:38 +01:00
Paul B Mahol 4e1307c0f7 avfilter/af_channelsplit: add channels option
So user can pick which channels to extract.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-03-23 10:11:19 +01:00
Mark Thompson abf35afb6f vf_scale_vaapi: Apply cropping rectangle to input 2018-03-22 23:19:04 +00:00
drfer3 6135c958cd lavfi: Add OpenCL avgblur filter
Behaves like the existing avgblur filter, except working on OpenCL
hardware frames. Takes exactly the same options.

Signed-off-by: Mark Thompson <sw@jkqxz.net>
2018-03-22 23:16:25 +00:00
Mark Thompson 0568af521e lavfi/opencl: Avoid deprecation warnings when built with post-1.2 headers
The intended target is OpenCL 1.2, so disable warnings for APIs deprecated
after that.  This primarily applies to clCreateCommandQueue(), we can't use
the replacement clCreateCommandQueueWithProperties() because it was
introduced in OpenCL 2.0.

Also remove some unnecessary includes from overlay and program filters so
that the define is available at the right moment.
2018-03-22 23:14:14 +00:00
Mark Thompson 2a1542d105 lavfi/opencl: Derive global work size from plane image sizes
Add a new function to find the global work size given the output image and
the required block alignment, then use it in the overlay, program and unsharp
filters.  Fixes the overlay and unsharp filters applying the kernel to
locations outside the frame when subsampled planes are present.
2018-03-22 23:12:47 +00:00
Paul B Mahol b78d55b2e6 avfilter/avf_showvolume: add background opacity option
This makes output more visible when overlayed.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-03-22 23:08:33 +01:00
Paul B Mahol 36cf3eb76a avfilter/vf_waveform: add orange graticule
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-03-21 12:21:42 +01:00
Paul B Mahol caef95737e avfilter/vf_waveform: add xflat mode
Also use macros for xflat and aflat mode.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-03-21 12:21:42 +01:00
Carl Eugen Hoyos cbbefc05b1 lavfi/deshake: Check alignment before calling asm init function.
Do this for every frame to make sure dynamic filters do not
cause crashes.

Fixes ticket #7078.
2018-03-20 01:09:23 +01:00
Martin Vignali 3e7fa34d3b avfilter/vf_premultiply : fix unpremultiply_offset for rgb input 2018-03-18 13:45:04 +01:00
Paul B Mahol 5941179e28 avfilter/af_surround: drain input at EOF
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-03-16 12:31:56 +01:00
Paul B Mahol 8fb0e51bd1 avfilter: add drmeter audio filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-03-11 13:43:33 +01:00
Carl Eugen Hoyos 9fe61b6107 lavfi/drawutils: Do not claim to support P016.
Fixes fate on big-endian.
2018-03-08 11:56:41 +01:00
Calvin Walton 2b2c8b22da libavfilter/vf_fps: Minor cleanups
Since the config_props function now references both the input and output
links, rename the 'link' variable to 'outlink'.

Fix up some mismatching indentation.

Don't bother setting the width and height on the outlink; the filter
framework does that for us.
2018-03-08 11:23:34 +01:00
Calvin Walton e4edc567a0 libavfilter/vf_fps: Rewrite using activate callback
The old version of the filter had a problem where it would queue up
all of the duplicate frames required to fill a timestamp gap in a
single call to filter_frame. In problematic files - I've hit this in
webcam streams with large gaps due to network issues - this will queue
up a potentially huge number of frames. (I've seen it trigger the Linux
OOM-killer on particularly large pts gaps.)

This revised version of the filter using the activate callback will
generate at most 1 frame each time it is called.
2018-03-08 11:23:34 +01:00