mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-20 21:00:41 +08:00
25e187f8494966377a4b9d077260ce7b501a911c
When mapping Vulkan Video frames to DMA-BUF, synchronize using an exportable binary semaphore and sync_fd where supported. Submit a lightweight exec that waits on each plane's timeline semaphore at the current value, signals a SYNC_FD-exportable binary semaphore, then export with vkGetSemaphoreFdKHR. Store that binary semaphore in AVVkFrameInternal and reuse it across maps instead of creating and destroying each time: for VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT, copy transference means a successful vkGetSemaphoreFdKHR unsignals the semaphore like a wait, so it can be signaled again on the next map submit. If export is unavailable, fall back to vkWaitSemaphores. Moved drm_sync_sem destroy to vulkan_free_internal Export dma-buf fds with GetMemoryFdKHR for each populated f->mem[i], iterating up to the sw_format plane count instead of stopping at the image count, so multi-memory bindings are not skipped. Describe DRM layers using max(sw planes, image count) and query subresource layout with the correct aspect and image index when one VkImage backs multiple planes. Reference the source hw_frames_ctx on the mapped frame and close dma-buf fds on failure paths. For DMA-BUF-capable pools, honor VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT from format export queries when binding memory. With DRM modifiers and a video profile in create_pnext, preserve caller usage and image flags instead of overwriting them from generic supported_usage probing; use the modifier list create info when probing export flags for modifier tiling. Include VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR from the output frames context's usage together with DST (fixes VUID-VkVideoBeginCodingInfoKHR-slotIndex-07245) instead of adding DPB usage only when !is_current. In ff_vk_decode_add_slice, pass VkVideoProfileListInfoKHR (from the output frames context's create_pnext) as the pNext argument to ff_vk_get_pooled_buffer instead of the full create_pnext chain. In ff_vk_frame_params, set tiling to OPTIMAL only when it is not already DRM_FORMAT_MODIFIER_EXT. In ff_vk_decode_init, when the output pool's create_pnext includes VkImageDrmFormatModifierListCreateInfoEXT, initialize the DPB pool with that modifier-list pNext and DRM_FORMAT_MODIFIER_EXT tiling; otherwise use VkVideoProfileListInfoKHR and OPTIMAL as before. When VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR is unset, the output and DPB pools cannot use different layouts or tiling, so the DPB pool must match the output pool. Also fix av_hwframe_map ioctl sync_fd export, multi-planar semaphore handling, and related failure-path cleanup. Signed-off-by: Tymur Boiko <tboiko@nvidia.com>
…
FFmpeg README
FFmpeg is a collection of libraries and tools to process multimedia content such as audio, video, subtitles and related metadata.
Libraries
libavcodecprovides implementation of a wider range of codecs.libavformatimplements streaming protocols, container formats and basic I/O access.libavutilincludes hashers, decompressors and miscellaneous utility functions.libavfilterprovides means to alter decoded audio and video through a directed graph of connected filters.libavdeviceprovides an abstraction to access capture and playback devices.libswresampleimplements audio mixing and resampling routines.libswscaleimplements color conversion and scaling routines.
Tools
- ffmpeg is a command line toolbox to manipulate, convert and stream multimedia content.
- ffplay is a minimalistic multimedia player.
- ffprobe is a simple analysis tool to inspect multimedia content.
- Additional small tools such as
aviocat,ismindexandqt-faststart.
Documentation
The offline documentation is available in the doc/ directory.
The online documentation is available in the main website and in the wiki.
Examples
Coding examples are available in the doc/examples directory.
License
FFmpeg codebase is mainly LGPL-licensed with optional components licensed under GPL. Please refer to the LICENSE file for detailed information.
Contributing
Patches should be submitted to the ffmpeg-devel mailing list using
git format-patch or git send-email. Github pull requests should be
avoided because they are not part of our review process and will be ignored.
Description
Languages
C
89.4%
Assembly
8.3%
Makefile
1.3%
C++
0.3%
GLSL
0.2%
Other
0.3%