summaryrefslogtreecommitdiff
path: root/libavfilter/vf_fps.c
Commit message (Collapse)AuthorAge
* lavfi/vf_fps: check flow before sending more framesNicolas George2022-02-20
| | | | | | Analyzed by Paul B Mahol <onemda@gmail.com>. Fixes OOM in #9081.
* avfilter: add AVFILTER_FLAG_METADATA_ONLYAnton Khirnov2021-12-04
| | | | | | This flag allows distinguishing between filters that actually modify the data and those that only modify metadata or gather some stream information.
* avfilter/avfilter: Add numbers of (in|out)pads directly to AVFilterAndreas Rheinhardt2021-08-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Up until now, an AVFilter's lists of input and output AVFilterPads were terminated by a sentinel and the only way to get the length of these lists was by using avfilter_pad_count(). This has two drawbacks: first, sizeof(AVFilterPad) is not negligible (i.e. 64B on 64bit systems); second, getting the size involves a function call instead of just reading the data. This commit therefore changes this. The sentinels are removed and new private fields nb_inputs and nb_outputs are added to AVFilter that contain the number of elements of the respective AVFilterPad array. Given that AVFilter.(in|out)puts are the only arrays of zero-terminated AVFilterPads an API user has access to (AVFilterContext.(in|out)put_pads are not zero-terminated and they already have a size field) the argument to avfilter_pad_count() is always one of these lists, so it just has to find the filter the list belongs to and read said number. This is slower than before, but a replacement function that just reads the internal numbers that users are expected to switch to will be added soon; and furthermore, avfilter_pad_count() is probably never called in hot loops anyway. This saves about 49KiB from the binary; notice that these sentinels are not in .bss despite being zeroed: they are in .data.rel.ro due to the non-sentinels. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/fps: remove unconventional acronymsGyan Doshi2021-07-06
| | | | | | | | | In dd770883e9, support for expressions was added. Among the constants added were labels of qnstc, qpal, sntsc & spal. These were added in ba2a8cb40b to represent parameter permutations where only the resolution is different. They don't have any usage currency and don't represent any industry standards or convention in terms of framerate.
* avfilter/vf_fps: extend support for expressionsJames Almer2021-06-13
| | | | | | | | | | | | | AV_OPT_TYPE_VIDEO_RATE AVOption types are parsed as expressions, but in a limited way. For example, name constants can only be parsed alone and not as part of a longer expression. This change allows usage like ffmpeg -i IN -vf fps="if(eq(source_fps\,film)\,ntsc_film\,source_fps)" OUT Suggested-by: ffmpeg@fb.com Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter: Constify all AVFiltersAndreas Rheinhardt2021-04-27
| | | | | | | This is possible now that the next-API is gone. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter/vf_fps: Avoid inlink fifo build up.Nikolas Bowe2019-09-10
| | | | | | | When duplicating frames we need to schedule for activation again, otherwise frames can build up in the inlink fifo. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavfi/fps: Avoid duplicating Closed Captions when increasing frame rate.Carl Eugen Hoyos2018-11-27
|
* libavfilter/vf_fps: Minor cleanupsCalvin Walton2018-03-08
| | | | | | | | | | 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.
* libavfilter/vf_fps: Rewrite using activate callbackCalvin Walton2018-03-08
| | | | | | | | | | | | 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.
* avfilter/vf_fps: add eof_action filter optionTobias Rapp2017-10-06
| | | | | | | | | | | | | | | Allows to specify the action to be performed when reading the last frame from the internal FIFO buffer. By default the last frame is written to filter output depending on the timestamp rounding method. When using "pass" action the last frame is passed through if input duration has not been reached yet. Examples using an input file with 25Hz, 1.4sec duration: - "fps=fps=1:round=near" generates an output file of 1sec - "fps=fps=1:round=near:eof_action=pass" generates an output file of 2sec Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
* avfilter/vf_fps: clean-up filter optionsTobias Rapp2017-10-05
| | | | | | | Add missing AV_OPT_FLAG_FILTERING_PARAM flag to "start_time" option. Fix indent of "round" named constants and clear unused field values. Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
* vf_fps: Fix memory leak introduced by eea64ef4Thierry Foucu2017-09-15
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* vf_fps: when reading EOF, using current_pts to duplicate the last frame if ↵Thierry Foucu2017-09-15
| | | | | | | | | needed. Fix ticket #2674 Tested with examples from ticket 2674. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/vf_fps: set fps value boundariesPrzemysław Sobala2016-05-09
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavfi/vf_fps: remove looping on request_frame().Nicolas George2015-10-07
|
* avfilter/vf_fps: update frame drop commentMichael Niedermayer2015-02-05
| | | | | Found-by: ubitux Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avfilter/vf_fps: Do not drop a random subset of framesMichael Niedermayer2015-02-04
| | | | | | This also avoids droping the frame which is closest to the target timestamp Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavfi/vf_fps: use av_fifo_alloc_arrayLukasz Marek2014-05-20
| | | | Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
* lavfi: use av_fifo_freepLukasz Marek2014-05-07
| | | | Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
* avfilter/vf_fps: fix rounding error accumulationMichael Niedermayer2014-02-20
| | | | | | | Fixes Ticket3329 Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-11-24
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: Add missing #includes for *INT64_MAX and *INT64_C Conflicts: ffmpeg.c ffmpeg_filter.c ffplay.c libavformat/assdec.c libavformat/avidec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Add missing #includes for *INT64_MAX and *INT64_CDiego Biurrun2013-11-23
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-10-29
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: lavfi: do not export the filters from shared objects Conflicts: libavfilter/af_amix.c libavfilter/af_anull.c libavfilter/asrc_anullsrc.c libavfilter/f_select.c libavfilter/f_settb.c libavfilter/split.c libavfilter/src_movie.c libavfilter/vf_aspect.c libavfilter/vf_blackframe.c libavfilter/vf_colorbalance.c libavfilter/vf_copy.c libavfilter/vf_crop.c libavfilter/vf_cropdetect.c libavfilter/vf_drawbox.c libavfilter/vf_format.c libavfilter/vf_framestep.c libavfilter/vf_frei0r.c libavfilter/vf_hflip.c libavfilter/vf_libopencv.c libavfilter/vf_lut.c libavfilter/vf_null.c libavfilter/vf_overlay.c libavfilter/vf_scale.c libavfilter/vf_transpose.c libavfilter/vf_unsharp.c libavfilter/vf_vflip.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavfi: do not export the filters from shared objectsAnton Khirnov2013-10-28
| |
* | avfilter: various cosmeticsPaul B Mahol2013-09-12
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | avfilter/vf_fps: make sure the fifo is not empty before using itMichael Niedermayer2013-09-02
| | | | | | | | | | | | Fixes Ticket2905 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avfilter/vf_fps: fix ABI compatibility with AV_NOPTS starttimeMichael Niedermayer2013-08-29
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'cb8f70c96e14c1b4824ef23d21d78d10fc5a4b93'Michael Niedermayer2013-08-29
|\| | | | | | | | | | | | | | | | | | | * commit 'cb8f70c96e14c1b4824ef23d21d78d10fc5a4b93': vf_fps: use double constants for default/min/max for start_time Conflicts: libavfilter/vf_fps.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * vf_fps: use double constants for default/min/max for start_timeHendrik Leppkes2013-08-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using AV_NOPTS_VALUE (which expands to INT64_C(0x8000000000000000)) as union initializer for a double field, the c99 converter needs to interpret this constant when filling the union initializer, and it is interpreted as a positive value. When converting AV_NOPTS_VALUE to a double, MSVC 2010 ends up with the same positive value as the c99 converter, while MSVC 2012 gets a negative value. This results in an infite loop in various FATE tests on MSVC 2012. Signed-off-by: Martin Storsjö <martin@martin.st>
* | avfilter/vf_fps: Work around msvc (c99wrap) build failurePavel Koshevoy2013-08-26
| | | | | | | | | | | | | | c99wrap choked on initialization of .dbl start_time option with AV_NOPTS_VALUE: Unable to parse int64_t as expression primary Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '545a0b807cf45b2bbc4c9087a297b741ce00f508'Michael Niedermayer2013-08-21
|\| | | | | | | | | | | | | | | | | | | | | * commit '545a0b807cf45b2bbc4c9087a297b741ce00f508': vf_fps: add 'start_time' option Conflicts: doc/filters.texi libavfilter/vf_fps.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * vf_fps: add 'start_time' optionJustin Ruggles2013-08-20
| | | | | | | | This allows for dropping or duplication to match a particular start time.
* | Merge commit '4c205f42c86ccefa093c59434669af34ad14a52b'Michael Niedermayer2013-05-17
|\| | | | | | | | | | | | | | | | | | | | | | | | | * commit '4c205f42c86ccefa093c59434669af34ad14a52b': vf_drawbox: make config_props work properly when called multiple times. vf_drawtext: do not reset the frame number in config_input. vf_fps: move initializing pts from config_props to init. Conflicts: libavfilter/vf_drawbox.c libavfilter/vf_drawtext.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * vf_fps: move initializing pts from config_props to init.Anton Khirnov2013-05-17
| | | | | | | | It should not be reinitialized if the link properties change.
| * lavfi: remove now unused args parameter from AVFilter.initAnton Khirnov2013-04-09
| |
* | lavfi: add missing periods in filter descriptions.Clément Bœsch2013-04-14
| |
* | lavfi: remove now unused args parameter from AVFilter.initAnton Khirnov2013-04-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: libavfilter/avfilter.c libavfilter/vf_drawtext.c libavfilter/vf_lut.c libavfilter/vf_select.c libavfilter/vf_setpts.c libavfilter/vsrc_color.c libavfilter/vsrc_movie.c Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'f13ab29925883b4245da4129694af3af378d67be'Michael Niedermayer2013-04-10
|\| | | | | | | | | | | | | | | | | | | * commit 'f13ab29925883b4245da4129694af3af378d67be': vf_fps: switch to an AVOptions-based system. Conflicts: libavfilter/vf_fps.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * vf_fps: switch to an AVOptions-based system.Anton Khirnov2013-04-09
| |
* | lavfi/fps: make use of AV_OPT_TYPE_VIDEO_RATEPaul B Mahol2013-03-26
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | lavfi/vf_fps: use standard options parsing.Nicolas George2013-03-20
| |
* | lavfi: remove remaining forgotten min/rej perms.Clément Bœsch2013-03-10
| |
* | Merge commit '7e350379f87e7f74420b4813170fe808e2313911'Michael Niedermayer2013-03-10
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '7e350379f87e7f74420b4813170fe808e2313911': lavfi: switch to AVFrame. Conflicts: doc/filters.texi libavfilter/af_ashowinfo.c libavfilter/audio.c libavfilter/avfilter.c libavfilter/avfilter.h libavfilter/buffersink.c libavfilter/buffersrc.c libavfilter/buffersrc.h libavfilter/f_select.c libavfilter/f_setpts.c libavfilter/fifo.c libavfilter/split.c libavfilter/src_movie.c libavfilter/version.h libavfilter/vf_aspect.c libavfilter/vf_bbox.c libavfilter/vf_blackframe.c libavfilter/vf_delogo.c libavfilter/vf_drawbox.c libavfilter/vf_drawtext.c libavfilter/vf_fade.c libavfilter/vf_fieldorder.c libavfilter/vf_fps.c libavfilter/vf_frei0r.c libavfilter/vf_gradfun.c libavfilter/vf_hqdn3d.c libavfilter/vf_lut.c libavfilter/vf_overlay.c libavfilter/vf_pad.c libavfilter/vf_scale.c libavfilter/vf_showinfo.c libavfilter/vf_transpose.c libavfilter/vf_vflip.c libavfilter/vf_yadif.c libavfilter/video.c libavfilter/vsrc_testsrc.c libavfilter/yadif.h Following are notes about the merge authorship and various technical details. Michael Niedermayer: * Main merge operation, notably avfilter.c and video.c * Switch to AVFrame: - afade - anullsrc - apad - aresample - blackframe - deshake - idet - il - mandelbrot - mptestsrc - noise - setfield - smartblur - tinterlace * various merge changes and fixes in: - ashowinfo - blackdetect - field - fps - select - testsrc - yadif Nicolas George: * Switch to AVFrame: - make rawdec work with refcounted frames. Adapted from commit 759001c534287a96dc96d1e274665feb7059145d by Anton Khirnov. Also, fix the use of || instead of | in a flags check. - make buffer sink and src, audio and video work all together Clément Bœsch: * Switch to AVFrame: - aevalsrc - alphaextract - blend - cellauto - colormatrix - concat - earwax - ebur128 - edgedetect - geq - histeq - histogram - hue - kerndeint - life - movie - mp (with the help of Michael) - overlay - pad - pan - pp - pp - removelogo - sendcmd - showspectrum - showwaves - silencedetect - stereo3d - subtitles - super2xsai - swapuv - thumbnail - tile Hendrik Leppkes: * Switch to AVFrame: - aconvert - amerge - asetnsamples - atempo - biquads Matthieu Bouron: * Switch to AVFrame - alphamerge - decimate - volumedetect Stefano Sabatini: * Switch to AVFrame: - astreamsync - flite - framestep Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Nicolas George <nicolas.george@normalesup.org> Signed-off-by: Clément Bœsch <ubitux@gmail.com> Signed-off-by: Hendrik Leppkes <h.leppkes@gmail.com> Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com> Signed-off-by: Stefano Sabatini <stefasab@gmail.com> Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavfi: switch to AVFrame.Anton Khirnov2013-03-08
| | | | | | | | | | Deprecate AVFilterBuffer/AVFilterBufferRef and everything related to it and use AVFrame instead.
* | Merge commit 'dae1d507af94261bafd3b11549884e5d1eca590e'Michael Niedermayer2013-01-16
|\| | | | | | | | | | | | | | | | | * commit 'dae1d507af94261bafd3b11549884e5d1eca590e': x86: Add PAVGB macro to abstract pavgb/pavgusb instruction via cpuflags vf_fps: add final flushed frames to the dropped frame count rv34_parser: Adjust #if for disabling individual parsers Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * vf_fps: add final flushed frames to the dropped frame countJustin Ruggles2013-01-15
| |
| * lavfi: merge start_frame/draw_slice/end_frameAnton Khirnov2012-11-28
| | | | | | | | | | Any alleged performance benefits gained from the split are purely mythological and do not justify added code complexity.
* | lavfi/fps: remove parse opt error message.Clément Bœsch2012-12-11
| | | | | | | | See cc650cf0 for more info.
* | lavfi/fps: add shorthand.Clément Bœsch2012-12-11
| |