summaryrefslogtreecommitdiff
path: root/libavfilter/avfilter.c
Commit message (Collapse)AuthorAge
* avfilter/avfilter: Make ff_tlog_ref() staticAndreas Rheinhardt2021-10-03
| | | | | | | | | It allows compilers to inline the one and only call to this function in its caller or even to optimize it away completely (this function is empty in case TRACE is not defined). Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/avfilter: Remove unused bufferAndreas Rheinhardt2021-10-02
| | | | | | | | Unused since the removal of ff_get_ref_perms_string() in a05a44e205d6ae13d5eb1cd8d4ad2dba6ec940b3. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* Replace all occurences of av_mallocz_array() by av_calloc()Andreas Rheinhardt2021-09-20
| | | | | | | They do the same. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/avfilter: Actually error out on init errorAndreas Rheinhardt2021-09-17
| | | | | | | | Currently an error from init could be overwritten by successfully setting the enable expression. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/avfilter: Remove unused countAndreas Rheinhardt2021-09-13
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/avfilter: add a return at the end of a non-void functionJames Almer2021-08-24
| | | | | | Fixes compilation with GCC 11 when configured with "--disable-optimizations --toolchain=gcc-tsan" Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter/avfilter: Allow to free non-static pads genericallyAndreas Rheinhardt2021-08-22
| | | | | | | | | | This can be enabled/disabled on a per-pad basis by setting the AVFILTERPAD_FLAG_FREE_NAME flag; variants of ff_append_(in|out)pads that do this for you have been added and will be put to use in the following commits. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/internal: Uninline ff_insert_(in|out)pad()Andreas Rheinhardt2021-08-22
| | | | | | | These functions are not hot at all. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/avfilter: Deprecate avfilter_pad_count()Andreas Rheinhardt2021-08-20
| | | | | | | | It is unnecessary as the number of static inputs and outputs can now be directly read via AVFilter.nb_(in|out)puts. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/avfilter: Add avfilter_filter_pad_count()Andreas Rheinhardt2021-08-20
| | | | | | | | It is intended as replacement for avfilter_pad_count(). In contrast to the latter, it avoids a loop. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* 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/avfilter: Remove unused feature to add pads in the middleAndreas Rheinhardt2021-08-17
| | | | | Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/internal: Replace AVFilterPad.needs_writable by flagsAndreas Rheinhardt2021-08-17
| | | | | | | It will be useful in the future when more flags are added. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/avfilter: Remove redundant assignmentAndreas Rheinhardt2021-08-17
| | | | | | | av_frame_copy_props() already copies pts. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter: Remove init_opaque callbackAndreas Rheinhardt2021-08-16
| | | | | | | | | The last init_opaque callback has been removed in commit 07ffdedf784e86b88074d8d3e08e55752869562a; the opaque argument has been always NULL since 0acf7e268b2f873379cd854b4d5aaba6f9c1f0b5. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/avfilter: Use av_memdup where appropriateAndreas Rheinhardt2021-08-11
| | | | | Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/avfilter: Remove unused partial_bufAndreas Rheinhardt2021-08-05
| | | | | | | | It is unused since 02aa0701ae0dc2def8db640c9e3c06dc1b5de70c. The corresponding size field is write-only since then. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/avfilter: add sample_count_in and sample_count_outPaul B Mahol2021-08-05
|
* avfilter/internal: Don't include framepool.h, thread.hAndreas Rheinhardt2021-08-04
| | | | | | | | They are not used by the header at all and only used by very few files; so include the headers in their users instead of in internal.h. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/avfilter: use av_frame_copy() to copy frame dataJames Almer2021-08-03
| | | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: James Almer <jamrial@gmail.com>
* avutil: remove deprecated AVClass.child_class_nextJames Almer2021-04-27
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter/avfilter: Remove deprecated avfilter_link_set_closed()Andreas Rheinhardt2021-04-27
| | | | | | | Deprecated in 39a09e995d32d16e4f8c87a6ff5273cb9d98146e. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter: Remove deprecated avfilter_link_get_channelsAndreas Rheinhardt2021-04-27
| | | | | | | Deprecated in b2c42fc6dc3502a8b6cae441c54d898972a51cff. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter/avfilter: Remove compatibility code for old filter optionsAndreas Rheinhardt2021-04-27
| | | | | | | | Added in ad7d972e08dddb1788ac6a434d1be314febcb09d; the old syntax has been deprecated in b439c992c23f3e0f3832fffd2a34a664b236c525. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter/avfilter: Remove avfilter_link_set_closed() on bumpAndreas Rheinhardt2021-03-07
| | | | | | | Deprecated in 39a09e995d32d16e4f8c87a6ff5273cb9d98146e. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/avfilter: move enable_str expression parsing into avfilter_init_dict()Paul B Mahol2021-02-06
| | | | | | | | This ensures that needed arrays are always allocated and properly initialized. Previously if code would use only avfilter_init_dict() to set options for filters it would not allocate arrays for timeline processing thus it would crash if user supplied enable option for filter(s).
* avfilter/avfilter: mark enable as runtime option tooPaul B Mahol2021-02-03
|
* avfilter/avfilter: remove obsolete commentPaul B Mahol2020-09-10
|
* lavfi: regroup formats lists in a single structure.Nicolas George2020-09-08
| | | | | | | | | | | | | | | It will allow to refernce it as a whole without clunky macros. Most of the changes have been automatically made with sed: sed -i ' s/-> *in_formats/->incfg.formats/g; s/-> *out_formats/->outcfg.formats/g; s/-> *in_channel_layouts/->incfg.channel_layouts/g; s/-> *out_channel_layouts/->outcfg.channel_layouts/g; s/-> *in_samplerates/->incfg.samplerates/g; s/-> *out_samplerates/->outcfg.samplerates/g; ' src/libavfilter/*(.)
* avfilter/avfilter: Fix indentationAndreas Rheinhardt2020-08-26
| | | | | | | Forgotten after fdd93eabfb2644f541f7aac9943abce26776ea73. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter: switch to child_class_iterate()Anton Khirnov2020-06-10
|
* Silence "string-plus-int" warning shown by clang.Carl Eugen Hoyos2020-01-06
| | | | libswscale/utils.c:89:42: warning: adding 'unsigned long' to a string does not append to the string [-Wstring-plus-int]
* lavfi: remove ff_poll_frame().Nicolas George2019-12-23
| | | | It is never used.
* avfilter/avfilter: fix indentationleozhang2019-11-21
| | | | | Signed-off-by: leozhang <leozhang@qiyi.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/avfilter: add ff_filter_process_command()Paul B Mahol2019-10-14
|
* avfilter: add ff_inlink_queued_samples()Paul B Mahol2018-10-04
|
* avfilter/filters: add ff_inlink_peek_frame and ff_inlink_queued_frames to ↵Marton Balint2018-10-03
| | | | | | access frames in the inlink fifo Signed-off-by: Marton Balint <cus@passwd.hu>
* avfilter/avfilter: fix typos in commentsPaul B Mahol2018-10-03
|
* lavfi: fix can't dispaly "slice" sub-option in "ffmpeg -h full"Jun Zhao2018-08-16
| | | | | | | fix can't dispaly "slice" sub-option in "ffmpeg -h full" for AVFilter options. Signed-off-by: Jun Zhao <mypopydev@gmail.com>
* lavfi: add new iteration APIJosh de Kock2018-03-31
| | | | Signed-off-by: Josh de Kock <josh@itanimul.li>
* Merge commit '6d86cef06ba36c0ed591e14a2382e9630059fc5d'Mark Thompson2018-02-12
|\ | | | | | | | | | | | | * commit '6d86cef06ba36c0ed591e14a2382e9630059fc5d': lavfi: Add support for increasing hardware frame pool sizes Merged-by: Mark Thompson <sw@jkqxz.net>
| * lavfi: Add support for increasing hardware frame pool sizesMark Thompson2018-02-11
| | | | | | | | | | AVFilterContext.extra_hw_frames functions identically to the field of the same name in AVCodecContext.
* | avfilter: deprecate avfilter_link_get_channels()James Almer2018-01-06
| | | | | | | | | | Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: James Almer <jamrial@gmail.com>
* | Revert "avfilter: deprecate avfilter_link_get_channels()"James Almer2018-01-05
| | | | | | | | | | | | This reverts commit 798dcf2432999f449c76c0e0fe2d7a4ee5eabbc2. It was applied by accident before it could be reviewed.
* | avfilter: deprecate avfilter_link_get_channels()James Almer2018-01-05
| | | | | | | | | | | | And move the channels field to the public section of the struct. Signed-off-by: James Almer <jamrial@gmail.com>
* | avfilter: use a mutex instead of atomics in avfilter_register()James Almer2018-01-05
| | | | | | | | | | Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* | avfilter: pass correct argument to helper functionPaul B Mahol2017-10-31
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | Merge commit '96a47364d1cf346a5d0437e054b1b10d44d8d969'James Almer2017-10-21
|\| | | | | | | | | | | | | * commit '96a47364d1cf346a5d0437e054b1b10d44d8d969': lavfi: Drop deprecated non-const filter retrieval Merged-by: James Almer <jamrial@gmail.com>
| * lavfi: Drop deprecated non-const filter retrievalVittorio Giovara2017-03-23
| | | | | | | | Deprecated in 10/2013.
* | Merge commit '8e18328b18e69b38a5feae5d10ad01b403a205b6'James Almer2017-10-21
|\| | | | | | | | | | | | | * commit '8e18328b18e69b38a5feae5d10ad01b403a205b6': lavfi: Drop deprecated filter registration Merged-by: James Almer <jamrial@gmail.com>