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-03-15avfilter/buffersink: simplify parsing the input channel layout stringJames Almer
And remove a stray comma in the list of supported separators. Signed-off-by: James Almer <jamrial@gmail.com>
2022-03-15avfilter: convert to new channel layout APIJames Almer
Signed-off-by: James Almer <jamrial@gmail.com>
2021-12-03avfilter/buffersink: Remove outdated commentsAndreas Rheinhardt
These lists have size fields since e48ded8551172b58a78f30303a81dfce125344e0. Reviewed-by: Nicolas George <george@nsup.org> 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-05avfilter/avfilter: Remove unused partial_bufAndreas Rheinhardt
It is unused since 02aa0701ae0dc2def8db640c9e3c06dc1b5de70c. The corresponding size field is write-only since then. 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-03-07avfilter/buffersink: Postpone removal of av_[a]buffersink_params_allocAndreas Rheinhardt
They have been deprecated in 61097535cdaa91fea0d62c567b3af02a940f6c2d, yet this was less than two years ago. Removing them will therefore have to wait. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-09lavfi/buffersink: cast to uint64_t before shifting.Nicolas George
Fix CID 1466666.
2020-09-08lavfi/buffersink: remove redundant channel layouts.Nicolas George
The channel_layouts and channel_counts options set what buffersink is supposed to accept. If channel_counts contains 2, then stereo is already accepted, there is no point in having it in channel_layouts too. This was not properly documented until now, so only print a warning.
2019-12-23avfilter/buffersink: deprecate AVBufferSinkParams and AVABufferSinkParamsZhao Zhili
2019-12-23avfilter/buffersink: replace init_opaque by initZhao Zhili
The argument 'opaque' is always NULL since 0acf7e2 (2013), and avfilter_init_filter() was removed in 52067b3c0e (2016).
2019-12-23avfilter/buffersink: remove unused macrosZhao Zhili
2019-10-18avfilter/buffersink: cosmeticsPaul B Mahol
2018-12-09lavfi/buffersink: fix abuffersink flag setting issueJun Zhao
abuffersink need to setting AV_OPT_FLAG_AUDIO_PARAM flag. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2017-01-12lavfi: remove stray semicolons.Nicolas George
Hopefully fix compilation with suncc.
2017-01-12lavfi/buffersink: move to the new design.Nicolas George
2017-01-12lavfi/buffersink: add accessors for the stream properties.Nicolas George
av_buffersink_get_frame_rate() did already exist; its argument becomes const.
2016-12-18lavfi: make filter_frame non-recursive.Nicolas George
A lot of changes happen at the same time: - Add a framequeue fifo to AVFilterLink. - split AVFilterLink.status into status_in and status_out: requires changes to the few filters and programs that use it directly (f_interleave, split, filtfmts). - Add a field ready to AVFilterContext, marking when the filter is ready and its activation priority. - Add flags to mark blocked links. - Change ff_filter_frame() to enqueue the frame. - Change all filtering functions to update the ready field and the blocked flags. - Update ff_filter_graph_run_once() to use the ready field. - buffersrc: always push the frame immediately.
2015-12-22lavfi: make request_frame() non-recursive.Nicolas George
Instead of calling the input filter request_frame() method, ff_request_frame() now marks the link and returns immediately. buffersink is changed to activate the marked filters until a frame is obtained.
2015-12-22lavfi: replace link.closed by link.status.Nicolas George
The status field can carry any error code instead of just EOF. Also only update it through a wrapper function and provide a timestamp. Update the few filters that used it directly.
2015-10-14avfilter/all: propagate errors of functions from avfilter/formatsGanesh Ajjanagadde
Many of the functions from avfilter/formats can return errors, usually AVERROR(ENOMEM). This propagates the return values. All of these were found by using av_warn_unused_result, demonstrating its utility. Tested with FATE. I am least sure of the changes to avfilter/filtergraph, since I don't know what/how reduce_format is intended to behave and how it should react to errors. Fixes: CID 1325680, 1325679, 1325678. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Previous version Reviewed-by: Nicolas George <george@nsup.org> Previous version Reviewed-by: Clément Bœsch <u@pkh.me> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-09-20lavfi/buffersink: loop over ff_request_frame().Nicolas George
Do not assume that ff_request_frame() returning success implies a frame has arrived in the FIFO. Instead, just loop until a frame is in the FIFO. It does not change anything since the same loop is present in ff_request_frame(), confirmed by an assertion.
2015-09-09avfilter/abuffersink: use AV_OPT_TYPE_BOOL for all_channel_counts optionClément Bœsch
2015-09-05Merge commit 'f6974fe651d29ef6eb68d66d73f7b6c011062aa0'Hendrik Leppkes
* commit 'f6974fe651d29ef6eb68d66d73f7b6c011062aa0': lavfi: Drop deprecated AVFilterBuffer* code Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-08-31avfilter: add missing FF_API_AVFILTERBUFFER guardsAndreas Cadhalpun
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-08-28lavfi: Drop deprecated AVFilterBuffer* codeVittorio Giovara
Deprecated in 11/2012.
2015-08-16buffersink: introduce FIFO_INIT_ELEMENT_SIZE to complement FIFO_INIT_SIZEAndreas Cadhalpun
Use sizeof(void *) as its value, because AVFilterBufferRef is deprecated. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-05-17avfilter/buffersink: return EOF if closed link in ↵Michael Niedermayer
av_buffersink_get_frame_flags() Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-20lavfi/buffersink: use av_fifo_alloc_arrayLukasz Marek
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-05-08lavfi: use av_fifo_freepLukasz Marek
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-04-19Merge commit '58400ac133bcfb6bf8196b4e5208bc178307739b'Michael Niedermayer
* commit '58400ac133bcfb6bf8196b4e5208bc178307739b': lavfi: name anonymous structs Conflicts: libavfilter/buffersink.c libavfilter/f_select.c libavfilter/src_movie.c libavfilter/vf_drawbox.c libavfilter/vf_drawtext.c libavfilter/vf_overlay.c libavfilter/vf_showinfo.c libavfilter/vf_unsharp.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-19lavfi: name anonymous structsVittorio Giovara
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-10-09avfilter/buffersink: try to fix AV_NOPTS_VALUEMichael Niedermayer
no testcase available, just found this issue by reading the code Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-03Merge commit '7950e519bb094897f957b9a9531cc60ba46cbc91'Michael Niedermayer
* commit '7950e519bb094897f957b9a9531cc60ba46cbc91': Disable deprecation warnings for cases where a replacement is available Conflicts: libavcodec/avpacket.c libavcodec/pthread.c libavcodec/utils.c libavdevice/v4l2.c libavfilter/avfiltergraph.c libavfilter/buffersrc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-02Disable deprecation warnings for cases where a replacement is availableDiego Biurrun
2013-07-28Merge commit '966689442ed843019dc0722a49bfb0ac51755d19'Michael Niedermayer
* commit '966689442ed843019dc0722a49bfb0ac51755d19': buffersink: K&R formatting cosmetics Conflicts: libavfilter/buffersink.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-27buffersink: K&R formatting cosmeticsDiego Biurrun
2013-07-26lavfi: add attribute_align_arg to all public entry pointsHendrik Leppkes
Previously it was partly only added to central functions called internally, however if GCC would inline these into the public fuction, the alignment attribute would not take effect. Instead, add it to all public entry points to avoid these problems. Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-26lavfi: add attribute_align_arg to all public entry pointsHendrik Leppkes
Previously it was partly only added to central functions called internally, however if GCC would inline these into the public fuction, the alignment attribute would not take effect. Instead, add it to all public entry points to avoid these problems. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-05Merge commit '20c86571ccc71412781d4a4813e4693e0c42aec6'Michael Niedermayer
* commit '20c86571ccc71412781d4a4813e4693e0c42aec6': lavfi: let gcc realign the stack on public graph driving functions Conflicts: libavfilter/buffersink.c libavfilter/buffersrc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-05lavfi: let gcc realign the stack on public graph driving functionsHendrik Leppkes
The functions which actually drive the filter graph by pushing frames through it need to ensure an aligned stack for SIMD functions. This fixes a crash in YADIF filter when using a mingw build in a MSVC application. Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-21lavfi/buffersink: fix possible leaks after allocation failures.Nicolas George
Should fix Coverity CID 1005313, 1005314, 1005315.
2013-04-13lavfi/buffersink: factor checks for lists sizes.Nicolas George
2013-04-12buffersink: remove shorthandMichael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-12lavfi/buffersink: accept parameters as options.Nicolas George
Move validation from init to query_formats(). Accept the formats lists as binary options. Signed-off-by: Nicolas George <nicolas.george@normalesup.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-12lavfi: remove now unused args parameter from AVFilter.init and init_opaqueMichael Niedermayer
This is mostly automated global search and replace The deprecated aconvert filter is disabled, if it still has users it should be updated Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-24buffersink/uninit: use av_frame_free() not unrefMichael Niedermayer
Fixes memleak Signed-off-by: Michael Niedermayer <michaelni@gmx.at>