summaryrefslogtreecommitdiff
path: root/libavfilter/avfilter.h
Commit message (Collapse)AuthorAge
* Keep including the full version.h when headers are included externallyMartin Storsjö2022-03-19
| | | | | | | | | This avoids unnecessary churn and build breakage for users, by making sure the whole version.h is included like it has been so far, while keeping the benefit of not needing to rebuild most files in the ffmpeg tree on minor/micro bumps. Signed-off-by: Martin Storsjö <martin@martin.st>
* libavfilter: Split version.hMartin Storsjö2022-03-16
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* avfilter: convert to new channel layout APIJames Almer2022-03-15
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* 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: Reindentation after query_formats changesAndreas Rheinhardt2021-10-05
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter: Replace query_formats callback with union of list and callbackAndreas Rheinhardt2021-10-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If one looks at the many query_formats callbacks in existence, one will immediately recognize that there is one type of default callback for video and a slightly different default callback for audio: It is "return ff_set_common_formats_from_list(ctx, pix_fmts);" for video with a filter-specific pix_fmts list. For audio, it is the same with a filter-specific sample_fmts list together with ff_set_common_all_samplerates() and ff_set_common_all_channel_counts(). This commit allows to remove the boilerplate query_formats callbacks by replacing said callback with a union consisting the old callback and pointers for pixel and sample format arrays. For the not uncommon case in which these lists only contain a single entry (besides the sentinel) enum AVPixelFormat and enum AVSampleFormat fields are also added to the union to store them directly in the AVFilter, thereby avoiding a relocation. The state of said union will be contained in a new, dedicated AVFilter field (the nb_inputs and nb_outputs fields have been shrunk to uint8_t in order to create a hole for this new field; this is no problem, as the maximum of all the nb_inputs is four; for nb_outputs it is only two). The state's default value coincides with the earlier default of query_formats being unset, namely that the filter accepts all formats (and also sample rates and channel counts/layouts for audio) provided that these properties agree coincide for all inputs and outputs. By using different union members for audio and video filters the type-unsafety of using the same functions for audio and video lists will furthermore be more confined to formats.c than before. When the new fields are used, they will also avoid allocations: Currently something nearly equivalent to ff_default_query_formats() is called after every successful call to a query_formats callback; yet in the common case that the newly allocated AVFilterFormats are not used at all (namely if there are no free links) these newly allocated AVFilterFormats are freed again without ever being used. Filters no longer using the callback will not exhibit this any more. Reviewed-by: Paul B Mahol <onemda@gmail.com> 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: 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: 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/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 avfilter_next/avfilter_register APIAndreas Rheinhardt2021-04-27
| | | | | | | Deprecated in 8f1382f80e0d4184c54c14afdda6482f050fbba7. 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: Remove deprecated resample_lavr_optsAndreas Rheinhardt2021-04-27
| | | | | | | Deprecated in 3796fb2692f87d0000fc0aa4572ac025a6469c2b. 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: Remove AVFilterLink.flagsAndreas Rheinhardt2021-01-24
| | | | | | | | It is a private field that is unused since 44f660e7e75b856eafa5f7e7cc6e633de5d01b5d. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/avfilter.h: add missing FF_API_NEXT wrapperJames Almer2020-10-10
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* 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/*(.)
* lavfi: remove request_samples.Nicolas George2020-08-20
| | | | | Filters can use min_samples/max_samples if the number is constant or activate and ff_inlink_consume_samples().
* lavfi: remove needs_fifo.Nicolas George2020-08-20
|
* avfilter/avfilter: update documentation of avfilter_graph_create_filterZhao Zhili2019-12-23
|
* avfilter: fix typo in commentsZhao Zhili2019-10-14
| | | | Signed-off-by: mypopy@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>
* | 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>
| * lavfi: Drop deprecated filter registrationVittorio Giovara2017-03-23
| | | | | | | | Deprecated in 04/2013.
* | Merge commit '52067b3c0e5ddbcf7021a093420798420351a9e2'James Almer2017-10-21
|\| | | | | | | | | | | | | * commit '52067b3c0e5ddbcf7021a093420798420351a9e2': lavfi: Drop deprecated filter initialization Merged-by: James Almer <jamrial@gmail.com>
| * lavfi: Drop deprecated filter initializationVittorio Giovara2017-03-23
| | | | | | | | Deprecated in 03/2013.
* | Merge commit 'c5c7cfd5e80d4c36568c01cc40abfde341657ad9'James Almer2017-10-21
|\| | | | | | | | | | | | | * commit 'c5c7cfd5e80d4c36568c01cc40abfde341657ad9': lavfi: Drop deprecated functions to open a filter or a filterchain Merged-by: James Almer <jamrial@gmail.com>
| * lavfi: Drop deprecated functions to open a filter or a filterchainVittorio Giovara2017-03-23
| | | | | | | | Deprecated in 03/2013.
* | lavfi: add a preinit callback to filters.Nicolas George2017-08-29
| | | | | | | | | | It is necessary for filters with child objects, to set the class and default options values.
* | Merge commit 'e3fb74f7f9a8f1895381355f40c92cac3c1023d9'Matthieu Bouron2017-03-30
|\| | | | | | | | | | | | | * commit 'e3fb74f7f9a8f1895381355f40c92cac3c1023d9': lavfi: Always propagate hw_frames_ctx through links Merged-by: Matthieu Bouron <matthieu.bouron@gmail.com>
| * lavfi: Always propagate hw_frames_ctx through linksMark Thompson2016-11-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also adds a new flag to mark filters which are aware of hwframes and will perform this task themselves, and marks all appropriate filters with this flag. This is required to allow software-mapped hardware frames to work, because we need to have the frames context available for any later mapping operation in the filter graph. The output from the filter graph should only propagate further to an encoder if the hardware format actually matches the visible format (mapped frames are valid here and have an hw_frames_ctx, but this should not be given to the encoder as its hardware context).
| * cosmetics: Fix spelling mistakesVittorio Giovara2016-05-04
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | lavfi: deprecate AVFilterGraph->resample_lavr_optsRostislav Pehlivanov2017-03-18
| | | | | | | | | | | | | | Not used by anything at all since we don't auto insert lavr filters. Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* | lavfi: add AVFilter.activate.Nicolas George2017-01-12
| |
* | lavfi: document that AVFilterLink is not for applications.Nicolas George2017-01-12
| |
* | lavfi/framepool: rename FFVideoFramePool to FFFramePoolMatthieu Bouron2017-01-12
| |
* | lavfi: make filter_frame non-recursive.Nicolas George2016-12-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A lot of changes happen at the same time: - Add a framequeue fifo to AVFilterLink. - split AVFilterLink.status into status_in and status_out: requires changes to the few filters and programs that use it directly (f_interleave, split, filtfmts). - Add a field ready to AVFilterContext, marking when the filter is ready and its activation priority. - Add flags to mark blocked links. - Change ff_filter_frame() to enqueue the frame. - Change all filtering functions to update the ready field and the blocked flags. - Update ff_filter_graph_run_once() to use the ready field. - buffersrc: always push the frame immediately.
* | lavfi: split frame_count between input and output.Nicolas George2016-11-13
| | | | | | | | | | | | | | | | | | | | | | | | AVFilterLink.frame_count is supposed to count the number of frames that were passed on the link, but with min_samples, that number is not always the same for the source and destination filters. With the addition of a FIFO on the link, the difference will become more significant. Split the variable in two: frame_count_in counts the number of frames that entered the link, frame_count_out counts the number of frames that were sent to the destination filter.
* | avfilter: add nb_threads to AVFilterContextPaul B Mahol2016-08-29
| | | | | | | | To be used in following commits.
* | doxygen: Standardize root-level modulesTimothy Gu2016-08-02
| |