aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/tests
Commit message (Collapse)AuthorAgeFilesLines
* tests: lavfi/drawutils: use av_err2strMarvin Scholz2025-04-221-3/+1
| | | | | There is no need to explicitly specify the buffer, as it is only ever passed to printf, so av_err2str can be used.
* avfilter/avfilter: Add FFFilter, hide internals of AVFilterAndreas Rheinhardt2025-01-121-4/+6
| | | | | | | | | | This patch is analogous to 20f972701806be20a77f808db332d9489343bb78: It hides the internal part of AVFilter by adding a new internal structure FFFilter (declared in filters.h) that has an AVFilter as its first member; the internal part of AVFilter is moved to this new structure. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavfi: add query_func2()Anton Khirnov2024-09-021-1/+18
| | | | | | | | It differs from query_func() in accepting arrays of input/output format configurations to be filled as callback parameters. This allows to mark the filter context as const, ensuring it is not modified by this function, as it is not supposed to have any side effects beyond returning the supported formats.
* lavfi: drop internal.hAnton Khirnov2024-08-191-1/+0
| | | | | | All that remains in it are things that belong in avfilter_internal.h. Move them there and remove internal.h
* lavfi: move ff_parse_{sample_rate,channel_layout}() to audio.[ch]Anton Khirnov2024-08-191-0/+1
| | | | That is a more appropriate place for those functions.
* avutil/common: Don't auto-include mem.hAndreas Rheinhardt2024-03-311-0/+1
| | | | | | | | | | | There are lots of files that don't need it: The number of object files that actually need it went down from 2011 to 884 here. Keep it for external users in order to not cause breakages. Also improve the other headers a bit while just at it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil: remove deprecated FF_API_OLD_CHANNEL_LAYOUTJames Almer2024-03-071-3/+0
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter: Add a header for internal generic-layer APIsAndreas Rheinhardt2024-02-181-1/+1
| | | | | | | | | This commit moves the generic-layer stuff (that is not used by filters) to a new header of its own, similarly to 5e7b5b0090bdf68e0897fe55ee657fdccc0cbca2 for libavcodec. thread.h and link_internal.h are merged into this header. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavfi: get rid of FF_INTERNAL_FIELDSAnton Khirnov2024-02-141-5/+4
| | | | | | | This hack is used to limit the visibility of some AVFilterLink fields to only certain files. Replace it with the same pattern that is used e.g. in lavf AVStream/FFStream and avoid exposing these internal fields in a public header completely.
* lavfi/dnn: Remove DNN native backendTing Fu2023-04-288-1350/+0
| | | | | | | | | | According to discussion in https://etherpad.mit.edu/p/FF_dev_meeting_20221202 and the proposal in http://ffmpeg.org/pipermail/ffmpeg-devel/2022-December/304534.html, the DNN native backend should be removed at first step. All the DNN native backend related codes are deleted. Signed-off-by: Ting Fu <ting.fu@intel.com>
* avfilter: convert to new channel layout APIJames Almer2022-03-152-5/+7
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* tests/dnn: Make DNN tests regular libavfilter testsAndreas Rheinhardt2021-12-199-0/+1358
| | | | | | | | | | | | | | | | | They test libavfilter internal API, so they should be libavfilter test programs (which implies: linked statically to libavfilter to access internal APIs and linked normally (statically or dynamically depending upon the build configuration) against all the other libs). Right now, they are always linked statically against all libs, which is a significant size waste compared to shared libs as all of libavcodec has been pulled in despite not being really used. This also leads to linking failures on systems for which av_export_avutil is intended: libavcodec does not expect to be linked statically against the library providing avpriv_(cga|vga16)_font in this case. This is fixed by this commit. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/tests/filtfmts: Check for existence of formats/channel layoutsAndreas Rheinhardt2021-10-101-3/+3
| | | | | | | | Fixes segfaults with filters that either return AVERROR(EAGAIN) (or another error) or that do not set everything and rely on filter_query_formats() to set the rest. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/tests/filtfmts: Replace macro by ordinary functionAndreas Rheinhardt2021-10-101-35/+42
| | | | | | This is possible now that AVFilterFormatsConfig exists. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter: Replace query_formats callback with union of list and callbackAndreas Rheinhardt2021-10-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Replace all occurences of av_mallocz_array() by av_calloc()Andreas Rheinhardt2021-09-201-2/+2
| | | | | | | They do the same. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/avcodec: Stop including channel_layout.h in avcodec.hAndreas Rheinhardt2021-07-221-0/+1
| | | | | | Also include channel_layout.h directly wherever used. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavfi: regroup formats lists in a single structure.Nicolas George2020-09-081-3/+3
| | | | | | | | | | | | | | | 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/tests/formats: reindent.Nicolas George2020-05-231-68/+68
|
* lavfi/formats: remove dead code.Nicolas George2020-05-231-0/+72
| | | | | Move the contents of all_channel_layouts.inc directly into libavfilter/tests/formats.c.
* avfilter/tests/integral: Correct the commentJun Zhao2019-02-131-1/+1
| | | | | | Correct the comment Signed-off-by: Jun Zhao <mypopydev@gmail.com>
* avfilter/tests/integral: Fix build warning after adjust the locationJun Zhao2019-02-121-4/+5
| | | | | | | | Fix build warning like "warning: ISO C90 forbids mixed declarations and code" after adjust the location for malloc fail check. Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Jun Zhao <mypopydev@gmail.com>
* avfilter/tests/integral: Check malloc fail before using itJun Zhao2019-02-121-3/+3
| | | | | | | | Need to check malloc fail before using it, so adjust the location in the code. Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Jun Zhao <mypopydev@gmail.com>
* lavfi/tests/filtfmts: fix the build warning.Jun Zhao2018-05-101-2/+2
| | | | | | fix the build warning: ignoring return value. Signed-off-by: Jun Zhao <mypopydev@gmail.com>
* lavfi/nlmeans: add AArch64 SIMD for compute_safe_ssd_integral_imageClément Bœsch2018-05-081-1/+5
| | | | | ssd_integral_image_c: 49204.6 ssd_integral_image_neon: 28346.8
* lav*,tests: remove several register_all callsJosh de Kock2018-04-021-2/+0
| | | | | | | 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>
* lavfi/tests/filtfmts: Constify a variable.Carl Eugen Hoyos2017-10-241-1/+1
| | | | | | Fixes the following warning: libavfilter/tests/filtfmts.c: In function ‘main’: libavfilter/tests/filtfmts.c:103:18: warning: assignment discards ‘const’ qualifier from pointer target type
* avfilter/formats: do not allow unknown layouts in ff_parse_channel_layout if ↵Marton Balint2017-01-241-0/+3
| | | | | | | | | | | | | nret is not set Current code returned the number of channels as channel layout in that case, and if nret is not set then unknown layouts are typically not supported. Also use the common parsing code. Use a temporary workaround to parse an unknown channel layout such as '13c', after a 1 year grace period only '13C' will work. Signed-off-by: Marton Balint <cus@passwd.hu>
* lavfi/tests/filtfmts: include internal.h.Nicolas George2017-01-121-0/+1
|
* lavfi: make filter_frame non-recursive.Nicolas George2016-12-181-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* avfilter/tests/.gitignore: add integralWan-Teh Chang2016-11-241-0/+1
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/tests/integral: Remove unused variablesMichael Niedermayer2016-09-241-2/+0
| | | | | Reviewed-by: Clément Bœsch <u@pkh.me> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavfi: add nlmeans filterClément Bœsch2016-09-241-0/+92
| | | | Fixes Ticket #4910
* Merge commit 'a6a750c7ef240b72ce01e9653343a0ddf247d196'Clément Bœsch2016-06-224-26/+175
| | | | | | | * commit 'a6a750c7ef240b72ce01e9653343a0ddf247d196': tests: Move all test programs to a subdirectory Merged-by: Clément Bœsch <clement@stupeflix.com>
* tests: Move all test programs to a subdirectoryDiego Biurrun2016-05-132-0/+125