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-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-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>
2022-05-24avfilter: use avpriv_fopen_utf8() instead of plain fopen()softworkz
Unify file access operations by replacing usages of direct calls to posix fopen() to prepare for long filename support on Windows. Signed-off-by: softworkz <softworkz@hotmail.com> Signed-off-by: Martin Storsjö <martin@martin.st>
2021-12-04avfilter: add AVFILTER_FLAG_METADATA_ONLYAnton Khirnov
This flag allows distinguishing between filters that actually modify the data and those that only modify metadata or gather some stream information.
2021-10-28avfilter/vf_psnr/ssim: fix typosPaul B Mahol
2021-10-05avfilter: Reindentation after query_formats changesAndreas Rheinhardt
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-05avfilter/vf_ssim: 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-21avfilter/vf_ssim: Remove always-false format checkAndreas Rheinhardt
This filter uses ff_set_common_formats_from_list(). Reviewed-by: Paul B Mahol <onemda@gmail.com> 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-05-01avfilter/vf_ssim: remove unnecessary checkLimin Wang
For the pointer have been checked in the previous few lines of code Signed-off-by: Limin Wang <lance.lmwang@gmail.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-25avfilter/vf_ssim.c: fix build warning for [-Wmain]Guo, Yejun
The build warning message: src/libavfilter/vf_ssim.c: In function ‘ssim_plane_16bit’: src/libavfilter/vf_ssim.c:246:24: warning: ‘main’ is usually a function [-Wmain] const uint8_t *main = td->main_data[c]; ^~~~ src/libavfilter/vf_ssim.c: In function ‘ssim_plane’: src/libavfilter/vf_ssim.c:289:24: warning: ‘main’ is usually a function [-Wmain] const uint8_t *main = td->main_data[c]; ^~~~ Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2021-02-19avfilter/vf_ssim: add slice threadingPaul B Mahol
2021-02-13avfilter/vf_ssim: remove precision limits for metadata valuesPaul B Mahol
2021-02-12avfilter/vf_ssim: add timeline supportPaul B Mahol
2020-02-04avfilter/vf_ssim: improve precisionPaul B Mahol
Use doubles for accumulating floats.
2020-02-01avfilter/vf_ssim: fix logic failure when comparing time basesPaul B Mahol
2019-10-25avfilter/vf_psnr,vf_ssim: add warning if different timebases are encounteredPaul B Mahol
2018-09-09avfilter: add support for gray14 formatPaul B Mahol
2017-10-07lavfi: Rename local variables "main" as "master".Carl Eugen Hoyos
Silences several warnings: main is usually a function
2017-09-12lavfi: rename framesync2 to framesync.Nicolas George
2017-08-29vf_ssim: convert to framesync2.Nicolas George
2017-08-07avfilter: add support for GRAY9 and GBRAP10Paul B Mahol
2017-08-04avfilter/vf_ssim: fix temp size calculationMuhammad Faiz
Also use av_mallocz_array. Fix Ticket6519. Reviewed-by: Tobias Rapp <t.rapp@noa-archive.com> Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2017-07-04avfilter/vf_ssim: use unsigned so result can be properly storedPaul B Mahol
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-04-23avfilter: do not use AVFrame accessorMuhammad Faiz
Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2016-12-17avfilter/vf_ssim: add >8 bit depth suppportPaul 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-10-30avfilter/vf_ssim: use log10 instead of log()/log(10)Ganesh Ajjanagadde
This is likely more precise and conveys the intent better. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-23vf_psnr/ssim: don't crash if stats_file is NULL.Ronald S. Bultje
2015-10-23vf_ssim: print per-channel dB values.Ronald S. Bultje
2015-10-21avfilter/vf_ssim: Add support for writing stats to stdoutTobias Rapp
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-14avfilter/vf_ssim: Fix "incompatible pointer type" warningsMichael Niedermayer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-14vf_ssim: x86 simd for ssim_4x4xN and ssim_endN.Ronald S. Bultje
Both are 2-2.5x faster than their C counterpart. Reviewed-by: Paul B Mahol <onemda@gmail.com> Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-13vf_ssim: remove another obscure double loop.Ronald S. Bultje
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-13ssim: refactor a weird double loop.Ronald S. Bultje
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-12vf_ssim: fix s->coefs for yuv with non-4:2:0 subsampling.Ronald S. Bultje
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-11avfilter/vf_ssim: Mark constant tables as constMichael Niedermayer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-06-30avfilter/vf_ssim: fix some cosmetics issuesPaul B Mahol
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-06-24avfilter: add ssim filterPaul B Mahol
Signed-off-by: Paul B Mahol <onemda@gmail.com>