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
2022-10-22avfilter/vf_curves: add PCHIP interpolator and interp optionTakeshi (Kesh) Ikuma
summary: This patch modifies the `curves` filter with new `interp` option to let user pick the existing natural cubic spline interpolation and the new PCHIP interapolation. reason: The natural cubic spline does not impose monotonicity between the keypoints. As such, the fitted curve may vary wildly against user's intension. The PCHIP interpolation is not as smooth as the natural spline but guarantees the monotonicity. Providing both options enhances users experience (e.g., reduces the number of keypoints to realize the desired curve). See the related bug report for the example of an ill-interpolated curve. alternate solution: Both Photoshop and GIMP appear to use monotonic interpolation in their curve tools, which were the models for this filter. As such, an alternate solution is to drop the natural spline and go without the `interp` option. related bug report: https://trac.ffmpeg.org/ticket/9947 (filed by myself) Signed-off-by: Takeshi (Kesh) Ikuma <tikuma@hotmail.com>
2022-09-03avutil/internal: Move avpriv-file API to a header of its ownAndreas Rheinhardt
It is not used by the large majority of files that include lavu/internal.h. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-23Switch uses of av_fopen_utf8 to avpriv_fopen_utf8Martin Storsjö
The former has been deprecated. Signed-off-by: Martin Storsjö <martin@martin.st>
2021-10-05avfilter/vf_curves: Use formats list instead of 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-09-20Replace all occurences of av_mallocz_array() by av_calloc()Andreas Rheinhardt
They do the same. Reviewed-by: Paul B Mahol <onemda@gmail.com> 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-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>
2021-02-09avfilter/vf_curves: add commands supportPaul B Mahol
2018-09-25avfilter/vf_curves: add planar rgb supportPaul B Mahol
2017-05-13avfilter: don't anonymously typedef structsPaul B Mahol
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-08-29avfilter: make use of ff_filter_get_nb_threadsPaul B Mahol
2016-07-26lavfi/curves: fix meaningless const int returned valueClément Bœsch
Spotted-by: James Almer <jamrial@gmail.com>
2016-07-24lavfi/curves: prefix init and uninit function namesClément Bœsch
2016-07-24lavfi/curves: pass log ctx as void* instead of AVFilterContext*Clément Bœsch
2016-07-24lavfi/curves: reindent after previous commitClément Bœsch
2016-07-24lavfi/curves: add 16-bit supportClément Bœsch
2016-07-24lavfi/curves: move alloc and init of LUTs inside config_input()Clément Bœsch
This is needed in order to have different sizes of LUTs according to the input.
2016-07-24lavfi/curves: dynamically allocate LUTsClément Bœsch
This simplifies following commits.
2016-07-24lavfi/curves: add various const where it makes senseClément Bœsch
2016-07-24lavfi/curves: remove pointless logging since the addition of plot optionClément Bœsch
2016-07-24lavfi/curves: add plot optionClément Bœsch
2016-07-24lavfi/curves: do not automatically insert points at x=0 and x=1Clément Bœsch
There is actually a need for the origin and end point not to be defined. We can not automatically insert them with the y value of the first and last point as it will influence the curves in a wrong way. Fixes #5397
2015-03-17avfilter: handle error in query_formats() of a bunch of random video filtersClément Bœsch
2015-03-08avfilter/vf_curves: Change enums to int, which are accessed via AVOption as intMichael Niedermayer
This fixes depending on implementation defined behavior Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-27avfilter/curves: fix resource leaks.Clément Bœsch
Fixes CID1206650
2014-02-13avfilter/curves: support slice threading.Clément Bœsch
2013-10-29Merge remote-tracking branch 'qatar/master'Michael Niedermayer
* qatar/master: lavfi: do not export the filters from shared objects Conflicts: libavfilter/af_amix.c libavfilter/af_anull.c libavfilter/asrc_anullsrc.c libavfilter/f_select.c libavfilter/f_settb.c libavfilter/split.c libavfilter/src_movie.c libavfilter/vf_aspect.c libavfilter/vf_blackframe.c libavfilter/vf_colorbalance.c libavfilter/vf_copy.c libavfilter/vf_crop.c libavfilter/vf_cropdetect.c libavfilter/vf_drawbox.c libavfilter/vf_format.c libavfilter/vf_framestep.c libavfilter/vf_frei0r.c libavfilter/vf_hflip.c libavfilter/vf_libopencv.c libavfilter/vf_lut.c libavfilter/vf_null.c libavfilter/vf_overlay.c libavfilter/vf_scale.c libavfilter/vf_transpose.c libavfilter/vf_unsharp.c libavfilter/vf_vflip.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-14lavfi: cosmetics: fix vertical alignment for pads in some filtersPaul B Mahol
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-05-12lavfi: replace passthrough_filter_frame with a flag.Clément Bœsch
With the introduction of AVFilterContext->is_disabled, we can simplify the custom passthrough mode in filters. This commit is technically a small compat break, but the timeline was introduced very recently. Doxy by Stefano Sabatini.
2013-05-11lavfi/curves: avoid ctx pointer indirection.Clément Bœsch
2013-04-26lavfi/curves: add support for more rgb formatsPaul B Mahol
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-04-23lavfi: add timeline support.Clément Bœsch
Flag added in a few simple filters. A bunch of other filters can likely use the feature as well.
2013-04-15lavfi/curves: fix memleak after master component dition.Clément Bœsch
2013-04-15lavfi/curves: add support for Photoshop curves files (.acv).Clément Bœsch
2013-04-15lavfi/curves: add support for master component.Clément Bœsch
2013-04-12lavfi: remove now unused args parameter from AVFilter.init and init_opaqueMichael Niedermayer
This is mostly automated global search and replace The deprecated aconvert filter is disabled, if it still has users it should be updated Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-11lavfi/curves: introduce "all" field in presets and use it.Clément Bœsch
2013-04-11lavfi/curves: make possible to customize presets.Clément Bœsch
2013-04-11lavfi/curves: fix a spacing weirdness.Clément Bœsch
2013-04-11lavfi/curves: switch to an AVOptions-based system.Clément Bœsch
2013-04-10vf_curves: add option to set all curves at onceMichael Niedermayer
Reviewed-by: ubitux Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-01lavfi/curves: make use of options to store the preset names.Clément Bœsch
2013-03-26lavfi/curves: add forgotten strong_contrast preset.Clément Bœsch
2013-03-26lavfi/curves: support preset shorthand.Clément Bœsch
2013-03-26lavfi/curves: add presets support.Clément Bœsch
Except for the vintage preset, the values are defined by Lou Logan based on the ones found in Adobe Photoshop CS6. Signed-off-by: Clément Bœsch <ubitux@gmail.com> Signed-off-by: Lou Logan <lou@lrcd.com>
2013-03-10lavfi: add curves filter.Clément Bœsch