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-11-09avfilter/vf_hqdn3d: Fix left-shift of negative numbersAndreas Rheinhardt
Affected filter-hqdn3d and filter-hqdn3d-sample FATE-tests. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
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_hqdn3d: 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-06-05avfilter/vf_hqdn3d: fix left shift of negative numbersValerii Zapodovnikov
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>
2019-11-29avfilter/vf_hqdn3d: add support for commandsPaul B Mahol
2019-11-29avfilter/vf_hqdn3d: add support for 12bit and 14bit yuv formatsPaul B Mahol
2019-10-10lavfi/hqdn3d: add slice thread optimizationJun Zhao
Enabled one thread per plane, used the test command for 1080P video (YUV420P format) as follow: ffmpeg -i 1080p.mp4 -an -vf hqdn3d -f null /dev/nul This optimization improved the performance about 30% in 1080P YUV420P case (from 110fps to 143fps), also pass the framemd5 check and FATE. Reviewed-by: Paul B Mahol <onemda@gmail.com> Reviewed-by: Moritz Barsnick <barsnick@gmx.net> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2016-06-21Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'Clément Bœsch
* commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb': cosmetics: Fix spelling mistakes Merged-by: Clément Bœsch <u@pkh.me>
2016-05-04cosmetics: Fix spelling mistakesVittorio Giovara
Signed-off-by: Diego Biurrun <diego@biurrun.de>
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-10-22avfilter,swresample,swscale: use fabs, fabsf instead of FFABSGanesh Ajjanagadde
It is well known that fabs and fabsf are at least as fast and sometimes faster than the FFABS macro, at least on the gcc+glibc combination. For instance, see the reference: http://patchwork.sourceware.org/patch/6735/. This was a patch to glibc in order to remove their usages of a macro. The reason essentially boils down to fabs using the __builtin_fabs of the compiler, while FFABS needs to infer to not use a branch and to simply change the sign bit. Usually the inference works, but sometimes it does not. This may be easily checked by looking at the asm. This also has the added benefit of reducing macro usage, which has problems with side-effects. Note that avcodec is not handled here, as it is huge and most things there are integer arithmetic anyway. Tested with FATE. Reviewed-by: Clément Bœsch <u@pkh.me> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
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-05-27avfilter/vf_hqdn3d: Initialize the whole LUTMichael Niedermayer
With bps > 8 more than 255..255 are used The initialized table content is left unchanged, But it could also be adjusted for the slight difference of the maximum Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-17avfilter: handle error in query_formats() of a bunch of random video filtersClément Bœsch
2015-02-08avfilter/hqdn3d: an invalid bit depth means a bug, not invalid read dataClément Bœsch
This code looks clumsy, and an assert would probably be more welcome.
2015-01-30Merge commit '22b985d59c007c4422aefe3ef3fca0aa0daafa9f'Michael Niedermayer
* commit '22b985d59c007c4422aefe3ef3fca0aa0daafa9f': hqdn3d: check memory allocations and propagate errors Conflicts: libavfilter/vf_hqdn3d.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-29hqdn3d: check memory allocations and propagate errorsVittorio Giovara
2014-05-14avfilter/vf_hqdn3: use av_malloc_array()Michael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-05Merge remote-tracking branch 'qatar/master'Michael Niedermayer
* qatar/master: avfilter: Add missing emms_c when needed Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-05avfilter: Add missing emms_c when neededLuca Barbato
Arch specific calls should have an emms_c following to keep the cpu state consistent. Reported-By: wm4 CC: libav-stable@libav.org
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-05-27lavfi/hqdn3d: make use of AVFILTER_DEFINE_CLASSPaul B Mahol
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-05-17Merge commit '16a645adeb758207346a4bbf66766f02734c461e'Michael Niedermayer
* commit '16a645adeb758207346a4bbf66766f02734c461e': vf_pixdesctest: make config_props work properly when called multiple times. vf_hqdn3d: make config_props work properly when called multiple times. Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-17vf_hqdn3d: make config_props work properly when called multiple times.Anton Khirnov
Do not leak all the temp buffers.
2013-05-16Merge commit '4753f802c00853859b7b4b8fdb79c35e082cb7f8'Michael Niedermayer
* commit '4753f802c00853859b7b4b8fdb79c35e082cb7f8': vf_libopencv: use the name 's' for the pointer to the private context vf_hqdn3d: use the name 's' for the pointer to the private context vf_hflip: use the name 's' for the pointer to the private context vf_gradfun: use the name 's' for the pointer to the private context Conflicts: libavfilter/vf_gradfun.c libavfilter/vf_hflip.c libavfilter/vf_hqdn3d.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-16vf_hqdn3d: use the name 's' for the pointer to the private contextAnton Khirnov
This is shorter and consistent across filters.
2013-05-12lavfi/hqdn3d: restore timeline feature.Clément Bœsch
2013-05-12lavfi/hqdn3d: use macros instead of hardcoded indexes.Clément Bœsch
2013-05-10lavfi: use ceil right shift for chroma width/height.Clément Bœsch
This should fix several issues with odd dimensions inputs. lut, vflip, pad and crop video filters also need to be checked for such issues. It's possible sws is also affected.
2013-05-05Merge commit '093804a93cc5da3f95f98265a5df116912443cec'Michael Niedermayer
* commit '093804a93cc5da3f95f98265a5df116912443cec': avfilter: Add av_cold attributes to init/uninit functions Conflicts: libavfilter/af_ashowinfo.c libavfilter/af_volume.c libavfilter/src_movie.c libavfilter/vf_lut.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-04avfilter: Add av_cold attributes to init/uninit functionsDiego Biurrun
2013-04-26lavfi/hqdn3d: remove timeline flag.Clément Bœsch
The filter stores some temporal data, which needs to be done with the passthrough callback system when timeline is enabled. Until then, timeline support is disabled.
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-12avfilter: add missing AV_OPT_FLAG_FILTERING_PARAMMichael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-12lavfi: remove now unused args parameter from AVFilter.initAnton Khirnov
Conflicts: libavfilter/avfilter.c libavfilter/vf_drawtext.c libavfilter/vf_lut.c libavfilter/vf_select.c libavfilter/vf_setpts.c libavfilter/vsrc_color.c libavfilter/vsrc_movie.c Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-10Merge commit '8c747d46f721cffa8ea51990805ad1d3a3a4fd0a'Michael Niedermayer
* commit '8c747d46f721cffa8ea51990805ad1d3a3a4fd0a': vf_hqdn3d: switch to an AVOptions-based system. Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-09lavfi: remove now unused args parameter from AVFilter.initAnton Khirnov
2013-04-09vf_hqdn3d: switch to an AVOptions-based system.Anton Khirnov
2013-03-13Merge remote-tracking branch 'qatar/master'Michael Niedermayer
* qatar/master: hqdn3d: Fix out of array read in LOWPASS cabac: remove unused argument of ff_init_cabac_states() rawdec: fix a typo -- || instead of | Conflicts: libavcodec/cabac.c libavcodec/h264.c libavfilter/vf_hqdn3d.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-13Merge commit '555000c7d5c1e13043a948ebc48d2939b0ba6536'Michael Niedermayer
* commit '555000c7d5c1e13043a948ebc48d2939b0ba6536': h264: check that DPB is allocated before accessing it in flush_dpb() vf_hqdn3d: fix uninitialized variable use vf_gradfun: fix uninitialized variable use Merged-by: Michael Niedermayer <michaelni@gmx.at>