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-06-15all: Replace if (ARCH_FOO) checks by #if ARCH_FOOAndreas Rheinhardt
This is more spec-compliant because it does not rely on dead-code elimination by the compiler. Especially MSVC has problems with this, as can be seen in https://ffmpeg.org/pipermail/ffmpeg-devel/2022-May/296373.html or https://ffmpeg.org/pipermail/ffmpeg-devel/2022-May/297022.html This commit does not eliminate every instance where we rely on dead code elimination: It only tackles branching to the initialization of arch-specific dsp code, not e.g. all uses of CONFIG_ and HAVE_ checks. But maybe it is already enough to compile FFmpeg with MSVC with whole-programm-optimizations enabled (if one does not disable too many components). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-05avfilter: Reindentation after query_formats changesAndreas Rheinhardt
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-05avfilter/vf_yadif: 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-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-07-22avutil/internal, swresample/audioconvert: Remove cpu.h inclusionsAndreas Rheinhardt
These inclusions are not necessary, as cpu.h is already included wherever it is needed (via direct inclusion or via the arch-specific headers). Also remove other unnecessary cpu.h inclusions from ordinary non-headers. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-05-29avfilter/vf_yadif: Fix handing of tiny imagesMichael Niedermayer
Fixes: out of array access Fixes: Ticket8240 Fixes: CVE-2020-22021 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-05-27avfilter/yadif: Fix time base for large denominatorsTom Boshoven
This fixes an issue where the yadif filter could cause the timebase denominator to overflow. Signed-off-by: Tom Boshoven <tom@jwplayer.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
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>
2020-08-27Revert "avfilter/yadif: simplify the code for better readability"Limin Wang
This reverts commit 2a9b934675b9e2d3850b46f8a618c19b03f02551.
2020-08-26avfilter/yadif: simplify the code for better readabilityLimin Wang
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2019-12-25avfilter/vf_yadif: cosmetics in the pix_fmts[] arrayLimin Wang
Signed-off-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-29avfilter/vf_yadif: rename config_props -> config_output, link -> outlinkLimin Wang
Signed-off-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-11-02libavfilter/vf_yadif: Make frame management logic and options shareablePhilip Langdale
I'm writing a cuda implementation of yadif, and while this obviously has a very different implementation of the actual filtering, all the frame management is unchanged. To avoid duplicating that logic, let's make it shareable. From the perspective of the existing filter, the only real change is introducing a function pointer for the filter() function so it can be specified for the specific filter.
2017-11-11Merge commit 'feed239021bad89743d5e7989b426ae594322eb7'James Almer
* commit 'feed239021bad89743d5e7989b426ae594322eb7': yadif: Account for the buffer alignment while processing the frame edges See 221f902f1dc167bdc0bfdff6b6af3214ae3cc1f4 Merged-by: James Almer <jamrial@gmail.com>
2017-08-22yadif: Account for the buffer alignment while processing the frame edgesMichael Niedermayer
Avoid out of bound reads. Bug-Id: 1031 CC: libav-stable@libav.org Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2016-08-29avfilter: make use of ff_filter_get_nb_threadsPaul B Mahol
2016-05-04cosmetics: Fix spelling mistakesVittorio Giovara
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-02-01avfilter/vf_yadif: make use of ctx pointerPaul B Mahol
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-27avutil: Rename FF_CEIL_COMPAT to AV_CEIL_COMPATDerek Buitenhuis
Libav, for some reason, merged this as a public API function. This will aid in future merges. A define is left for backwards compat, just in case some person used it, since it is in a public header. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2015-11-11Merge commit '9df477e03ef74068f3de130adc4dd34349a16ef2'Hendrik Leppkes
* commit '9df477e03ef74068f3de130adc4dd34349a16ef2': yadif: update frame rate Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-09yadif: update frame rateMichael Niedermayer
(cherry picked from ffmpeg commit 31619584556466e4beab98e9b04ed4c5ba0db178) Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-10-07lavfi/vf_yadif: reindent after last commit.Nicolas George
2015-10-07lavfi/vf_yadif: remove looping on request_frame().Nicolas George
2015-09-27avfilter/vf_yadif: add missing "This file is part of FFmpeg"Michael Niedermayer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-08Merge commit '2268db2cd052674fde55c7d48b7a5098ce89b4ba'Hendrik Leppkes
* commit '2268db2cd052674fde55c7d48b7a5098ce89b4ba': lavu: Drop the {minus,plus}1 suffix from AVComponentDescriptor fields Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-07lavu: Drop the {minus,plus}1 suffix from AVComponentDescriptor fieldsVittorio Giovara
The new fields can be accessed directly and are more intelligible. Signed-off-by: Vittorio Giovara <vittorio.giovara@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>
2015-01-06avfilter/vf_yadif: detect telecine contentMichael Niedermayer
Fixes: yadif with interlaced_flag_switch.mpeg Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-31avfilter/vf_yadif: add >8bit planar rgb formatsMichael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-29avfilter/vf_yadif: fix extra leading dup frame when deint=1Neil Birkbeck
Logic for handling single frame in yadif (0f9f24c9), caused deint=1 (e.g., yadif=0:-1:1) to output extra duplicate leading frame: ffmpeg -i fate-suite/ffmpeg-synthetic/vsynth1/%02d.pgm -vf yadif=0:-1:1,showinfo -f null -y /dev/null [Parsed_showinfo_1 @ 0x1d967d0] n:0 pts:0 pts_time:0 pos:-1 fmt:gray sar:0/1 s:352x432 i:P iskey:1 type:I checksum:E457EEA0 plane_checksum:[E457EEA0] mean:[126] stdev:[46.6] [Parsed_showinfo_1 @ 0x1d967d0] n:1 pts:0 pts_time:0 pos:-1 fmt:gray sar:0/1 s:352x432 i:P iskey:1 type:I checksum:E457EEA0 plane_checksum:[E457EEA0] mean:[126] stdev:[46.6] (Outputs 51 frames) After patch, vf "yadif=0:-1:1" behaves correctly (like "yadif=0:-1:0") and outputs 50 frames, first two: [Parsed_showinfo_1 @ 0x1e307d0] n:0 pts:0 pts_time:0 pos:-1 fmt:gray sar:0/1 s:352x432 i:P iskey:1 type:I checksum:68E8D1EB plane_checksum:[68E8D1EB] mean:[126] stdev:[46.0] [Parsed_showinfo_1 @ 0x1e307d0] n:1 pts:2 pts_time:0.04 pos:-1 fmt:gray sar:0/1 s:352x432 i:P iskey:1 type:I checksum:4E674BC7 plane_checksum:[4E674BC7] mean:[125] stdev:[46.0] (Outputs 50 frames) Signed-off-by: Neil Birkbeck <neil.birkbeck@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-03vfilter/vf_yadif: fix request_frame after 0f9f24c9Michael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-02avfilter/vf_yadif: fix filtering a single imageMichael Niedermayer
Found-by: wm4 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-14Change license of yadif from GPL to LGPLRobert Krüger
Signed-off-by: Robert Krüger <krueger@lesspain.de> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-14Revert "avfilter/yadif: Revert "lavfi: convert input/ouput list compound ↵Robert Krüger
literals to named objects"" This reverts commit 4ef4bb4a203e8f472ab0484396270b9430862037. Signed-off-by: Robert Krüger <krueger@lesspain.de> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-14Revert "Revert "yadif: add parens around macro parameters""Robert Krüger
This reverts commit ab00800cde1af1f252731118062dd5149f1a7ed7. Signed-off-by: Robert Krüger <krueger@lesspain.de> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-14Revert "Revert "vf_yadif: move x86 init code to x86/yadif.c""Robert Krüger
This reverts commit 975110a85ef8e794fdc041455ff41b0ad30bc01e. Signed-off-by: Robert Krüger <krueger@lesspain.de> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-14vf_yadif: Relicense from GPL to LGPLRobert Krüger
All copyright holders have agreed to the relicensing.
2013-12-01Revert "vf_yadif: move x86 init code to x86/yadif.c"Michael Niedermayer
This reverts commit a87b17f3283aada762820f1b797eeb7a2dff6c61. This reduces the amount of non LGPL code, making a relicensing to LGPL easier Conflicts: libavfilter/vf_yadif.c libavfilter/x86/yadif.c libavfilter/x86/yadif_template.c libavfilter/yadif.h Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-01Revert "yadif: add parens around macro parameters"Michael Niedermayer
This reverts commit 49e617f9565b6528fe707bae7ea4b62b10c771a5. This reduces the amount of non LGPL code, making a relicensing to LGPL easier Conflicts: libavfilter/vf_yadif.c Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-01avfilter/yadif: Revert "lavfi: convert input/ouput list compound literals to ↵Michael Niedermayer
named objects" This reverts commit 568c70e79ee267426c15ef4603c69703f6a5884a. This reduces the amount of non LGPL code, making a relicensing to LGPL easier Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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-10-28lavfi: do not export the filters from shared objectsAnton Khirnov
2013-09-12avfilter: various cosmeticsPaul B Mahol
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-09-11avfilter: remove redundant use of AV_NE() macroPaul B Mahol
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-09-05avfilter/vf_yadif: Treat mode as a field of flagsMichael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-05avfilter/vf_yadif: fix "incompatible pointer type" warningMichael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>