summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* avfilter/vf_geq: Simplify creating stringAndreas Rheinhardt2021-09-21
| | | | | | | Also fixes a Wformat-truncation warning from GCC. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/vf_xfade: Remove always-false format checkAndreas Rheinhardt2021-09-21
| | | | | | | 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>
* avfilter/vf_vif: Remove always-false format checkAndreas Rheinhardt2021-09-21
| | | | | | | 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>
* avfilter/vf_threshold: Remove always-false format checkAndreas Rheinhardt2021-09-21
| | | | | | | 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>
* avfilter/vf_ssim: Remove always-false format checkAndreas Rheinhardt2021-09-21
| | | | | | | 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>
* avfilter/vf_psnr: Remove always-false format checkAndreas Rheinhardt2021-09-21
| | | | | | | 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>
* avfilter/vf_premultiply: Remove always-false format checkAndreas Rheinhardt2021-09-21
| | | | | | | These filters use ff_set_common_formats_from_list(). Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/vf_midequalizer: Remove always-false format checkAndreas Rheinhardt2021-09-21
| | | | | | | 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>
* avfilter/vf_maskedthreshold: Remove always-false format checkAndreas Rheinhardt2021-09-21
| | | | | | | 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>
* avfilter/vf_maskedminmax: Remove always-false format checkAndreas Rheinhardt2021-09-21
| | | | | | | These filters use ff_set_common_formats_from_list(). Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/vf_maskedmerge: Remove always-false format checkAndreas Rheinhardt2021-09-21
| | | | | | | 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>
* avfilter/vf_maskedclamp: Remove always-false format checkAndreas Rheinhardt2021-09-21
| | | | | | | 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>
* avfilter/vf_libvmaf: Remove always-false format checkAndreas Rheinhardt2021-09-21
| | | | | | | 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>
* avfilter/vf_identity: Remove always-false format checkAndreas Rheinhardt2021-09-21
| | | | | | | These filters use ff_set_common_formats_from_list(). Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/vf_hysteresis: Remove always-false format checkAndreas Rheinhardt2021-09-21
| | | | | | | 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>
* avfilter/vf_guided: Remove always-false format checkAndreas Rheinhardt2021-09-21
| | | | | | | 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>
* avfilter/vf_displace: Remove always-false format checkAndreas Rheinhardt2021-09-21
| | | | | | | 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>
* avfilter/vf_convolve: Remove always-false format checkAndreas Rheinhardt2021-09-21
| | | | | | | These filters use ff_set_common_formats_from_list(). Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/vf_bm3d: Remove always-false format checkAndreas Rheinhardt2021-09-21
| | | | | | | 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>
* avfilter/vf_blend: Remove always-false format checkAndreas Rheinhardt2021-09-21
| | | | | | | 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>
* avfilter/af_sidechaincompress: Remove always-false samplerate checkAndreas Rheinhardt2021-09-21
| | | | | | | | | | This filter uses ff_set_common_all_samplerates(). Also don't overwrite outlink->sample_rate in config_output; it is harmless, because it is overwritten with the value it already had, but it is an API violation. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/af_amerge: Remove always-false samplerate checkAndreas Rheinhardt2021-09-21
| | | | | | | | | | This filter uses ff_set_common_all_samplerates(). Also don't overwrite outlink->sample_rate in config_output; it is harmless, because it is overwritten with the value it already had, but it is an API violation. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/af_agate: Remove always-false samplerate checkAndreas Rheinhardt2021-09-21
| | | | | | | | | | This filter uses ff_set_common_all_samplerates(). Also don't overwrite outlink->sample_rate in config_output; it is harmless, because it is overwritten with the value it already had, but it is an API violation. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/af_sidechaincompress: Honour query_formats API, fix segfaultAndreas Rheinhardt2021-09-21
| | | | | | | | | | | | | | | | | | | | Just like the sidechaingate filter, the sidechaincompress filter overwrote the channel layout and channel count of its output in its config_output callback to match the channel layout of its main input instead of linking the main input and its output together in its query_formats callback. This is an API violation that can lead to segfaults, as in the following filtergraph, where stereotools rightly expects stereo, yet receives only mono: [in]aformat=channel_layouts=mono,aformat=channel_layouts=stereo|mono[out];\ [out][in2]sidechaincompress,stereotools Fix this by linking the channel layouts of the main input and the output in query_formats and remove the code overwriting it in config_output. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/af_agate: Honour query_formats API, fix segfaultAndreas Rheinhardt2021-09-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sidechaingate filter wants its main input and its (only) output to have the same channel layout and number of channels; yet it does not link them in its query_formats callback. Instead it sets the outlink to only accept the first offered choice for the main input's channel layout and then sets both inputs to independently accept any channel counts. The config_output callback then overwrote the outlink's channel layout and channels properties with the main input's, even though they may differ in case the first offered choice for the main input's channel layout turns out not to be the final one. Consider e.g. the following filtergraph: [in]aformat=channel_layouts=mono,aformat=channel_layouts=stereo|mono[out];\ [out][in2]sidechaingate,stereotools The two aformats ensure that the first offered channel layout (stereo) will not be chosen for the input; yet it is the only offered channel layout for the output of sidechaingate and will therefore be chosen by the query_formats framework. Because the sidechaingate outputs interleaved doubles which stereotools expects the output of sidechaingate appears to be suitable as input for stereotools without further conversions. Yet stereotools actually only receives a mono frame and therefore overreads its input buffer which leads to segfaults; it can also lead to heap corruption because there can be writes beyond the end of the buffer, too. Fix this by linking the channel layouts of the main input and the output in query_formats and remove the code overwriting it in config_output. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/af_afade: Remove redundant checks and assignmentsAndreas Rheinhardt2021-09-21
| | | | | | | | | The acrossfade filter uses the ff_set_common_* functions in its query_formats(), so that the formats, the sample rates as well as the channel layouts and counts of all links coincide. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* ffmpeg_filter: don't try to autorotate frames with hwaccel pixel formatsJames Almer2021-09-21
| | | | | | | | The transpose, rotate, hflip, and vflip filters don't support them. Fixes ticket #9432. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: James Almer <jamrial@gmail.com>
* configure: arm: Don't add -march= to the compiler if no preference was passedMartin Storsjö2021-09-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If no --cpu= option was passed to configure, we detect what the compiler defaults to. This detected value was then fed back to the rest of the configure logic, as if it was an explicit choice. This breaks on Ubuntu 21.10 with GCC 11.1. Since GCC 8, it's possible to add configure extra features via the -march option, like e.g. -march=armv7-a+neon. If the -mfpu= option is configured to default to 'auto', the fpu setting gets taken from the -march option. GCC 11.1 in Ubuntu seems to be configured to use -mfpu=auto. This has the effect of breaking any compilation command that specifies -march=armv7-a, because the driver implicitly also adds -mfloat-abi=hard, and that combination results in this error: cc1: error: ‘-mfloat-abi=hard’: selected processor lacks an FPU One can compile successfully by passing e.g. -march=armv7-a+fp. Therefore, restructure configure. If no specific preference was set (and the 'cpu' configure variable was set as the output of probe_arm_arch), the value we tried to set via -march= was the same value that we just tried to detect as the compiler default. So instead, just try to detect what the compiler defaults to, with to allow setting other configure settings (such as 'fast_unaligned'), but don't try to spell out the compiler's default via the -march flag. Signed-off-by: Martin Storsjö <martin@martin.st>
* doc/demuxers: fix typo in concatdec optionsrcombs2021-09-21
|
* avcodec/libdav1d: pass auto threads value to libdav1dJames Almer2021-09-20
| | | | | | libdav1d 1.0.0 will be the first version supporting Dav1dSettings.n_threads == 0. Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter/avf_showspectrum: rewrite frequency log axis/bin scalingPaul B Mahol2021-09-20
|
* avcodec/elbg: Keep buffers to avoid allocations and freesAndreas Rheinhardt2021-09-20
| | | | | | | | | | | | | | | | | | | Up until now, each call to avpriv_elbg_do() would result in at least six allocations. And this function is called a lot: A typical FATE run results in 52213653 calls to av_malloc; of these, 34974671 originate from av_malloc_array and from these 34783679 originate from avpriv_elbg_do; the msvideo1 encoder tests are behind most of these. This commit changes this by keeping the buffers and only reallocating them when needed. E.g. for the encoding part of fate-vsynth1-msvideo1 total heap usage went down from 11,407,939 allocs and frees with 468,106,207 bytes allocated to 3,149 allocs and frees with 13,181,847 bytes allocated. The time for one encode2-call went down by 69%. Reviewed-by: Paul B Mahol <onemda@gmail.com> Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/elbg: Move arguments to the context early if possibleAndreas Rheinhardt2021-09-20
| | | | | | | | | This affects all the arguments that don't change during a call to avpriv_elbg_do(); doing so makes it easily recognizable which arguments change upon recursive calls. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/elbg: Add persistent ELBGContextAndreas Rheinhardt2021-09-20
| | | | | | | | It will be used in future commits to avoid having to allocate and free all the buffers used. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/elbg: Rename elbg_data to ELBGContextAndreas Rheinhardt2021-09-20
| | | | | | | | It is in line with our naming conventions for types. Also change numCB to num_cb for the same reason. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/vf_elbg: Rename ELBGContext->ELBGFilterContextAndreas Rheinhardt2021-09-20
| | | | | | | The former name will be used for a context for avpriv_do_elbg(). Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/elbg: Merge avpriv_init_elbg() into avpriv_do_elbg()Andreas Rheinhardt2021-09-20
| | | | | | | | | These functions are always called directly after another with the exact same arguments. This avoids exporting a symbol; it also avoids having to perform two calls for every caller. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/elbg: Move avpriv_init_elbg() downAndreas Rheinhardt2021-09-20
| | | | | | | It will avoid a forward declaration later. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fftools/ffmpeg_opt: Add missing AV_OPT_SEARCH_FAKE_OBJAndreas Rheinhardt2021-09-20
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil/mem: Deprecate av_mallocz_array()Andreas Rheinhardt2021-09-20
| | | | | | | | It does the same as av_calloc(), so one of them should be removed. Given that av_calloc() has the shorter name, it is retained. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* Replace all occurences of av_mallocz_array() by av_calloc()Andreas Rheinhardt2021-09-20
| | | | | | | They do the same. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/opus_silk: Remove wrong size information in function declarationAndreas Rheinhardt2021-09-20
| | | | | | | | | | | | | | | | silk_lsp2poly()'s declaration contained arrays with array sizes; yet these array sizes exceeded the number of actually accessed array elements (which is related to another parameter) and this leads to -Wstringop-overflow= warnings from GCC 11, because the arrays provided by callers are only large enough for the actually used elements. So replace the incorrect array sizes with comments containing the correct array sizes. Given that these sizes are not compile-time constants, they can only be communicated via a comment. Reported by Paul B Mahol. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/avcodec, options_table: Deprecate sub_text_formatAndreas Rheinhardt2021-09-20
| | | | | | | | Unused since 1f63665ca567fbc49fa80166d468a822c2999efa. Found-by: Soft Works <softworkz@hotmail.com> Reviewed-by: Soft Works <softworkz@hotmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/vf_subtitles, fftools/ffmpeg: Don't set sub_text_formatAndreas Rheinhardt2021-09-20
| | | | | | | | | Unnecessary since 1f63665ca567fbc49fa80166d468a822c2999efa, because the value the option is set to coincides with the default value. Found-by: Soft Works <softworkz@hotmail.com> Reviewed-by: Soft Works <softworkz@hotmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil/opt: Simplify av_opt_set_dict2()Andreas Rheinhardt2021-09-20
| | | | | | Make it clearer that the ordinary exit always returns 0. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil/opt: Also warn for deprecated named constantsAndreas Rheinhardt2021-09-20
| | | | | | Intended for the "truncated" AVCodecContext flag. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* Revert "fate: Add test for ticket 6024, truncated decoding mode"Anton Khirnov2021-09-20
| | | | | | | This reverts commit 47cd8effea343e71c4010929ed3fb10dd3dca4b1. AV_CODEC_FLAG_TRUNCATED is now deprecated. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fftools/cmdutils: Don't report AV_CODEC_CAP_TRUNCATEDAndreas Rheinhardt2021-09-20
| | | | | | | It is deprecated. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/(h263|mpeg4?video)_parser: Make *_find_frame_end() staticAndreas Rheinhardt2021-09-20
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavc: deprecate AV_CODEC_(FLAG|CAP)_TRUNCATEDAnton Khirnov2021-09-20
| | | | | | | | | | It is supported only by a few decoders (h263, h263p, mpeg(1|2|)video and mpeg4) and is entirely redundant with parsers. Furthermore, using it leads to missing frames, as flushing the decoder at the end does not work properly. Co-authored-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>