Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-10-05avfilter/vf_xbr: Store format in filter, remove query functionAndreas Rheinhardt
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-05avfilter: Replace query_formats callback with union of list and callbackAndreas Rheinhardt
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>
2021-08-20avfilter/avfilter: Add numbers of (in|out)pads directly to AVFilterAndreas Rheinhardt
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>
2021-08-15avfilter/internal: Factor out executing a filter's execute_funcAndreas Rheinhardt
The current way of doing it involves writing the ctx parameter twice. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-13avfilter/formats: Factor common function combinations outAndreas Rheinhardt
Several combinations of functions happen quite often in query_format functions; e.g. ff_set_common_formats(ctx, ff_make_format_list(sample_fmts)) is very common. This commit therefore adds functions that are equivalent to commonly used function combinations in order to reduce code duplication. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-22Remove unnecessary avassert.h inclusionsAndreas Rheinhardt
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-04-27avfilter: Constify all AVFiltersAndreas Rheinhardt
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>
2019-10-03avfilter: add av_cold where it is missingPaul B Mahol
2019-09-28avfilter/vf_xbr: Fix left shift of negative numberAndreas Rheinhardt
Affected every usage of vf_xbr, e.g. the FATE-tests filter-2xbr, filter-3xbr, filter-4xbr. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-08-09lavfi/xbr: update filter urlMina
Existing link is broken. This patch updates the existing url with a working one. Signed-off-by: Mina <minasamy_@hotmail.com> Signed-off-by: Gyan Doshi <ffmpeg@gyani.pro>
2017-05-13avfilter: don't anonymously typedef structsPaul B Mahol
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-03-29lavfi/xbr: undef PI if definedClément Bœsch
This conflict with the DJGPP libc math.h which includes a PI macro (to M_PI). We cannot make DJGPP POSIX only (using -D_POSIX_SOURCE) to avoid this kind of symbols conflicts due to the lack of both posix_memalign and memalign (DJGPP non standard function) in that POSIX mode. We currently rely on memalign for aligned heap allocation.
2016-08-29avfilter: make use of ff_filter_get_nb_threadsPaul B Mahol
2015-09-18all: do standards compliant absdiff computationGanesh Ajjanagadde
This resolves implementation defined behavior, and also silences -Wabsolute-value in clang 3.5+. Moreover, the generated asm is identical to before modulo nop padding. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-15avfilter/vf_xbr: use the name 's' for the pointer to the private contextGanesh Ajjanagadde
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-04-08avfilter: handle error in query_formats() in bunch of filtersPaul B Mahol
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2014-12-26avfilter/xbr: reindent after previous commitClément Bœsch
2014-12-26avfilter/xbr: refactor px calculation in FILT[234]Clément Bœsch
2014-12-26avfilter/xbr: move alpha blend assignment out of the macrosClément Bœsch
2014-12-26avfilter/xbr: remove unused maskClément Bœsch
2014-12-26avfilter/xbr: refactor alpha blending macrosClément Bœsch
2014-11-16avfilter/xbr: fix style in FILT4() callsClément Bœsch
2014-11-16avfilter/xbr: clarify default "interpolated" pixels assignmentsClément Bœsch
2014-11-16avfilter/xbr: refactor xbr[234]x into a single functionClément Bœsch
No speed difference.
2014-11-16avfilter/xbr: add slice threadingClément Bœsch
2014-11-15avfilter/xbr: add video and filtering flags to optionsClément Bœsch
Fixes ffmpeg -h filter=xbr
2014-11-15avfilter/xbr: use function pointers for xbr[234]xClément Bœsch
2014-11-15avfilter/xbr: remove FATE test entry from @todoClément Bœsch
See 57688aecbd720f4b02acc65b5006b14b7dd6a9f4
2014-11-15avfilter/xbr: consistent copyright headerClément Bœsch
2014-11-15avfilter/xbr: make xbr[234]x a bit more consistentClément Bœsch
2014-11-15avfilter/xbr: misc style fixesClément Bœsch
2014-11-15avfilter/xbr: simplify left/up conditionsClément Bœsch
2014-11-15avfilter/xbr: misc cleanup in FILT[234] macrosClément Bœsch
2014-11-15avfilter/xbr: refactor src/dst pointers definitions into a macroClément Bœsch
2014-11-15avfilter/xbr: refactor the 21 pixels definition into a macroClément Bœsch
2014-11-15avfilter/xbr: mark source pointers as constClément Bœsch
2014-11-15avfilter/xbr: simplify width overread checksClément Bœsch
2014-11-15avfilter/xbr: use different macro names for each dimensionClément Bœsch
2014-11-15avfilter/xbr: avoid unecessary macro redirectionsClément Bœsch
2014-11-15avfilter/xbr: localize some filtering variablesClément Bœsch
2014-11-15avfilter/xbr: do not pass unchanging r2y to macrosClément Bœsch
2014-11-15lavfi/xbr: remove relicensing notice from copyright headerStefano Sabatini
The log is good enough for tracking those changes.
2014-11-15lavfi : change xBR filter to LGPLArwa Arif
Hyllian's message : "Hi, Put lgpl on this and use it as you wish. It's free!" Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-10lavfi/xbr: apply misc cosmetical fixesStefano Sabatini
2014-11-10avfilter/xbr: drop yet another x2 referenceClément Bœsch
2014-11-10avfilter/xbr: fix filter description fieldClément Bœsch
2014-11-10avfilter/xbr: fix TODO entryClément Bœsch
2014-11-10avfilter/xbr: consistent use of @seeClément Bœsch
2014-11-10avfilter/vf_xbr: Uppercase first letter of context type for consistencyMichael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-10lavfi: add xbr filter xBRArwa Arif
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>