summaryrefslogtreecommitdiff
path: root/libavfilter
Commit message (Collapse)AuthorAgeFilesLines
* avfilter/vf_showinfo: remove backspacesMichael Niedermayer2022-11-031-4/+7
| | | | | | | | They mess with storing editing and comparing the results Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 31581ae7ee6d007f2f2dcd16de5df991ba7aa1b6) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/vf_scale: overwrite the width and height expressions with the ↵James Almer2022-09-071-10/+10
| | | | | | | | | | | | | | | | | | original values Instead of the potentially adjusted ones. Otherwise, if config_props() is called again and if using force_original_aspect_ratio, the already adjusted values could be altered again. Example command line scale=size=1920x1000:force_original_aspect_ratio=decrease:force_divisible_by=2 user value 1920x1000 -> 1920x798 on init_dict() -> 1918x798 on frame change when eval_mode == EVAL_MODE_INIT, which after e645a1ddb9 could be at the very first frame. Signed-off-by: James Almer <jamrial@gmail.com> (cherry picked from commit d9e3cb7e73c77ccddc4d29ed5c1be3920f72c226)
* avfilter/vf_signature: Fix integer overflow in filter_frame()Michael Niedermayer2022-09-011-2/+2
| | | | | | | | | | Fixes: CID1403233 The second of the 2 changes may be unneeded but will help coverity Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit dd6040675ec18d19429f882caea6bb306ed6677a) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/vf_libplacebo: Match AV_OPT_TYPE_FLOAT to dblMichael Niedermayer2022-09-011-1/+1
| | | | | | | Reviewed-by: "mypopy@gmail.com" <mypopy@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 0a3e121798081f40a377951a8c2a847a629ec7e7) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/vsrc_mandelbrot: Check for malloc failureMichael Niedermayer2022-09-011-0/+3
| | | | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit fbd22504c4148d2a01ccfe38df26c144f56db76b) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/vf_frei0r: Copy to frame allocated according to frei0r requirementsMichael Niedermayer2022-09-011-6/+16
| | | | | | | | | Fixes: issues with non trivial linesize Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit d353909e773ba8a8201fa13d6c35251351dd567a) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/video: Add ff_default_get_video_buffer2() to set specific alignmentMichael Niedermayer2022-09-012-1/+8
| | | | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit d74078270198b97fdda258840f0d501a3ffcc693) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/vf_subtitles: pass storage size to libassOneric2022-04-041-1/+5
| | | | | | | | Due to a quirk of the ASS format some tags depend on the exact storage resolution of the video, so tell libass via ass_set_storage_size. Reviewed-by: Soft Works <softworkz@hotmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* vf_tonemap: Fix order of planesVittorio Giovara2022-01-141-7/+8
| | | | | | | | | | This resulted in a dimmed tonemapping due to bad resulting luma calculation. Found by: Derek Buitenhuis Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com> (cherry picked from commit 7d377558a6c5f7e0592487f38bb76a8b99aada7a)
* avfilter/vpp_qsv: fix regression on older api versions (e.g. 1.11)softworkz2022-01-141-12/+47
| | | | | | | | | | | | | Commit 8b83dad82512a6948b63408f964463b063ad24c9 introduced a regression in a way that scaling via vpp_qsv doesn't work any longer for devices with an MSDK runtime version lower than 1.19. This is true for older CPUs which are stuck at 1.11. The commit added checks for the compile-sdk version but it didn't test for the runtime version. Signed-off-by: softworkz <softworkz@hotmail.com> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com> (cherry picked from commit 479f3c65986fca0ccf56f4dadb5a5b167f466fc7)
* lavfi/vf_libplacebo: fix side data stripping logicNiklas Haas2022-01-101-9/+12
| | | | | | | | | | | | This was accidentally comparing s->colorspace against out->colorspace, which is wrong - the intent was to compare in->colorspace against out->colorspace. We also forgot to strip mastering metadata. Finally, the order is sort of wrong - we should strip this side data *before* process_frames, because otherwise it may end up being seen and used by libplacebo. Signed-off-by: Niklas Haas <git@haasn.dev>
* avfilter/vf_blend: fix un-checked potential memory allocation failureWu Jianhua2022-01-051-1/+5
| | | | Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
* lavfi/libplacebo: support dovi metadata applicationNiklas Haas2022-01-051-3/+32
| | | | | | | | | | | | | libplacebo supports automatic dolby vision application, but it requires us to switch to a new API. Also add some logic to strip the dolby vision metadata from the output frames in any case where we end up changing the colorimetry. The libplacebo dependency bump is justified because neither 184 nor 192 are part of any stable libplacebo release, so users have to build from git anyways for this filter to exist. Signed-off-by: Niklas Haas <git@haasn.dev>
* lavfi/drawutils: re-enable P010 and P016 supportrcombs2022-01-041-2/+0
| | | | These formats now work as expected.
* lavfi/drawutils: overhaul to improve pixel format supportrcombs2022-01-042-63/+48
| | | | | | | | | | | | - No longer mixes u8 and u16 component accesses (this was UB) - De-duplicated 8->16 conversion - De-duplicated component -> plane+offset conversion - De-duplicated planar + packed RGB - No longer calls ff_fill_rgba_map - Removed redundant comp_mask data member - RGB0 and related formats no longer write an alpha value to the 0 byte - Non-planar YA formats now work correctly - High-bit-depth semi-planar YUV now works correctly
* lavfi/drawutils: ensure we don't support formats with non-pixel-sized offsetsrcombs2022-01-041-0/+2
|
* lavfi/drawutils: ensure we can't overflow a componentrcombs2022-01-041-0/+2
|
* lavfi/drawutils: ensure we don't allow mixed-byte-depth formatsrcombs2022-01-041-0/+7
| | | | These could be hazardous because of FFDrawColor's union
* lavfi/drawutils: reimplement ff_fill_rgba_map without hardcoding the listrcombs2022-01-041-42/+39
| | | | | | Same outputs, but computed instead of statically known, so new formats will be supported more easily. Asserts in place to ensure we update this if we add anything incompatible with its logic.
* lavfi/drawutils: reject shift-packed formatsrcombs2022-01-041-0/+3
| | | | Disables x2bgr10/x2rgb10 (which did not behave correctly before).
* lavfi/drawutils: remove redundant BE format checksrcombs2022-01-041-1/+1
| | | | We already explicitly don't support big-endian in general
* lavfi/drawutils: move BE check out of looprcombs2022-01-041-2/+2
|
* lavfi/showinfo: fix printf precision for dovi metadataNiklas Haas2022-01-041-1/+1
| | | | | | | | Fix warning caused by this field changing from uint64_t to uint16_t. Signed-off-by: Niklas Haas <git@haasn.dev> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> (cherry picked from commit 10e4b2b1d243435445ff537cc9e3948b7490eb5b)
* lib*/version.h: Bump Versions before release/5.0 branchAndreas Rheinhardt2022-01-041-1/+1
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavfi/showinfo: Support AV_FRAME_DATA_DOVI_METADATANiklas Haas2022-01-041-0/+108
| | | | | Signed-off-by: Niklas Haas <git@haasn.dev> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* Makefile: Redo duplicating object files in shared buildsAndreas Rheinhardt2022-01-041-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case of shared builds, some object files containing tables are currently duplicated into other libraries: log2_tab.c, golomb.c, reverse.c. The check for whether this is duplicated is simply whether CONFIG_SHARED is true. Yet this is crude: E.g. libavdevice includes reverse.c for shared builds, but only needs it for the decklink input device, which given that decklink is not enabled by default will be unused in most libavdevice.so. This commit changes this by making it more explicit about what to duplicate from other libraries. To do this, two new Makefile variables were added: SHLIBOBJS and STLIBOBJS. SHLIBOBJS contains the objects that are duplicated from other libraries in case of shared builds; STLIBOBJS contains stuff that a library has to provide for other libraries in case of static builds. These new variables provide a way to enable/disable with a finer granularity than just whether shared builds are enabled or not. E.g. lavd's Makefile now contains: SHLIBOBJS-$(CONFIG_DECKLINK_INDEV) += reverse.o Another example is provided by the golomb tables. These are provided by lavc for static builds, even if one uses a build configuration that makes only lavf use them. Therefore lavc's Makefile contains STLIBOBJS-$(CONFIG_MXF_MUXER) += golomb.o, whereas lavf's Makefile has a corresponding SHLIBOBJS-$(CONFIG_MXF_MUXER) += golomb_tab.o. E.g. in case the MXF muxer is the only component needing these tables only libavformat.so will contain them for shared builds; currently libavcodec.so does so, too. (There is currently a CONFIG_EXTRA group for golomb. But actually one would need two groups (golomb_avcodec and golomb_avformat) in order to know when and where to include these tables. Therefore this commit uses a Makefile-based approach for this and stops using these groups for the users in libavformat.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lib*/version.h: Bump Versions after release/5.0 branchMichael Niedermayer2022-01-031-1/+1
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lib*/version.h: Bump Versions before release/5.0 branchMichael Niedermayer2022-01-031-1/+1
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/vf_scale_vulkan: align struct ScaleVulkanContextWu Jianhua2022-01-031-3/+5
| | | | | | | | On 64 bit Operating System, sizeof(ScaleVulkanContext): reduce from 2400 to 2392 on Linux reduce from 2416 to 2408 on Windows Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
* transpose_vulkan: add passthrough optionWu Jianhua2022-01-031-0/+22
| | | | | | | | The following command is on how to apply passthrough option: ffmpeg -init_hw_device vulkan -i input.264 -vf hwupload=extra_hw_frames=16,transpose_vulkan=passthrough=landscape,hwdownload,format=yuv420p output.264 Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
* avfilter: add anlmf filterPaul B Mahol2021-12-254-2/+24
|
* lavfi/metal: fix build with pre-10.11 deployment targetsrcombs2021-12-223-12/+94
| | | | | | | | | | - Ensure the yadif .metal compiles when targeting any Metal runtime version - Use some preprocessor awkwardness to ensure Core Video's Metal-specific functionality is exposed regardless of our deployment target (this works around what seems to be an SDK header bug, filed as FB9816002) - Ensure all direct references to Metal functions and classes are gated behind runtime version checks (this satisfies clang's deployment-target violation warnings provided by -Wunguarded-availability).
* lavfi/metal: fix build on pre-10.15 SDKsrcombs2021-12-221-0/+3
|
* lavfi/metal: don't use braced-include for internal headersrcombs2021-12-222-5/+5
|
* tests/dnn: Make DNN tests regular libavfilter testsAndreas Rheinhardt2021-12-1910-0/+1361
| | | | | | | | | | | | | | | | | They test libavfilter internal API, so they should be libavfilter test programs (which implies: linked statically to libavfilter to access internal APIs and linked normally (statically or dynamically depending upon the build configuration) against all the other libs). Right now, they are always linked statically against all libs, which is a significant size waste compared to shared libs as all of libavcodec has been pulled in despite not being really used. This also leads to linking failures on systems for which av_export_avutil is intended: libavcodec does not expect to be linked statically against the library providing avpriv_(cga|vga16)_font in this case. This is fixed by this commit. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter: add vf_yadif_videotoolboxAman Karmani2021-12-184-0/+680
| | | | | | | | | | | | | | | | | | | | | | | | | | deinterlaces CVPixelBuffers, i.e. AV_PIX_FMT_VIDEOTOOLBOX frames for example, an interlaced mpeg2 video can be decoded by avcodec, uploaded into a CVPixelBuffer, deinterlaced by Metal, and then encoded to h264 by VideoToolbox as follows: ffmpeg \ -init_hw_device videotoolbox \ -i interlaced.ts \ -vf hwupload,yadif_videotoolbox \ -c:v h264_videotoolbox \ -b:v 2000k \ -c:a copy \ -y progressive.ts (note that uploading AVFrame into CVPixelBuffer via hwupload requires 504c60660d3194758823ddd45ceddb86e35d806f) this work is sponsored by Fancy Bits LLC Reviewed-by: Ridley Combs <rcombs@rcombs.me> Reviewed-by: Philip Langdale <philipl@overt.org> Signed-off-by: Aman Karmani <aman@tmm1.net>
* avfilter: add metal utilitiesAman Karmani2021-12-182-0/+108
| | | | | Reviewed-by: Ridley Combs <rcombs@rcombs.me> Signed-off-by: Aman Karmani <aman@tmm1.net>
* avfilter/vf_yadif_cuda: simplify filter definitionAman Karmani2021-12-181-18/+1
| | | | | Signed-off-by: Aman Karmani <aman@tmm1.net> Signed-off-by: Philip Langdale <philipl@overt.org>
* lavfi/vf_libplacebo: update deprecated option nameNiklas Haas2021-12-151-3/+3
| | | | | | | | This was renamed upstream quite a while ago (v3.112.0). Rename the option name as well for consistency (and expand the description just slightly). Signed-off-by: Niklas Haas <git@haasn.dev>
* vf_libplacebo: switch to newer libplacebo helpersNiklas Haas2021-12-151-79/+12
| | | | | | | | | | | | | | | | | Support for mapping/unmapping hardware frames has been added into libplacebo itself, so we can scrap this code in favor of using the new functions. This has the additional benefit of being forwards-compatible as support for more complicated frame-related state management is added to libplacebo (e.g. mapping dolby vision metadata). It's worth pointing out that, technically, this would also allow `vf_libplacebo` to accept, practically unmodified, other frame types (e.g. vaapi or drm), or even software input formats. (Although we still need a vulkan *device* to be available) To keep things simple, though, retain the current restriction to vulkan frames. It's possible we could rethink this in a future commit, but for now I don't want to introduce any more potentially breaking changes.
* avfilter/af_astats: improve options descriptionsLimin Wang2021-12-141-3/+3
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avfilter: add audio dynamic equalizer filterPaul B Mahol2021-12-124-1/+318
|
* avfilter/vf_transpose_vulkan: simplify config_props_output functionWu Jianhua2021-12-101-10/+1
| | | | | | | It's no need to assign outlink here, which has been done in ff_vk_filter_config_output already. Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
* avfilter/vf_transpose_vulkan: add clock and cclock optionWu Jianhua2021-12-101-4/+21
| | | | | | | | | | | | | | | | | | | | | | The following command is on how to apply cclock option: ffmpeg -init_hw_device vulkan -i input.264 -vf \ hwupload=extra_hw_frames=16,transpose_vulkan=dir=cclock,hwdownload,format=yuv420p \ output.264 The following command is on how to apply clock_flip option: ffmpeg -init_hw_device vulkan -i input.264 -vf \ hwupload=extra_hw_frames=16,transpose_vulkan=dir=clock_flip,hwdownload,format=yuv420p \ output.264 The following command is on how to apply clock option: ffmpeg -init_hw_device vulkan -i input.264 -vf \ hwupload=extra_hw_frames=16,transpose_vulkan=dir=clock,hwdownload,format=yuv420p \ output.264 Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
* avfilter: add a transpose_vulkan filterWu Jianhua2021-12-103-0/+318
| | | | | | | | The following command is on how to apply transpose_vulkan filter: ffmpeg -init_hw_device vulkan -i input.264 -vf \ hwupload=extra_hw_frames=16,transpose_vulkan,hwdownload,format=yuv420p output.264 Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
* avfilter/vf_transpose: fix un-checked potential memory allocation failureWu Jianhua2021-12-101-3/+12
| | | | Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
* lavfi/vf_subtitles: stop using deprecated ass_set_aspect_ratio()Anton Khirnov2021-12-071-2/+2
| | | | | It has been deprecated in favor of ass_set_pixel_aspect() since version 0.11.0, roughly ~2014. Even Debian oldoldstable (stretch) has 0.13.
* avfilter: add AVFILTER_FLAG_METADATA_ONLYAnton Khirnov2021-12-0459-26/+113
| | | | | | This flag allows distinguishing between filters that actually modify the data and those that only modify metadata or gather some stream information.
* lavfi/allfilters: move vf_chromaber_vulkan to video sectionAnton Khirnov2021-12-041-1/+1
|
* avfilter/buffersink: Remove outdated commentsAndreas Rheinhardt2021-12-031-5/+5
| | | | | | | | These lists have size fields since e48ded8551172b58a78f30303a81dfce125344e0. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>