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-09-10avfilter/vf_gblur: allow filtering with zero horizontal sigmaPaul B Mahol
2022-09-04avfilter/vf_gblur: handle cases when parameters become invalidPaul B Mahol
2022-06-23avfilter/vf_gblur: properly round outputPaul B Mahol
2022-05-06avfilter/vf_gblur: Move ff_gblur_init into a headerAndreas Rheinhardt
This removes a dependency of checkasm on lavfi/vf_gblur.o and also allows to inline ff_gblur_init() irrespectively of interposing. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-10avfilter/vf_gblur: fix memory leaks if config_input() is called againPaul B Mahol
2022-02-10avfilter/vf_gblur: use av_freep()Paul B Mahol
2021-10-05avfilter: Reindentation after query_formats changesAndreas Rheinhardt
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-05avfilter/vf_gblur: 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-29libavfilter/x86/vf_gblur: add localbuf and ff_horiz_slice_avx2/512()Wu Jianhua
We introduced a ff_horiz_slice_avx2/512() implemented on a new algorithm. In a nutshell, the new algorithm does three things, gathering data from 8/16 rows, blurring data, and scattering data back to the image buffer. Here we used a customized transpose 8x8/16x16 to avoid the huge overhead brought by gather and scatter instructions, which is dependent on the temporary buffer called localbuf added newly. Performance data: ff_horiz_slice_avx2(old): 109.89 ff_horiz_slice_avx2(new): 666.67 ff_horiz_slice_avx512: 1000 Co-authored-by: Cheng Yanfei <yanfei.cheng@intel.com> Co-authored-by: Jin Jun <jun.i.jin@intel.com> Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
2021-08-29libavfilter/x86/vf_gblur: add ff_verti_slice_avx2/512()Wu Jianhua
The new vertical slice with AVX2/512 acceleration can significantly improve the performance of Gaussian Filter 2D. Performance data: ff_verti_slice_c: 32.57 ff_verti_slice_avx2: 476.19 ff_verti_slice_avx512: 833.33 Co-authored-by: Cheng Yanfei <yanfei.cheng@intel.com> Co-authored-by: Jin Jun <jun.i.jin@intel.com> Signed-off-by: Wu Jianhua <jianhua.wu@intel.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-17avfilter/vf_gblur: add missing arch checkJames Almer
Removed by mistake in 2b4da1cb8c2984b37e5c912e103a1b8b734e7c1f where it should have been replaced instead. Signed-off-by: James Almer <jamrial@gmail.com>
2021-02-17x86/vf_gblur: fix postscale_slice prologueJames Almer
x86_32 ABI does not pass float arguments directly on xmm regs, and the Win64 ABI uses only the first four regs for this purpose. Signed-off-by: James Almer <jamrial@gmail.com>
2021-02-16avfilter/x86/vf_gblur: add postscale SIMDPaul B Mahol
2021-02-16avfilter/vf_gblur: factor out postscale functionPaul B Mahol
2021-02-12avfilter/vf_gblur: add float format supportPaul B Mahol
2019-11-18avfilter/vf_gblur: add support for 12bit yuva formatsPaul B Mahol
2019-10-16avfilter/vf_gblur: fix undefined behaviourPaul B Mahol
Fixes #8292
2019-10-16avfilter/vf_gblur: fix heap-buffer overflowPaul B Mahol
Fixes #8282
2019-10-14avfilter/vf_gblur: switch to ff_filter_process_command()Paul B Mahol
2019-10-06avfilter/vf_gblur: add support for commandsPaul B Mahol
2019-06-12avfilter/vf_gblur: add x86 SIMD optimizationsRuiling Song
The horizontal pass get ~2x performance with the patch under single thread. Tested overall performance using the command(avx2 enabled): ./ffmpeg -i 1080p.mp4 -vf gblur -f null /dev/null ./ffmpeg -i 1080p.mp4 -vf gblur=threads=1 -f null /dev/null For single thread, the fps improves from 43 to 60, about 40%. For multi-thread, the fps improves from 110 to 130, about 20%. Signed-off-by: Ruiling Song <ruiling.song@intel.com>
2019-05-08lavfi/gblur: doing several columns at the same timeRuiling Song
Instead of doing each column one by one, doing several columns together gives about 30% better performance. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Ruiling Song <ruiling.song@intel.com>
2018-09-09avfilter: add support for gray14 formatPaul B Mahol
2017-08-07avfilter: add support for GRAY9 and GBRAP10Paul B Mahol
2017-04-10avfilter: add GRAY10 and GRAY12 to some filtersPaul B Mahol
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-01-28avfilter/vf_gblur: Increase supported pixel count from 31bit to 32bit in ↵Michael Niedermayer
filter_postscale() Fixes CID1396252 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-05avfilter/vf_gblur: add sigmaV option, different vertical filteringPaul B Mahol
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-09-04avfilter: add gblur filterPaul B Mahol
Signed-off-by: Paul B Mahol <onemda@gmail.com>