summaryrefslogtreecommitdiff
path: root/libavfilter/vf_frei0r.c
Commit message (Collapse)AuthorAge
* libavfilter/vf_frei0r.c: Use UTF-8 version of getenv()Nil Admirari2022-06-21
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* avfilter/vf_frei0r: Copy to frame allocated according to frei0r requirementsMichael Niedermayer2022-04-21
| | | | | | | Fixes: issues with non trivial linesize Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter: Replace query_formats callback with union of list and callbackAndreas Rheinhardt2021-10-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* avfilter/frei0r: use win32dlfcn wrapperTimo Rothenpieler2021-09-15
|
* avfilter/avfilter: Add numbers of (in|out)pads directly to AVFilterAndreas Rheinhardt2021-08-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* avfilter: Constify all AVFiltersAndreas Rheinhardt2021-04-27
| | | | | | | 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>
* avfilter/vf_frei0r: add timeline supportPaul B Mahol2021-02-05
|
* avfilter/vf_frei0r: add support for commandsPaul B Mahol2020-11-19
|
* lavfi/frei0r: Remove duplicated pix_fmt entryAndrew Rodland2020-11-16
| | | | | | | | | | | | Fixes e.g. 'ffmpeg -i input.mp4 -vf frei0r=pixeliz0r output.mp4': [Parsed_frei0r_0 @ 0x5585b8093280] Duplicated pixel format Error reinitializing filters! Failed to inject frame into filter network: Invalid argument Error while processing the decoded data for stream #0:0 Conversion failed! Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* lavfi/frei0r: Fix a union member type and remove an unneeded cast.Carl Eugen Hoyos2019-04-25
|
* lavfi/frei0r: Fixes the compilation warningsJun Zhao2019-04-21
| | | | | | | Fixes the compilation warnings Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* avfilter/vf_frei0r: Remove duplicate }, fix buildMichael Niedermayer2018-08-30
| | | | | | | Fixes regression from a3c6b7ff5903b8a044e30edaaa0de00e70517538 Reported-by: qq2225936589 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* frei0r: handle string paramsRaphael Graf2018-08-30
| | | | | | | | | This is needed for some of the frei0r filters (facebl0r and facedetect) which accept string parameters. Fixes the issue described here: http://www.ffmpeg-archive.org/Unable-to-set-ffmpeg-frei0r-facedetect-filter-parameter-td4680190.html Signed-off-by: Raphael Graf <r@undefined.ch>
* Merge commit 'def03d14687b9d089950ba8e45083e666de4eb68'Clément Bœsch2016-06-21
|\ | | | | | | | | | | | | * commit 'def03d14687b9d089950ba8e45083e666de4eb68': vf_frei0r: Drop overly verbose and broken debug output Merged-by: Clément Bœsch <u@pkh.me>
| * vf_frei0r: Drop overly verbose and broken debug outputDiego Biurrun2016-05-04
| |
| * vf_frei0r: also set AVFilterLink.frame_rateMichael Niedermayer2015-11-09
| | | | | | | | | | (cherry picked from ffmpeg commit 353cf95f948ef7c6139c8ead79e9eeb9eb8d2e6e) Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * vf_frei0r: do not increment string if it reached the endVittorio Giovara2014-12-08
| | | | | | | | | | Bug-Id: 778 CC: libav-stable@libav.org
| * vf_frei0r: fix missing end of line characterVittorio Giovara2014-03-04
| | | | | | | | Error introduced in 61b323ce7c7cdc101eadfd7de2203922b8a39e8d.
| * vf_frei0r: refactor library loading from env variableVittorio Giovara2014-03-04
| | | | | | | | strtok_r is not needed any more, so remove it from configure.
* | avfilter: Fix max value of AV_OPT_TYPE_VIDEO_RATEMichael Niedermayer2016-06-09
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avfilter/vf_frei0r: use av_strtod instead of strtod for added flexibilityGanesh Ajjanagadde2015-11-02
| | | | | | | | | | | | | | | | | | This converts the usage of strtod to av_strtod in order to unify and make number parsing more consistent. This also adds support for SI postfixes. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* | avfilter/all: propagate errors of functions from avfilter/formatsGanesh Ajjanagadde2015-10-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | avfilter: handle error in query_formats() in bunch of filtersPaul B Mahol2015-04-08
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | avfilter/vf_frei0r: fix build with DEBUG enabledMichael Niedermayer2015-01-17
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avfilter/vf_frei0r: also set AVFilterLink.frame_rateMichael Niedermayer2015-01-17
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '4e0be9c86f2003dd3ba2eb8fad01e8d0e538075e'Michael Niedermayer2014-03-04
|\| | | | | | | | | | | | | * commit '4e0be9c86f2003dd3ba2eb8fad01e8d0e538075e': vf_frei0r: prevent a segfault when filter parameters are not set Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * vf_frei0r: prevent a segfault when filter parameters are not setVittorio Giovara2014-03-04
| |
* | Merge commit '8accddeb5806cd98e3803b4ddf2a2ef576d0e4d9'Michael Niedermayer2014-03-04
|\| | | | | | | | | | | | | | | | | | | * commit '8accddeb5806cd98e3803b4ddf2a2ef576d0e4d9': vf_frei0r: adjust error messages Conflicts: libavfilter/vf_frei0r.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * vf_frei0r: adjust error messagesVittorio Giovara2014-03-04
| |
* | lavfi/frei0r: factorize plugin loading with static pathMarton Balint2014-02-26
| | | | | | | | | | Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Marton Balint <cus@passwd.hu>
* | lavfi/frei0r: search plugins in lib64 dirs on all architecturesMarton Balint2014-02-26
| | | | | | | | | | | | | | As Reimar Döffinger pointed out there are non-x86 64bit architectures as well. Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Marton Balint <cus@passwd.hu>
* | lavfi/frei0r: load plugins from lib64 folders as well on 64bit buildsMarton Balint2014-02-11
| | | | | | | | | | Signed-off-by: Marton Balint <cus@passwd.hu> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-10-29
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * lavfi: do not export the filters from shared objectsAnton Khirnov2013-10-28
| |
* | avfilter/vf_frei0r: fix out of array readMichael Niedermayer2013-10-04
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avfilter: various cosmeticsPaul B Mahol2013-09-12
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | lavfi/frei0r: use AV_OPT_TYPE_IMAGE_SIZEPaul B Mahol2013-07-26
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | lavfi/frei0r: use AV_OPT_TYPE_VIDEO_RATEPaul B Mahol2013-07-26
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | lavfi/frei0r: make use of AVFILTER_DEFINE_CLASSPaul B Mahol2013-05-27
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | Merge commit 'd371c3c2e2830d9783465ecfe1ab7d93351083b7'Michael Niedermayer2013-05-17
|\| | | | | | | | | | | | | | | | | | | | | | | * commit 'd371c3c2e2830d9783465ecfe1ab7d93351083b7': vf_frei0r: make config_props work properly when called multiple times. vf_gradfun: make config_props work properly when called multiple times. vf_lut: make config_props work properly when called multiple times. Conflicts: libavfilter/vf_lut.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * vf_frei0r: make config_props work properly when called multiple times.Anton Khirnov2013-05-17
| | | | | | | | Do not leak the initialized filter instance.
* | Merge commit 'f6b6d6ac42c0ee427fcd3fae4c398b2103b491b8'Michael Niedermayer2013-05-16
|\| | | | | | | | | | | | | | | | | | | | | | | | | * commit 'f6b6d6ac42c0ee427fcd3fae4c398b2103b491b8': vf_frei0r: use the name 's' for the pointer to the private context vf_format: use the name 's' for the pointer to the private context vf_fieldorder: use the name 's' for the pointer to the private context vf_fieldorder: cosmetics, remove an extra linebreak Conflicts: libavfilter/vf_frei0r.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * vf_frei0r: use the name 's' for the pointer to the private contextAnton Khirnov2013-05-16
| | | | | | | | This is shorter and consistent across filters.
* | Merge commit 'b3ea76624ad1baab0b6bcc13f3f856be2f958110'Michael Niedermayer2013-05-16
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'b3ea76624ad1baab0b6bcc13f3f856be2f958110': vf_aspect: use the name 's' for the pointer to the private context Remove commented-out debug #define cruft Conflicts: libavcodec/4xm.c libavcodec/dvdsubdec.c libavcodec/ituh263dec.c libavcodec/mpeg12.c libavfilter/avfilter.c libavfilter/vf_aspect.c libavfilter/vf_fieldorder.c libavformat/rtmpproto.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Remove commented-out debug #define cruftDiego Biurrun2013-05-16
| |
| * lavfi: remove now unused args parameter from AVFilter.initAnton Khirnov2013-04-09
| |
* | lavfi/frei0r: fix crash when parameters are not set.Clément Bœsch2013-05-03
| |
* | avfilter: add missing AV_OPT_FLAG_FILTERING_PARAMMichael Niedermayer2013-04-12
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavfi: remove now unused args parameter from AVFilter.initAnton Khirnov2013-04-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: libavfilter/avfilter.c libavfilter/vf_drawtext.c libavfilter/vf_lut.c libavfilter/vf_select.c libavfilter/vf_setpts.c libavfilter/vsrc_color.c libavfilter/vsrc_movie.c Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '5aa1a668cfae7f617e1a06efad20f87283badd8a'Michael Niedermayer2013-04-10
|\| | | | | | | | | | | | | | | | | | | | | * commit '5aa1a668cfae7f617e1a06efad20f87283badd8a': vf_frei0r: switch to an AVOptions-based system. Conflicts: doc/filters.texi libavfilter/vf_frei0r.c Merged-by: Michael Niedermayer <michaelni@gmx.at>