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_spp: 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-19avfilter/vf_spp: Add dummy element to array to avoid shiftAndreas Rheinhardt
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19avfilter/vf_spp: Use preinit instead of init_dictAndreas Rheinhardt
By using preinit, the AVDCT already exists directly after allocating the filter, so that the filter's AVClass's child_next becomes usable for setting options with the AV_OPT_SEARCH_CHILDREN search flag. This means that it is no longer necessary to use the init_dict callback for this filter. Furthermore, the earlier code did not abide by the documentation of the init_dict callback at all: Instead of only returning the options that have not been recognized it always returned all options on any av_opt_set() error and errored out in this case, even if it is just an unrecognized option. This behaviour has been inherited by avfilter_init_dict(), contradicting its documentation. This is also fixed in this commit. 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-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>
2021-04-27avutil: remove deprecated AVClass.child_class_nextJames Almer
Signed-off-by: James Almer <jamrial@gmail.com>
2021-01-01lavfi/vf_spp: convert to the video_enc_params APIAnton Khirnov
Re-enable fate-filter-spp
2021-01-01lavu/mem: move the DECLARE_ALIGNED macro family to mem_internal on next+1 bumpAnton Khirnov
They are not properly namespaced and not intended for public use.
2020-06-10vf_spp: switch to child_class_iterate()Anton Khirnov
2020-05-13pixblockdsp, avdct: Add get_pixels_unalignedMartin Storsjö
Use this in vf_spp.c, where the get_pixels operation is done on unaligned source addresses. Hook up the x86 (mmx and sse) versions of get_pixels to this function pointer, as those implementations seem to support unaligned use. This fixes fate-filter-spp on armv7. Signed-off-by: Martin Storsjö <martin@martin.st>
2020-05-12avfilter/vf_spp: Fix endian-dependance in add_block()Michael Niedermayer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-05-12avfilter/vf_spp: Remove unused AVCodecContextMichael Niedermayer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-01-13lavfi/spp: enable runtime change flagJun Zhao
enable runtime change flag. Reviewe-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2020-01-13lavfi/spp: add "quality" option in runtime change pathJun Zhao
it's stranage to use option "level" in runtime change path but used "quality" in option, add "quality" in runtime change path, it's more intuitive and keep the "level" for compatibility. Reviewe-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Jun Zhao <barryjzhao@tencent.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-09-09avfilter/spp: use AV_OPT_TYPE_BOOL for use_bframe_qp optionClément Bœsch
2015-09-08Replace all remaining occurances of step/depth_minus1 and offset_plus1Hendrik Leppkes
2015-09-01avfilter/vf_spp: 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>
2015-03-18Replace PixelFormats which sneaked in over time or where forgotten by ↵Michael Niedermayer
AVPixelFormats Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-13lavfi: use ff_norm_qscale(), factorizeStefano Sabatini
2014-12-21avfilter/vf_spp: Fix overflow in 8bit store sliceMichael Niedermayer
Fixes regression with ffplay -f lavfi -i testsrc=640x480 -vf format=gray,boxblur=20:10,geq="'mod(lum(X,Y),16)*15'",boxblur=10,geq="'abs(mod(lum(X,Y),15)-7)*32'",spp=4:40 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-20avfilter/vf_spp: fix overflows with depth > 8Michael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-20avfilter/vf_spp: add support for 9bit YUV and GBR as well as GBRP10Michael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-18avfilter/vf_spp: add gbrp supportMichael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-18avfilter/vf_spp: add gray8 supportMichael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-18avfilter/vf_spp: Fix pointer type warningMichael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-15avfilter/vf_spp: support 10bit per sampleMichael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-12avfilter/vf_spp: The qp array width is qp_stride not stride/16Michael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-12avfilter/vf_spp: Allocate qp storage after qp_stride is knownMichael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-12avfilter/vf_spp: change temporary to unsignedMichael Niedermayer
More consistent with uspp and allows for future 10bit support Found-by: ubitux Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-04avfilter/vf_spp: Use dct->get_pixels()Michael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-28avfilter/vf_spp: support setting dct avoptions from the filter graph stringMichael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-27avfilter/vf_spp: use AVDCTMichael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-18Merge commit '2d60444331fca1910510038dd3817bea885c2367'Michael Niedermayer
* commit '2d60444331fca1910510038dd3817bea885c2367': dsputil: Split motion estimation compare bits off into their own context Conflicts: configure libavcodec/Makefile libavcodec/arm/Makefile libavcodec/dvenc.c libavcodec/error_resilience.c libavcodec/h264.h libavcodec/h264_slice.c libavcodec/me_cmp.c libavcodec/me_cmp.h libavcodec/motion_est.c libavcodec/motion_est_template.c libavcodec/mpeg4videoenc.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/x86/Makefile libavcodec/x86/me_cmp_init.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-10Merge commit 'f46bb608d9d76c543e4929dc8cffe36b84bd789e'Michael Niedermayer
* commit 'f46bb608d9d76c543e4929dc8cffe36b84bd789e': dsputil: Split off pixel block routines into their own context Conflicts: configure libavcodec/dsputil.c libavcodec/mpegvideo_enc.c libavcodec/pixblockdsp_template.c libavcodec/x86/dsputilenc.asm libavcodec/x86/dsputilenc_mmx.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-08Merge commit 'a9aee08d900f686e966c64afec5d88a7d9d130a3'Michael Niedermayer
* commit 'a9aee08d900f686e966c64afec5d88a7d9d130a3': dsputil: Split off FDCT bits into their own context Conflicts: configure libavcodec/Makefile libavcodec/asvenc.c libavcodec/dnxhdenc.c libavcodec/dsputil.c libavcodec/mpegvideo.h libavcodec/mpegvideo_enc.c libavcodec/x86/Makefile libavcodec/x86/dsputilenc_mmx.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-01Merge commit 'e3fcb14347466095839c2a3c47ebecff02da891e'Michael Niedermayer
* commit 'e3fcb14347466095839c2a3c47ebecff02da891e': dsputil: Split off IDCT bits into their own context Conflicts: configure libavcodec/aic.c libavcodec/arm/Makefile libavcodec/arm/dsputil_init_arm.c libavcodec/arm/dsputil_init_armv6.c libavcodec/asvdec.c libavcodec/dnxhdenc.c libavcodec/dsputil.c libavcodec/dvdec.c libavcodec/dxva2_mpeg2.c libavcodec/intrax8.c libavcodec/mdec.c libavcodec/mjpegdec.c libavcodec/mjpegenc_common.h libavcodec/mpegvideo.c libavcodec/ppc/dsputil_altivec.h libavcodec/ppc/dsputil_ppc.c libavcodec/ppc/idctdsp.c libavcodec/x86/Makefile libavcodec/x86/dsputil_init.c libavcodec/x86/dsputil_mmx.c libavcodec/x86/dsputil_x86.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-18avfilter/vf_spp: Use av_malloc_array()Michael Niedermayer
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-09-03Update copyrights where my email appears with the new one.Clément Bœsch
2013-06-14lavfi/spp: fix description.Clément Bœsch
2013-06-14lavfi: add spp filter.Clément Bœsch