summaryrefslogtreecommitdiff
path: root/libavfilter/tests
Commit message (Collapse)AuthorAge
* avfilter: convert to new channel layout APIJames Almer2022-03-15
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* tests/dnn: Make DNN tests regular libavfilter testsAndreas Rheinhardt2021-12-19
| | | | | | | | | | | | | | | | | 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-10
| | | | | | | | 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-10
| | | | | | 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-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>
* 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>
* avcodec/avcodec: Stop including channel_layout.h in avcodec.hAndreas Rheinhardt2021-07-22
| | | | | | 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-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/tests/formats: reindent.Nicolas George2020-05-23
|
* lavfi/formats: remove dead code.Nicolas George2020-05-23
| | | | | Move the contents of all_channel_layouts.inc directly into libavfilter/tests/formats.c.
* avfilter/tests/integral: Correct the commentJun Zhao2019-02-13
| | | | | | Correct the comment Signed-off-by: Jun Zhao <mypopydev@gmail.com>
* avfilter/tests/integral: Fix build warning after adjust the locationJun Zhao2019-02-12
| | | | | | | | 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-12
| | | | | | | | 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-10
| | | | | | 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-08
| | | | | ssd_integral_image_c: 49204.6 ssd_integral_image_neon: 28346.8
* lav*,tests: remove several register_all callsJosh de Kock2018-04-02
| | | | | | | 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-24
| | | | | | 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-24
| | | | | | | | | | | | | 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-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.
* avfilter/tests/.gitignore: add integralWan-Teh Chang2016-11-24
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/tests/integral: Remove unused variablesMichael Niedermayer2016-09-24
| | | | | 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-24
| | | | Fixes Ticket #4910
* Merge commit 'a6a750c7ef240b72ce01e9653343a0ddf247d196'Clément Bœsch2016-06-22
| | | | | | | * 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-13